[FFmpeg-devel] [PATCH] avcodec/libvpxenc: add VP8/9 sharpness config option

James Zern jzern at google.com
Wed Dec 19 21:01:40 EET 2018


On Wed, Dec 19, 2018 at 10:24 AM Rene Claus
<rclaus-at-google.com at ffmpeg.org> wrote:
>
> This commit adds configuration options to libvpxenc.c that can be used to
> tune the sharpness parameter of the loop filter for VP8 and VP9.
>
> Signed-off-by: Rene Claus <rclaus at google.com>
> ---
>  doc/encoders.texi      | 4 ++++
>  libavcodec/libvpxenc.c | 5 +++++
>  2 files changed, 9 insertions(+)
>
> diff --git a/doc/encoders.texi b/doc/encoders.texi
> index ca3892d682..4d06bbe4bf 100644
> --- a/doc/encoders.texi
> +++ b/doc/encoders.texi
> @@ -1767,6 +1767,10 @@ Set number of frames to look ahead for frametype and ratecontrol.
>  @item error-resilient
>  Enable error resiliency features.
>
> + at item sharpness @var{integer}
> +Set loop filter sharpness.

The behavior has changed in VP9 post-1.7.0, it still affects sharpness
but doesn't manipulate the loop filter. The documentation and vpxenc
output weren't updated unfortunately. There should be a change going
upstream to correct this, you can pick up that when it lands.

> [...]
>
> @@ -1251,6 +1255,7 @@ static const AVOption vp9_options[] = {
>  #ifdef VPX_CTRL_VP9E_SET_TPL
>      { "enable-tpl",      "Enable temporal dependency model", OFFSET(tpl_model), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE },
>  #endif
> +    { "sharpness",       "Sharpness", OFFSET(sharpness), AV_OPT_TYPE_INT, {.i64 = 0}, 0, 7, VE},

This should be moved to COMMON_OPTIONS so it can be used with VP8.


More information about the ffmpeg-devel mailing list