[FFmpeg-cvslog] avfilter/vf_scale: set proper out frame color range

Thomas Mundt git at videolan.org
Fri Jan 15 17:51:11 CET 2016


ffmpeg | branch: release/2.5 | Thomas Mundt <loudmax at yahoo.de> | Thu Dec 31 00:01:21 2015 +0100| [53025e8681c141883662ab9882ac2f7769c6ed4d] | committer: Michael Niedermayer

avfilter/vf_scale: set proper out frame color range

Prevents that following scalers in the filter chain will do unintentional color range conversions.
Fixes Ticket #5096

Signed-off-by: Thomas Mundt <loudmax at yahoo.de>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 73ce8162f3499cf0e86d1d80dea53324bd62bcb3)

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=53025e8681c141883662ab9882ac2f7769c6ed4d
---

 libavfilter/vf_scale.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
index 64b88c2..237f3b8 100644
--- a/libavfilter/vf_scale.c
+++ b/libavfilter/vf_scale.c
@@ -512,6 +512,8 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
             sws_setColorspaceDetails(scale->isws[1], inv_table, in_full,
                                      table, out_full,
                                      brightness, contrast, saturation);
+
+        av_frame_set_color_range(out, out_full ? AVCOL_RANGE_JPEG : AVCOL_RANGE_MPEG);
     }
 
     av_reduce(&out->sample_aspect_ratio.num, &out->sample_aspect_ratio.den,



More information about the ffmpeg-cvslog mailing list