Commit c7f9652f authored by Sumeyra Demir Kanik's avatar Sumeyra Demir Kanik
Browse files

Merge conflicts with mainMerge branch 'main' into 356-ism-audio-and-meta-out-of-sync-in-decoder

parents 40a6fe69 ff0aca81
Loading
Loading
Loading
Loading
+61 −5
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ typedef enum
    IVAS_ERR_INVALID_SAMPLING_RATE,
    IVAS_ERR_NOT_CONFIGURED,
    IVAS_ERR_INVALID_STEREO_MODE,
    IVAS_ERR_INVALID_CICP_INDEX,
    IVAS_ERR_INVALID_CICP_INDEX, /* ToDo: rename, CICP not used in IVAS anymore */
    IVAS_ERR_INVALID_BITRATE,
    IVAS_ERR_INVALID_MASA_CONFIG,
    IVAS_ERR_TOO_MANY_INPUTS,
@@ -72,17 +72,15 @@ typedef enum
    IVAS_ERR_INVALID_SPAR_CONFIG,
    IVAS_ERR_WRONG_PARAMS,
    IVAS_ERR_INIT_ERROR,
    IVAS_ERR_DECODER_ERROR,
    IVAS_ERR_WRONG_MODE,
    IVAS_ERR_INVALID_OUTPUT_FORMAT,
    IVAS_ERR_HEAD_ROTATION_NOT_SUPPORTED,
    IVAS_ERR_INVALID_HRTF,
    IVAS_ERR_INVALID_INPUT_FORMAT,
    IVAS_ERR_INVALID_INDEX,
    IVAS_ERR_INVALID_INDEX, /* ToDo: should be merged with IVAS_ERR_INDEX_OUT_OF_BOUNDS */
    IVAS_ERR_NOT_SUPPORTED_OPTION,
    IVAS_ERR_NOT_IMPLEMENTED,
    IVAS_ERR_WAITING_FOR_BITSTREAM,
    IVAS_ERR_FILE_READER_TIMESTAMP_MISMATCH,
    IVAS_ERR_ISM_FILE_READER_INVALID_METADATA_FORMAT,
    IVAS_ERR_ISM_INVALID_METADATA_VALUE,
    IVAS_ERR_INVALID_MASA_FORMAT_METADATA_FILE,
@@ -131,7 +129,7 @@ typedef enum
     *    renderer (lib_rend only)            *
     *----------------------------------------*/

    IVAS_ERR_NUM_CHANNELS_UNKNOWN,
    IVAS_ERR_NUM_CHANNELS_UNKNOWN = 0x6000,
    IVAS_ERR_INVALID_CUSTOM_LS_LAYOUT,
    IVAS_ERR_INVALID_INPUT_ID,
    IVAS_ERR_WRONG_NUM_CHANNELS,
@@ -182,6 +180,64 @@ static inline const char *ivas_error_to_string( ivas_error error_code )
            return "Parse error";
        case IVAS_ERR_END_OF_FILE:
            return "End of file";
        case IVAS_ERR_WRONG_PARAMS:
            return "Wrong function parameters";
        case IVAS_ERR_INVALID_BANDWIDTH:
            return "Invalid bandwidth";
        case IVAS_ERR_INVALID_DTX_UPDATE_RATE:
            return "Invalid DTX update rate";
        case IVAS_ERR_NOT_CONFIGURED:
            return "Handle has not been configured";
        case IVAS_ERR_INVALID_STEREO_MODE:
            return "Invalid stereo mode";
        case IVAS_ERR_INVALID_CICP_INDEX:
            return "Invalid speaker layout";
        case IVAS_ERR_INVALID_BITRATE:
            return "Invalid bitrate";
        case IVAS_ERR_INVALID_MASA_CONFIG:
            return "Invalid MASA config";
        case IVAS_ERR_TOO_MANY_INPUTS:
            return "Too many object inputs provided";
        case IVAS_ERR_INDEX_OUT_OF_BOUNDS:
            return "Index out of bounds";
        case IVAS_ERR_RECONFIGURE_NOT_SUPPORTED:
            return "Reconfigure not supported";
        case IVAS_ERR_INVALID_FEC_OFFSET:
            return "Invalid FEC offset";
        case IVAS_ERR_INVALID_INPUT_BUFFER_SIZE:
            return "Invalid input buffer size";
        case IVAS_ERR_DTX_NOT_SUPPORTED:
            return "DTX is not supported in this IVAS format and element mode";
        case IVAS_ERR_UNEXPECTED_NULL_POINTER:
            return "Unexpected NULL pointer";
        case IVAS_ERR_METADATA_NOT_EXPECTED:
            return "Metadata input not expected for current configuration";
#ifdef DEBUGGING
        case IVAS_ERR_INVALID_FORCE_MODE:
            return "Invalid force mode";
