Merge commit '3865ba7b21aef5d60183719e238361ec8797ab5a'

* commit '3865ba7b21aef5d60183719e238361ec8797ab5a':
  iff: K&R formatting cosmetics

Conflicts:
	libavcodec/iff.c

Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-07-11 11:12:48 +02:00
commit 56090b5b80

View File

@ -155,9 +155,8 @@ static int cmap_read_palette(AVCodecContext *avctx, uint32_t *pal)
// If extradata is smaller than actually needed, fill the remaining with black.
count = FFMIN(palette_size / 3, count);
if (count) {
for (i=0; i < count; i++) {
for (i = 0; i < count; i++)
pal[i] = 0xFF000000 | AV_RB24(palette + i*3);
}
if (s->flags && count >= 32) { // EHB
for (i = 0; i < 32; i++)
pal[i + 32] = 0xFF000000 | (AV_RB24(palette + i*3) & 0xFEFEFE) >> 1;
@ -166,10 +165,9 @@ static int cmap_read_palette(AVCodecContext *avctx, uint32_t *pal)
} 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);
}
}
if (s->masking == MASK_HAS_MASK) {
memcpy(pal + (1 << avctx->bits_per_coded_sample), pal, count * 4);
for (i = 0; i < count; i++)
@ -468,7 +466,8 @@ static void lookup_pal_indicies(uint32_t *dst, const uint32_t *buf,
* @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;) {
@ -741,7 +740,8 @@ static int decode_frame(AVCodecContext *avctx,
uint8_t *row = &s->frame->data[0][y * s->frame->linesize[0]];
memset(row, 0, avctx->width << 2);
for (plane = 0; plane < s->bpp && buf < buf_end; plane++) {
decodeplane32((uint32_t *) row, buf, FFMIN(s->planesize, buf_end - buf), plane);
decodeplane32((uint32_t *)row, buf,
FFMIN(s->planesize, buf_end - buf), plane);
buf += s->planesize;
}
}