[FFmpeg-devel] [PATCH v2] avcodec/amfenc: add smart access video option

Evgeny Pavlov lucenticus at gmail.com
Tue Nov 28 16:18:54 EET 2023


>
>
> Seems like we could template this to avoid the duplication, something like:
>
> #define PER_CODEC_OPTION(name) \
>    (ctx->codec == AV1  ? AMF_VIDEO_ENCODER_AV1_  ## name : \
>     ctx->codec == HEVC ? AMF_VIDEO_ENCODER_HEVC_ ## name : \
>                          AMF_VIDEO_ENCODER_      ## name)
>

Thanks for the suggestion, I've extracted duplicated code to amfenc.c file,
but can't extract the whole smart_access_video option, because there are
some differences between av1 & hevc/h264 encoders while set low latency
mode.
In addition, I've added a more detailed description for SAV option, I hope
it will be enough for understanding.
Here is an updated version of this patch:
https://patchwork.ffmpeg.org/project/ffmpeg/patch/20231128135347.892-2-lucenticus@gmail.com/


More information about the ffmpeg-devel mailing list