[FFmpeg-devel] [PATCH 1/2] vf_colorspace: Interpret unspecified color range as limited range

Vittorio Giovara vittorio.giovara at gmail.com
Thu Sep 15 00:09:02 EEST 2016


This is the assumption that is made in pixel format conversion do
throughout the code (in particular swscale and vf_colormatrix).

Signed-off-by: Vittorio Giovara <vittorio.giovara at gmail.com>
---
 libavfilter/vf_colorspace.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/libavfilter/vf_colorspace.c b/libavfilter/vf_colorspace.c
index b9ecb5f..7e87cd8 100644
--- a/libavfilter/vf_colorspace.c
+++ b/libavfilter/vf_colorspace.c
@@ -522,6 +522,7 @@ static int get_range_off(int *off, int *y_rng, int *uv_rng,
                          enum AVColorRange rng, int depth)
 {
     switch (rng) {
+    case AVCOL_RANGE_UNSPECIFIED:
     case AVCOL_RANGE_MPEG:
         *off = 16 << (depth - 8);
         *y_rng = 219 << (depth - 8);
-- 
2.9.3



More information about the ffmpeg-devel mailing list