Commit a8156ed0 authored by Jan Kiene's avatar Jan Kiene
Browse files

port MR 1413 from float

fix ISM1 non-diegetic panning
parent 2c2a6925
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                  */
+2 −0
Original line number Diff line number Diff line
@@ -129,6 +129,8 @@
#define NONBE_FIX_947_STEREO_DMX_FADOPT                       /* Orange: Fading optimisation */  
#endif     

#define FIX_1009_ISM_NONDIEGETIC_PANNING                /* FhG: issue #1009: use correct object buffer for ISM1 non-diegetic pan      */

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

#endif
+4 −0
Original line number Diff line number Diff line
@@ -1996,7 +1996,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 ) )
+8 −0
Original line number Diff line number Diff line
@@ -318,6 +318,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                        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, pan_right_fx, output_f_fx[1], output_frame );
    v_multc_fixed( input_f_fx, pan_left_fx, 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;
}