Commit 996f3e19 authored by reutelhuber's avatar reutelhuber
Browse files

add exits in case IGF_Reconfig() fails

parent 792bab85
Loading
Loading
Loading
Loading
Loading
+20 −15
Original line number Diff line number Diff line
@@ -431,14 +431,16 @@ ivas_error ivas_corecoder_enc_reconfig(
                                                                          st_ivas->hCPE[0]->hCoreCoder[n]->rf_mode );

#ifdef IGF_MEMORY_ALLOC_OPT
                    error = IGF_Reconfig( &st_ivas->hCPE[0]->hCoreCoder[n]->hIGFEnc,
                    if ( ( error = IGF_Reconfig( &st_ivas->hCPE[0]->hCoreCoder[n]->hIGFEnc,
                                               st_ivas->hCPE[0]->hCoreCoder[n]->igf,
                                               1,
                                               st_ivas->hCPE[0]->element_brate,
                                               st_ivas->hCPE[0]->hCoreCoder[n]->bwidth,
                                               st_ivas->hCPE[0]->hCoreCoder[n]->element_mode,
                                          st_ivas->hCPE[0]->hCoreCoder[n]->rf_mode );

                                               st_ivas->hCPE[0]->hCoreCoder[n]->rf_mode ) ) != IVAS_ERR_OK )
                    {
                        return error;
                    }
#else
                    if ( st_ivas->hCPE[0]->hCoreCoder[n]->igf )
                    {
@@ -515,13 +517,16 @@ ivas_error ivas_corecoder_enc_reconfig(
                                                                      st_ivas->hCPE[0]->hCoreCoder[n]->rf_mode );

#ifdef IGF_MEMORY_ALLOC_OPT
                error = IGF_Reconfig( &st_ivas->hCPE[0]->hCoreCoder[n]->hIGFEnc,
               if ( ( error = IGF_Reconfig( &st_ivas->hCPE[0]->hCoreCoder[n]->hIGFEnc,
                                          st_ivas->hCPE[0]->hCoreCoder[n]->igf,
                                          1,
                                          st_ivas->hCPE[0]->element_brate,
                                          st_ivas->hCPE[0]->hCoreCoder[n]->bwidth,
                                          st_ivas->hCPE[0]->hCoreCoder[n]->element_mode,
                                      st_ivas->hCPE[0]->hCoreCoder[n]->rf_mode );
                                          st_ivas->hCPE[0]->hCoreCoder[n]->rf_mode ) ) != IVAS_ERR_OK )
               {
                   return error;
               }
#else
                if ( st_ivas->hCPE[0]->hCoreCoder[n]->igf )
                {
+4 −1
Original line number Diff line number Diff line
@@ -528,7 +528,10 @@ ivas_error ivas_cpe_enc(
        {
            int16_t igf;
            igf = getIgfPresent( sts[n]->element_mode, sts[n]->bits_frame_nominal * FRAMES_PER_SEC, sts[n]->max_bwidth, sts[n]->rf_mode );
            error = IGF_Reconfig( &sts[n]->hIGFEnc, igf, 0, sts[n]->bits_frame_nominal * FRAMES_PER_SEC, sts[n]->max_bwidth, sts[n]->element_mode, sts[n]->rf_mode );
            if ( ( error = IGF_Reconfig( &sts[n]->hIGFEnc, igf, 0, sts[n]->bits_frame_nominal * FRAMES_PER_SEC, sts[n]->max_bwidth, sts[n]->element_mode, sts[n]->rf_mode ) ) != IVAS_ERR_OK )
            {
                return error;
            }
        }
    }
#endif
+4 −1
Original line number Diff line number Diff line
@@ -314,7 +314,10 @@ ivas_error ivas_ism_enc(
        {
            int16_t igf;
            igf = getIgfPresent( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, st->max_bwidth, st->rf_mode );
            error = IGF_Reconfig( &st->hIGFEnc, igf, 0, st->bits_frame_nominal * FRAMES_PER_SEC, st->max_bwidth, st->element_mode, st->rf_mode );
            if ( ( error = IGF_Reconfig( &st->hIGFEnc, igf, 0, st->bits_frame_nominal * FRAMES_PER_SEC, st->max_bwidth, st->element_mode, st->rf_mode ) ) != IVAS_ERR_OK )
            {
                return error;
            }
        }
#endif

+4 −1
Original line number Diff line number Diff line
@@ -499,7 +499,10 @@ ivas_error mct_enc_reconfigure(
                    st->igf = getIgfPresent( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, st->bwidth, st->rf_mode );

#ifdef IGF_MEMORY_ALLOC_OPT
                    error = IGF_Reconfig( &st->hIGFEnc, st->igf, 1, st_ivas->hCPE[cpe_id]->element_brate, st->bwidth, st->element_mode, st->rf_mode );
                    if ( ( error = IGF_Reconfig( &st->hIGFEnc, st->igf, 1, st_ivas->hCPE[cpe_id]->element_brate, st->bwidth, st->element_mode, st->rf_mode ) ) != IVAS_ERR_OK )
                    {
                        return error;
                    }
#else
                    if ( st->igf )
                    {
+4 −1
Original line number Diff line number Diff line
@@ -236,7 +236,10 @@ ivas_error ivas_sce_enc(
    {
        int16_t igf;
        igf = getIgfPresent( st->element_mode, st->bits_frame_nominal * FRAMES_PER_SEC, st->max_bwidth, st->rf_mode );
        error = IGF_Reconfig( &st->hIGFEnc, igf, 0, st->bits_frame_nominal * FRAMES_PER_SEC, st->max_bwidth, st->element_mode, st->rf_mode );
        if ( ( error = IGF_Reconfig( &st->hIGFEnc, igf, 0, st->bits_frame_nominal * FRAMES_PER_SEC, st->max_bwidth, st->element_mode, st->rf_mode ) ) != IVAS_ERR_OK )
        {
            return error;
        }
    }
#endif