Commit 2193500c authored by Jouni Paulus's avatar Jouni Paulus
Browse files

Merge branch '425-masa-bitrate-switching-not-reconfiguring-renderer' into 'main'

[non-BE] Add renderer reconfiguration in MASA bitrate switching

See merge request !585
parents 38807d28 6fe8cb54
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -165,6 +165,8 @@
#define FIX_431_PARAMMC_PLC_INTERPOLATOR                /* FhG: Issue 431: fix missing interpolator reset for ParamMC PCL */
#define FIX_391_SBA                                     /* Dlb: Fix for issue 391 for SBA */

#define FIX_425_MASA_BRSW_RENDERER                      /* Nokia: Issue 425: renderer not reconfigure in MASA bitrate switching */

#define EUALER2QUAT_FIX                                 /*Dlb :fix for issue 430 issue in euler2quat, sign of quat y is inverted*/
/* ################## End DEVELOPMENT switches ######################### */
/* clang-format on */
+27 −1
Original line number Diff line number Diff line
@@ -1091,6 +1091,26 @@ ivas_error ivas_masa_dec_reconfigure(
    ivas_init_dec_get_num_cldfb_instances( st_ivas, &numCldfbAnalyses_old, &numCldfbSyntheses_old );
#endif

#ifdef FIX_425_MASA_BRSW_RENDERER
    /* renderer might have changed, reselect */
    ivas_renderer_select( st_ivas );

    if ( st_ivas->renderer_type != RENDERER_DISABLE && st_ivas->hDirAC == NULL )
    {
        /* init a new DirAC dec */
        if ( ( error = ivas_dirac_dec_config( st_ivas, DIRAC_OPEN ) ) != IVAS_ERR_OK )
        {
            return error;
        }
    }
    else if ( st_ivas->renderer_type == RENDERER_DISABLE && st_ivas->hDirAC != NULL )
    {
        /* close unnecessary DirAC dec */
        ivas_dirac_dec_close( &( st_ivas->hDirAC ) );
    }
    /* possible reconfigure is done later */
#endif

    /*-----------------------------------------------------------------*
     * Allocate and initialize SCE/CPE and other handles
     *-----------------------------------------------------------------*/
@@ -1147,7 +1167,13 @@ ivas_error ivas_masa_dec_reconfigure(
            }
        }
    }

#ifdef FIX_425_MASA_BRSW_RENDERER
    if ( st_ivas->hDiracDecBin != NULL )
    {
        /* regularization factor is bitrate-dependent */
        st_ivas->hDiracDecBin->reqularizationFactor = configure_reqularization_factor( st_ivas->ivas_format, st_ivas->hDecoderConfig->ivas_total_brate );
    }
#endif
#ifdef FIX_417_TD_DECORR_BRATE_SW
    /*-----------------------------------------------------------------*
     * TD Decorrelator