diff --git a/apps/decoder.c b/apps/decoder.c index e226ba245714bf5d5e5fef165efbb09972ecf0a1..e63a80e8971e8bff14ba0df175479b18b6caba63 100644 --- a/apps/decoder.c +++ b/apps/decoder.c @@ -498,6 +498,7 @@ int main( } } +#ifndef FIX_1550_WRONG_RENDER_FRAMESIZE_PRINTOUT #ifdef DEBUGGING /*-----------------------------------------------------------------* * Preview bitstream and print config information @@ -587,6 +588,7 @@ int main( fprintf( stderr, "\nIVAS_DEC_PrintConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } +#endif #endif /*-------------------------------------------------------------------* @@ -777,6 +779,99 @@ int main( hHrtfBinary.hrtf_set_audio_cfg = IVAS_AUDIO_CONFIG_INVALID; } +#ifdef FIX_1550_WRONG_RENDER_FRAMESIZE_PRINTOUT +#ifdef DEBUGGING + /*-----------------------------------------------------------------* + * Preview bitstream and print config information + *-----------------------------------------------------------------*/ + + if ( arg.voipMode ) + { + if ( ( error = printBitstreamInfoVoip( arg, hBsReader, hIvasDec ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "Error while previewing VoIP bitstream: %s\n", ivas_error_to_string( error ) ); + goto cleanup; + } + } + else + { + uint16_t bit_stream[IVAS_MAX_BITS_PER_FRAME + 4 * 8]; + int16_t num_bits; + int16_t bfi = 0; + do + { + if ( BS_Reader_ReadFrame_short( hBsReader, bit_stream, &num_bits, &bfi ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nError: input bitstream file %s couldn't be read\n\n", arg.inputBitstreamFilename ); + goto cleanup; + } + } while ( bfi || num_bits < MIN_NUM_BITS_ACTIVE_FRAME || num_bits == NUM_BITS_SID_IVAS_5K2 ); + + BS_Reader_Rewind( hBsReader ); + + IVAS_DEC_PrintConfigWithBitstream( hIvasDec, arg.quietModeEnabled, bit_stream, num_bits ); + +#ifdef VARIABLE_SPEED_DECODING + if ( arg.tsmEnabled ) + { + if ( arg.tsmScaleFileEnabled ) + { + fprintf( stdout, "Variable speed file: %s\n", arg.tsmScaleFileName ); + } + else + { + fprintf( stdout, "Variable speed factor: %i\n", arg.tsmScale ); + } + } +#endif + } + + /*-----------------------------------------------------------------* + * Open Error pattern file for simulation + *-----------------------------------------------------------------*/ + + if ( arg.FEPatternFileName != NULL ) + { + if ( ( FEC_pattern = fopen( arg.FEPatternFileName, "rb" ) ) == NULL ) + { + fprintf( stderr, "Error: Missing or incorrect FEC filename specification\n\n" ); + usage_dec(); + goto cleanup; + } + } + +#ifdef DEBUG_SBA_AUDIO_DUMP + ivas_open_sba_decoder_debug_files( arg.output_Fs, 1, 1 ); +#endif + + /*-----------------------------------------------------------------* + * Print information about FEC + *-----------------------------------------------------------------*/ + + if ( !arg.voipMode && ( arg.FEPatternFileName != NULL || arg.FER > 0 ) ) + { + if ( arg.FEPatternFileName != NULL ) + { + fprintf( stdout, "FEC: %s\n", arg.FEPatternFileName ); + } + else + { + fprintf( stdout, "FEC: %.2f %%\n", arg.FER ); + } + } +#else + /*-----------------------------------------------------------------* + * Print config information + *-----------------------------------------------------------------*/ + + if ( ( error = IVAS_DEC_PrintConfig( hIvasDec, 1, arg.voipMode ) ) != IVAS_ERR_OK ) + { + fprintf( stderr, "\nIVAS_DEC_PrintConfig failed: %s\n\n", IVAS_DEC_GetErrorMessage( error ) ); + goto cleanup; + } +#endif +#endif + /*------------------------------------------------------------------------------------------* * Allocate output data buffer *------------------------------------------------------------------------------------------*/ diff --git a/lib_com/options.h b/lib_com/options.h index c096f383c16f6839e38483d2c242125cb51a1409..56db7581cb9c3b2dba04dbcea65cdfcfcab17f5f 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -165,6 +165,7 @@ #define FIX_2095_REMOVE_UNUSED_ISAR_TABLES /* Dolby: remove unused ISAR */ #define FIX_FLOAT_1582_STEREO_DFT_QUANTIZE_ITD /* FhG: float issue 1582: Remove unncessary statement from stereo_dft_quantize_itd() */ #define FIX_1585_ASAN_FORMAT_SW_ALT /* VA: float issue 1585: alternative fix memory leaks with format switching */ +#define FIX_1550_WRONG_RENDER_FRAMESIZE_PRINTOUT /* Dolby: float issue 1550: Wrong render framesize printout */ /* #################### End BE switches ################################## */