diff options
author | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2015-09-01 09:17:26 +0200 |
---|---|---|
committer | Carl Eugen Hoyos <cehoyos@ag.or.at> | 2015-09-01 09:17:26 +0200 |
commit | 0cb6c0ec488e324443b49b36f1224d3e5af420c4 (patch) | |
tree | b22e273fc84b14b8fc9702a05d77d667031ceb65 /libavfilter/vf_scale.c | |
parent | 555f513769ecfa1449c6fcbb8cd51de7cae3efb1 (diff) | |
download | ffmpeg-0cb6c0ec488e324443b49b36f1224d3e5af420c4.tar.gz |
lavfi/scale: Pass src_range and dst_range to libswscale.
Fixes ticket #4812.
Diffstat (limited to 'libavfilter/vf_scale.c')
-rw-r--r-- | libavfilter/vf_scale.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index a1a19bb63f..a40b392c65 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -374,6 +374,12 @@ static int config_props(AVFilterLink *outlink) av_opt_set_int(*s, "sws_flags", scale->flags, 0); av_opt_set_int(*s, "param0", scale->param[0], 0); av_opt_set_int(*s, "param1", scale->param[1], 0); + if (scale->in_range != AVCOL_RANGE_UNSPECIFIED) + av_opt_set_int(*s, "src_range", + scale->in_range == AVCOL_RANGE_JPEG, 0); + if (scale->out_range != AVCOL_RANGE_UNSPECIFIED) + av_opt_set_int(*s, "dst_range", + scale->out_range == AVCOL_RANGE_JPEG, 0); if (scale->opts) { AVDictionaryEntry *e = NULL; |