Commit 756c53b7 authored by multrus's avatar multrus
Browse files

Merge branch...

Merge branch '2196_basop_ivas-osba-stereo-add-channels-differs-between-ivas-main-and-ivas-float-update' into 'main'

Resolve "ivas_osba_stereo_add_channels() differs between ivas-main and ivas-float-update"

Closes #2196

See merge request !2531
parents 4bdf3862 720f0b5b
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -3800,10 +3800,16 @@ ivas_error ivas_osba_render_sf_fx(
void ivas_osba_stereo_add_channels_fx(
    Word32 *tc_fx[],                                            /* i  : transport channels                          */
    Word32 *output_fx[],                                        /* i/o: output channels                             */
#ifdef FIX_2196_UNREACHABLE_CODE_IN_OSBA_STEREO_OUTPUT
    const Word32 gain,                                          /* i  : gain bed value Q11                          */
#else
    const Word32 gain_bed_fx,                                   /* i  : gain bed value Q11                          */
#endif
    const Word16 nchan_out,                                     /* i  : number of output channels                   */
    const Word16 nchan_ism,                                     /* i  : number of ISM channels                      */
#ifndef FIX_2196_UNREACHABLE_CODE_IN_OSBA_STEREO_OUTPUT
    const Word16 ism_mode,                                      /* i  : ISM mode                                    */
#endif
    const UWord16 n_samples_to_render                           /* i  : output frame length per channel             */
);

+1 −0
Original line number Diff line number Diff line
@@ -96,6 +96,7 @@
#define FIX_FLOAT_1526_DIRAC_MEM_LEAK                   /* FhG: float issue 1526: potential memory leak in DirAC handles in case of format switching */
#define FIX_2437_HARMONIZE_ENCODERINDEX                 /* FhG: basop issue 2437 EncoderIndex_ivas_fx() and EncoderIndex_fx()*/
#define FIX_2385_GETTCXONLY                             /* FhG: issue 2385 : harmonizing getTcxonly_ivas_fx() and getTcxonly_ivas_fx() functions */
#define FIX_2196_UNREACHABLE_CODE_IN_OSBA_STEREO_OUTPUT /* FhG: remove unreachable code in ivas_osba_stereo_add_channels */

/* #################### End BE switches ################################## */

+4 −0
Original line number Diff line number Diff line
@@ -511,7 +511,11 @@ ivas_error ivas_dec_render_fx(
                ivas_ism_render_sf_fx( st_ivas, st_ivas->renderer_type, p_output_fx, *nSamplesRendered );

                /* add already rendered SBA part */
#ifdef FIX_2196_UNREACHABLE_CODE_IN_OSBA_STEREO_OUTPUT
                ivas_osba_stereo_add_channels_fx( p_tc_fx, p_output_fx, st_ivas->hSbaIsmData->gain_bed_fx, nchan_out, st_ivas->nchan_ism, *nSamplesRendered );
#else
                ivas_osba_stereo_add_channels_fx( p_tc_fx, p_output_fx, st_ivas->hSbaIsmData->gain_bed_fx, nchan_out, st_ivas->nchan_ism, st_ivas->ism_mode, *nSamplesRendered );
#endif
            }
            ELSE IF( EQ_32( st_ivas->renderer_type, RENDERER_OSBA_AMBI ) || EQ_32( st_ivas->renderer_type, RENDERER_OSBA_LS ) || EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV_ROOM ) )
            {
+17 −7
Original line number Diff line number Diff line
@@ -319,20 +319,27 @@ ivas_error ivas_osba_render_sf_fx(
void ivas_osba_stereo_add_channels_fx(
    Word32 *tc_fx[],     /* i  : transport channels                */
    Word32 *output_fx[], /* i/o: output channels                   */
#ifdef FIX_2196_UNREACHABLE_CODE_IN_OSBA_STEREO_OUTPUT
    const Word32 gain, /* i  : gain bed value                    */
#else
    const Word32 gain_bed_fx, /* i  : gain bed value                    */
#endif
    const Word16 nchan_out, /* i  : number of output channels         */
    const Word16 nchan_ism, /* i  : number of ISM channels            */
#ifndef FIX_2196_UNREACHABLE_CODE_IN_OSBA_STEREO_OUTPUT
    const Word16 ism_mode, /* i  : ISM mode                          */
#endif
    const UWord16 n_samples_to_render /* i  : output frame length per channel   */
)
{
    Word16 n, i;

#ifndef FIX_2196_UNREACHABLE_CODE_IN_OSBA_STEREO_OUTPUT
    IF( EQ_16( ism_mode, ISM_SBA_MODE_DISC ) )
    {
        Word32 gain = gain_bed_fx;
        move32();

#endif
        test();
        IF( NE_32( gain, ONE_IN_Q29 ) && GT_32( gain, 0 ) )
        {
@@ -357,6 +364,7 @@ void ivas_osba_stereo_add_channels_fx(
                }
            }
        }
#ifndef FIX_2196_UNREACHABLE_CODE_IN_OSBA_STEREO_OUTPUT
    }
    ELSE
    {
@@ -368,6 +376,8 @@ void ivas_osba_stereo_add_channels_fx(
            }
        }
    }
#endif


    return;
}