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

James Zern jzern at google.com
Sat Apr 11 09:16:56 EEST 2020


On Fri, Apr 3, 2020 at 2:10 PM Wang Cao <doubleecao at gmail.com> wrote:
>
> Signed-off-by: Wang Cao <wangcao at google.com>
> ---
>  doc/encoders.texi      | 39 +++++++++++++++++++++++++++++++++++
>  libavcodec/libaomenc.c | 47 ++++++++++++++++++++++++++++++++++++++++++
>  libavcodec/version.h   |  2 +-
>  3 files changed, 87 insertions(+), 1 deletion(-)
>
> diff --git a/doc/encoders.texi b/doc/encoders.texi
> index 18bfe8f2eb..e32fecdca3 100644
> --- a/doc/encoders.texi
> +++ b/doc/encoders.texi

There is some trailing whitespace in this file. Don't forget to run
tools/patcheck / git diff --check.

> [...]
> +
> +enum AOMSuperresModes {
> +    AOM_SUPERRES_MODE_NONE    = 0,
> +    AOM_SUPERRES_MODE_FIXED   = 1,
> +    AOM_SUPERRES_MODE_RANDOM  = 2,
> +    AOM_SUPERRES_MODE_QTHRESH = 3,
> +    AOM_SUPERRES_MODE_AUTO    = 4,
> +    AOM_SUPERRES_MODE_NB
>  };
>

This really could be exposed by the library. Just use constants for
the options, it's dangerous to use the AOM_ namespace should libaom
make similar values public.

> [...]
> +    { "enable-superres", "Enable super-resolution mode", OFFSET(enable_superres), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE},
> +    { "superres-mode",   "Select super-resultion mode", OFFSET(superres_mode), AV_OPT_TYPE_INT, {.i64 = -1}, -1, AOM_SUPERRES_MODE_NB-1, VE, "superres_mode"},

resolution.


More information about the ffmpeg-devel mailing list