pcx: K&R formatting cosmetics

This commit is contained in:
Luca Barbato 2013-06-29 06:25:31 +02:00
parent ef5b70affc
commit 170fb593c6

View File

@ -32,7 +32,9 @@
* @return advanced src pointer * @return advanced src pointer
*/ */
static const uint8_t *pcx_rle_decode(const uint8_t *src, uint8_t *dst, static const uint8_t *pcx_rle_decode(const uint8_t *src, uint8_t *dst,
unsigned int bytes_per_scanline, int compressed) { unsigned int bytes_per_scanline,
int compressed)
{
unsigned int i = 0; unsigned int i = 0;
unsigned char run, value; unsigned char run, value;
@ -55,7 +57,9 @@ static const uint8_t *pcx_rle_decode(const uint8_t *src, uint8_t *dst,
return src; return src;
} }
static void pcx_palette(const uint8_t **src, uint32_t *dst, unsigned int pallen) { static void pcx_palette(const uint8_t **src, uint32_t *dst,
unsigned int pallen)
{
unsigned int i; unsigned int i;
for (i = 0; i < pallen; i++) for (i = 0; i < pallen; i++)
@ -65,7 +69,8 @@ static void pcx_palette(const uint8_t **src, uint32_t *dst, unsigned int pallen)
} }
static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
AVPacket *avpkt) { AVPacket *avpkt)
{
const uint8_t *buf = avpkt->data; const uint8_t *buf = avpkt->data;
int buf_size = avpkt->size; int buf_size = avpkt->size;
AVFrame *const p = data; AVFrame *const p = data;
@ -156,7 +161,6 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
ptr += stride; ptr += stride;
} }
} else if (nplanes == 1 && bits_per_pixel == 8) { } else if (nplanes == 1 && bits_per_pixel == 8) {
const uint8_t *palstart = bufstart + buf_size - 769; const uint8_t *palstart = bufstart + buf_size - 769;
@ -173,7 +177,6 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
av_log(avctx, AV_LOG_ERROR, "expected palette after image data\n"); av_log(avctx, AV_LOG_ERROR, "expected palette after image data\n");
goto end; goto end;
} }
} else if (nplanes == 1) { /* all packed formats, max. 16 colors */ } else if (nplanes == 1) { /* all packed formats, max. 16 colors */
GetBitContext s; GetBitContext s;
@ -186,7 +189,6 @@ static int pcx_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
ptr[x] = get_bits(&s, bits_per_pixel); ptr[x] = get_bits(&s, bits_per_pixel);
ptr += stride; ptr += stride;
} }
} else { /* planar, 4, 8 or 16 colors */ } else { /* planar, 4, 8 or 16 colors */
int i; int i;