From 47ea410206b5ba00ac0817014ee274ab4410a20c Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Tue, 30 May 2023 19:22:16 +0200 Subject: [PATCH 1/2] [fix] update error message and change one return value in lib_dec::input_format_API_to_internal() --- lib_com/ivas_error.h | 4 ++++ lib_com/options.h | 3 ++- lib_dec/lib_dec.c | 4 ++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/lib_com/ivas_error.h b/lib_com/ivas_error.h index e1ba2c2912..56e09c558d 100644 --- a/lib_com/ivas_error.h +++ b/lib_com/ivas_error.h @@ -235,7 +235,11 @@ static inline const char *ivas_error_to_string( ivas_error error_code ) case IVAS_ERR_INVALID_HRTF: return "Unsupported HRTF filter set"; case IVAS_ERR_INVALID_INPUT_FORMAT: +#ifdef FIX_510 + return "Invalid input format"; +#else return "Invalid format of input bitstream"; +#endif case IVAS_ERR_INVALID_INDEX: return "Invalid index"; default: diff --git a/lib_com/options.h b/lib_com/options.h index 3c714b64e0..c266e9ad83 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -222,7 +222,8 @@ #define FIX_483 /* FhG: fix issue 483, division by zero in nois_est */ #define FIX_483b /* FhG: fix issue 483, uninitialized values in ivas_mct_core_enc */ -#define FIX_170_DTX_MASA /* Nokia: Fix issue 170, relaxing the use of DTX in MASA format */ +#define FIX_170_DTX_MASA /* Nokia: Fix issue 170, relaxing the use of DTX in MASA format */ +#define FIX_510 /* FhG: fix issue 510, misleading error message for invalid input format */ /* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ diff --git a/lib_dec/lib_dec.c b/lib_dec/lib_dec.c index 95fd02a0c1..47797f658b 100644 --- a/lib_dec/lib_dec.c +++ b/lib_dec/lib_dec.c @@ -3209,7 +3209,11 @@ static ivas_error input_format_API_to_internal( *sdp_hf_only = 1; break; default: +#ifdef FIX_510 + return IVAS_ERR_INVALID_BITSTREAM; +#else return IVAS_ERR_INVALID_INPUT_FORMAT; +#endif break; } -- GitLab From 0b3c48347ce92e733949daade8144b637f03071e Mon Sep 17 00:00:00 2001 From: Archit Tamarapu Date: Tue, 30 May 2023 19:23:09 +0200 Subject: [PATCH 2/2] [fix] whitespace in options.h --- lib_com/options.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index c266e9ad83..718e124e09 100755 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -188,7 +188,7 @@ #define ARITH_HUFF_CODER_CHANGES /* DLB: Optimization of metadata memory for Huffman and arithmetic coders */ #define FIX_463_TD_RENDERER_DIRECTIVITY_RESET /* Eri: Remove unintentional reset of directivity pattern */ -#define FIX_642 /* FhG: Fix for issue 642, buggy DoA-array access in DirAC head rotation*/ +#define FIX_642 /* FhG: Fix for issue 642, buggy DoA-array access in DirAC head rotation*/ #define FIX_443_FD_CNG_INIT /* FhG: correct bitrate value for FD-CNG init */ #define VARIABLE_SPEED_DECODING /* FhG: Contribution 37: variable speed decoding employing the JBM functioniality */ #define JBM_TSM_ON_TCS /* FhG: Contribution 37: run the TSM part of JBM on the TCs instead of the final output pcm waveforms */ @@ -222,10 +222,10 @@ #define FIX_483 /* FhG: fix issue 483, division by zero in nois_est */ #define FIX_483b /* FhG: fix issue 483, uninitialized values in ivas_mct_core_enc */ -#define FIX_170_DTX_MASA /* Nokia: Fix issue 170, relaxing the use of DTX in MASA format */ +#define FIX_170_DTX_MASA /* Nokia: Fix issue 170, relaxing the use of DTX in MASA format */ #define FIX_510 /* FhG: fix issue 510, misleading error message for invalid input format */ - /* ################## End DEVELOPMENT switches ######################### */ +/* ################## End DEVELOPMENT switches ######################### */ /* clang-format on */ #endif -- GitLab