Commit 3afc01c0 authored by vaclav's avatar vaclav
Browse files

add FIX_1435_MOVE_STEREO_PANNING

parent 32751f56
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -802,8 +802,8 @@ void dtx_read_padding_bits(

#endif
void ivas_apply_non_diegetic_panning( 
    float *input_f,                                             /* i  : non-diegetic object                                         */
    float *output_f[],                                          /* o  : core-coder transport mono channel/stereo output             */
    float *input_f,                                             /* i  : non-diegetic object (mono channel)                          */
    float *output_f[],                                          /* o  : stereo output channels                                      */
    const float non_diegetic_pan_gain,                          /* i  : non-diegetic panning gain                                   */
    const int16_t output_frame                                  /* i  : output frame length per channel                             */
);
@@ -5268,6 +5268,14 @@ void ivas_mc2sba(
    const int16_t sba_order,                                    /* i  : SBA order                                       */
    const float gain_lfe                                        /* i  : gain for LFE, 0=ignore LFE                      */
);
#ifdef FIX_1419_MONO_STEREO_UMX

void ivas_stereo2sba(
    float *input_f[],                                           /* i  : core-coder transport stereo channels            */
    float *output_f[],                                          /* o  : SBA output channels                             */
    const int16_t output_frame                                  /* i  : output frame length per channel                 */
);
#endif

void ivas_param_mc_mc2sba_cldfb(
    IVAS_OUTPUT_SETUP hTransSetup,                                                /* i  : transported MC Format                                       */
+1 −0
Original line number Diff line number Diff line
@@ -182,6 +182,7 @@
#define RENDERER_MD_SYNC_DELAY_TO_INTEGER               /* FhG: change data type of metadata sync delay in ext renderer to int16_t for better BASOP portability (and nicer code) */
#define FIX_1427_OBJ_EDITING_EXT_METADATA               /* Eri: Add support for extended metadata in object editing */
#define FIX_1419_MONO_STEREO_UMX                        /* FhG: fix for issue 1419 : support upmix to all output formats for mono and stereo */
#define FIX_1435_MOVE_STEREO_PANNING                    /* VA: issue 1435: do the EVS stereo panning in the renderer */
#define FIX_1437_LC3PLUS_EXTREND_HIRES                  /* FhG: fix external renderer split bitstream header writing causing a crash for LC3plus High-res mode */

#define FIX_1318_ROOM_SIZE_CMD_LINE                     /* Philips/Nokia: Default room sizes support */
+11 −7
Original line number Diff line number Diff line
@@ -955,16 +955,16 @@ ivas_error ivas_jbm_dec_render(
#endif
            ivas_ls_setup_conversion( st_ivas, st_ivas->nchan_transport, *nSamplesRendered, p_tc, p_output );
        }
#ifdef FIX_1435_MOVE_STEREO_PANNING
        else if ( st_ivas->renderer_type == RENDERER_NON_DIEGETIC_DOWNMIX )
        {
            ivas_apply_non_diegetic_panning( p_tc[0], p_output, st_ivas->hDecoderConfig->non_diegetic_pan_gain, *nSamplesRendered );
        }
#endif
#ifdef FIX_1419_MONO_STEREO_UMX
        else if ( st_ivas->renderer_type == RENDERER_SBA_LINEAR_ENC )
        {
            for ( n = 0; n < *nSamplesRendered; n++ )
            {
                float tmp;
                tmp = p_tc[0][n];
                p_output[0][n] = 0.5f * ( tmp + p_tc[1][n] ); /* W = 0.5 * ( L + R ) */
                p_output[1][n] = 0.5f * ( tmp - p_tc[1][n] ); /* Y = 0.5 * ( L - R ) */
            }
            ivas_stereo2sba( p_tc, p_output, *nSamplesRendered );
        }
#endif /* FIX_1419_MONO_STEREO_UMX */
    }
@@ -2566,6 +2566,9 @@ TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode(
            buffer_mode = TC_BUFFER_MODE_RENDERER;
            break;
        case RENDERER_NON_DIEGETIC_DOWNMIX:
#ifdef FIX_1435_MOVE_STEREO_PANNING
            buffer_mode = TC_BUFFER_MODE_RENDERER;
#else
            if ( st_ivas->ivas_format == MONO_FORMAT )
            {
                buffer_mode = TC_BUFFER_MODE_BUFFER;
@@ -2574,6 +2577,7 @@ TC_BUFFER_MODE ivas_jbm_dec_get_tc_buffer_mode(
            {
                buffer_mode = TC_BUFFER_MODE_RENDERER;
            }
#endif
            break;
        case RENDERER_MC_PARAMMC:
            if ( st_ivas->hParamMC->synthesis_conf == PARAM_MC_SYNTH_MONO_STEREO )
+4 −4
Original line number Diff line number Diff line
@@ -221,8 +221,8 @@ void ivas_mono_stereo_downmix_mcmasa(
 *------------------------------------------------------------------------*/

void ivas_apply_non_diegetic_panning(
    float *input_f,                    /* i  : non-diegetic object                                         */
    float *output_f[],                 /* o  : core-coder transport mono channel/stereo output  */
    float *input_f,                    /* i  : non-diegetic object (mono channel)   */
    float *output_f[],                 /* o  : stereo output channels               */
    const float non_diegetic_pan_gain, /* i  : non-diegetic panning gain            */
    const int16_t output_frame         /* i  : output frame length per channel      */
)
+28 −0
Original line number Diff line number Diff line
@@ -209,6 +209,34 @@ void ivas_mc2sba(
    return;
}

#ifdef FIX_1419_MONO_STEREO_UMX

/*-------------------------------------------------------------------------*
 * ivas_stereo2sba()
 *
 * mono signal is transformed into SBA in TD domain
 *-------------------------------------------------------------------------*/

void ivas_stereo2sba(
    float *input_f[],          /* i  : core-coder transport stereo channels */
    float *output_f[],         /* o  : SBA output channels                  */
    const int16_t output_frame /* i  : output frame length per channel      */
)
{
    int16_t n;
    float tmp;

    for ( n = 0; n < output_frame; n++ )
    {
        tmp = input_f[0][n];
        output_f[0][n] = 0.5f * ( tmp + input_f[1][n] ); /* W = 0.5 * ( L + R ) */
        output_f[1][n] = 0.5f * ( tmp - input_f[1][n] ); /* Y = 0.5 * ( L - R ) */
    }

    return;
}

#endif

/*-------------------------------------------------------------------------*
 * ivas_param_mc_mc2sba_cldfb()
Loading