Commit 83116b0d authored by Marek Szczerba's avatar Marek Szczerba
Browse files

Refactoring reflecting review remarks

parent c5146c6c
Loading
Loading
Loading
Loading
Loading
+0 −33
Original line number Diff line number Diff line
@@ -2020,21 +2020,10 @@ ivas_error ivas_init_decoder(
        }
        if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
        {
#ifdef FIX_1053_REVERB_RECONFIGURATION
            if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
            {
                return error;
            }
            if ( ( error = ivas_reverb_init( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
            {
                return error;
            }
#else
            if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
            {
                return error;
            }
#endif
        }

        granularity = NS2SA( st_ivas->hDecoderConfig->output_Fs, FRAME_SIZE_NS / MAX_PARAM_SPATIAL_SUBFRAMES );
@@ -2118,21 +2107,10 @@ ivas_error ivas_init_decoder(

            if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
            {
#ifdef FIX_1053_REVERB_RECONFIGURATION
                if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
                if ( ( error = ivas_reverb_init( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
#else
                if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
#endif
            }

            /* Allocate 'hIsmRendererData' handle and memory for delay buffer within 'hMasaIsmData' */
@@ -2206,21 +2184,10 @@ ivas_error ivas_init_decoder(

            if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
            {
#ifdef FIX_1053_REVERB_RECONFIGURATION
                if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
                if ( ( error = ivas_reverb_init( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
#else
                if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
#endif
            }
        }
    }
+0 −12
Original line number Diff line number Diff line
@@ -202,22 +202,10 @@ static ivas_error ivas_ism_bitrate_switching_dec(
                }
                if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
                {
#ifdef FIX_1053_REVERB_RECONFIGURATION
                    if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
                    {
                        return error;
                    }

                    if ( ( error = ivas_reverb_init( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
                    {
                        return error;
                    }
#else
                    if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
                    {
                        return error;
                    }
#endif
                }
            }
        }
+0 −11
Original line number Diff line number Diff line
@@ -1254,21 +1254,10 @@ static ivas_error ivas_mc_dec_reconfig(

                if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
                {
#ifdef FIX_1053_REVERB_RECONFIGURATION
                    if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
                    {
                        return error;
                    }
                    if ( ( error = ivas_reverb_init( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
                    {
                        return error;
                    }
#else
                    if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
                    {
                        return error;
                    }
#endif
                }

                if ( st_ivas->hIntSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
+0 −11
Original line number Diff line number Diff line
@@ -411,21 +411,10 @@ ivas_error ivas_omasa_dec_config(

                    if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
                    {
#ifdef FIX_1053_REVERB_RECONFIGURATION
                        if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
                        {
                            return error;
                        }
                        if ( ( error = ivas_reverb_init( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
                        {
                            return error;
                        }
#else
                        if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
                        {
                            return error;
                        }
#endif
                    }
                }

+0 −11
Original line number Diff line number Diff line
@@ -506,21 +506,10 @@ ivas_error ivas_sba_dec_reconfigure(

                if ( st_ivas->hOutSetup.output_config == IVAS_AUDIO_CONFIG_BINAURAL_ROOM_REVERB )
                {
#ifdef FIX_1053_REVERB_RECONFIGURATION
                    if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
                    {
                        return error;
                    }
                    if ( ( error = ivas_reverb_init( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
                    {
                        return error;
                    }
#else
                    if ( ( error = ivas_reverb_open( &st_ivas->hReverb, st_ivas->hHrtfStatistics, st_ivas->hRenderConfig, st_ivas->hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK )
                    {
                        return error;
                    }
#endif
                }
            }

Loading