Commit 164a7c9d authored by vaclav's avatar vaclav
Browse files

port MR, part 2

parent e2b8268c
Loading
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -420,8 +420,12 @@ int main(
#ifdef FIX_1053_REVERB_RECONFIGURATION
    uint16_t aeID = arg.aeSequence.count > 0 ? arg.aeSequence.pID[0] : 65535;
#ifdef FIX_745_FIX_DATA_TYPE_CONVERSION
#ifdef LIB_DEC_REVISION
    if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.non_diegetic_pan_enabled, arg.non_diegetic_pan_gain_fx, arg.dpidEnabled, aeID, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK )
#else
    if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.tsmEnabled, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.non_diegetic_pan_enabled, arg.non_diegetic_pan_gain_fx,
                                       arg.dpidEnabled, aeID, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK )
#endif
#else
    if ( ( error = IVAS_DEC_Configure( hIvasDec, arg.output_Fs, arg.outputConfig, arg.tsmEnabled, arg.renderFramesize, arg.customLsOutputEnabled, arg.hrtfReaderEnabled, arg.enableHeadRotation, arg.enableExternalOrientation, arg.orientation_tracking, arg.renderConfigEnabled, arg.Opt_non_diegetic_pan, arg.non_diegetic_pan_gain_fx,
                                       arg.Opt_dpid_on, aeID, arg.delayCompensationEnabled ) ) != IVAS_ERR_OK )
+3 −1
Original line number Diff line number Diff line
@@ -4205,8 +4205,10 @@ Word64 var_32_fx(
);

ivas_error ivas_jbm_dec_tc_fx(
    Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure                                      */
    Decoder_Struct *st_ivas  /* i/o: IVAS decoder structure                                      */
#ifndef LIB_DEC_REVISION
    Word32 *data_fx 
#endif
);

ivas_error ivas_jbm_dec_flush_renderer_fx(
+2 −0
Original line number Diff line number Diff line
@@ -175,6 +175,8 @@
#define FIX_1139_REV_COLORATION_SHORT_T60               /* Nokia,FhG: Fix issue 1139, prevent sound coloration artefacts at very low reverberation times */

#define FIX_1959_assert_in_gain_enc_mless_fx            /* VA: Fix saturation introduced by the usage of the non-EVS basop operators =, the saturation was expected */
#define LIB_DEC_REVISION                                /* VA: cleaning and simplification of lib_dec.c */

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

#endif
+8 −2
Original line number Diff line number Diff line
@@ -78,8 +78,10 @@ static Word16 ceil_fx16( Word16 inp, Word16 Q )
 *--------------------------------------------------------------------------*/

ivas_error ivas_jbm_dec_tc_fx(
    Decoder_Struct *st_ivas, /* i/o: IVAS decoder structure         */
    Decoder_Struct *st_ivas /* i/o: IVAS decoder structure         */
#ifndef LIB_DEC_REVISION
        Word32 *data_fx /*Q11*/
#endif
)
{
    Word16 ch, n, output_frame, nchan_out, i, ii;
@@ -1504,11 +1506,15 @@ ivas_error ivas_jbm_dec_tc_fx(
     * Write IVAS transport channels
     *----------------------------------------------------------------*/

#ifdef LIB_DEC_REVISION
    IF( st_ivas->hDecoderConfig->Opt_tsm == 0 )
#else
    IF( EQ_16( st_ivas->hDecoderConfig->Opt_tsm, 1 ) )
    {
        ivas_syn_output_f_fx( p_output_fx, output_frame, st_ivas->hTcBuffer->nchan_transport_jbm, data_fx );
    }
    ELSE
#endif
    {
        /* directly copy to tc buffers */
        /*note : the q of cldfb buffers (imag/real) are needed to be Q_p_output - 5 here 6 is taken for that*/
+12 −1
Original line number Diff line number Diff line
@@ -106,7 +106,9 @@ ivas_error IVAS_DEC_Configure(
    IVAS_DEC_HANDLE hIvasDec,                               /* i/o: IVAS decoder handle                                                     */
    const UWord32 sampleRate,                               /* i  : output sampling frequency                                               */
    const IVAS_AUDIO_CONFIG outputConfig,                   /* i  : output configuration                                                    */
#ifndef LIB_DEC_REVISION
    const bool tsmEnabled,                                  /* i  : enable time scale modification                                          */
    #endif
    const IVAS_RENDER_FRAMESIZE renderFramesize,            /* i  : rendering frame size                                                    */
    const bool customLsOutputEnabled,                       /* i  : enable custom loudspeaker setup handle                                  */
    const bool hrtfReaderEnabled,                           /* i  : enable HRTF binary file input                                           */
@@ -265,11 +267,19 @@ ivas_error IVAS_DEC_VoIP_SetScale(
    const Word16 scale                                      /* i  : TSM scale to set                                                        */
);

#ifdef VARIABLE_SPEED_DECODING
#ifdef LIB_DEC_REVISION
ivas_error IVAS_DEC_EnableTsm(
    IVAS_DEC_HANDLE hIvasDec                    /* i/o: IVAS decoder handle                                                     */
);
#endif

ivas_error IVAS_DEC_TSM_SetQuality(
    IVAS_DEC_HANDLE hIvasDec,                               /* i/o: IVAS decoder handle                                                     */
    const Word16 quality                                    /* i  : target TSM quality Q14                                                  */
);

#endif
/*! r: error code */
ivas_error IVAS_DEC_VoIP_GetSamples(
    IVAS_DEC_HANDLE hIvasDec,                               /* i/o: IVAS decoder handle                                                     */
@@ -423,12 +433,13 @@ ivas_error IVAS_DEC_HasDecodedFirstGoodFrame(
    bool *hasDecodedFirstGoodFrame                          /* o  : flag indicating if the decoder has decoded a good frame since it was configured */
);

#ifndef LIB_DEC_REVISION
/*! r: error code */
ivas_error IVAS_DEC_GetPcmFrameSize(
    IVAS_DEC_HANDLE hIvasDec,                               /* i/o: IVAS decoder handle                                                     */
    Word32 *pcmFrameSize                                    /* o  : total size of the PCM output frame. This takes into account the number of output channels Q0 */
);

#endif
/*! r: true if decoder has no data in VoIP jitter buffer */
bool IVAS_DEC_VoIP_IsEmpty(
    IVAS_DEC_HANDLE hIvasDec,                               /* i/o: IVAS decoder handle                                                     */
Loading