#endif
        case IVAS_ERR_NOT_IMPLEMENTED:
            return "Not implemented";
        case IVAS_ERR_ISM_FILE_READER_INVALID_METADATA_FORMAT:
            return "Invalid metadata file format";
        case IVAS_ERR_ISM_INVALID_METADATA_VALUE:
            return "Invalid metadata value provided";
        case IVAS_ERR_NOT_SUPPORTED_OPTION:
            return "Option not supported in this set-up";
        case IVAS_ERR_INIT_ERROR:
            return "Initialization error";
        case IVAS_ERR_INVALID_BITSTREAM:
            return "Invalid bitstream";
        case IVAS_ERR_WRONG_MODE:
            return "Wrong mode";
        case IVAS_ERR_HEAD_ROTATION_NOT_SUPPORTED:
            return "Head rotation not supported";
        case IVAS_ERR_INVALID_HRTF:
            return "Unsupported HRTF filter set";
        case IVAS_ERR_INVALID_INPUT_FORMAT:
            return "Invalid format of input bitstream";
        case IVAS_ERR_INVALID_INDEX:
            return "Invalid index";
        default:
            break;
    }
+1 −0
Original line number Diff line number Diff line
@@ -193,6 +193,7 @@
#define FIX_MDCT_ST_PLC_FADEOUT_DELAY
#define FIX_DIRAC_LS_SYNTHESIS_CONFIG_479               /* FhG: fix for issue 479, broken LS output with DirAC at high BRs */
#define HYBRID_ITD_MAX                                 /* FhG: Improvement for DFT-stereo for cases with large ITDs */
#define FIX_462_HRTF_FILE_BR_SWITCH_MEM_ERR             /* Eri: Fix for issue 462: Use-of-uninitialized memory in external HRTF deallocation in decoder together with BR switching */
#define FIX_487_LOWRATE_SBA_TUNING_FIX                  /* Dlb: TUning fix for low bitrate cases to match theoretical longest SPAR MD bitstream */
#define FIX_490_MASA_2TC_LBR_DTX                        /* Nokia: Fixes issue 490 by correcting condition. */

+25 −1
Original line number Diff line number Diff line
@@ -42,7 +42,6 @@
#endif
#include "wmc_auto.h"


/*-------------------------------------------------------------------------*
 * ivas_ism_bitrate_switching()
 *
@@ -186,11 +185,21 @@ static ivas_error ivas_ism_bitrate_switching(
            ivas_dirac_dec_close_binaural_data( &st_ivas->hDiracDecBin );

            /* Open the TD Binaural renderer */
#ifdef FIX_462_HRTF_FILE_BR_SWITCH_MEM_ERR
            if ( st_ivas->hHrtfTD == NULL || st_ivas->hBinRendererTd == NULL )
            {
                if ( ( error = ivas_td_binaural_open( st_ivas ) ) != IVAS_ERR_OK )
                {
                    return error;
                }
            }
#else
            if ( ( error = ivas_td_binaural_open( st_ivas ) ) != IVAS_ERR_OK )
            {
                return error;
            }
