On 26/11/2023 14:40, Dmitrii Ovchinnikov wrote:
The code looks significantly duplicated.

This is not moved to amfenc.c since the property has different names
  for different encoders, and many other properties (also common to
different encoders, but with different names) are separated in this way.

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,

- Mark
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to