Commit 4d598b9d authored by Archit Tamarapu's avatar Archit Tamarapu
Browse files

[cleanup] accept FIX_NCHAN_BUFFERS

parent 89018684
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -133,7 +133,6 @@
#define FIX_1384_MSAN_ivas_spar_dec_open                /* VA: issue 1386: fix use-of-uninitialized value in ivas_spar_dec_open() */
#define FIX_1388_MSAN_ivas_init_decoder                 /* VA: issue 1388: fix use-of-uninitialized value in ivas_init_decoder() */
#define FIX_1288_SPLIT_REND_XSAN                        /* Dlb: Fix asan, msan and usan issues in split rendering mode*/
#define FIX_NCHAN_BUFFERS                               /* VA: issue 1322: Correct the number of float buffers (channels) at the decoder */
#define FIX_RENDERER_STACK                              /* VA: issue 1322: reduction of renderers' buffers size */
#define JBM_MEMORY_OPT                                  /* VA: issue 916: optimization of RAM in the JBM decoder */
#define NONBE_1324_TC_BUFFER_MEMOERY_KEEP               /* VA: issue 1324: do not reset TSM memory in JBM bitrate switching */
+0 −4
Original line number Diff line number Diff line
@@ -3222,12 +3222,8 @@ ivas_error ivas_init_decoder_fx(
        return error;
    }
#else
#ifdef FIX_NCHAN_BUFFERS
    k = ivas_get_nchan_buffers_dec_fx( st_ivas, st_ivas->sba_analysis_order, ivas_total_brate );
    FOR( n = 0; n < k; n++ )
#else
    FOR( n = 0; n < ivas_get_nchan_buffers_dec_fx( st_ivas, st_ivas->sba_analysis_order, ivas_total_brate ); n++ )
#endif
    {
        /* note: these are intra-frame heap memories */
        IF( ( st_ivas->p_output_fx[n] = (Word32 *) malloc( ( 48000 / FRAMES_PER_SEC ) * sizeof( Word32 ) ) ) == NULL )
+0 −4
Original line number Diff line number Diff line
@@ -1661,16 +1661,12 @@ void ivas_jbm_dec_feed_tc_to_renderer_fx(
            move16();
        }

#ifdef FIX_NCHAN_BUFFERS
#ifdef JBM_MEMORY_OPT
        ch = s_max( hTcBuffer->nchan_transport_jbm, hTcBuffer->nchan_buffer_full );
#else
        ch = ivas_get_nchan_buffers_dec_fx( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate );
#endif
        FOR( n = 0; n < ch; n++ )
#else
        FOR( n = 0; n < ivas_get_nchan_buffers_dec_fx( st_ivas, st_ivas->sba_analysis_order, st_ivas->hDecoderConfig->ivas_total_brate ); n++ )
#endif
        {
            hTcBuffer->tc_fx[n] = st_ivas->p_output_fx[n]; /* note: buffers needed in the TD decorellator */
            move16();
+0 −10
Original line number Diff line number Diff line
@@ -1689,12 +1689,10 @@ ivas_error ivas_masa_dec_reconfigure_fx(
    Decoder_State **sts;
    UWord32 ivas_total_brate, last_ivas_total_brate;
    Word16 numCldfbAnalyses_old, numCldfbSyntheses_old;
#ifdef FIX_NCHAN_BUFFERS
#ifdef FIX_1330_JBM_MEMORY
    Word16 nchan_out_buff;
#else
    Word16 nchan_out_buff_old, nchan_out_buff;
#endif
#endif
    ivas_error error;
    Word32 ism_total_brate;
@@ -1704,10 +1702,8 @@ ivas_error ivas_masa_dec_reconfigure_fx(
    move32();
    last_ivas_total_brate = st_ivas->hDecoderConfig->last_ivas_total_brate;
    move32();
#ifdef FIX_NCHAN_BUFFERS
#ifndef FIX_1330_JBM_MEMORY
    nchan_out_buff_old = ivas_get_nchan_buffers_dec_fx( st_ivas, -1, -1 );
#endif
#endif

    test();
@@ -1976,7 +1972,6 @@ ivas_error ivas_masa_dec_reconfigure_fx(
            }
            ELSE
            {
#ifdef FIX_NCHAN_BUFFERS
                tc_nchan_to_allocate = BINAURAL_CHANNELS;
                move16();
                test();
@@ -1985,9 +1980,6 @@ ivas_error ivas_masa_dec_reconfigure_fx(
                    tc_nchan_to_allocate = 2 * BINAURAL_CHANNELS;
                    move16();
                }
#else
                tc_nchan_to_allocate = shl( BINAURAL_CHANNELS, 1 );
#endif
            }

            test();
@@ -2054,7 +2046,6 @@ ivas_error ivas_masa_dec_reconfigure_fx(
        }
    }

#ifdef FIX_NCHAN_BUFFERS
    /*-----------------------------------------------------------------*
     * output audio buffers
     *-----------------------------------------------------------------*/
@@ -2073,7 +2064,6 @@ ivas_error ivas_masa_dec_reconfigure_fx(
        }
    }

#endif
    return IVAS_ERR_OK;
}

+0 −5
Original line number Diff line number Diff line
@@ -1555,7 +1555,6 @@ static ivas_error ivas_mc_dec_reconfig_fx(
        test();
        IF( EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC ) || EQ_16( st_ivas->renderer_type, RENDERER_BINAURAL_PARAMETRIC_ROOM ) || EQ_16( st_ivas->renderer_type, RENDERER_STEREO_PARAMETRIC ) )
        {
#ifdef FIX_NCHAN_BUFFERS
            tc_nchan_allocate_new = BINAURAL_CHANNELS;
            move16();
            test();
@@ -1568,10 +1567,6 @@ static ivas_error ivas_mc_dec_reconfig_fx(
            {
                tc_nchan_allocate_new = add( tc_nchan_allocate_new, 1 );
            }
#else
            tc_nchan_allocate_new = BINAURAL_CHANNELS * 2;
            move16();
#endif
            tc_nchan_full_new = tc_nchan_allocate_new;
            move16();
        }
Loading