vf_tonemap: Update hdr metadata with the new peak value
authorVittorio Giovara <vittorio.giovara@gmail.com>
Wed, 25 Jul 2018 15:45:46 +0000 (17:45 +0200)
committerVittorio Giovara <vittorio.giovara@gmail.com>
Mon, 6 Aug 2018 16:35:52 +0000 (18:35 +0200)
Less effective than the approach in vf_tonemap_opencl because there
is no peak detection, but it's still a good idea to implement this.

libavfilter/vf_tonemap.c

index b625329..98a2c4b 100644 (file)
@@ -265,6 +265,8 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
 
     av_frame_free(&in);
 
+    ff_update_hdr_metadata(out, peak);
+
     return ff_filter_frame(outlink, out);
 }