[FFmpeg-soc] [soc]: r4120 - in amr: amrdata.h amrnbdec.c amrnbfloatdata.h amrnbfloatdec.c

diego subversion at mplayerhq.hu
Sun Feb 22 11:42:29 CET 2009


Author: diego
Date: Sun Feb 22 11:42:29 2009
New Revision: 4120

Log:
whitespace cosmetics

Modified:
   amr/amrdata.h
   amr/amrnbdec.c
   amr/amrnbfloatdata.h
   amr/amrnbfloatdec.c

Modified: amr/amrdata.h
==============================================================================
--- amr/amrdata.h	Sun Feb 22 03:39:05 2009	(r4119)
+++ amr/amrdata.h	Sun Feb 22 11:42:29 2009	(r4120)
@@ -30,7 +30,7 @@
 
 // general definitions
 #define AMR_BLOCK_SIZE    160
-#define AMR_SUBFRAME_SIZE 40
+#define AMR_SUBFRAME_SIZE  40
 
 // definition of modes for decoder
 #define NO_DATA 15
@@ -82,7 +82,7 @@ enum RXFrameType {
 #define PRMS_MODE_795 23
 #define PRMS_MODE_102 39
 #define PRMS_MODE_122 57
-#define PRMS_MODE_DTX 5
+#define PRMS_MODE_DTX  5
 
 // typedef for bit order tables
 typedef struct AMROrder {
@@ -247,119 +247,119 @@ static const AMROrder order_MODE_DTX[35]
 
 // homing frames for the decoder
 static const int16_t dhf_MODE_475[PRMS_MODE_475] = {
-  0x00F8,0x009D,0x001C,0x0066,0x0000,0x0003,0x0028,0x000F,0x0038,0x0001,
-  0x000F,0x0031,0x0002,0x0008,0x000F,0x0026,0x0003
+    0x00F8, 0x009D, 0x001C, 0x0066, 0x0000, 0x0003, 0x0028, 0x000F, 0x0038, 0x0001,
+    0x000F, 0x0031, 0x0002, 0x0008, 0x000F, 0x0026, 0x0003
 };
 
 static const int16_t dhf_MODE_515[PRMS_MODE_515] = {
-  0x00F8,0x009D,0x001C,0x0066,0x0000,0x0003,0x0037,0x000F,0x0000,0x0003,
-  0x0005,0x000F,0x0037,0x0003,0x0037,0x000F,0x0023,0x0003,0x001F
+    0x00F8, 0x009D, 0x001C, 0x0066, 0x0000, 0x0003, 0x0037, 0x000F, 0x0000, 0x0003,
+    0x0005, 0x000F, 0x0037, 0x0003, 0x0037, 0x000F, 0x0023, 0x0003, 0x001F
 };
 
 static const int16_t dhf_MODE_59[PRMS_MODE_59] = {
-  0x00F8,0x00E3,0x002F,0x00BD,0x0000,0x0003,0x0037,0x000F,0x0001,0x0003,
-  0x000F,0x0060,0x00F9,0x0003,0x0037,0x000F,0x0000,0x0003,0x0037
+    0x00F8, 0x00E3, 0x002F, 0x00BD, 0x0000, 0x0003, 0x0037, 0x000F, 0x0001, 0x0003,
+    0x000F, 0x0060, 0x00F9, 0x0003, 0x0037, 0x000F, 0x0000, 0x0003, 0x0037
 };
 
 static const int16_t dhf_MODE_67[PRMS_MODE_67] = {
-  0x00F8,0x00E3,0x002F,0x00BD,0x0002,0x0007,0x0000,0x000F,0x0098,0x0007,
-  0x0061,0x0060,0x05C5,0x0007,0x0000,0x000F,0x0318,0x0007,0x0000
+    0x00F8, 0x00E3, 0x002F, 0x00BD, 0x0002, 0x0007, 0x0000, 0x000F, 0x0098, 0x0007,
+    0x0061, 0x0060, 0x05C5, 0x0007, 0x0000, 0x000F, 0x0318, 0x0007, 0x0000
 };
 
 static const int16_t dhf_MODE_74[PRMS_MODE_74] = {
-  0x00F8,0x00E3,0x002F,0x00BD,0x0006,0x000F,0x0000,0x001B,0x0208,0x000F,
-  0x0062,0x0060,0x1BA6,0x000F,0x0000,0x001B,0x0006,0x000F,0x0000
+    0x00F8, 0x00E3, 0x002F, 0x00BD, 0x0006, 0x000F, 0x0000, 0x001B, 0x0208, 0x000F,
+    0x0062, 0x0060, 0x1BA6, 0x000F, 0x0000, 0x001B, 0x0006, 0x000F, 0x0000
 };
 
 static const int16_t dhf_MODE_795[PRMS_MODE_795] = {
-  0x00C2,0x00E3,0x002F,0x00BD,0x0006,0x000F,0x000A,0x0000,0x0039,0x1C08,
-  0x0007,0x000A,0x000B,0x0063,0x11A6,0x000F,0x0001,0x0000,0x0039,0x09A0,
-  0x000F,0x0002,0x0001
+    0x00C2, 0x00E3, 0x002F, 0x00BD, 0x0006, 0x000F, 0x000A, 0x0000, 0x0039, 0x1C08,
+    0x0007, 0x000A, 0x000B, 0x0063, 0x11A6, 0x000F, 0x0001, 0x0000, 0x0039, 0x09A0,
+    0x000F, 0x0002, 0x0001
 };
 
 static const int16_t dhf_MODE_102[PRMS_MODE_102] = {
-  0x00F8,0x00E3,0x002F,0x0045,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,
-  0x0000,0x0000,0x001B,0x0000,0x0001,0x0000,0x0001,0x0326,0x00CE,0x007E,
-  0x0051,0x0062,0x0000,0x0000,0x0000,0x0000,0x015A,0x0359,0x0076,0x0000,
-  0x001B,0x0000,0x0000,0x0000,0x0000,0x017C,0x0215,0x0038,0x0030
+    0x00F8, 0x00E3, 0x002F, 0x0045, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000,
+    0x0000, 0x0000, 0x001B, 0x0000, 0x0001, 0x0000, 0x0001, 0x0326, 0x00CE, 0x007E,
+    0x0051, 0x0062, 0x0000, 0x0000, 0x0000, 0x0000, 0x015A, 0x0359, 0x0076, 0x0000,
+    0x001B, 0x0000, 0x0000, 0x0000, 0x0000, 0x017C, 0x0215, 0x0038, 0x0030
 };
 
 static const int16_t dhf_MODE_122[PRMS_MODE_122] = {
-  0x0004,0x002A,0x00DB,0x0096,0x002A,0x0156,0x000B,0x0000,0x0000,0x0000,
-  0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0000,0x0036,0x000B,
-  0x0000,0x000F,0x000E,0x000C,0x000D,0x0000,0x0001,0x0005,0x0007,0x0001,
-  0x0008,0x0024,0x0000,0x0001,0x0000,0x0005,0x0006,0x0001,0x0002,0x0004,
-  0x0007,0x0004,0x0002,0x0003,0x0036,0x000B,0x0000,0x0002,0x0004,0x0000,
-  0x0003,0x0006,0x0001,0x0007,0x0006,0x0005,0x0000
+    0x0004, 0x002A, 0x00DB, 0x0096, 0x002A, 0x0156, 0x000B, 0x0000, 0x0000, 0x0000,
+    0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0036, 0x000B,
+    0x0000, 0x000F, 0x000E, 0x000C, 0x000D, 0x0000, 0x0001, 0x0005, 0x0007, 0x0001,
+    0x0008, 0x0024, 0x0000, 0x0001, 0x0000, 0x0005, 0x0006, 0x0001, 0x0002, 0x0004,
+    0x0007, 0x0004, 0x0002, 0x0003, 0x0036, 0x000B, 0x0000, 0x0002, 0x0004, 0x0000,
+    0x0003, 0x0006, 0x0001, 0x0007, 0x0006, 0x0005, 0x0000
 };
 
 // parameter sizes (# of bits), one table per mode
 static const int16_t bitno_MODE_475[PRMS_MODE_475] = {
-  8, 8, 7,    /* LSP VQ          */
-  8, 7, 2, 8, /* first subframe  */
-  4, 7, 2,    /* second subframe */
-  4, 7, 2, 8, /* third subframe  */
-  4, 7, 2     /* fourth subframe */
+    8, 8, 7,    /* LSP VQ          */
+    8, 7, 2, 8, /* first subframe  */
+    4, 7, 2,    /* second subframe */
+    4, 7, 2, 8, /* third subframe  */
+    4, 7, 2     /* fourth subframe */
 };
 
 static const int16_t bitno_MODE_515[PRMS_MODE_515] = {
-  8, 8, 7,    /* LSP VQ          */
-  8, 7, 2, 6, /* first subframe  */
-  4, 7, 2, 6, /* second subframe */
-  4, 7, 2, 6, /* third subframe  */
-  4, 7, 2, 6  /* fourth subframe */
+    8, 8, 7,    /* LSP VQ          */
+    8, 7, 2, 6, /* first subframe  */
+    4, 7, 2, 6, /* second subframe */
+    4, 7, 2, 6, /* third subframe  */
+    4, 7, 2, 6  /* fourth subframe */
 };
 
 static const int16_t bitno_MODE_59[PRMS_MODE_59] = {
-  8, 9, 9,    /* LSP VQ          */
-  8, 9, 2, 6, /* first subframe  */
-  4, 9, 2, 6, /* second subframe */
-  8, 9, 2, 6, /* third subframe  */
-  4, 9, 2, 6  /* fourth subframe */
+    8, 9, 9,    /* LSP VQ          */
+    8, 9, 2, 6, /* first subframe  */
+    4, 9, 2, 6, /* second subframe */
+    8, 9, 2, 6, /* third subframe  */
+    4, 9, 2, 6  /* fourth subframe */
 };
 
 static const int16_t bitno_MODE_67[PRMS_MODE_67] = {
-  8, 9, 9,       /* LSP VQ          */
-  8, 11, 3, 7,   /* first subframe  */
-  4, 11, 3, 7,   /* second subframe */
-  8, 11, 3, 7,   /* third subframe  */
-  4, 11, 3, 7    /* fourth subframe */
+    8, 9, 9,       /* LSP VQ          */
+    8, 11, 3, 7,   /* first subframe  */
+    4, 11, 3, 7,   /* second subframe */
+    8, 11, 3, 7,   /* third subframe  */
+    4, 11, 3, 7    /* fourth subframe */
 };
 
 static const int16_t bitno_MODE_74[PRMS_MODE_74] = {
-  8, 9, 9,       /* LSP VQ          */
-  8, 13, 4, 7,   /* first subframe  */
-  5, 13, 4, 7,   /* second subframe */
-  8, 13, 4, 7,   /* third subframe  */
-  5, 13, 4, 7    /* fourth subframe */
+    8, 9, 9,       /* LSP VQ          */
+    8, 13, 4, 7,   /* first subframe  */
+    5, 13, 4, 7,   /* second subframe */
+    8, 13, 4, 7,   /* third subframe  */
+    5, 13, 4, 7    /* fourth subframe */
 };
 
 static const int16_t bitno_MODE_795[PRMS_MODE_795] = {
-  9, 9, 9,          /* LSP VQ          */
-  8, 13, 4, 4, 5,   /* first subframe  */
-  6, 13, 4, 4, 5,   /* second subframe */
-  8, 13, 4, 4, 5,   /* third subframe  */
-  6, 13, 4, 4, 5    /* fourth subframe */
+    9, 9, 9,          /* LSP VQ          */
+    8, 13, 4, 4, 5,   /* first subframe  */
+    6, 13, 4, 4, 5,   /* second subframe */
+    8, 13, 4, 4, 5,   /* third subframe  */
+    6, 13, 4, 4, 5    /* fourth subframe */
 };
 
 static const int16_t bitno_MODE_102[PRMS_MODE_102] = {
-  8, 9, 9,                      /* LSP VQ          */
-  8, 1, 1, 1, 1, 10, 10, 7, 7,  /* first subframe  */
-  5, 1, 1, 1, 1, 10, 10, 7, 7,  /* second subframe */
-  8, 1, 1, 1, 1, 10, 10, 7, 7,  /* third subframe  */
-  5, 1, 1, 1, 1, 10, 10, 7, 7   /* fourth subframe */
+    8, 9, 9,                      /* LSP VQ          */
+    8, 1, 1, 1, 1, 10, 10, 7, 7,  /* first subframe  */
+    5, 1, 1, 1, 1, 10, 10, 7, 7,  /* second subframe */
+    8, 1, 1, 1, 1, 10, 10, 7, 7,  /* third subframe  */
+    5, 1, 1, 1, 1, 10, 10, 7, 7   /* fourth subframe */
 };
 
 static const int16_t bitno_MODE_122[PRMS_MODE_122] = {
-  7, 8, 9, 8, 6,                            /* LSP VQ          */
-  9, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 5,    /* first subframe  */
-  6, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 5,    /* second subframe */
-  9, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 5,    /* third subframe  */
-  6, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 5     /* fourth subframe */
+    7, 8, 9, 8, 6,                            /* LSP VQ          */
+    9, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 5,    /* first subframe  */
+    6, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 5,    /* second subframe */
+    9, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 5,    /* third subframe  */
+    6, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 5     /* fourth subframe */
 };
 
 static const int16_t bitno_MODE_DTX[PRMS_MODE_DTX] = {
-  3, 8, 9, 9, 6
+    3, 8, 9, 9, 6
 };
 
 static const uint16_t lsf_3_mean[10] = {
@@ -1161,22 +1161,22 @@ static const uint16_t pitch_gain_attenua
 // quantization table for the adaptive codebook gain (MODE_795, MODE_122)
 #define N_PITCH_QUANTS 16
 static const uint16_t pitch_gain_quant[N_PITCH_QUANTS] = {
-   0,
-   3277,
-   6556,
-   8192,
-   9830,
-   11469,
-   12288,
-   13107,
-   13926,
-   14746,
-   15565,
-   16384,
-   17203,
-   18022,
-   18842,
-   19661
+        0,
+     3277,
+     6556,
+     8192,
+     9830,
+    11469,
+    12288,
+    13107,
+    13926,
+    14746,
+    15565,
+    16384,
+    17203,
+    18022,
+    18842,
+    19661
 };
 
 /**************************** end of tables *****************************/

Modified: amr/amrnbdec.c
==============================================================================
--- amr/amrnbdec.c	Sun Feb 22 03:39:05 2009	(r4119)
+++ amr/amrnbdec.c	Sun Feb 22 11:42:29 2009	(r4120)
@@ -191,7 +191,7 @@ enum Mode decode_bitstream(AVCodecContex
     // reorder the bitstream to match the bit allocation in the specification
     if((p->cur_frame_type != RX_NO_DATA) && (p->cur_frame_type != RX_SPEECH_BAD)) {
         for(i=0; i<mode_bits[mode]; i++) {
-            p->amr_prms[ order[i].array_element ] += get_bits1(&p->gb) * (1<< order[i].bit_mask);
+            p->amr_prms[ order[i].array_element ] += get_bits1(&p->gb) * (1 << order[i].bit_mask);
         }
     }
 
@@ -242,7 +242,7 @@ static void lsf2lsp(int *lsf, int *lsp)
     int index, offset;
 
     for(i=0; i<LP_FILTER_ORDER; i++) {
-        index = lsf[i] >> 8;      // bits 8 to 15 of lsf[i]
+        index  = lsf[i] >> 8;     // bits 8 to 15 of lsf[i]
         offset = lsf[i] & 0x00ff; // bits 0 to  7 of lsf[i]
         lsp[i] = cos_table[index] + ( (( cos_table[index+1]-cos_table[index] )*offset)>>8 );
     }
@@ -636,7 +636,7 @@ static void decode_pitch_lag_3(AVCodecCo
             }
         }else {
             // decoding with 5 or 6 bit resolution
-            *pitch_lag_int = ( ((pitch_index + 2)*10923 )>>15) - 1 + p->search_range_min;
+            *pitch_lag_int  = ( ((pitch_index + 2)*10923 )>>15) - 1 + p->search_range_min;
             *pitch_lag_frac = pitch_index - (*pitch_lag_int - p->search_range_min)*3 - 2;
         }
     }
@@ -1129,8 +1129,8 @@ void decode_reset(AVCodecContext *avctx)
     AMRContext *p = avctx->priv_data;
 
     p->prev_frame_homing = 1;
-    p->prev_frame_type = RX_SPEECH_GOOD;
-    p->prev_frame_mode = MODE_475;
+    p->prev_frame_type   = RX_SPEECH_GOOD;
+    p->prev_frame_mode   = MODE_475;
     // FIXME reset AMRDecoderState too!
 }
 
@@ -1301,12 +1301,12 @@ static av_cold int amrnb_decode_close(AV
 
 
 AVCodec amrnb_decoder = {
-    .name = "amrnb",
-    .type = CODEC_TYPE_AUDIO,
-    .id = CODEC_ID_AMR_NB,
+    .name           = "amrnb",
+    .type           = CODEC_TYPE_AUDIO,
+    .id             = CODEC_ID_AMR_NB,
     .priv_data_size = sizeof(AMRContext),
-    .init = amrnb_decode_init,
-    .close = amrnb_decode_close,
-    .decode = amrnb_decode_frame,
-    .long_name = NULL_IF_CONFIG_SMALL("Adaptive Multi-Rate NarrowBand"),
+    .init           = amrnb_decode_init,
+    .close          = amrnb_decode_close,
+    .decode         = amrnb_decode_frame,
+    .long_name      = NULL_IF_CONFIG_SMALL("Adaptive Multi-Rate NarrowBand"),
 };

Modified: amr/amrnbfloatdata.h
==============================================================================
--- amr/amrnbfloatdata.h	Sun Feb 22 03:39:05 2009	(r4119)
+++ amr/amrnbfloatdata.h	Sun Feb 22 11:42:29 2009	(r4120)
@@ -36,7 +36,7 @@
 
 // general definitions
 #define AMR_BLOCK_SIZE    160
-#define AMR_SUBFRAME_SIZE 40
+#define AMR_SUBFRAME_SIZE  40
 
 // definition of modes for decoder
 #define NO_DATA 15
@@ -75,7 +75,7 @@ enum RXFrameType {
 #define PRMS_MODE_795 23
 #define PRMS_MODE_102 39
 #define PRMS_MODE_122 57
-#define PRMS_MODE_DTX 5
+#define PRMS_MODE_DTX  5
 
 #define LP_FILTER_ORDER 10 // linear predictive coding filter order
 
@@ -533,14 +533,14 @@ static const uint8_t mode_bits[N_MODES] 
  *
  * @note: Taken from Decoder_amr_reset in Q15 using val/1000
  */
- static const int8_t lsp_sub4_init[LP_FILTER_ORDER] = { 30, 26, 21, 15, 8, 0, -8, -15, -21, -26 };
+static const int8_t lsp_sub4_init[LP_FILTER_ORDER] = { 30, 26, 21, 15, 8, 0, -8, -15, -21, -26 };
 
 /**
  * Initialize mean lsp values.
  *
  * @note: Taken from Decoder_amr_reset in Q15
  */
- static const int16_t lsp_avg_init[LP_FILTER_ORDER] = {
+static const int16_t lsp_avg_init[LP_FILTER_ORDER] = {
     1384, 2077, 3420, 5108, 6742, 8122, 9863, 11092, 12714, 13701
 };
 
@@ -2032,7 +2032,7 @@ static const float pred_fac[LP_FILTER_OR
 };
 
 #define PRED_FAC_MODE_122 0.65
-#define FREQ_LSP_FAC 2.0*M_PI/8000.0
+#define FREQ_LSP_FAC      2.0*M_PI/8000.0
 
 
 // pitch tables

Modified: amr/amrnbfloatdec.c
==============================================================================
--- amr/amrnbfloatdec.c	Sun Feb 22 03:39:05 2009	(r4119)
+++ amr/amrnbfloatdec.c	Sun Feb 22 11:42:29 2009	(r4120)
@@ -194,7 +194,7 @@ enum Mode decode_bitstream(AMRContext *p
 
         memset(&p->frame, 0, sizeof(AMRNBFrame));
         for(i=0; i<mode_bits[mode]; i++) {
-            data[order[i].array_element] += get_bits1(&p->gb) * (1<< order[i].bit_mask);
+            data[order[i].array_element] += get_bits1(&p->gb) * (1 << order[i].bit_mask);
         }
 
         if(mode == MODE_DTX) {
@@ -377,24 +377,24 @@ static void lsp2lpc(float *lsp, float *l
  */
 
 static void decode_pitch_lag(int *lag_int, int *lag_frac, int pitch_index, const int prev_lag_int,
-                            const int subframe, const enum Mode mode)
+                             const int subframe, const enum Mode mode)
 {
     // subframe 1 or 3
     if(!(subframe & 1)) {
         if(mode == MODE_122) {
             if(pitch_index < 463){
-                *lag_int = (pitch_index + 5)/6 + 17;
+                *lag_int  = (pitch_index + 5)/6 + 17;
                 *lag_frac = pitch_index - *lag_int*6 + 105;
             }else {
-                *lag_int = pitch_index - 368;
+                *lag_int  = pitch_index - 368;
                 *lag_frac = 0;
             }
         }else if(pitch_index < 197) {
             // 10923>>15 is approximately 1/3
-            *lag_int = ( ((pitch_index + 2)*10923)>>15 ) + 19;
+            *lag_int  = ( ((pitch_index + 2)*10923)>>15 ) + 19;
             *lag_frac = pitch_index - *lag_int*3 + 58;
         }else {
-            *lag_int = pitch_index - 112;
+            *lag_int  = pitch_index - 112;
             *lag_frac = 0;
         }
     // subframe 2 or 4
@@ -409,16 +409,16 @@ static void decode_pitch_lag(int *lag_in
             // decoding with 4-bit resolution
             if(pitch_index < 4) {
                 // integer only precision for [search_range_min, search_range_min+3]
-                *lag_int = pitch_index + search_range_min;
+                *lag_int  = pitch_index + search_range_min;
                 *lag_frac = 0;
             }else if(pitch_index < 12) {
                 // 1/3 fractional precision for [search_range_min+4 2/3, search_range_min+5 2/3]
-                *lag_int = ( ((pitch_index - 5)*10923)>>15 ) - 1;
+                *lag_int  = ( ((pitch_index - 5)*10923)>>15 ) - 1;
                 *lag_frac = pitch_index - *lag_int*3 - 9;
                 *lag_int += search_range_min + 5;
             }else {
                 // integer only precision for [search_range_min+6, search_range_min+9]
-                *lag_int = pitch_index + search_range_min - 6;
+                *lag_int  = pitch_index + search_range_min - 6;
                 *lag_frac = 0;
             }
         }else {
@@ -461,7 +461,7 @@ static void interp_pitch_vector(float *p
 
     b60_idx1 = &b60[    lag_frac];
     b60_idx2 = &b60[6 - lag_frac];
-    exc_idx = &pitch_vector[-lag_int];
+    exc_idx  = &pitch_vector[-lag_int];
 
     for(n=0; n<AMR_SUBFRAME_SIZE; n++) {
         pitch_vector[n] = 0.0;
@@ -620,25 +620,25 @@ static void decode_fixed_vector(float *f
         const int fixed_index = pulses[0];
 
         if(mode <= MODE_515) {
-            pulse_subset =      ((fixed_index >> 3) & 8) + (subframe << 1);
+            pulse_subset      = ((fixed_index >> 3) & 8) + (subframe << 1);
             pulse_position[0] = ( fixed_index       & 7)*5 + track_position[pulse_subset];
             pulse_position[1] = ((fixed_index >> 3) & 7)*5 + track_position[pulse_subset + 1];
         }else if(mode == MODE_59) {
-            pulse_subset = ((fixed_index & 1) << 1) + 1;
+            pulse_subset      = ((fixed_index & 1) << 1) + 1;
             pulse_position[0] = ((fixed_index >> 1) & 7)*5 + pulse_subset;
-            pulse_subset = (fixed_index >> 4) & 3;
+            pulse_subset      = (fixed_index  >> 4) & 3;
             pulse_position[1] = ((fixed_index >> 6) & 7)*5 + pulse_subset + (pulse_subset == 3 ? 1 : 0);
         }else if(mode == MODE_67) {
             pulse_position[0] = ( fixed_index       & 7)*5;
-            pulse_subset = (fixed_index >> 2) & 2;
+            pulse_subset      = (fixed_index  >> 2) & 2;
             pulse_position[1] = ((fixed_index >> 4) & 7)*5 + pulse_subset + 1;
-            pulse_subset = (fixed_index >> 6) & 2;
+            pulse_subset      = (fixed_index  >> 6) & 2;
             pulse_position[2] = ((fixed_index >> 8) & 7)*5 + pulse_subset + 2;
         }else { // mode <= MODE_795
             pulse_position[0] = gray_decode[ fixed_index        & 7]*5;
             pulse_position[1] = gray_decode[(fixed_index >> 3)  & 7]*5 + 1;
             pulse_position[2] = gray_decode[(fixed_index >> 6)  & 7]*5 + 2;
-            pulse_subset = (fixed_index >> 9) & 1;
+            pulse_subset      = (fixed_index >> 9) & 1;
             pulse_position[3] = gray_decode[(fixed_index >> 10) & 7]*5 + pulse_subset + 3;
         }
         reconstruct_fixed_vector(pulse_position, pulses[1], pulses_nb_per_mode[mode], fixed_vector);
@@ -934,21 +934,21 @@ static int amrnb_decode_frame(AVCodecCon
 
         // decode pitch gain and fixed gain correction factor
         if(p->cur_frame_mode == MODE_122 || p->cur_frame_mode == MODE_795) {
-            p->pitch_gain[4] =     qua_gain_pit[amr_subframe->p_gain];
+            p->pitch_gain[4]     = qua_gain_pit [amr_subframe->p_gain];
             p->fixed_gain_factor = qua_gain_code[amr_subframe->fixed_gain];
         }else if(p->cur_frame_mode == MODE_67 || p->cur_frame_mode == MODE_74 ||
                  p->cur_frame_mode == MODE_102) {
-            p->pitch_gain[4] =     gains_high[amr_subframe->p_gain][0];
+            p->pitch_gain[4]     = gains_high[amr_subframe->p_gain][0];
             p->fixed_gain_factor = gains_high[amr_subframe->p_gain][1];
         }else if(p->cur_frame_mode == MODE_515 || p->cur_frame_mode == MODE_59) {
-            p->pitch_gain[4] =     gains_low[amr_subframe->p_gain][0];
+            p->pitch_gain[4]     = gains_low[amr_subframe->p_gain][0];
             p->fixed_gain_factor = gains_low[amr_subframe->p_gain][1];
         }else {
             // gain index is only coded in subframes 0,2
             if(!(subframe&1)) {
                 gains_index_MODE_475 = amr_subframe->p_gain<<1;
             }
-            p->pitch_gain[4] =     gains_MODE_475[gains_index_MODE_475 + (subframe&1)][0];
+            p->pitch_gain[4]     = gains_MODE_475[gains_index_MODE_475 + (subframe&1)][0];
             p->fixed_gain_factor = gains_MODE_475[gains_index_MODE_475 + (subframe&1)][1];
         }
 
@@ -970,7 +970,7 @@ static int amrnb_decode_frame(AVCodecCon
 
         // smooth fixed gain
         if(p->cur_frame_mode < MODE_74 || p->cur_frame_mode == MODE_102) {
-            float diff = 0.0;
+            float diff             = 0.0;
             float smoothing_factor = 0.0;
 
             for(i=0; i<LP_FILTER_ORDER; i++) {
@@ -1027,12 +1027,12 @@ static int amrnb_decode_frame(AVCodecCon
 
 
 AVCodec amrnb_decoder = {
-    .name = "amrnb",
-    .type = CODEC_TYPE_AUDIO,
-    .id = CODEC_ID_AMR_NB,
+    .name           = "amrnb",
+    .type           = CODEC_TYPE_AUDIO,
+    .id             = CODEC_ID_AMR_NB,
     .priv_data_size = sizeof(AMRContext),
-    .init = amrnb_decode_init,
-    .decode = amrnb_decode_frame,
-    .long_name = NULL_IF_CONFIG_SMALL("Adaptive Multi-Rate NarrowBand"),
+    .init           = amrnb_decode_init,
+    .decode         = amrnb_decode_frame,
+    .long_name      = NULL_IF_CONFIG_SMALL("Adaptive Multi-Rate NarrowBand"),
 };
 



More information about the FFmpeg-soc mailing list