Commit 0ab1e48c authored by vaclav's avatar vaclav
Browse files

FIX_BRATE_SWITCHING: fix bitrate switching cases in OMASA and OSBA

parent 4b98829e
Loading
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -161,6 +161,7 @@
#define OBJ_EDITING_EXAMPLE                            /* obj editing example code in decoder.c */
#define OMASA_OBJECT_EDITING                           /* Nokia: object editing interface for OMASA */
#define OBJ_EDITING_PARAMISM_BIN                       /* Nokia: object editing for ParamISM to binaural */
#define FIX_BRATE_SWITCHING                            /* VA: fix bitrate switching cases in OMASA and OSBA */
#endif

/* ################### Start BE switches ################################# */
+4 −0
Original line number Diff line number Diff line
@@ -2911,7 +2911,11 @@ static ivas_error doSanityChecks_IVAS(
#ifdef OBJ_EDITING_COMMANDLINE
    if ( st_ivas->hDecoderConfig->Opt_ObjEdit_on )
    {
#ifdef FIX_BRATE_SWITCHING
        if ( !( st_ivas->ivas_format == ISM_FORMAT || st_ivas->ivas_format == SBA_ISM_FORMAT || st_ivas->ivas_format == MASA_ISM_FORMAT || ( st_ivas->ivas_format == MASA_FORMAT && st_ivas->nchan_ism > 0 ) ) )
#else
        if ( !( st_ivas->ivas_format == ISM_FORMAT || st_ivas->ivas_format == SBA_ISM_FORMAT || st_ivas->ivas_format == MASA_ISM_FORMAT ) )
#endif
        {
            return IVAS_ERROR( IVAS_ERR_OBJECTS_EDITING_NOT_SUPPORTED, "Wrong set-up: Obect editing is not supported in this IVAS format." );
        }
+15 −1
Original line number Diff line number Diff line
@@ -956,9 +956,16 @@ ivas_error IVAS_DEC_GetEditableParameters(
        return IVAS_ERR_UNEXPECTED_NULL_POINTER;
    }

#ifdef FIX_BRATE_SWITCHING
    if ( !( hIvasDec->st_ivas->ivas_format == ISM_FORMAT ||
            hIvasDec->st_ivas->ivas_format == SBA_ISM_FORMAT ||
            hIvasDec->st_ivas->ivas_format == MASA_ISM_FORMAT ||
            ( hIvasDec->st_ivas->ivas_format == MASA_FORMAT && hIvasDec->st_ivas->nchan_ism > 0 ) ) )
#else
    if ( !( hIvasDec->st_ivas->ivas_format == ISM_FORMAT ||
            ( hIvasDec->st_ivas->ivas_format == SBA_ISM_FORMAT && hIvasDec->st_ivas->ism_mode == ISM_SBA_MODE_DISC ) ||
            ( hIvasDec->st_ivas->ivas_format == MASA_ISM_FORMAT && ( hIvasDec->st_ivas->ism_mode == ISM_MASA_MODE_PARAM_ONE_OBJ || hIvasDec->st_ivas->ism_mode == ISM_MASA_MODE_DISC ) ) ) )
#endif
    {
        return IVAS_ERROR( IVAS_ERR_OBJECTS_EDITING_NOT_SUPPORTED, "Object editing is not supported in this operation mode." );
    }
@@ -1082,12 +1089,19 @@ ivas_error IVAS_DEC_SetEditableParameters(
        return IVAS_ERR_UNEXPECTED_NULL_POINTER;
    }

#ifdef FIX_BRATE_SWITCHING
    if ( !( hIvasDec->st_ivas->ivas_format == ISM_FORMAT ||
            hIvasDec->st_ivas->ivas_format == SBA_ISM_FORMAT ||
            hIvasDec->st_ivas->ivas_format == MASA_ISM_FORMAT ||
            ( hIvasDec->st_ivas->ivas_format == MASA_FORMAT && hIvasDec->st_ivas->nchan_ism > 0 ) ) )
#else
    if ( !( hIvasDec->st_ivas->ivas_format == ISM_FORMAT ||
            ( hIvasDec->st_ivas->ivas_format == SBA_ISM_FORMAT && hIvasDec->st_ivas->ism_mode == ISM_SBA_MODE_DISC ) ||
            ( hIvasDec->st_ivas->ivas_format == MASA_ISM_FORMAT && ( hIvasDec->st_ivas->ism_mode == ISM_MASA_MODE_PARAM_ONE_OBJ || hIvasDec->st_ivas->ism_mode == ISM_MASA_MODE_DISC ) ) ) ||
         hIvasDec->st_ivas->hDecoderConfig->output_config == IVAS_AUDIO_CONFIG_EXTERNAL )
#endif
    {
        return IVAS_ERROR( IVAS_ERR_WRONG_MODE, "Object editing no supported in this operation mode." );
        return IVAS_ERROR( IVAS_ERR_OBJECTS_EDITING_NOT_SUPPORTED, "Object editing no supported in this operation mode." );
    }

    if ( hIvasDec == NULL || hIvasDec->st_ivas == NULL )