iff: K&R formatting cosmetics

This commit is contained in:
Luca Barbato
2013-06-29 07:05:54 +02:00
parent 4ecdb5ed44
commit 3865ba7b21

View File

@@ -133,16 +133,14 @@ static int cmap_read_palette(AVCodecContext *avctx, uint32_t *pal)
// If extradata is smaller than actually needed, fill the remaining with black.
count = FFMIN(avctx->extradata_size / 3, count);
if (count) {
for (i=0; i < count; i++) {
for (i = 0; i < count; i++)
pal[i] = 0xFF000000 | AV_RB24(avctx->extradata + i * 3);
}
} else { // Create gray-scale color palette for bps < 8
count = 1 << avctx->bits_per_coded_sample;
for (i=0; i < count; i++) {
for (i = 0; i < count; i++)
pal[i] = 0xFF000000 | gray2rgb((i * 255) >> avctx->bits_per_coded_sample);
}
}
return 0;
}
@@ -225,7 +223,8 @@ static void decodeplane32(uint32_t *dst, const uint8_t *buf, int buf_size, int p
* @return number of consumed bytes in byterun1 compressed bitstream
*/
static int decode_byterun(uint8_t *dst, int dst_size,
const uint8_t *buf, const uint8_t *const buf_end) {
const uint8_t *buf, const uint8_t *const buf_end)
{
const uint8_t *const buf_start = buf;
unsigned x;
for (x = 0; x < dst_size && buf < buf_end;) {
@@ -271,7 +270,8 @@ static int decode_frame_ilbm(AVCodecContext *avctx,
for (y = 0; y < avctx->height; y++) {
uint8_t *row = &s->frame.data[0][y * s->frame.linesize[0]];
memset(row, 0, avctx->width);
for (plane = 0; plane < avctx->bits_per_coded_sample && buf < buf_end; plane++) {
for (plane = 0; plane < avctx->bits_per_coded_sample && buf < buf_end;
plane++) {
decodeplane8(row, buf, FFMIN(s->planesize, buf_end - buf), plane);
buf += s->planesize;
}
@@ -280,8 +280,10 @@ static int decode_frame_ilbm(AVCodecContext *avctx,
for (y = 0; y < avctx->height; y++) {
uint8_t *row = &s->frame.data[0][y * s->frame.linesize[0]];
memset(row, 0, avctx->width << 2);
for (plane = 0; plane < avctx->bits_per_coded_sample && buf < buf_end; plane++) {
decodeplane32((uint32_t *) row, buf, FFMIN(s->planesize, buf_end - buf), plane);
for (plane = 0; plane < avctx->bits_per_coded_sample && buf < buf_end;
plane++) {
decodeplane32((uint32_t *)row, buf,
FFMIN(s->planesize, buf_end - buf), plane);
buf += s->planesize;
}
}