Commit 594e05d1 authored by diego's avatar diego

cosmetics: K&R coding style, prettyprinting


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20115 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 754d4406
...@@ -31,7 +31,8 @@ typedef struct SgiContext { ...@@ -31,7 +31,8 @@ typedef struct SgiContext {
AVFrame picture; AVFrame picture;
} SgiContext; } SgiContext;
static av_cold int encode_init(AVCodecContext *avctx){ static av_cold int encode_init(AVCodecContext *avctx)
{
SgiContext *s = avctx->priv_data; SgiContext *s = avctx->priv_data;
avcodec_get_frame_defaults(&s->picture); avcodec_get_frame_defaults(&s->picture);
...@@ -41,7 +42,8 @@ static av_cold int encode_init(AVCodecContext *avctx){ ...@@ -41,7 +42,8 @@ static av_cold int encode_init(AVCodecContext *avctx){
} }
static int encode_frame(AVCodecContext *avctx, unsigned char *buf, static int encode_frame(AVCodecContext *avctx, unsigned char *buf,
int buf_size, void *data) { int buf_size, void *data)
{
SgiContext *s = avctx->priv_data; SgiContext *s = avctx->priv_data;
AVFrame * const p = &s->picture; AVFrame * const p = &s->picture;
uint8_t *offsettab, *lengthtab, *in_buf, *encode_buf; uint8_t *offsettab, *lengthtab, *in_buf, *encode_buf;
...@@ -127,7 +129,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf, ...@@ -127,7 +129,7 @@ static int encode_frame(AVCodecContext *avctx, unsigned char *buf,
for (x = 0; x < width; x++) for (x = 0; x < width; x++)
encode_buf[x] = in_buf[depth * x]; encode_buf[x] = in_buf[depth * x];
if((length = ff_rle_encode(buf, end_buf - buf - 1, encode_buf, 1, width, 0, 0, 0x80, 0)) < 1) { if ((length = ff_rle_encode(buf, end_buf - buf - 1, encode_buf, 1, width, 0, 0, 0x80, 0)) < 1) {
av_free(encode_buf); av_free(encode_buf);
return -1; return -1;
} }
...@@ -168,4 +170,3 @@ AVCodec sgi_encoder = { ...@@ -168,4 +170,3 @@ AVCodec sgi_encoder = {
.pix_fmts= (const enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGBA, PIX_FMT_GRAY8, PIX_FMT_NONE}, .pix_fmts= (const enum PixelFormat[]){PIX_FMT_RGB24, PIX_FMT_RGBA, PIX_FMT_GRAY8, PIX_FMT_NONE},
.long_name= NULL_IF_CONFIG_SMALL("SGI image"), .long_name= NULL_IF_CONFIG_SMALL("SGI image"),
}; };
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment