[FFmpeg-devel] [PATCH]Set src_range and dst_range from vf_scale

Carl Eugen Hoyos cehoyos at ag.or.at
Mon Aug 31 17:28:12 CEST 2015


Hi!

Attached patch fixes ticket #4812 for Robert, I suspect it 
will not fix all use-cases but maybe it is a good start?

Carl Eugen
-------------- next part --------------
diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c
index a1a19bb..545e2b7 100644
--- a/libavfilter/vf_scale.c
+++ b/libavfilter/vf_scale.c
@@ -374,6 +374,10 @@ 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)
+                av_opt_set_int(*s, "src_range", scale->in_range > 1, 0);
+            if (scale->out_range)
+                av_opt_set_int(*s, "dst_range", scale->out_range > 1, 0);
 
             if (scale->opts) {
                 AVDictionaryEntry *e = NULL;


More information about the ffmpeg-devel mailing list