Changeset 47


Ignore:
Timestamp:
09/23/06 14:52:51 (16 years ago)
Author:
zorg
Message:

Fix project

Location:
mppenc/branches/zorg
Files:
7 added
1 edited

Legend:

Unmodified
Added
Removed
  • mppenc/branches/zorg/src/encode_sv7.c

    r46 r47  
    9393    WriteBits ( 1            ,  1 );    // true gapless: used?
    9494    WriteBits ( SamplesRest  , 11 );    // true gapless: valid samples in last frame
    95     WriteBits ( 0            , 20 );
     95    WriteBits ( 1            , 1 );             // we now support fast seeking
     96    WriteBits ( 0            , 19 );
    9697
    9798    WriteBits ( (MPPENC_VERSION[0]&15)*100 + (MPPENC_VERSION[2]&15)*10 + (MPPENC_VERSION[3]&15),
     
    109110#define ENCODE_SCF1( new, old, rll )                         \
    110111        d = new - old + 7;                                   \
    111         if ( d <= 14u  &&  (rll < 32  || (int)new < 0 ) ) {  \
     112        if ( d <= 14u  && rll < 32) {                        \
    112113            WriteBits ( Table[d].Code, Table[d].Length );    \
    113114        }                                                    \
     
    242243            case 2:
    243244                ENCODE_SCF1 ( SCF_Index_L[n][0], SCF_Last_L[n]    , DSCF_RLL_L[n] );
    244                 ENCODE_SCFn ( SCF_Index_L[n][2], SCF_Index_L[n][1], DSCF_RLL_L[n] );
     245                ENCODE_SCFn ( SCF_Index_L[n][2], SCF_Index_L[n][0], DSCF_RLL_L[n] );
    245246                SCF_Last_L[n] = SCF_Index_L[n][2];
    246247                break;
     
    251252            }
    252253        }
    253         DSCF_RLL_L[n]++;        // Increased counters for SCF that haven't been initialized again
     254        if (DSCF_RLL_L[n] <= 32)
     255            DSCF_RLL_L[n]++;        // Increased counters for SCF that haven't been initialized again
    254256
    255257        if ( Res_R[n] ) {
     
    268270            case 2:
    269271                ENCODE_SCF1 ( SCF_Index_R[n][0], SCF_Last_R[n]    , DSCF_RLL_R[n] );
    270                 ENCODE_SCFn ( SCF_Index_R[n][2], SCF_Index_R[n][1], DSCF_RLL_R[n] );
     272                ENCODE_SCFn ( SCF_Index_R[n][2], SCF_Index_R[n][0], DSCF_RLL_R[n] );
    271273                SCF_Last_R[n] = SCF_Index_R[n][2];
    272274                break;
     
    277279            }
    278280        }
    279         DSCF_RLL_R[n]++;          // Increased counters for SCF that haven't been freshly initialized
     281        if (DSCF_RLL_R[n] <= 32)
     282            DSCF_RLL_R[n]++;          // Increased counters for SCF that haven't been freshly initialized
    280283    }
    281284
Note: See TracChangeset for help on using the changeset viewer.