comparison qdrw.c @ 4364:05e932ddaaa9 libavcodec

rename BE/LE_8/16/32 to AV_RL/B_8/16/32
author alex
date Fri, 19 Jan 2007 22:12:59 +0000
parents c8c591fe26f8
children 94301f9f53f7
comparison
equal deleted inserted replaced
4363:9b7662fa4905 4364:05e932ddaaa9
56 p->key_frame= 1; 56 p->key_frame= 1;
57 57
58 outdata = a->pic.data[0]; 58 outdata = a->pic.data[0];
59 59
60 buf += 0x68; /* jump to palette */ 60 buf += 0x68; /* jump to palette */
61 colors = BE_32(buf); 61 colors = AV_RB32(buf);
62 buf += 4; 62 buf += 4;
63 63
64 if(colors < 0 || colors > 256) { 64 if(colors < 0 || colors > 256) {
65 av_log(avctx, AV_LOG_ERROR, "Error color count - %i(0x%X)\n", colors, colors); 65 av_log(avctx, AV_LOG_ERROR, "Error color count - %i(0x%X)\n", colors, colors);
66 return -1; 66 return -1;
67 } 67 }
68 68
69 for (i = 0; i <= colors; i++) { 69 for (i = 0; i <= colors; i++) {
70 unsigned int idx; 70 unsigned int idx;
71 idx = BE_16(buf); /* color index */ 71 idx = AV_RB16(buf); /* color index */
72 buf += 2; 72 buf += 2;
73 73
74 if (idx > 255) { 74 if (idx > 255) {
75 av_log(avctx, AV_LOG_ERROR, "Palette index out of range: %u\n", idx); 75 av_log(avctx, AV_LOG_ERROR, "Palette index out of range: %u\n", idx);
76 buf += 6; 76 buf += 6;
91 uint8_t *out; 91 uint8_t *out;
92 int tsize = 0; 92 int tsize = 0;
93 93
94 /* decode line */ 94 /* decode line */
95 out = outdata; 95 out = outdata;
96 size = BE_16(buf); /* size of packed line */ 96 size = AV_RB16(buf); /* size of packed line */
97 buf += 2; 97 buf += 2;
98 left = size; 98 left = size;
99 next = buf + size; 99 next = buf + size;
100 while (left > 0) { 100 while (left > 0) {
101 code = *buf++; 101 code = *buf++;