Commit 15560d74 authored by Dominik Weckbecker's avatar Dominik Weckbecker 💬
Browse files

Merge branch '1615_basop-port-mr-1413-from-float' into 'main-pc'

Port float MR 1413 to BASOP

See merge request !1634
parents 020a8d61 3921fa88
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -1155,6 +1155,9 @@ void ivas_mono_stereo_downmix_mcmasa_fx(
);

void ivas_apply_non_diegetic_panning_fx(
#ifdef FIX_1009_ISM_NONDIEGETIC_PANNING
    Word32 *input_f_fx,                                             /* i  : non-diegetic object                                         */
#endif
    Word32 *output_f_fx[],                 /* i/o: core-coder transport mono channel/stereo output  */
    const Word16 non_diegetic_pan_gain_fx, /* i  : non-diegetic panning gain                        */
    const Word16 output_frame              /* i  : output frame length per channel                  */
+1 −0
Original line number Diff line number Diff line
@@ -140,6 +140,7 @@
/* #define NONBE_FIX_991_PARAMBIN_BINARY_HRTF   */           /* Nokia: issue #991: fix using of binary file HRTF in ParamBin (to activate when USE_NEW_HRTF_BINARY_FILE_FORMAT and FIX_777_COMBI_RENDER_CONFIG_FILE are on ) */

#define FIX_1008_EXTORIENT_TARGET_INTERPOLATION          /* FhG: issue #1008, external orientation init was wrong for 5ms */
#define FIX_1009_ISM_NONDIEGETIC_PANNING                /* FhG: issue #1009: use correct object buffer for ISM1 non-diegetic pan      */

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

+4 −0
Original line number Diff line number Diff line
@@ -1992,7 +1992,11 @@ ivas_error ivas_jbm_dec_render_fx(
            }
            ELSE IF( EQ_32( st_ivas->renderer_type, RENDERER_NON_DIEGETIC_DOWNMIX ) )
            {
#ifdef FIX_1009_ISM_NONDIEGETIC_PANNING
                ivas_apply_non_diegetic_panning_fx( p_tc_fx[0], p_output_fx, st_ivas->hDecoderConfig->non_diegetic_pan_gain_fx, *nSamplesRendered );
#else
                ivas_apply_non_diegetic_panning_fx( p_output_fx, st_ivas->hDecoderConfig->non_diegetic_pan_gain_fx, *nSamplesRendered );
#endif
            }
#ifdef DEBUGGING
            ELSE IF( EQ_32( st_ivas->renderer_type, RENDERER_SBA_LINEAR_ENC ) || EQ_32( st_ivas->renderer_type, RENDERER_BINAURAL_FASTCONV ) )
+9 −1
Original line number Diff line number Diff line
@@ -318,7 +318,10 @@ void ivas_mono_stereo_downmix_mcmasa_fx(
 *------------------------------------------------------------------------*/

void ivas_apply_non_diegetic_panning_fx(
    Word32 *output_f_fx[],                 /* i/o: core-coder transport mono channel/stereo output  */
#ifdef FIX_1009_ISM_NONDIEGETIC_PANNING
    Word32 *input_f_fx, /* i  : non-diegetic object                                 */
#endif
    Word32 *output_f_fx[],                 /* o: core-coder transport mono channel/stereo output       */
    const Word16 non_diegetic_pan_gain_fx, /* i  : non-diegetic panning gain                        Q15*/
    const Word16 output_frame              /* i  : output frame length per channel                  Q11*/
)
@@ -328,8 +331,13 @@ void ivas_apply_non_diegetic_panning_fx(
    pan_left_fx = add( mult( non_diegetic_pan_gain_fx, 16384 ), 16384 ); // 0.5.Q15 = 16384
    pan_right_fx = sub( 32767, pan_left_fx );

#ifdef FIX_1009_ISM_NONDIEGETIC_PANNING
    v_multc_fixed( input_f_fx, L_shl( L_deposit_l( pan_right_fx ), 16 ), output_f_fx[1], output_frame );
    v_multc_fixed( input_f_fx, L_shl( L_deposit_l( pan_left_fx ), 16 ), output_f_fx[0], output_frame );
#else
    v_multc_fixed( output_f_fx[0], L_shl( L_deposit_l( pan_right_fx ), 16 ), output_f_fx[1], output_frame );
    v_multc_fixed( output_f_fx[0], L_shl( L_deposit_l( pan_left_fx ), 16 ), output_f_fx[0], output_frame );
#endif

    return;
}