Loading apps/decoder.c +4 −0 Original line number Diff line number Diff line Loading @@ -1222,6 +1222,10 @@ static bool parseCmdlIVAS_dec( { if ( !is_digits_only( argv[i] ) ) { #ifdef LIB_DEC_REVISION fprintf( stderr, "Error: Render frame size not specified!\n\n" ); usage_dec(); #endif return false; } Loading lib_com/options.h +1 −1 Original line number Diff line number Diff line Loading @@ -163,7 +163,7 @@ #define FIX_1285_RENDER_CONFIG_PTR_COMPARE /* Philips: Warning about pointer comparison in the render config reader */ #define FIX_1298_MEMORY_OPT_IVAS_CORE_ENC /* VA: issue 1298: Memory saving in ivas_core_enc() */ #define SIMPLIFY_IVAS_CORE /* VA: simplify ivas core coder functions */ #define LIB_DEC_REVISION /* VA: correction and simplification of lib_dec.c */ #define LIB_DEC_REVISION /* VA: cleaning and simplification of lib_dec.c */ /* #################### End BE switches ################################## */ Loading lib_dec/lib_dec.c +22 −25 Original line number Diff line number Diff line Loading @@ -1144,7 +1144,7 @@ ivas_error IVAS_DEC_GetSamplesDecoder( st_ivas = hIvasDec->st_ivas; #ifdef LIB_DEC_REVISION isInitialized_voip = hIvasDec->isInitialized; isInitialized_voip = hIvasDec->apaExecBuffer != NULL; #endif if ( !hIvasDec->isInitialized || hIvasDec->hasBeenFedFrame ) /* wait for the first good frame */ Loading Loading @@ -2141,9 +2141,6 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( static ivas_error ivas_dec_setup_all( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ #ifndef LIB_DEC_REVISION uint16_t *nTcBufferGranularity, /* o : granularity of the TC Buffer */ #endif uint8_t *nTransportChannels, /* o : number of decoded transport PCM channels */ const int16_t isSplitRend, /* i : split rendering enabled flag */ ISAR_SPLIT_REND_BITS_DATA *splitRendBits /* o : output split rendering bits */ Loading Loading @@ -2212,25 +2209,6 @@ static ivas_error IVAS_DEC_Setup( *nTcBufferGranularity = (uint16_t) st_ivas->hTcBuffer->n_samples_granularity; #endif #ifdef LIB_DEC_REVISION /* allocate/reallocte APA buffer */ // ToDo: this memory should be harmonized with st_ivas->p_output_f[] and st_ivas->hTcBuffer->tc_buffer[] - see issue #104 // ToDo: this part is also related to cleaning of NONBE_UNIFIED_DECODING_PATHS leftovers (see MR !1246) if ( hIvasDec->st_ivas->hDecoderConfig->Opt_tsm && *nTransportChannels != hIvasDec->nTransportChannelsOld ) { if ( hIvasDec->apaExecBuffer != NULL ) { free( hIvasDec->apaExecBuffer ); } if ( ( hIvasDec->apaExecBuffer = malloc( sizeof( float ) * APA_BUF_PER_CHANNEL * *nTransportChannels ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" ); } set_zero( hIvasDec->apaExecBuffer, APA_BUF_PER_CHANNEL * *nTransportChannels ); } #endif /*-----------------------------------------------------------------* * ISAR: * - initialize ISAR handle at the first frame Loading Loading @@ -2258,6 +2236,25 @@ static ivas_error IVAS_DEC_Setup( } } #ifdef LIB_DEC_REVISION /* allocate/reallocate APA buffer */ // ToDo: this memory should be harmonized with st_ivas->p_output_f[] and st_ivas->hTcBuffer->tc_buffer[] - see issue #916 // ToDo: this part is also related to cleaning of NONBE_UNIFIED_DECODING_PATHS leftovers (see MR !1246) if ( hIvasDec->st_ivas->hDecoderConfig->Opt_tsm && *nTransportChannels != hIvasDec->nTransportChannelsOld ) { if ( hIvasDec->apaExecBuffer != NULL ) { free( hIvasDec->apaExecBuffer ); } if ( ( hIvasDec->apaExecBuffer = malloc( sizeof( float ) * APA_BUF_PER_CHANNEL * *nTransportChannels ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" ); } set_zero( hIvasDec->apaExecBuffer, APA_BUF_PER_CHANNEL * *nTransportChannels ); } #endif return IVAS_ERR_OK; } Loading Loading @@ -4812,8 +4809,8 @@ static ivas_error IVAS_DEC_VoIP_reconfigure( #endif { DECODER_CONFIG_HANDLE hDecoderConfig; #ifndef LIB_DEC_REVISION if ( hIvasDec->st_ivas->hDecoderConfig->Opt_tsm ) { #endif Loading Loading
apps/decoder.c +4 −0 Original line number Diff line number Diff line Loading @@ -1222,6 +1222,10 @@ static bool parseCmdlIVAS_dec( { if ( !is_digits_only( argv[i] ) ) { #ifdef LIB_DEC_REVISION fprintf( stderr, "Error: Render frame size not specified!\n\n" ); usage_dec(); #endif return false; } Loading
lib_com/options.h +1 −1 Original line number Diff line number Diff line Loading @@ -163,7 +163,7 @@ #define FIX_1285_RENDER_CONFIG_PTR_COMPARE /* Philips: Warning about pointer comparison in the render config reader */ #define FIX_1298_MEMORY_OPT_IVAS_CORE_ENC /* VA: issue 1298: Memory saving in ivas_core_enc() */ #define SIMPLIFY_IVAS_CORE /* VA: simplify ivas core coder functions */ #define LIB_DEC_REVISION /* VA: correction and simplification of lib_dec.c */ #define LIB_DEC_REVISION /* VA: cleaning and simplification of lib_dec.c */ /* #################### End BE switches ################################## */ Loading
lib_dec/lib_dec.c +22 −25 Original line number Diff line number Diff line Loading @@ -1144,7 +1144,7 @@ ivas_error IVAS_DEC_GetSamplesDecoder( st_ivas = hIvasDec->st_ivas; #ifdef LIB_DEC_REVISION isInitialized_voip = hIvasDec->isInitialized; isInitialized_voip = hIvasDec->apaExecBuffer != NULL; #endif if ( !hIvasDec->isInitialized || hIvasDec->hasBeenFedFrame ) /* wait for the first good frame */ Loading Loading @@ -2141,9 +2141,6 @@ ivas_error IVAS_DEC_GetSplitBinauralBitstream( static ivas_error ivas_dec_setup_all( IVAS_DEC_HANDLE hIvasDec, /* i/o: IVAS decoder handle */ #ifndef LIB_DEC_REVISION uint16_t *nTcBufferGranularity, /* o : granularity of the TC Buffer */ #endif uint8_t *nTransportChannels, /* o : number of decoded transport PCM channels */ const int16_t isSplitRend, /* i : split rendering enabled flag */ ISAR_SPLIT_REND_BITS_DATA *splitRendBits /* o : output split rendering bits */ Loading Loading @@ -2212,25 +2209,6 @@ static ivas_error IVAS_DEC_Setup( *nTcBufferGranularity = (uint16_t) st_ivas->hTcBuffer->n_samples_granularity; #endif #ifdef LIB_DEC_REVISION /* allocate/reallocte APA buffer */ // ToDo: this memory should be harmonized with st_ivas->p_output_f[] and st_ivas->hTcBuffer->tc_buffer[] - see issue #104 // ToDo: this part is also related to cleaning of NONBE_UNIFIED_DECODING_PATHS leftovers (see MR !1246) if ( hIvasDec->st_ivas->hDecoderConfig->Opt_tsm && *nTransportChannels != hIvasDec->nTransportChannelsOld ) { if ( hIvasDec->apaExecBuffer != NULL ) { free( hIvasDec->apaExecBuffer ); } if ( ( hIvasDec->apaExecBuffer = malloc( sizeof( float ) * APA_BUF_PER_CHANNEL * *nTransportChannels ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" ); } set_zero( hIvasDec->apaExecBuffer, APA_BUF_PER_CHANNEL * *nTransportChannels ); } #endif /*-----------------------------------------------------------------* * ISAR: * - initialize ISAR handle at the first frame Loading Loading @@ -2258,6 +2236,25 @@ static ivas_error IVAS_DEC_Setup( } } #ifdef LIB_DEC_REVISION /* allocate/reallocate APA buffer */ // ToDo: this memory should be harmonized with st_ivas->p_output_f[] and st_ivas->hTcBuffer->tc_buffer[] - see issue #916 // ToDo: this part is also related to cleaning of NONBE_UNIFIED_DECODING_PATHS leftovers (see MR !1246) if ( hIvasDec->st_ivas->hDecoderConfig->Opt_tsm && *nTransportChannels != hIvasDec->nTransportChannelsOld ) { if ( hIvasDec->apaExecBuffer != NULL ) { free( hIvasDec->apaExecBuffer ); } if ( ( hIvasDec->apaExecBuffer = malloc( sizeof( float ) * APA_BUF_PER_CHANNEL * *nTransportChannels ) ) == NULL ) { return IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Could not allocate VoIP handle" ); } set_zero( hIvasDec->apaExecBuffer, APA_BUF_PER_CHANNEL * *nTransportChannels ); } #endif return IVAS_ERR_OK; } Loading Loading @@ -4812,8 +4809,8 @@ static ivas_error IVAS_DEC_VoIP_reconfigure( #endif { DECODER_CONFIG_HANDLE hDecoderConfig; #ifndef LIB_DEC_REVISION if ( hIvasDec->st_ivas->hDecoderConfig->Opt_tsm ) { #endif Loading