[10/12] libopencore-amr: Cosmetics: Rewrap and align

Message ID 1302645498-12642-10-git-send-email-martin@martin.st
State Superseded
Headers show

Commit Message

Martin Storsjö April 12, 2011, 9:58 p.m.
---
 libavcodec/libopencore-amr.c |   20 ++++++++------------
 1 files changed, 8 insertions(+), 12 deletions(-)

Comments

Ronald Bultje April 12, 2011, 11:41 p.m. | #1
Hi,

On Tue, Apr 12, 2011 at 5:58 PM, Martin Storsjö <martin@martin.st> wrote:
> ---
>  libavcodec/libopencore-amr.c |   20 ++++++++------------
>  1 files changed, 8 insertions(+), 12 deletions(-)

OK.

Ronald

Patch

diff --git a/libavcodec/libopencore-amr.c b/libavcodec/libopencore-amr.c
index a5c9269..e3708f1 100644
--- a/libavcodec/libopencore-amr.c
+++ b/libavcodec/libopencore-amr.c
@@ -53,14 +53,10 @@  typedef struct AMR_bitrates {
 static int get_bitrate_mode(int bitrate)
 {
     /* make the correspondance between bitrate and mode */
-    static const AMR_bitrates rates[] = {{ 4750, MR475},
-                             { 5150, MR515},
-                             { 5900, MR59},
-                             { 6700, MR67},
-                             { 7400, MR74},
-                             { 7950, MR795},
-                             {10200, MR102},
-                             {12200, MR122}, };
+    static const AMR_bitrates rates[] = {
+        { 4750, MR475 }, { 5150, MR515 }, {  5900, MR59  }, {  6700, MR67  },
+        { 7400, MR74 },  { 7950, MR795 }, { 10200, MR102 }, { 12200, MR122 }
+    };
     int i;
 
     for (i = 0; i < 8; i++)
@@ -109,12 +105,12 @@  static int amr_nb_decode_frame(AVCodecContext *avctx, void *data,
 {
     const uint8_t *buf = avpkt->data;
     int buf_size       = avpkt->size;
-    AMRContext *s = avctx->priv_data;
+    AMRContext *s      = avctx->priv_data;
     static const uint8_t block_size[16] = { 12, 13, 15, 17, 19, 20, 26, 31, 5, 0, 0, 0, 0, 0, 0, 0 };
     enum Mode dec_mode;
     int packet_size;
 
-    dec_mode = (buf[0] >> 3) & 0x000F;
+    dec_mode    = (buf[0] >> 3) & 0x000F;
     packet_size = block_size[dec_mode] + 1;
 
     if (packet_size > buf_size) {
@@ -229,7 +225,7 @@  static av_cold int amr_wb_decode_init(AVCodecContext *avctx)
 {
     AMRWBContext *s = avctx->priv_data;
 
-    s->state      = D_IF_init();
+    s->state        = D_IF_init();
 
     amr_decode_fix_avctx(avctx);
 
@@ -246,7 +242,7 @@  static int amr_wb_decode_frame(AVCodecContext *avctx, void *data,
 {
     const uint8_t *buf = avpkt->data;
     int buf_size       = avpkt->size;
-    AMRWBContext *s = avctx->priv_data;
+    AMRWBContext *s    = avctx->priv_data;
     int mode;
     int packet_size;
     static const uint8_t block_size[16] = {18, 24, 33, 37, 41, 47, 51, 59, 61, 6, 6, 0, 0, 0, 1, 1};