#endif
        }
        else
        {
            /* close the ISM renderer and reinitialize */
@@ -252,6 +261,20 @@ static ivas_error ivas_ism_bitrate_switching(
            }

            /* Close the TD Binaural renderer */
#ifdef FIX_462_HRTF_FILE_BR_SWITCH_MEM_ERR
            if ( st_ivas->hBinRendererTd->HrFiltSet_p->ModelParams.modelROM == TRUE )
            {
                if ( st_ivas->hBinRendererTd != NULL )
                {
                    ivas_td_binaural_close( &st_ivas->hBinRendererTd );
                }

                if ( st_ivas->hHrtfTD != NULL )
                {
                    st_ivas->hHrtfTD = NULL;
                }
            }
#else
            if ( st_ivas->hBinRendererTd != NULL )
            {
                ivas_td_binaural_close( &st_ivas->hBinRendererTd );
@@ -261,6 +284,7 @@ static ivas_error ivas_ism_bitrate_switching(
            {
                st_ivas->hHrtfTD = NULL;
            }
#endif
        }
        else
        {
+1 −49
Original line number Diff line number Diff line
@@ -2476,55 +2476,7 @@ const char *IVAS_DEC_GetErrorMessage(
    ivas_error error /* i  : decoder error code enum */
)
{
    switch ( error )
    {
        case IVAS_ERR_OK:
            return "no error";
        case IVAS_ERR_FAILED_ALLOC:
            return "Failed allocation error";
        case IVAS_ERR_WRONG_PARAMS:
            return "wrong parameters";
        case IVAS_ERR_INIT_ERROR:
            return "initialization error";
        case IVAS_ERR_INVALID_BITSTREAM:
            return "Invalid bitstream";
        case IVAS_ERR_DECODER_ERROR:
            return "decoder error";
        case IVAS_ERR_WRONG_MODE:
            return "wrong mode";
        case IVAS_ERR_INVALID_OUTPUT_FORMAT:
            return "invalid output format";
        case IVAS_ERR_INVALID_SAMPLING_RATE:
            return "invalid sampling rate";
        case IVAS_ERR_HEAD_ROTATION_NOT_SUPPORTED:
            return "head rotation not supported";
        case IVAS_ERR_INVALID_HRTF:
            return "Not supported HRTF filter set";
        case IVAS_ERR_INVALID_INPUT_FORMAT:
            return "invalid format of input bitstream";
        case IVAS_ERR_INVALID_INDEX:
            return "invalid index";
        case IVAS_ERR_INTERNAL:
        case IVAS_ERR_INTERNAL_FATAL:
            return "internal error";
        case IVAS_ERR_RECONFIGURE_NOT_SUPPORTED:
            return "reconfigure not supported";
        case IVAS_ERR_UNEXPECTED_NULL_POINTER:
            return "unexpected NULL pointer";
#ifdef DEBUGGING
        case IVAS_ERR_INVALID_FORCE_MODE:
            return "invalid force mode";
#endif
        case IVAS_ERR_FAILED_FILE_READ:
            return "could not read from file";
        case IVAS_ERR_NOT_IMPLEMENTED:
            return "not implemented";
        case IVAS_ERR_UNKNOWN:
        default:
            break;
    }

    return "unknown error";
    return ivas_error_to_string( error );
}


+1 −65
Original line number Diff line number Diff line
@@ -1480,71 +1480,7 @@ const char *IVAS_ENC_GetErrorMessage(
    ivas_error error /* i  : encoder error code enum  */
)
{
    switch ( error )
    {
        case IVAS_ERR_OK:
            return "no error";
        case IVAS_ERR_FAILED_ALLOC:
            return "Failed allocation error";
        case IVAS_ERR_WRONG_PARAMS:
            return "wrong parameters";
        case IVAS_ERR_INVALID_BANDWIDTH:
            return "invalid bandwidth";
        case IVAS_ERR_INVALID_DTX_UPDATE_RATE:
            return "invalid DTX update rate";
        case IVAS_ERR_INVALID_SAMPLING_RATE:
            return "invalid sampling rate";
        case IVAS_ERR_NOT_CONFIGURED:
            return "encoder has not been configured";
        case IVAS_ERR_INVALID_STEREO_MODE:
            return "invalid stereo mode";
        case IVAS_ERR_INVALID_CICP_INDEX:
            return "invalid CICP index";
        case IVAS_ERR_INVALID_BITRATE:
            return "invalid bitrate";
        case IVAS_ERR_INVALID_MASA_CONFIG:
            return "invalid MASA config";
        case IVAS_ERR_TOO_MANY_INPUTS:
            return "too many object inputs provided";
        case IVAS_ERR_INDEX_OUT_OF_BOUNDS:
            return "index out of bounds";
        case IVAS_ERR_INTERNAL:
        case IVAS_ERR_INTERNAL_FATAL:
            return "internal error";
        case IVAS_ERR_RECONFIGURE_NOT_SUPPORTED:
            return "reconfigure not supported";
        case IVAS_ERR_INVALID_FEC_OFFSET:
            return "invalid FEC offset";
        case IVAS_ERR_INVALID_INPUT_BUFFER_SIZE:
            return "invalid input buffer size";
        case IVAS_ERR_DTX_NOT_SUPPORTED:
            return "DTX is not supported in this IVAS format and element mode";
        case IVAS_ERR_UNEXPECTED_NULL_POINTER:
            return "unexpected NULL pointer";
        case IVAS_ERR_METADATA_NOT_EXPECTED:
            return "metadata input not expected for current configuration";
#ifdef DEBUGGING
        case IVAS_ERR_INVALID_FORCE_MODE:
            return "invalid force mode";
#endif
        case IVAS_ERR_NOT_IMPLEMENTED:
            return "not implemented";
        case IVAS_ERR_FILE_READER_TIMESTAMP_MISMATCH:
            return "mismatched timestamp";
        case IVAS_ERR_ISM_FILE_READER_INVALID_METADATA_FORMAT:
            return "invalid metadata format";
        case IVAS_ERR_ISM_INVALID_METADATA_VALUE:
            return "invalid metadata value provided";
        case IVAS_ERR_FAILED_FILE_READ:
            return "could not read from file";
        case IVAS_ERR_NOT_SUPPORTED_OPTION:
            return "option not supported in this set-up";
        case IVAS_ERR_UNKNOWN:
        default:
            break;
    }

    return "unknown error";
    return ivas_error_to_string( error );
}


Loading