Message ID | 20230630115132.142593-1-haihao.xiang@intel.com |
---|---|
State | Accepted |
Commit | ca939ebb4faf6aac343c22702e2f28e3eeed1ba1 |
Headers | show |
Series | [FFmpeg-devel] lavfi/tonemap_vaapi: remove HDR metadata | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
On Vr, 2023-06-30 at 19:51 +0800, Xiang, Haihao wrote: > From: Haihao Xiang <haihao.xiang@intel.com> > > The HDR metadata should be removed after HDR to SDR conversion, > otherwise the output frame still has HDR side data. > > Signed-off-by: Haihao Xiang <haihao.xiang@intel.com> > --- > libavfilter/vf_tonemap_vaapi.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/libavfilter/vf_tonemap_vaapi.c b/libavfilter/vf_tonemap_vaapi.c > index cd2f4c2195..52303a8b86 100644 > --- a/libavfilter/vf_tonemap_vaapi.c > +++ b/libavfilter/vf_tonemap_vaapi.c > @@ -309,6 +309,9 @@ static int tonemap_vaapi_filter_frame(AVFilterLink > *inlink, AVFrame *input_frame > av_get_pix_fmt_name(output_frame->format), > output_frame->width, output_frame->height, output_frame->pts); > > + av_frame_remove_side_data(output_frame, > AV_FRAME_DATA_CONTENT_LIGHT_LEVEL); > + av_frame_remove_side_data(output_frame, > AV_FRAME_DATA_MASTERING_DISPLAY_METADATA); > + > return ff_filter_frame(outlink, output_frame); > > fail: Will apply, -Haihao
diff --git a/libavfilter/vf_tonemap_vaapi.c b/libavfilter/vf_tonemap_vaapi.c index cd2f4c2195..52303a8b86 100644 --- a/libavfilter/vf_tonemap_vaapi.c +++ b/libavfilter/vf_tonemap_vaapi.c @@ -309,6 +309,9 @@ static int tonemap_vaapi_filter_frame(AVFilterLink *inlink, AVFrame *input_frame av_get_pix_fmt_name(output_frame->format), output_frame->width, output_frame->height, output_frame->pts); + av_frame_remove_side_data(output_frame, AV_FRAME_DATA_CONTENT_LIGHT_LEVEL); + av_frame_remove_side_data(output_frame, AV_FRAME_DATA_MASTERING_DISPLAY_METADATA); + return ff_filter_frame(outlink, output_frame); fail: