From 67572963864b4da79432783461c43992f5fc9bad Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Wed, 3 Dec 2014 10:14:34 +0100 Subject: [PATCH] video-converter: only do dithering when needed Only do dithering when one of the quantizers is > 1. --- gst-libs/gst/video/video-converter.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gst-libs/gst/video/video-converter.c b/gst-libs/gst/video/video-converter.c index d15cabc77c..90a019075b 100644 --- a/gst-libs/gst/video/video-converter.c +++ b/gst-libs/gst/video/video-converter.c @@ -1466,10 +1466,11 @@ chain_dither (GstVideoConverter * convert, GstLineCache * prev) flags |= GST_VIDEO_DITHER_FLAG_QUANTIZE; quant[i] = target_quant; } - do_dither = TRUE; } else { quant[i] = 0; } + if (quant[i] > 1) + do_dither = TRUE; } }