[FFmpeg-devel] [PATCH 1/3] avcodec/libaomenc: Add parameter for avif single image encoding

Vignesh Venkatasubramanian vigneshv at google.com
Thu Feb 17 21:33:46 EET 2022


On Thu, Feb 17, 2022 at 10:09 AM James Zern <jzern at google.com> wrote:
>
> On Wed, Feb 16, 2022 at 9:51 PM Vignesh Venkatasubramanian
> <vigneshv-at-google.com at ffmpeg.org> wrote:
> >
> > Add a parameter to libaom-av1 encoder to enforce some of the single
> > image constraints in the AV1 encoder. Setting this flag will limit
> > the encoder to producing exactly one frame and the sequence header
> > that is produced by the encoder will be conformant to the AVIF
> > specification [1].
> >
> > Part of Fixing Trac ticket #7621
> >
> > [1] https://aomediacodec.github.io/av1-avif
> >
> > Signed-off-by:: Vignesh Venkatasubramanian <vigneshv at google.com>
> > ---
> >  libavcodec/libaomenc.c | 14 ++++++++++++++
> >  1 file changed, 14 insertions(+)
> >
> > [...]
> > @@ -1290,6 +1303,7 @@ static const AVOption options[] = {
> >      { "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"},
> >      FF_AV1_PROFILE_OPTS
> > +    { "avif-image", "Encode in single frame mode for still AVIF images.", OFFSET(is_avif), AV_OPT_TYPE_BOOL, {.i64 = -1}, -1, 1, VE },
>
> Can this instead be mapped to something that can be sent via aom-params?


>From what i understand, aom-params can only be used to set key-value
pairs that are set using the aom_codec_set_option() function call. For
single image AVIF encodes, we are modifying some of the
aom_codec_enc_cfg entries. There is no way to do that in a generic way
other than to introduce a specific option like this.

-- 
Vignesh


More information about the ffmpeg-devel mailing list