Commit 7d346792 authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

port NONBE_FIX_1262_OSBA_STEREO from float

parent 2035c6fb
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -5618,7 +5618,9 @@ void ivas_osba_stereo_add_channels(
    const float gain,                                           /* i  : gain bed value                          */
    const int16_t nchan_out,                                    /* i  : number of output channels               */
    const int16_t nchan_ism,                                    /* i  : number of ISM channels                  */
#ifndef NONBE_FIX_1262_OSBA_STEREO
    const int16_t ism_mode,                                     /* i  : ISM mode                                */
#endif
    const int16_t n_samples_to_render                           /* i  : output frame length per channel         */
);
#endif
+1 −0
Original line number Diff line number Diff line
@@ -206,6 +206,7 @@
#define NONBE_FIX_1174_MCMASA_LBR_LOOP_ERROR            /* Nokia: Fix issue 1174 by removing the unnecessary inner loop causing problems. */

#define FIX_1849_OBJ_EDITING_API
#define NONBE_FIX_1262_OSBA_STEREO

/* #################### End BASOP porting switches ############################ */

+6 −0
Original line number Diff line number Diff line
@@ -1239,7 +1239,13 @@ ivas_error ivas_jbm_dec_render(

                /* add already rendered SBA part */
#ifdef FIX_1849_OBJ_EDITING_API

#ifdef NONBE_FIX_1262_OSBA_STEREO
                ivas_osba_stereo_add_channels( p_tc, p_output, 1.0f, nchan_out, st_ivas->nchan_ism, *nSamplesRendered );
#else
                ivas_osba_stereo_add_channels( p_tc, p_output, 1.0f, nchan_out, st_ivas->nchan_ism, st_ivas->ism_mode, *nSamplesRendered );
#endif

#else
                for ( n = 0; n < nchan_out; n++ )
                {
+15 −0
Original line number Diff line number Diff line
@@ -316,14 +316,18 @@ void ivas_osba_stereo_add_channels(
    const float gain,                 /* i  : gain bed value                    */
    const int16_t nchan_out,          /* i  : number of output channels         */
    const int16_t nchan_ism,          /* i  : number of ISM channels            */
#ifndef NONBE_FIX_1262_OSBA_STEREO
    const int16_t ism_mode,           /* i  : ISM mode                          */
#endif
    const int16_t n_samples_to_render /* i  : output frame length per channel   */
)
{
    int16_t n;

#ifndef NONBE_FIX_1262_OSBA_STEREO
    if ( ism_mode == ISM_SBA_MODE_DISC )
    {
#endif
        if ( gain != 1.0f )
        {
            assert( 0 && "Object editing is not implemented in this branch!" );
@@ -335,6 +339,7 @@ void ivas_osba_stereo_add_channels(
                v_add( output_f[n], tc_f[n + nchan_ism], output_f[n], n_samples_to_render );
            }
        }
#ifndef NONBE_FIX_1262_OSBA_STEREO
    }
    else
    {
@@ -343,6 +348,16 @@ void ivas_osba_stereo_add_channels(
            v_add( output_f[n], tc_f[n + nchan_ism], output_f[n], n_samples_to_render );
        }
    }
#endif


#ifdef NONBE_FIX_1262_OSBA_STEREO
    for ( n = 0; n < nchan_out; n++ )
    {
        v_multc( output_f[n], 0.5f, output_f[n], n_samples_to_render );
    }
#endif


    return;
}