Commit fbb62107 authored by multrus's avatar multrus
Browse files

[cleanup] accept FIX_764_HARM_CODE

parent ba4b3006
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -773,13 +773,11 @@ void dtx_read_padding_bits(
    const int16_t num_bits 
);

#ifdef FIX_764_HARM_CODE
void ivas_apply_non_diegetic_panning( 
    float *output_f[],                                          /* i/o: core-coder transport mono channel/stereo output             */
    const float non_diegetic_pan_gain,                          /* i  : non-diegetic panning gain                                   */
    const int16_t output_frame                                  /* i  : output frame length per channel                             */
);
#endif


/*----------------------------------------------------------------------------------*
+0 −1
Original line number Diff line number Diff line
@@ -163,7 +163,6 @@
#define FIX_708_DPID_COMMAND_LINE                       /* issue 708: sanity checks for '-dpid' command-line */
#define FIX_730_DPID_NOT_SET_CORRECTLY                  /* Eri: issue 730: write dpid read from file in correct index, print informative error message when DPID specified is not found. */
#define FIX_513_REND_MC_ALLOC                           /* FhG: issue 513, optimise external renderer allocation for multichannel */
#define FIX_764_HARM_CODE                               /* VA: issue 764: introduce new function for the same code block at four different places */
#define FIX_747_ISM_TODOS                               /* VA: issue 747 - address ISM ToDos */
#define FIX_ISMRENDERER_HANDLE_DEALLOC                  /* VA: issue 781: harmonize Deallocation of handle 'hIsmRendererData' */
#define FIX_782_OSBA_FUNCTION_NAMES                     /* VA: fix 782: correct OSBA function names */
+0 −17
Original line number Diff line number Diff line
@@ -68,9 +68,6 @@ ivas_error ivas_dec(
    int16_t nb_bits_metadata[MAX_SCE + 1];
    int32_t output_Fs, ivas_total_brate;
    AUDIO_CONFIG output_config;
#ifndef FIX_764_HARM_CODE
    float pan_left, pan_right;
#endif
    ivas_error error;
    int16_t num_md_sub_frames;
    int32_t ism_total_brate;
@@ -236,14 +233,7 @@ ivas_error ivas_dec(
            }
            else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX )
            {
#ifdef FIX_764_HARM_CODE
                ivas_apply_non_diegetic_panning( p_output, st_ivas->hDecoderConfig->non_diegetic_pan_gain, output_frame );
#else
                pan_left = ( st_ivas->hDecoderConfig->non_diegetic_pan_gain + 1.f ) * 0.5f;
                pan_right = 1.f - pan_left;
                v_multc( p_output[0], pan_right, p_output[1], output_frame );
                v_multc( p_output[0], pan_left, p_output[0], output_frame );
#endif
            }
            else if ( st_ivas->renderer_type == RENDERER_PARAM_ISM || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC )
            {
@@ -265,14 +255,7 @@ ivas_error ivas_dec(
            }
            else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX )
            {
#ifdef FIX_764_HARM_CODE
                ivas_apply_non_diegetic_panning( p_output, st_ivas->hDecoderConfig->non_diegetic_pan_gain, output_frame );
#else
                pan_left = ( st_ivas->hDecoderConfig->non_diegetic_pan_gain + 1.f ) * 0.5f;
                pan_right = 1.f - pan_left;
                v_multc( p_output[0], pan_right, p_output[1], output_frame );
                v_multc( p_output[0], pan_left, p_output[0], output_frame );
#endif
            }
            else if ( st_ivas->renderer_type == RENDERER_TD_PANNING || st_ivas->renderer_type == RENDERER_BINAURAL_MIXER_CONV_ROOM )
            {
+0 −17
Original line number Diff line number Diff line
@@ -980,9 +980,6 @@ ivas_error ivas_jbm_dec_render(
    int16_t nchan_remapped;
    int32_t output_Fs;
    AUDIO_CONFIG output_config;
#ifndef FIX_764_HARM_CODE
    float pan_left, pan_right;
#endif
    int16_t nSamplesAskedLocal;
    ivas_error error;

@@ -1073,14 +1070,7 @@ ivas_error ivas_jbm_dec_render(
            else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX )
            {
                *nSamplesRendered = min( st_ivas->hTcBuffer->n_samples_available, nSamplesAskedLocal );
#ifdef FIX_764_HARM_CODE
                ivas_apply_non_diegetic_panning( p_output, st_ivas->hDecoderConfig->non_diegetic_pan_gain, *nSamplesRendered );
#else
                pan_left = ( st_ivas->hDecoderConfig->non_diegetic_pan_gain + 1.f ) * 0.5f;
                pan_right = 1.f - pan_left;
                v_multc( p_tc[0], pan_right, output[1], *nSamplesRendered );
                v_multc( p_tc[0], pan_left, output[0], *nSamplesRendered );
#endif
            }
            else if ( st_ivas->renderer_type == RENDERER_PARAM_ISM || st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC )
            {
@@ -1105,14 +1095,7 @@ ivas_error ivas_jbm_dec_render(
            }
            else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX )
            {
#ifdef FIX_764_HARM_CODE
                ivas_apply_non_diegetic_panning( p_output, st_ivas->hDecoderConfig->non_diegetic_pan_gain, *nSamplesRendered );
#else
                pan_left = ( st_ivas->hDecoderConfig->non_diegetic_pan_gain + 1.f ) * 0.5f;
                pan_right = 1.f - pan_left;
                v_multc( p_tc[0], pan_right, output[1], *nSamplesRendered );
                v_multc( p_tc[0], pan_left, output[0], *nSamplesRendered );
#endif
            }
            else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC || st_ivas->renderer_type == RENDERER_BINAURAL_FASTCONV )
            {
+0 −2
Original line number Diff line number Diff line
@@ -209,7 +209,6 @@ void ivas_mono_stereo_downmix_mcmasa(
}


#ifdef FIX_764_HARM_CODE
/*-------------------------------------------------------------------------
 * ivas_apply_non_diegetic_panning()
 *
@@ -232,4 +231,3 @@ void ivas_apply_non_diegetic_panning(

    return;
}
#endif