mirror of https://git.ffmpeg.org/ffmpeg.git
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@yahoo.de>
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 73ce8162f3
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
2c58d73413
commit
2f6d3459d9
|
@ -526,6 +526,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,
|
||||
|
|
Loading…
Reference in New Issue