aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-07-27 01:11:37 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-07-27 01:11:37 +0200
commit8efe96ee6f3f69dd9413dec311232eced9c027ec (patch)
tree50626db0fe8c00f9c9e08b88d5b2b2b48bc4016c
parentf3f4e133d6a052f8223c237e043f048bc8f9b4af (diff)
downloadffmpeg-8efe96ee6f3f69dd9413dec311232eced9c027ec.tar.gz
swscale/fill_rgb2yuv_table: fix default detection
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libswscale/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libswscale/utils.c b/libswscale/utils.c
index cff0ad8cb9..8fbde7fb0a 100644
--- a/libswscale/utils.c
+++ b/libswscale/utils.c
@@ -904,7 +904,7 @@ static void fill_rgb2yuv_table(SwsContext *c, const int table[4], int dstRange)
c->input_rgb2yuv_table[GV_IDX] = -ROUNDED_DIV((1 << RGB2YUV_SHIFT)*ONE*ONE , Cv);
c->input_rgb2yuv_table[BV_IDX] = ROUNDED_DIV((1 << RGB2YUV_SHIFT)*W , Cv);
- if(/*!dstRange && */table == ff_yuv2rgb_coeffs[SWS_CS_DEFAULT]) {
+ if(/*!dstRange && */!memcmp(table, ff_yuv2rgb_coeffs[SWS_CS_DEFAULT], sizeof(ff_yuv2rgb_coeffs[SWS_CS_DEFAULT]))) {
c->input_rgb2yuv_table[BY_IDX] = ((int)(0.114 * 219 / 255 * (1 << RGB2YUV_SHIFT) + 0.5));
c->input_rgb2yuv_table[BV_IDX] = (-(int)(0.081 * 224 / 255 * (1 << RGB2YUV_SHIFT) + 0.5));
c->input_rgb2yuv_table[BU_IDX] = ((int)(0.500 * 224 / 255 * (1 << RGB2YUV_SHIFT) + 0.5));