diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-26 19:50:28 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-26 20:40:44 +0100 |
commit | 02001a372de6e07a51d1772accc7c7b27f2af7ae (patch) | |
tree | d5558d83d669189aa2c8e9fdcdb18cf261562182 /libswscale/input.c | |
parent | 3c2ecfcc24761adc67e49888cce08f8a6fddfbb4 (diff) | |
download | ffmpeg-02001a372de6e07a51d1772accc7c7b27f2af7ae.tar.gz |
sws: add planar RGB formats to isAnyRGB
We have to make some symetric changes elsewhere as this increases
the precission with which samples are stored.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale/input.c')
-rw-r--r-- | libswscale/input.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libswscale/input.c b/libswscale/input.c index d3aeb22151..2def2de6c8 100644 --- a/libswscale/input.c +++ b/libswscale/input.c @@ -729,7 +729,7 @@ static av_always_inline void planar_rgb16_to_y(uint8_t *_dst, const uint8_t *_sr int b = rdpx(src[1] + i); int r = rdpx(src[2] + i); - dst[i] = ((RY * r + GY * g + BY * b + (33 << (RGB2YUV_SHIFT + bpc - 9))) >> RGB2YUV_SHIFT); + dst[i] = ((RY * r + GY * g + BY * b + (33 << (RGB2YUV_SHIFT + bpc - 9))) >> (RGB2YUV_SHIFT + bpc - 14)); } } @@ -796,8 +796,8 @@ static av_always_inline void planar_rgb16_to_uv(uint8_t *_dstU, uint8_t *_dstV, int b = rdpx(src[1] + i); int r = rdpx(src[2] + i); - dstU[i] = (RU * r + GU * g + BU * b + (257 << (RGB2YUV_SHIFT + bpc - 9))) >> RGB2YUV_SHIFT; - dstV[i] = (RV * r + GV * g + BV * b + (257 << (RGB2YUV_SHIFT + bpc - 9))) >> RGB2YUV_SHIFT; + dstU[i] = (RU * r + GU * g + BU * b + (257 << (RGB2YUV_SHIFT + bpc - 9))) >> (RGB2YUV_SHIFT + bpc - 14); + dstV[i] = (RV * r + GV * g + BV * b + (257 << (RGB2YUV_SHIFT + bpc - 9))) >> (RGB2YUV_SHIFT + bpc - 14); } } #undef rdpx |