[FFmpeg-soc] [soc]: r4871 - amr/amrnbdec.c

cmcq subversion at mplayerhq.hu
Fri Jul 31 17:36:07 CEST 2009


Author: cmcq
Date: Fri Jul 31 17:36:07 2009
New Revision: 4871

Log:
Comments to clarify that the ignored bits are just padding

Modified:
   amr/amrnbdec.c

Modified: amr/amrnbdec.c
==============================================================================
--- amr/amrnbdec.c	Fri Jul 31 17:10:43 2009	(r4870)
+++ amr/amrnbdec.c	Fri Jul 31 17:36:07 2009	(r4871)
@@ -136,12 +136,12 @@ static enum Mode decode_bitstream(AMRCon
 
     // initialize get_bits
     init_get_bits(&p->gb, buf, buf_size * 8);
-    skip_bits(&p->gb, 1);
-    // set the mode
-    mode = get_bits(&p->gb, 4);
-    // set the bad frame indicator based on the quality bit
-    p->bad_frame_indicator = !get_bits1(&p->gb);
-    skip_bits(&p->gb, 2);
+
+    // Decode the first octet.
+    skip_bits(&p->gb, 1);                        // padding bit
+    mode = get_bits(&p->gb, 4);                  // frame type
+    p->bad_frame_indicator = !get_bits1(&p->gb); // quality bit
+    skip_bits(&p->gb, 2);                        // two padding bits
 
     if (mode <= MODE_DTX) {
         uint16_t *data = (uint16_t *)&p->frame;


More information about the FFmpeg-soc mailing list