[FFmpeg-soc] [soc]: r5018 - als/alsdec.c

thilo.borgmann subversion at mplayerhq.hu
Mon Aug 10 01:15:41 CEST 2009


Author: thilo.borgmann
Date: Mon Aug 10 01:15:41 2009
New Revision: 5018

Log:
Added functionality for independently coded channel pairs while block swtiching
is enabled.

Modified:
   als/alsdec.c

Modified: als/alsdec.c
==============================================================================
--- als/alsdec.c	Mon Aug 10 00:53:21 2009	(r5017)
+++ als/alsdec.c	Mon Aug 10 01:15:41 2009	(r5018)
@@ -688,8 +688,10 @@ static int read_frame_data(ALSDecContext
 
             // if joint_stereo and block_switching is set, independent decoding
             // is signaled via the first bit of bs_info
-            if(sconf->joint_stereo && sconf->block_switching)
-                independent_bs = bs_info >> 31;
+            if(sconf->joint_stereo && sconf->block_switching) {
+                if (bs_info >> 31)
+                    independent_bs = 2;
+            }
 
             // if this is the last channel, it has to be decoded independently
             if (c == sconf->channels - 1)
@@ -709,6 +711,9 @@ static int read_frame_data(ALSDecContext
                 memmove((ctx->raw_samples[c]) - sconf->max_order,
                         (ctx->raw_samples[c]) - sconf->max_order + sconf->frame_length,
                         sizeof(int64_t) * sconf->max_order);
+
+                if(independent_bs)
+                    independent_bs--;
             } else {
                 unsigned int offset = 0;
 


More information about the FFmpeg-soc mailing list