[FFmpeg-devel] [PATCH] avfilter/vf_scale: set the RGB matrix coefficients in case of RGB

Jan Ekström jeebjp at gmail.com
Sun Aug 29 22:05:02 EEST 2021


On Sun, Aug 29, 2021 at 9:21 PM Paul B Mahol <onemda at gmail.com> wrote:
>
> probably fine if fate passes

Yea, FATE passes :) . I think this stuff not being noticed until now
is due to nothing checking the metadata values returned by vf_scale
(since pix_fmt and actual logic is not changed at all with these
output AVFrame metadata changes):
- The first fix I did was for RGB->YCbCr still being flagged as RGB
(and thus encoders like the libx264 wrapper would gladly comply,
leading to bugs like issue #9132 )
- This one fixes the opposite conversion where your YCbCr input has
matrix coefficients configured, and the RGB output still has that
value as-is from the av_frame_copy_props call (and once again, encoder
complies).

Jan


More information about the ffmpeg-devel mailing list