[FFmpeg-devel] [PATCH v3] avcodec/libaomenc.c: Add super-resolution options to libaom wrapper

James Zern jzern at google.com
Wed Jul 1 21:37:06 EEST 2020


On Tue, Jun 30, 2020 at 12:44 PM Wang Cao <doubleecao at gmail.com> wrote:
>
> From: Wang Cao <doubleecao at gmail.com>
>
> Signed-off-by: Wang Cao <wangcao at google.com>
> ---
>  doc/encoders.texi      | 36 +++++++++++++++++++++++++++++++++
>  libavcodec/libaomenc.c | 46 ++++++++++++++++++++++++++++++++++++++++++
>  libavcodec/version.h   |  2 +-
>  3 files changed, 83 insertions(+), 1 deletion(-)
>
> [...]
> diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c
> index fe98449fa1..83ccf07fab 100644
> --- a/libavcodec/libaomenc.c
> +++ b/libavcodec/libaomenc.c
> @@ -23,6 +23,7 @@
>   * AV1 encoder support via libaom
>   */
>
> +#include <libavutil/pixfmt.h>

This looks unrelated.

> [...]
> +#if AOM_ENCODER_ABI_VERSION >= 22

Judging by when the enum was added, I think 19 might work.

> +    { "superres-mode", "Select super-resolution mode",                                   OFFSET(superres_mode), AV_OPT_TYPE_INT,   {.i64 = -1},                   -1, AOM_SUPERRES_AUTO, VE, "superres_mode"},
> +    { "none",          "No frame superres allowed",                                      0,                     AV_OPT_TYPE_CONST, {.i64 = AOM_SUPERRES_NONE},    0,  0,                 VE, "superres_mode"},
> +    { "fixed",         "All frames are coded at the specified scale and super-resolved", 0,                     AV_OPT_TYPE_CONST, {.i64 = AOM_SUPERRES_FIXED},   0,  0,                 VE, "superres_mode"},
> +    { "random",        "All frames are coded at a random scale and super-resolved.",     0,                     AV_OPT_TYPE_CONST, {.i64 = AOM_SUPERRES_RANDOM},  0,  0,                 VE, "superres_mode"},
> +    { "qthresh",       "Superres scale for a frame is determined based on q_index",      0,                     AV_OPT_TYPE_CONST, {.i64 = AOM_SUPERRES_QTHRESH}, 0,  0,                 VE, "superres_mode"},
> +    { "auto",          "Automatically select superres for appropriate frames",           0,                     AV_OPT_TYPE_CONST, {.i64 = AOM_SUPERRES_AUTO},    0,  0,                 VE, "superres_mode"},


More information about the ffmpeg-devel mailing list