[FFmpeg-devel] [PATCH] avcodec/libaomenc: Expose the allintra usage mode

James Zern jzern at google.com
Tue May 17 22:42:29 EEST 2022


On Tue, May 17, 2022 at 11:24 AM Vignesh Venkatasubramanian
<vigneshv-at-google.com at ffmpeg.org> wrote:
>
> libaom added an usage=allintra mode for doing better with still
> images. Expose that in the ffmpeg's wrapper. This is especially
> useful for encoding still AVIF images.
>
> Signed-off-by: Vignesh Venkatasubramanian <vigneshv at google.com>
> ---
>  libavcodec/libaomenc.c | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>

lgtm. It seems this was never documented in encoders.texi:
http://ffmpeg.org/ffmpeg-codecs.html#libaom_002dav1

> diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c
> index 0411773bbf..7a601c120e 100644
> --- a/libavcodec/libaomenc.c
> +++ b/libavcodec/libaomenc.c
> @@ -1298,8 +1298,11 @@ static const AVOption options[] = {
>      { "enable-intrabc",  "Enable intra block copy prediction mode", OFFSET(enable_intrabc), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
>      { "enable-restoration", "Enable Loop Restoration filtering", OFFSET(enable_restoration), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
>      { "usage",           "Quality and compression efficiency vs speed trade-off", OFFSET(usage), AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, VE, "usage"},
> -    { "good",            "Good quality",      0, AV_OPT_TYPE_CONST, {.i64 = 0 /* AOM_USAGE_GOOD_QUALITY */}, 0, 0, VE, "usage"},
> -    { "realtime",        "Realtime encoding", 0, AV_OPT_TYPE_CONST, {.i64 = 1 /* AOM_USAGE_REALTIME */},     0, 0, VE, "usage"},
> +    { "good",            "Good quality",       0, AV_OPT_TYPE_CONST, {.i64 = 0 /* AOM_USAGE_GOOD_QUALITY */}, 0, 0, VE, "usage"},
> +    { "realtime",        "Realtime encoding",  0, AV_OPT_TYPE_CONST, {.i64 = 1 /* AOM_USAGE_REALTIME */},     0, 0, VE, "usage"},
> +#ifdef AOM_USAGE_ALL_INTRA
> +    { "allintra",        "All Intra encoding", 0, AV_OPT_TYPE_CONST, {.i64 = 2 /* AOM_USAGE_ALL_INTRA */},    0, 0, VE, "usage"},
> +#endif
>      { "tune",            "The metric that the encoder tunes for. Automatically chosen by the encoder by default", OFFSET(tune), AV_OPT_TYPE_INT, {.i64 = -1}, -1, AOM_TUNE_SSIM, VE, "tune"},
>      { "psnr",            NULL,         0, AV_OPT_TYPE_CONST, {.i64 = AOM_TUNE_PSNR}, 0, 0, VE, "tune"},
>      { "ssim",            NULL,         0, AV_OPT_TYPE_CONST, {.i64 = AOM_TUNE_SSIM}, 0, 0, VE, "tune"},
> --
> 2.36.0.550.gb090851708-goog
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".


More information about the ffmpeg-devel mailing list