Commit 00b8af57 authored by Michael Sturm's avatar Michael Sturm
Browse files

Unifies IGFDecReadData function.

parent 9fcc1eac
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -1425,13 +1425,14 @@ void mdct_read_IGF_bits_fx(
    Decoder_State *st0                                          /* i  : pointer to handle where bitstream is read   */
);

#ifndef FIX_2346_DUPLICATED_IGF_FUNCTIONS
void IGFDecReadData_ivas_fx( 
    const IGF_DEC_INSTANCE_HANDLE hInstance,                    /* i  : instance handle of IGF Deccoder                      */
    Decoder_State *st,                                          /* i  : decoder state                                        */
    const Word16 igfGridIdx,                                    /* i  : in case of CELP->TCX switching, use 1.25 framelength */
    const Word16 isIndepFrame                                   /* i  : if 1: arith dec force reset, if 0: no reset          */
);

#endif
void stereo_tca_init_dec_fx(
    STEREO_TCA_DEC_HANDLE hStereoTCA                            /* i/o: Stereo TCA handle for Fixed             */
);
+18 −5
Original line number Diff line number Diff line
@@ -3079,11 +3079,19 @@ static void IGF_RefineGrid_ivas_fx( H_IGF_GRID hGrid /**< in/out: | IGF grid han
/**********************************************************************/ /*
reads whitening information from the bitstream
**************************************************************************/
#ifdef FIX_2346_DUPLICATED_IGF_FUNCTIONS
void IGFDecReadData( const IGF_DEC_INSTANCE_HANDLE hInstance,    /**< in:     | instance handle of IGF Deccoder                      */
                     Decoder_State *st,                          /**< in:     | decoder state                                        */
                     const Word16 igfGridIdx,                    /**< in: Q0  | in case of CELP->TCX switching, use 1.25 framelength */
                     const Word16 isIndepFrame                   /**< in: Q0  | if 1: arith dec force reset, if 0: no reset          */
)
#else
void IGFDecReadData_ivas_fx( const IGF_DEC_INSTANCE_HANDLE hInstance, /**< in:     | instance handle of IGF Deccoder                      */
                             Decoder_State *st,                       /**< in:     | decoder state                                        */
                             const Word16 igfGridIdx,                 /**< in: Q0  | in case of CELP->TCX switching, use 1.25 framelength */
                             const Word16 isIndepFrame                /**< in: Q0  | if 1: arith dec force reset, if 0: no reset          */
)
#endif
{
    IGF_DEC_PRIVATE_DATA_HANDLE hPrivateData;
    H_IGF_GRID hGrid;
@@ -3125,7 +3133,11 @@ void IGFDecReadData_ivas_fx( const IGF_DEC_INSTANCE_HANDLE hInstance, /**< in
        {
            IGF_decode_whitening_level( st, hPrivateData, 0 );
            test();
#ifdef FIX_2346_DUPLICATED_IGF_FUNCTIONS
            IF( ( EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_SWB_48000_CPE ) || EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_FB_48000_CPE ) ) && GT_16( st->element_mode, EVS_MONO ) )
#else
            IF( EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_SWB_48000_CPE ) || EQ_16( hPrivateData->igfInfo.bitRateIndex, IGF_BITRATE_FB_48000_CPE ) )
#endif
            {
                tmp = 0;
                move16();
@@ -3164,6 +3176,7 @@ void IGFDecReadData_ivas_fx( const IGF_DEC_INSTANCE_HANDLE hInstance, /**< in
    }
}

#ifndef FIX_2346_DUPLICATED_IGF_FUNCTIONS
void IGFDecReadData( const IGF_DEC_INSTANCE_HANDLE hInstance, /**< in:     | instance handle of IGF Deccoder                      */
                     Decoder_State *st,                       /**< in:     | decoder state                                        */
                     const Word16 igfGridIdx,                 /**< in: Q0  | in case of CELP->TCX switching, use 1.25 framelength */
@@ -3238,7 +3251,7 @@ void IGFDecReadData( const IGF_DEC_INSTANCE_HANDLE hInstance, /**< in: | ins
        IGF_decode_temp_flattening_trigger( st, hInstance );
    }
}

#endif
/**********************************************************************/ /*
read the IGF level information from the bitsream
**************************************************************************/
+8 −0
Original line number Diff line number Diff line
@@ -72,7 +72,11 @@ void mdct_read_IGF_bits_fx(
        /* read IGF payload */
        IGFDecReadLevel( st->hIGFDec, st0, temp, 1 );

#ifdef FIX_2346_DUPLICATED_IGF_FUNCTIONS
        IGFDecReadData( st->hIGFDec, st0, temp, 1 );
#else
        IGFDecReadData_ivas_fx( st->hIGFDec, st0, temp, 1 );
#endif
    }

    IF( EQ_16( st->core, TCX_10_CORE ) )
@@ -91,7 +95,11 @@ void mdct_read_IGF_bits_fx(
            }
            IGFDecReadLevel( st->hIGFDec, st0, IGF_GRID_LB_SHORT, temp );

#ifdef FIX_2346_DUPLICATED_IGF_FUNCTIONS
            IGFDecReadData( st->hIGFDec, st0, IGF_GRID_LB_SHORT, temp );
#else
            IGFDecReadData_ivas_fx( st->hIGFDec, st0, IGF_GRID_LB_SHORT, temp );
#endif

            IGFDecStoreTCX10SubFrameData( st->hIGFDec, k );
        }