[FFmpeg-cvslog] sgi: K&R formatting cosmetics

Vittorio Giovara git at videolan.org
Tue Apr 1 03:36:25 CEST 2014


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Thu Mar 13 15:20:00 2014 +0100| [a7dbfcf6cb6ab8a8981d74332fd02fb90360d22f] | committer: Vittorio Giovara

sgi: K&R formatting cosmetics

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=a7dbfcf6cb6ab8a8981d74332fd02fb90360d22f
---

 libavcodec/sgi.h    |    2 +-
 libavcodec/sgidec.c |    4 ++--
 libavcodec/sgienc.c |   22 +++++++++++-----------
 3 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/libavcodec/sgi.h b/libavcodec/sgi.h
index ca531f0..3c47d3a 100644
--- a/libavcodec/sgi.h
+++ b/libavcodec/sgi.h
@@ -1,4 +1,4 @@
- /*
+/*
  * SGI image encoder
  * Xiaohui Sun <tjnksxh at hotmail.com>
  *
diff --git a/libavcodec/sgidec.c b/libavcodec/sgidec.c
index b25b41f..91b68eb 100644
--- a/libavcodec/sgidec.c
+++ b/libavcodec/sgidec.c
@@ -94,7 +94,7 @@ static int read_rle_sgi(uint8_t *out_buf, SgiState *s)
     unsigned int start_offset;
 
     /* size of  RLE offset and length tables */
-    if (len * 2  > bytestream2_get_bytes_left(&s->g)) {
+    if (len * 2 > bytestream2_get_bytes_left(&s->g)) {
         return AVERROR_INVALIDDATA;
     }
 
@@ -120,7 +120,7 @@ static int read_rle_sgi(uint8_t *out_buf, SgiState *s)
  * @param s the current image state
  * @return 0 if read success, otherwise return -1.
  */
-static int read_uncompressed_sgi(unsigned char* out_buf, uint8_t* out_end,
+static int read_uncompressed_sgi(unsigned char *out_buf, uint8_t *out_end,
                                  SgiState *s)
 {
     int x, y, z;
diff --git a/libavcodec/sgienc.c b/libavcodec/sgienc.c
index 902437f..ab1e36f 100644
--- a/libavcodec/sgienc.c
+++ b/libavcodec/sgienc.c
@@ -101,14 +101,14 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     memset(buf, 0, SGI_HEADER_SIZE);
     buf += 80;
 
-     /* colormap */
+    /* colormap */
     bytestream_put_be32(&buf, 0L);
 
     /* The rest of the 512 byte header is unused. */
     buf += 404;
     offsettab = buf;
 
-    if (avctx->coder_type  != FF_CODER_TYPE_RAW) {
+    if (avctx->coder_type != FF_CODER_TYPE_RAW) {
         /* Skip RLE offset table. */
         buf += tablesize;
         lengthtab = buf;
@@ -156,7 +156,7 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     }
 
     /* total length */
-    pkt->size = buf - pkt->data;
+    pkt->size   = buf - pkt->data;
     pkt->flags |= AV_PKT_FLAG_KEY;
     *got_packet = 1;
 
@@ -170,14 +170,14 @@ static av_cold int encode_close(AVCodecContext *avctx)
 }
 
 AVCodec ff_sgi_encoder = {
-    .name           = "sgi",
-    .long_name      = NULL_IF_CONFIG_SMALL("SGI image"),
-    .type           = AVMEDIA_TYPE_VIDEO,
-    .id             = AV_CODEC_ID_SGI,
-    .init           = encode_init,
-    .encode2        = encode_frame,
-    .close          = encode_close,
-    .pix_fmts       = (const enum AVPixelFormat[]){
+    .name      = "sgi",
+    .long_name = NULL_IF_CONFIG_SMALL("SGI image"),
+    .type      = AVMEDIA_TYPE_VIDEO,
+    .id        = AV_CODEC_ID_SGI,
+    .init      = encode_init,
+    .encode2   = encode_frame,
+    .close     = encode_close,
+    .pix_fmts  = (const enum AVPixelFormat[]) {
         AV_PIX_FMT_RGB24, AV_PIX_FMT_RGBA, AV_PIX_FMT_GRAY8, AV_PIX_FMT_NONE
     },
 };



More information about the ffmpeg-cvslog mailing list