Mercurial > libavcodec.hg
comparison r210dec.c @ 10694:d17c26774897 libavcodec
Swap red and blue when decoding r210.
author | cehoyos |
---|---|
date | Fri, 18 Dec 2009 10:42:26 +0000 |
parents | 0aec5a890b83 |
children | 8a4984c5cacc |
comparison
equal
deleted
inserted
replaced
10693:0aec5a890b83 | 10694:d17c26774897 |
---|---|
61 for (h = 0; h < avctx->height; h++) { | 61 for (h = 0; h < avctx->height; h++) { |
62 uint16_t *dst = (uint16_t *)dst_line; | 62 uint16_t *dst = (uint16_t *)dst_line; |
63 for (w = 0; w < avctx->width; w++) { | 63 for (w = 0; w < avctx->width; w++) { |
64 uint32_t pixel = be2me_32(*src++); | 64 uint32_t pixel = be2me_32(*src++); |
65 uint16_t r, g, b; | 65 uint16_t r, g, b; |
66 r = pixel << 6; | 66 b = pixel << 6; |
67 g = (pixel >> 4) & 0xffc0; | 67 g = (pixel >> 4) & 0xffc0; |
68 b = (pixel >> 14) & 0xffc0; | 68 r = (pixel >> 14) & 0xffc0; |
69 *dst++ = r | (r >> 10); | 69 *dst++ = r | (r >> 10); |
70 *dst++ = g | (g >> 10); | 70 *dst++ = g | (g >> 10); |
71 *dst++ = b | (b >> 10); | 71 *dst++ = b | (b >> 10); |
72 } | 72 } |
73 src += aligned_width - avctx->width; | 73 src += aligned_width - avctx->width; |