aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/r210dec.c
diff options
context:
space:
mode:
authorCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2009-12-18 10:42:26 +0000
committerCarl Eugen Hoyos <cehoyos@rainbow.studorg.tuwien.ac.at>2009-12-18 10:42:26 +0000
commit646eb55139ce6cad08d6f2d1dd07c28ee73a861e (patch)
tree2916424d7ad41651f0eb2085e142742f1fb199cf /libavcodec/r210dec.c
parent2c2a167ca700d2e0b6c8121f0b6165ed00129526 (diff)
downloadffmpeg-646eb55139ce6cad08d6f2d1dd07c28ee73a861e.tar.gz
Swap red and blue when decoding r210.
Originally committed as revision 20893 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/r210dec.c')
-rw-r--r--libavcodec/r210dec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/r210dec.c b/libavcodec/r210dec.c
index 94edb169ae..0b100e5f7d 100644
--- a/libavcodec/r210dec.c
+++ b/libavcodec/r210dec.c
@@ -63,9 +63,9 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size,
for (w = 0; w < avctx->width; w++) {
uint32_t pixel = be2me_32(*src++);
uint16_t r, g, b;
- r = pixel << 6;
+ b = pixel << 6;
g = (pixel >> 4) & 0xffc0;
- b = (pixel >> 14) & 0xffc0;
+ r = (pixel >> 14) & 0xffc0;
*dst++ = r | (r >> 10);
*dst++ = g | (g >> 10);
*dst++ = b | (b >> 10);