Mercurial > libavcodec.hg
comparison fraps.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 | 228252c41929 |
children | 66ef3690d108 |
comparison
equal
deleted
inserted
replaced
4363:9b7662fa4905 | 4364:05e932ddaaa9 |
---|---|
136 int64_t sum = 0; | 136 int64_t sum = 0; |
137 uint8_t recode[256]; | 137 uint8_t recode[256]; |
138 | 138 |
139 for(i = 0; i < 256; i++){ | 139 for(i = 0; i < 256; i++){ |
140 s->nodes[i].sym = i; | 140 s->nodes[i].sym = i; |
141 s->nodes[i].count = LE_32(src); | 141 s->nodes[i].count = AV_RL32(src); |
142 s->nodes[i].n0 = -2; | 142 s->nodes[i].n0 = -2; |
143 if(s->nodes[i].count < 0) { | 143 if(s->nodes[i].count < 0) { |
144 av_log(s->avctx, AV_LOG_ERROR, "Symbol count < 0\n"); | 144 av_log(s->avctx, AV_LOG_ERROR, "Symbol count < 0\n"); |
145 return -1; | 145 return -1; |
146 } | 146 } |
213 uint32_t *luma1,*luma2,*cb,*cr; | 213 uint32_t *luma1,*luma2,*cb,*cr; |
214 uint32_t offs[4]; | 214 uint32_t offs[4]; |
215 int i, is_chroma, planes; | 215 int i, is_chroma, planes; |
216 | 216 |
217 | 217 |
218 header = LE_32(buf); | 218 header = AV_RL32(buf); |
219 version = header & 0xff; | 219 version = header & 0xff; |
220 header_size = (header & (1<<30))? 8 : 4; /* bit 30 means pad to 8 bytes */ | 220 header_size = (header & (1<<30))? 8 : 4; /* bit 30 means pad to 8 bytes */ |
221 | 221 |
222 if (version > 2 && version != 4) { | 222 if (version > 2 && version != 4) { |
223 av_log(avctx, AV_LOG_ERROR, | 223 av_log(avctx, AV_LOG_ERROR, |
335 f->key_frame = 0; | 335 f->key_frame = 0; |
336 break; | 336 break; |
337 } | 337 } |
338 f->pict_type = FF_I_TYPE; | 338 f->pict_type = FF_I_TYPE; |
339 f->key_frame = 1; | 339 f->key_frame = 1; |
340 if ((LE_32(buf) != FPS_TAG)||(buf_size < (planes*1024 + 24))) { | 340 if ((AV_RL32(buf) != FPS_TAG)||(buf_size < (planes*1024 + 24))) { |
341 av_log(avctx, AV_LOG_ERROR, "Fraps: error in data stream\n"); | 341 av_log(avctx, AV_LOG_ERROR, "Fraps: error in data stream\n"); |
342 return -1; | 342 return -1; |
343 } | 343 } |
344 for(i = 0; i < planes; i++) { | 344 for(i = 0; i < planes; i++) { |
345 offs[i] = LE_32(buf + 4 + i * 4); | 345 offs[i] = AV_RL32(buf + 4 + i * 4); |
346 if(offs[i] >= buf_size || (i && offs[i] <= offs[i - 1] + 1024)) { | 346 if(offs[i] >= buf_size || (i && offs[i] <= offs[i - 1] + 1024)) { |
347 av_log(avctx, AV_LOG_ERROR, "Fraps: plane %i offset is out of bounds\n", i); | 347 av_log(avctx, AV_LOG_ERROR, "Fraps: plane %i offset is out of bounds\n", i); |
348 return -1; | 348 return -1; |
349 } | 349 } |
350 } | 350 } |