Commit a2d8c68d authored by TYAGIRIS's avatar TYAGIRIS
Browse files

temporary fix for IGF issue at SBA 128 kbps

parent ff0aca81
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -165,6 +165,8 @@
#define FIX_482_DUMMYDEC_INIT                           /* Nokia: fix issue #428: missing inits for dummyDec in IVAS_rend */
#define FIX_468_16KHZ_PUPMIX                            /* Dlb: Fix issue 468 for Param Upmix at 16kHz sampling rate */

#define FIX_SBA_3TC_MODE                                /*Dlb: Fix for 3 TC mode in SBA*/
//#define FIX_SBA_3TC_MODE_DEBUG
/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */

+19 −0
Original line number Diff line number Diff line
@@ -1012,10 +1012,29 @@ ivas_error ivas_init_decoder(

        for ( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ )
        {
#ifdef FIX_SBA_3TC_MODE
            if ( ivas_total_brate == IVAS_128k )
            {
                if ( ( error = create_cpe_dec( st_ivas, cpe_id, ( ivas_total_brate / st_ivas->nCPE ) ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
            }
            else
            {
                if ( ( error = create_cpe_dec( st_ivas, cpe_id, ( ivas_total_brate / st_ivas->nchan_transport ) * CPE_CHANNELS ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
            }

#else
            if ( ( error = create_cpe_dec( st_ivas, cpe_id, ( ivas_total_brate / st_ivas->nchan_transport ) * CPE_CHANNELS ) ) != IVAS_ERR_OK )
            {
                return error;
            }
#endif


            for ( n = 0; n < CPE_CHANNELS; n++ )
            {
+5 −4
Original line number Diff line number Diff line
@@ -1401,24 +1401,24 @@ void ivas_spar_dec_upmixer(
    }
#endif

#ifdef DEBUG_SPAR_BYPASS_EVS_CODEC
#if defined DEBUG_SPAR_BYPASS_EVS_CODEC || defined FIX_SBA_3TC_MODE_DEBUG
    /* by-pass core-coder */
    /*write the core coder output to a file for debugging*/
    {
        float tmp;
        int16_t pcm, j;
        for ( j = 0; j < output_frame; j++ )
        for ( j = 0; j < 240; j++ )
        {
            for ( i = 0; i < nchan_transport; i++ )
            {
                tmp = roundf( output[i][j] * PCM16_TO_FLT_FAC );
                tmp = roundf( output[i][j] );
                pcm = ( tmp > MAX16B_FLT ) ? MAX16B : ( tmp < MIN16B_FLT ) ? MIN16B
                                                                           : (short) tmp;
                dbgwrite( &pcm, sizeof( int16_t ), 1, 1, "dmx_dec.raw" );
            }
        }
    }

#ifndef FIX_SBA_3TC_MODE_DEBUG
    /*overwrite the core coder output with core input for debugging*/
    {
        static FILE *fid_enc = 0;
@@ -1437,6 +1437,7 @@ void ivas_spar_dec_upmixer(
        }
    }
#endif
#endif

#ifndef JBM_TSM_ON_TCS
    /*---------------------------------------------------------------------*
+18 −0
Original line number Diff line number Diff line
@@ -564,10 +564,28 @@ ivas_error ivas_init_encoder(

        for ( cpe_id = 0; cpe_id < st_ivas->nCPE; cpe_id++ )
        {
#ifdef FIX_SBA_3TC_MODE
            if ( ivas_total_brate == IVAS_128k )
            {
                if ( ( error = create_cpe_enc( st_ivas, cpe_id, ( ivas_total_brate / st_ivas->nCPE ) ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
            }
            else
            {
                if ( ( error = create_cpe_enc( st_ivas, cpe_id, ( ivas_total_brate / st_ivas->nchan_transport ) * CPE_CHANNELS ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
            }
#else
            if ( ( error = create_cpe_enc( st_ivas, cpe_id, ( ivas_total_brate / st_ivas->nchan_transport ) * CPE_CHANNELS ) ) != IVAS_ERR_OK )
            {
                return error;
            }
#endif


            for ( n = 0; n < CPE_CHANNELS; n++ )
            {
+6 −0
Original line number Diff line number Diff line
@@ -548,6 +548,9 @@ void ivas_mct_core_enc(

#ifdef DEBUGGING
            total_brate += st->total_brate;
#endif
#ifdef FIX_SBA_3TC_MODE_DEBUG
            printf( " bits ch %d , %d,  ", ch, st->bits_frame_channel );
#endif
        }
#ifdef DEBUGGING
@@ -557,6 +560,9 @@ void ivas_mct_core_enc(
        }
#endif
    }
#ifdef FIX_SBA_3TC_MODE_DEBUG
    printf( " frame %d \n", frame );
#endif

#ifdef DEBUGGING
    format_bits = ( ivas_format == MC_FORMAT ? IVAS_FORMAT_SIGNALING_NBITS + MC_LS_SETUP_BITS : IVAS_FORMAT_SIGNALING_NBITS_EXTENDED + SBA_ORDER_BITS + SBA_PLANAR_BITS );
Loading