Commit 309c4c34 authored by multrus's avatar multrus
Browse files

work in progress

parent 8071f0d5
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -1160,7 +1160,11 @@ void ivas_apply_non_diegetic_panning_fx(
    const Word16 output_frame              /* i  : output frame length per channel                  */
);

#ifdef NONBE_FIX_967_ISM_MONO_DMX
void ivas_ism_mono_dmx_fx(
#else
void ivas_mono_downmix_render_passive_fx(
#endif
    Decoder_Struct *st_ivas,  /* i/o: IVAS decoder structure                                */
    Word32 *output_f_fx[],    /* i/o: synthesized core-coder transport channels/mono output */
    const Word16 output_frame /* i  : output frame length                                   */
+1 −0
Original line number Diff line number Diff line
@@ -100,6 +100,7 @@
#define FIX_957_REMOVE_PANNING_DEAD_CODE                /* VA: Remove obsolete non-diegetic panning related code. */
#define NONBE_FIX_935_EARLY_REFLECTIONS_WRONG_ORDER     /* Qualcomm: issue 953: fix order or ER channels in LC mode*/
#define FIX_955_FASTCONV_REND_IN_ISM                    /* VA: put FastConv rendering call under DEBUGGING */
#define NONBE_FIX_967_ISM_MONO_DMX                      /* FhG: issue 967: accumulating energies in ISM mono DMX */

#define FIX_956_DECODER_COMMAND_LINE_FIX                /* VA: Output correct error message when the decoder command-line has too many mandatory arguments. */

+12 −0
Original line number Diff line number Diff line
@@ -265,7 +265,11 @@ ivas_error ivas_jbm_dec_tc_fx(
        test();
        IF( EQ_32( st_ivas->renderer_type, RENDERER_MONO_DOWNMIX ) )
        {
#ifdef NONBE_FIX_967_ISM_MONO_DMX
            ivas_ism_mono_dmx_fx( st_ivas, p_output_fx, output_frame );
#else
            ivas_mono_downmix_render_passive_fx( st_ivas, p_output_fx, output_frame );
#endif

            Scale_sig32( p_output_fx[0], L_FRAME48k, 3 );
        }
@@ -794,7 +798,11 @@ ivas_error ivas_jbm_dec_tc_fx(
        move16();
        IF( EQ_32( st_ivas->renderer_type, RENDERER_MONO_DOWNMIX ) )
        {
#ifdef NONBE_FIX_967_ISM_MONO_DMX
            ivas_ism_mono_dmx_fx( st_ivas, p_output_fx, output_frame );
#else
            ivas_mono_downmix_render_passive_fx( st_ivas, p_output_fx, output_frame );
#endif

            output_q = 8;
            move16();
@@ -1082,7 +1090,11 @@ ivas_error ivas_jbm_dec_tc_fx(
        }
        ELSE IF( EQ_32( st_ivas->renderer_type, RENDERER_MONO_DOWNMIX ) && EQ_32( st_ivas->ism_mode, ISM_SBA_MODE_DISC ) )
        {
#ifdef NONBE_FIX_967_ISM_MONO_DMX
            ivas_ism_mono_dmx_fx( st_ivas, p_output_fx, output_frame );
#else
            ivas_mono_downmix_render_passive_fx( st_ivas, p_output_fx, output_frame );
#endif

            Scale_sig32( p_output_fx[0], L_FRAME48k, Q11 - Q8 ); // Q11

+16 −1
Original line number Diff line number Diff line
@@ -46,7 +46,9 @@
 * Local constants
 *------------------------------------------------------------------------*/
#define DOWNMIX_ALPHA_FX                      31130 /* Smoothing coefficient */
#ifndef NONBE_FIX_967_ISM_MONO_DMX
#define MONO_DOWNMIX_RENDERER_MAX_INPUT_CHANS 4
#endif

/*-------------------------------------------------------------------------
 * ivas_mono_dmx_renderer_open()
@@ -102,11 +104,15 @@ void ivas_mono_dmx_renderer_close(
}

/*-------------------------------------------------------------------------
 * ivas_mono_downmix_render_passive()
 * ivas_ism_mono_dmx()
 *
 * Downmix process
 *------------------------------------------------------------------------*/
#ifdef NONBE_FIX_967_ISM_MONO_DMX
void ivas_ism_mono_dmx_fx(
#else
void ivas_mono_downmix_render_passive_fx(
#endif
    Decoder_Struct *st_ivas,  /* i/o: IVAS decoder structure                                */
    Word32 *output_f_fx[],    /* i/o: synthesized core-coder transport channels/mono output Qin = 11/ Qout = 8*/
    const Word16 output_frame /* i  : output frame length                                   */
@@ -120,6 +126,13 @@ void ivas_mono_downmix_render_passive_fx(
    Word16 Q_shift, proto_shift, input_shift, norm_protoEner, norm_inputEner, proto_norm;
    Word16 diff_shift, div, div_sqrt;
    Word32 protoEner_pre, inputEner_pre;
#ifdef NONBE_FIX_967_ISM_MONO_DMX
    Word32 inputEnergy_local_fx;
    Word16 Q_inputEner_local;
    Word32 protoEnergy_local_fx;
    Word16 Q_protoEner_local;
#endif

    numInputChannels = st_ivas->nSCE;
    move16();
    if ( EQ_32( st_ivas->ivas_format, SBA_ISM_FORMAT ) )
@@ -160,11 +173,13 @@ void ivas_mono_downmix_render_passive_fx(
        v_add_32( output_shr, proto_signal_fx, proto_signal_fx, output_frame );
    }

#ifndef NONBE_FIX_967_ISM_MONO_DMX
    /* compute the input energy, proto energy after smoothing */
    hDownmix->inputEnergy_fx = Mpy_32_16_1( hDownmix->inputEnergy_fx, DOWNMIX_ALPHA_FX );
    move32();
    hDownmix->protoEnergy_fx = Mpy_32_16_1( hDownmix->protoEnergy_fx, DOWNMIX_ALPHA_FX );
    move32();
#endif

    proto_norm = L_norm_arr( proto_signal_fx, output_frame );