comparison v210dec.c @ 9630:ef0cf18b192d libavcodec

add casts to silence gcc warnings
author bcoudurier
date Wed, 13 May 2009 00:27:11 +0000
parents 4b6766057548
children 4f974b8d8851
comparison
equal deleted inserted replaced
9629:3c98f3e1b719 9630:ef0cf18b192d
59 59
60 pic->reference = 0; 60 pic->reference = 0;
61 if (avctx->get_buffer(avctx, pic) < 0) 61 if (avctx->get_buffer(avctx, pic) < 0)
62 return -1; 62 return -1;
63 63
64 y = pic->data[0]; 64 y = (uint16_t*)pic->data[0];
65 u = pic->data[1]; 65 u = (uint16_t*)pic->data[1];
66 v = pic->data[2]; 66 v = (uint16_t*)pic->data[2];
67 pic->pict_type = FF_I_TYPE; 67 pic->pict_type = FF_I_TYPE;
68 pic->key_frame = 1; 68 pic->key_frame = 1;
69 69
70 #define READ_PIXELS(a, b, c) \ 70 #define READ_PIXELS(a, b, c) \
71 do { \ 71 do { \
74 *b++ = (val >> 4) & 0xFFC0; \ 74 *b++ = (val >> 4) & 0xFFC0; \
75 *c++ = (val >> 14) & 0xFFC0; \ 75 *c++ = (val >> 14) & 0xFFC0; \
76 } while (0); 76 } while (0);
77 77
78 for (h = 0; h < avctx->height; h++) { 78 for (h = 0; h < avctx->height; h++) {
79 const uint32_t *src = psrc; 79 const uint32_t *src = (const uint32_t*)psrc;
80 uint32_t val; 80 uint32_t val;
81 for (w = 0; w < avctx->width - 5; w += 6) { 81 for (w = 0; w < avctx->width - 5; w += 6) {
82 READ_PIXELS(u, y, v); 82 READ_PIXELS(u, y, v);
83 READ_PIXELS(y, u, y); 83 READ_PIXELS(y, u, y);
84 READ_PIXELS(v, y, u); 84 READ_PIXELS(v, y, u);