Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2011-06-05 06:31:36 +0400
committerMichael Niedermayer <michaelni@gmx.at>2011-06-05 06:47:48 +0400
commitba91bf58cd8bab4de55ec31ffcdf6cc71f7e5e42 (patch)
treecaa46f021a037388d4c34f911468ac425be7de40 /libswscale
parentec4207c46ae3f9a1add21dbe3eee124bb2b10eee (diff)
swscale: override the lack of the accurate rounding flag when needed for dither.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale')
-rw-r--r--libswscale/x86/swscale_template.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libswscale/x86/swscale_template.c b/libswscale/x86/swscale_template.c
index ccd40521a7..58c6bdeee4 100644
--- a/libswscale/x86/swscale_template.c
+++ b/libswscale/x86/swscale_template.c
@@ -2366,7 +2366,8 @@ static void RENAME(sws_init_swScale)(SwsContext *c)
default: break;
}
} else {
- c->yuv2yuv1 = RENAME(yuv2yuv1 );
+ int should_dither= isNBPS(c->srcFormat) || is16BPS(c->srcFormat);
+ c->yuv2yuv1 = should_dither ? RENAME(yuv2yuv1_ar ) : RENAME(yuv2yuv1 );
c->yuv2yuvX = RENAME(yuv2yuvX );
switch (c->dstFormat) {
case PIX_FMT_RGB32: c->yuv2packedX = RENAME(yuv2rgb32_X); break;