[FFmpeg-soc] [soc]: r1728 - eac3/ac3_parser.c

jbr subversion at mplayerhq.hu
Mon Dec 31 02:52:41 CET 2007


Author: jbr
Date: Mon Dec 31 02:52:41 2007
New Revision: 1728

Log:
cosmetics: reindent after last commit

Modified:
   eac3/ac3_parser.c

Modified: eac3/ac3_parser.c
==============================================================================
--- eac3/ac3_parser.c	(original)
+++ eac3/ac3_parser.c	Mon Dec 31 02:52:41 2007
@@ -53,36 +53,36 @@ int ff_ac3_parse_header(const uint8_t bu
         return AC3_PARSE_ERROR_BSID;
 
     if(hdr->bitstream_id <= 10) {
-    hdr->crc1 = get_bits(&gbc, 16);
-    hdr->sr_code = get_bits(&gbc, 2);
-    if(hdr->sr_code == 3)
-        return AC3_PARSE_ERROR_SAMPLE_RATE;
+        hdr->crc1 = get_bits(&gbc, 16);
+        hdr->sr_code = get_bits(&gbc, 2);
+        if(hdr->sr_code == 3)
+            return AC3_PARSE_ERROR_SAMPLE_RATE;
 
-    frame_size_code = get_bits(&gbc, 6);
-    if(frame_size_code > 37)
-        return AC3_PARSE_ERROR_FRAME_SIZE;
+        frame_size_code = get_bits(&gbc, 6);
+        if(frame_size_code > 37)
+            return AC3_PARSE_ERROR_FRAME_SIZE;
 
-    skip_bits(&gbc, 5); // skip bsid, already got it
+        skip_bits(&gbc, 5); // skip bsid, already got it
 
-    skip_bits(&gbc, 3); // skip bitstream mode
-    hdr->channel_mode = get_bits(&gbc, 3);
-    if((hdr->channel_mode & 1) && hdr->channel_mode != AC3_CHMODE_MONO) {
-        skip_bits(&gbc, 2); // skip center mix level
-    }
-    if(hdr->channel_mode & 4) {
-        skip_bits(&gbc, 2); // skip surround mix level
-    }
-    if(hdr->channel_mode == AC3_CHMODE_STEREO) {
-        skip_bits(&gbc, 2); // skip dolby surround mode
-    }
-    hdr->lfe_on = get_bits1(&gbc);
+        skip_bits(&gbc, 3); // skip bitstream mode
+        hdr->channel_mode = get_bits(&gbc, 3);
+        if((hdr->channel_mode & 1) && hdr->channel_mode != AC3_CHMODE_MONO) {
+            skip_bits(&gbc, 2); // skip center mix level
+        }
+        if(hdr->channel_mode & 4) {
+            skip_bits(&gbc, 2); // skip surround mix level
+        }
+        if(hdr->channel_mode == AC3_CHMODE_STEREO) {
+            skip_bits(&gbc, 2); // skip dolby surround mode
+        }
+        hdr->lfe_on = get_bits1(&gbc);
 
-    hdr->sr_shift = FFMAX(hdr->bitstream_id, 8) - 8;
-    hdr->sample_rate = ff_ac3_sample_rate_tab[hdr->sr_code] >> hdr->sr_shift;
-    hdr->bit_rate = (ff_ac3_bitrate_tab[frame_size_code>>1] * 1000) >> hdr->sr_shift;
-    hdr->channels = ff_ac3_channels_tab[hdr->channel_mode] + hdr->lfe_on;
-    hdr->frame_size = ff_ac3_frame_size_tab[frame_size_code][hdr->sr_code] * 2;
-    hdr->num_blocks = 6;
+        hdr->sr_shift = FFMAX(hdr->bitstream_id, 8) - 8;
+        hdr->sample_rate = ff_ac3_sample_rate_tab[hdr->sr_code] >> hdr->sr_shift;
+        hdr->bit_rate = (ff_ac3_bitrate_tab[frame_size_code>>1] * 1000) >> hdr->sr_shift;
+        hdr->channels = ff_ac3_channels_tab[hdr->channel_mode] + hdr->lfe_on;
+        hdr->frame_size = ff_ac3_frame_size_tab[frame_size_code][hdr->sr_code] * 2;
+        hdr->num_blocks = 6;
     } else {
         hdr->crc1 = 0;
         skip_bits(&gbc, 2); // skip stream type
@@ -133,11 +133,11 @@ static int ac3_sync(AVCodecContext *avct
         avctx->codec_id = CODEC_ID_EAC3;
     }
 
-        *sample_rate = hdr.sample_rate;
-        *bit_rate = hdr.bit_rate;
-        *channels = hdr.channels;
-        *samples = hdr.num_blocks * 256;
-        return hdr.frame_size;
+    *sample_rate = hdr.sample_rate;
+    *bit_rate = hdr.bit_rate;
+    *channels = hdr.channels;
+    *samples = hdr.num_blocks * 256;
+    return hdr.frame_size;
 }
 
 static int ac3_parse_init(AVCodecParserContext *s1)



More information about the FFmpeg-soc mailing list