avfilter/vf_scale: If no output color matrix is specified, use the input
authorMichael Niedermayer <michael@niedermayer.cc>
Sun, 30 Aug 2015 22:17:50 +0000 (00:17 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sun, 30 Aug 2015 23:33:05 +0000 (01:33 +0200)
This should only affect yuv->yuv, and not change behavior

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavfilter/vf_scale.c

index 01f0020..89a80ee 100644 (file)
@@ -535,6 +535,8 @@ static int filter_frame(AVFilterLink *link, AVFrame *in)
             inv_table = parse_yuv_type(scale->in_color_matrix, av_frame_get_colorspace(in));
         if (scale->out_color_matrix)
             table     = parse_yuv_type(scale->out_color_matrix, AVCOL_SPC_UNSPECIFIED);
+        else if (scale->in_color_matrix)
+            table = inv_table;
 
         if (scale-> in_range != AVCOL_RANGE_UNSPECIFIED)
             in_full  = (scale-> in_range == AVCOL_RANGE_JPEG);