Commit 22a940b2 authored by Sandesh Venkatesh's avatar Sandesh Venkatesh
Browse files

JBM issue fixes

parent a63724a6
Loading
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -2791,7 +2791,7 @@ ivas_error ivas_jbm_dec_render(
    {
#ifdef IVAS_FLOAT_FIXED
        FOR(Word16 ind = 0; ind < st_ivas->hTcBuffer->nchan_transport_jbm; ind++) {
            floatToFixed_arrL(st_ivas->hTcBuffer->tc[ind] + st_ivas->hTcBuffer->n_samples_rendered, st_ivas->hTcBuffer->tc_fx[ind] + st_ivas->hTcBuffer->n_samples_rendered, Q11, s_max(*nSamplesRendered, nSamplesAskedLocal));
            floatToFixed_arrL(st_ivas->hTcBuffer->tc[ind] + st_ivas->hTcBuffer->n_samples_rendered, st_ivas->hTcBuffer->tc_fx[ind] + st_ivas->hTcBuffer->n_samples_rendered, Q11, st_ivas->hTcBuffer->tc_buffer_len- st_ivas->hTcBuffer->n_samples_rendered);
            p_output_fx[ind] = malloc(sizeof(Word32) * 960);
            floatToFixed_arrL(p_output[ind], p_output_fx[ind], Q11, s_max(*nSamplesRendered, nSamplesAskedLocal));
        }
@@ -5100,6 +5100,7 @@ ivas_error ivas_jbm_dec_tc_buffer_open(
                {
                    return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for JBM TC Buffer\n" ) );
                }
                hTcBuffer->tc_buffer_len = nsamp_to_allocate;
                set32_fx( hTcBuffer->tc_buffer_fx, 0, nsamp_to_allocate );
#endif

@@ -5277,6 +5278,7 @@ ivas_error ivas_jbm_dec_tc_buffer_open_fx(
                {
                    return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for JBM TC Buffer\n" ) );
                }
                hTcBuffer->tc_buffer_len = nsamp_to_allocate;
                set32_fx( hTcBuffer->tc_buffer_fx, 0, nsamp_to_allocate );

                offset = 0;
+1 −0
Original line number Diff line number Diff line
@@ -1217,6 +1217,7 @@ typedef struct decoder_tc_buffer_structure
    float *tc_buffer;                                                                                                                /* the buffer itself                                                        */
    float *tc[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS]; /* pointers into the buffer to the beginning of each tc                     */ // VE2SB: TBV
#ifdef IVAS_FLOAT_FIXED
    Word16 tc_buffer_len;
    Word32 *tc_buffer_fx;                                                                                                           /* the buffer itself                                                        */
    Word32 *tc_fx[MAX_OUTPUT_CHANNELS + MAX_NUM_OBJECTS]; /* pointers into the buffer to the beginning of each tc                    */ // VE2SB: TBV
#endif
+9 −0
Original line number Diff line number Diff line
@@ -862,12 +862,21 @@ static void JB4_adaptActivePlayout(
        {
            IF ( convertToLateLoss )
            {
#ifdef EVS_FLOAT
                JB4_dropFromBuffer( h );
#else
                JB4_dropFromBuffer( h );
                h->nLostOrStretched = L_add( h->nLostOrStretched, 1 );
#endif // EVS_FLOAT
            }
            ELSE IF ( dropEarly )
            {
#ifdef EVS_FLOAT
                JB4_dropFromBuffer( h );
                ++h->nLostOrStretched;
#else
                JB4_dropFromBuffer( h );
#endif
            }
            ELSE
            {