Loading apps/decoder.c +91 −0 Original line number Diff line number Diff line Loading @@ -3250,7 +3250,14 @@ static ivas_error decodeVoIP( } vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len; frame++; #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE if ( vec_pos_update == 0 ) { systemTime_ms += vec_pos_len * systemTimeInc_ms; } #else systemTime_ms += systemTimeInc_ms; #endif #ifdef WMOPS update_mem(); Loading @@ -3258,6 +3265,90 @@ static ivas_error decodeVoIP( #endif } #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE int16_t nSamplesFlushed = 0; /* decode and get samples */ if ( ( error = IVAS_DEC_Flush( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, &nSamplesFlushed ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_VoIP_Flush: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( nSamplesFlushed ) { /* Write current frame */ if ( ( error = AudioFileWriter_write( afWriter, pcmBuf, nSamplesFlushed * nOutChannels ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nOutput audio file writer error\n" ); goto cleanup; } /* Write ISm metadata to external file(s) */ if ( decodedGoodFrame && arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL ) { if ( bsFormat == IVAS_DEC_BS_OBJ || bsFormat == IVAS_DEC_BS_MASA_ISM || bsFormat == IVAS_DEC_BS_SBA_ISM ) { if ( ( error = IVAS_DEC_GetNumObjects( hIvasDec, &numObj ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetNumObjects: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } for ( i = 0; i < numObj; ++i ) { IVAS_ISM_METADATA IsmMetadata; if ( ( error = IVAS_DEC_GetObjectMetadata( hIvasDec, &IsmMetadata, 0, i ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetObjectMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( ( IsmFileWriter_writeFrame( IsmMetadata, ismWriters[i] ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError writing ISM metadata to file %s\n", IsmFileWriter_getFilePath( ismWriters[i] ) ); goto cleanup; } } } if ( bsFormat == IVAS_DEC_BS_MASA || bsFormat == IVAS_DEC_BS_MASA_ISM ) { IVAS_MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta; #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT int16_t fullDelayNumSamples[3]; float delayMs; /* delayNumSamples is zeroed, and delayNumSamples_orig is updated only on first good frame, so need to re-fetch delay info */ if ( ( error = IVAS_DEC_GetDelay( hIvasDec, fullDelayNumSamples, &delayTimeScale ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) ); } #endif if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT delayMs = (float) ( fullDelayNumSamples[0] ) / (float) ( delayTimeScale ); if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMasaExtOutMeta, &delayMs ) ) != IVAS_ERR_OK ) #else if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMasaExtOutMeta ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( masaWriter ) ); goto cleanup; } } } } #endif /*------------------------------------------------------------------------------------------* * Add zeros at the end to have equal length of synthesized signals *------------------------------------------------------------------------------------------*/ Loading apps/encoder.c +1 −6 Original line number Diff line number Diff line Loading @@ -785,12 +785,7 @@ int main( } /* *** Encode one frame *** */ if ( ( error = IVAS_ENC_EncodeFrameToSerial( hIvasEnc, pcmBuf, pcmBufSize, bitStream, &numBits #ifdef DBG_BITSTREAM_ANALYSIS , frame #endif ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_ENC_EncodeFrameToSerial( hIvasEnc, pcmBuf, pcmBufSize, bitStream, &numBits ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nencodeFrame failed: %s\n\n", IVAS_ENC_GetErrorMessage( error ) ); goto cleanup; Loading lib_com/bitstream.c +21 −39 Original line number Diff line number Diff line Loading @@ -37,9 +37,6 @@ #include <assert.h> #include <stdint.h> #include "options.h" #ifdef DEBUGGING #include "debug.h" #endif #include "cnst.h" #include "prot.h" #include "stat_enc.h" Loading @@ -50,9 +47,12 @@ #include "ivas_cnst.h" #include "ivas_rom_com.h" #include "wmc_auto.h" #ifdef DEBUGGING #include "debug.h" #ifdef DBG_BITSTREAM_ANALYSIS #include <string.h> #endif #endif #ifdef DEBUGGING Loading Loading @@ -212,7 +212,7 @@ ivas_error ind_list_realloc( { new_ind_list[i].id = old_ind_list[i].id; new_ind_list[i].value = old_ind_list[i].value; #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( new_ind_list[i].function_name, old_ind_list[i].function_name, 100 ); #endif } Loading @@ -223,7 +223,7 @@ ivas_error ind_list_realloc( for ( ; i < max_num_indices; i++ ) { new_ind_list[i].nb_bits = -1; #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) sprintf( new_ind_list[i].function_name, "RESET in ind_list_realloc" ); #endif } Loading Loading @@ -812,7 +812,7 @@ void move_indices( new_ind_list[i].value = old_ind_list[i].value; new_ind_list[i].nb_bits = old_ind_list[i].nb_bits; #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( new_ind_list[i].function_name, old_ind_list[i].function_name, 100 ); #endif old_ind_list[i].nb_bits = -1; Loading @@ -825,12 +825,12 @@ void move_indices( new_ind_list[i].id = old_ind_list[i].id; new_ind_list[i].value = old_ind_list[i].value; new_ind_list[i].nb_bits = old_ind_list[i].nb_bits; #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( new_ind_list[i].function_name, old_ind_list[i].function_name, 100 ); #endif old_ind_list[i].nb_bits = -1; #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) sprintf( old_ind_list[i].function_name, "RESET in move_indices" ); #endif } Loading Loading @@ -909,7 +909,7 @@ ivas_error check_ind_list_limits( return error; } #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) const char *named_indices_table[] = { "IND_IVAS_FORMAT", "IND_SMODE_OMASA", Loading Loading @@ -2837,7 +2837,7 @@ ivas_error push_indice( hBstr->ind_list[j].id = hBstr->ind_list[j - 1].id; hBstr->ind_list[j].nb_bits = hBstr->ind_list[j - 1].nb_bits; hBstr->ind_list[j].value = hBstr->ind_list[j - 1].value; #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( hBstr->ind_list[j].function_name, hBstr->ind_list[j - 1].function_name, 100 ); #endif } Loading @@ -2848,7 +2848,7 @@ ivas_error push_indice( hBstr->ind_list[i].id = id; hBstr->ind_list[i].value = value; hBstr->ind_list[i].nb_bits = nb_bits; #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( hBstr->ind_list[i].function_name, named_indices_table[id], 100 ); #endif Loading @@ -2865,7 +2865,7 @@ ivas_error push_indice( * Push a new indice into the buffer at the next position *-------------------------------------------------------------------*/ #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) ivas_error push_next_indice_( const char *caller, #else Loading Loading @@ -2915,7 +2915,7 @@ ivas_error push_next_indice( hBstr->ind_list[hBstr->nb_ind_tot].value = value; hBstr->ind_list[hBstr->nb_ind_tot].nb_bits = nb_bits; #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( hBstr->ind_list[hBstr->nb_ind_tot].function_name, caller, 100 ); #endif Loading @@ -2932,7 +2932,7 @@ ivas_error push_next_indice( * Push a bit buffer into the buffer at the next position *-------------------------------------------------------------------*/ #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) ivas_error push_next_bits_( const char *caller, #else Loading Loading @@ -2978,7 +2978,7 @@ ivas_error push_next_bits( ptr->value = code; ptr->nb_bits = 16; ptr->id = prev_id; #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( ptr->function_name, caller, 100 ); #endif hBstr->nb_ind_tot++; Loading @@ -2997,7 +2997,7 @@ ivas_error push_next_bits( ptr->value = bits[i]; ptr->nb_bits = 1; ptr->id = prev_id; #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( ptr->function_name, caller, 100 ); #endif hBstr->nb_ind_tot++; Loading Loading @@ -3069,7 +3069,7 @@ uint16_t delete_indice( hBstr->ind_list[j].id = hBstr->ind_list[i].id; hBstr->ind_list[j].value = hBstr->ind_list[i].value; hBstr->ind_list[j].nb_bits = hBstr->ind_list[i].nb_bits; #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( hBstr->ind_list[j].function_name, hBstr->ind_list[i].function_name, 100 ); #endif } Loading @@ -3083,7 +3083,7 @@ uint16_t delete_indice( { /* reset the shifted indices at the end of the list */ hBstr->ind_list[j].nb_bits = -1; #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) sprintf( hBstr->ind_list[j].function_name, "RESET in delete_indice" ); #endif } Loading Loading @@ -3388,10 +3388,6 @@ static ivas_error write_indices_element( uint16_t **pt_stream, /* i : pointer to bitstream buffer */ const int16_t is_SCE, /* i : flag to distingusih SCE and CPE */ const int16_t element_id /* i : id of the SCE or CPE */ #ifdef DBG_BITSTREAM_ANALYSIS , int32_t frame #endif ) { int16_t ch; Loading Loading @@ -3513,7 +3509,7 @@ static ivas_error write_indices_element( } #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) if ( is_SCE ) /* EVS and SCE */ { static FILE *f1 = 0; Loading Loading @@ -3625,10 +3621,6 @@ ivas_error write_indices_ivas( Encoder_Struct *st_ivas, /* i/o: encoder state structure */ uint16_t *bit_stream, /* i/o: output bitstream */ uint16_t *num_bits /* i : number of indices written to output */ #ifdef DBG_BITSTREAM_ANALYSIS , int32_t frame #endif ) { int16_t i, n; Loading Loading @@ -3694,22 +3686,12 @@ ivas_error write_indices_ivas( for ( n = 0; n < st_ivas->nSCE; n++ ) { write_indices_element( st_ivas, &pt_stream, 1, n #ifdef DBG_BITSTREAM_ANALYSIS , frame #endif ); write_indices_element( st_ivas, &pt_stream, 1, n ); } for ( n = 0; n < st_ivas->nCPE; n++ ) { write_indices_element( st_ivas, &pt_stream, 0, n #ifdef DBG_BITSTREAM_ANALYSIS , frame #endif ); write_indices_element( st_ivas, &pt_stream, 0, n ); } *num_bits = (uint16_t) ( pt_stream - bit_stream ); Loading lib_com/options.h +2 −0 Original line number Diff line number Diff line Loading @@ -168,6 +168,8 @@ #define NONBE_FIX_1277_EVS_DTX_HIGH_RATE_THRESHOLD /* VA/Eri: FLP issue 1277: Fix Mismatch in DTX high-rate threshold between EVS float and BASOP */ #define NONBE_1319_M2R_PRECISION_ALIGN /* Nokia: bring updates from PC code related to OMASA masa2total ratios */ #define NONBE_FIX_864_JBM_RENDER_FRAMESIZE /* FhG: issue #864: fix different behaviour of JBM TSM with different render frame sizes */ /* #################### End FIXES switches ############################ */ Loading lib_com/prot.h +3 −7 Original line number Diff line number Diff line Loading @@ -479,12 +479,12 @@ ivas_error push_indice( int16_t nb_bits /* i : number of bits used to quantize the indice */ ); #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) #define push_next_indice( ... ) push_next_indice_( __func__, __VA_ARGS__ ) #define push_next_bits( ... ) push_next_bits_( __func__, __VA_ARGS__ ); #endif #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) ivas_error push_next_indice_( const char *caller, #else Loading @@ -495,7 +495,7 @@ ivas_error push_next_indice( int16_t nb_bits /* i : number of bits used to quantize the indice */ ); #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) ivas_error push_next_bits_( const char *caller, #else Loading Loading @@ -595,10 +595,6 @@ ivas_error write_indices_ivas( Encoder_Struct *st_ivas, /* i/o: encoder state structure */ uint16_t *bit_stream, /* i/o: output bitstream */ uint16_t *num_bits /* i/o: number of bits written to output */ #ifdef DBG_BITSTREAM_ANALYSIS , int32_t frame #endif ); Word16 rate2EVSmode( Loading Loading
apps/decoder.c +91 −0 Original line number Diff line number Diff line Loading @@ -3250,7 +3250,14 @@ static ivas_error decodeVoIP( } vec_pos_update = ( vec_pos_update + 1 ) % vec_pos_len; frame++; #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE if ( vec_pos_update == 0 ) { systemTime_ms += vec_pos_len * systemTimeInc_ms; } #else systemTime_ms += systemTimeInc_ms; #endif #ifdef WMOPS update_mem(); Loading @@ -3258,6 +3265,90 @@ static ivas_error decodeVoIP( #endif } #ifdef NONBE_FIX_864_JBM_RENDER_FRAMESIZE int16_t nSamplesFlushed = 0; /* decode and get samples */ if ( ( error = IVAS_DEC_Flush( hIvasDec, nOutSamples, IVAS_DEC_PCM_INT16, (void *) pcmBuf, &nSamplesFlushed ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_VoIP_Flush: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( nSamplesFlushed ) { /* Write current frame */ if ( ( error = AudioFileWriter_write( afWriter, pcmBuf, nSamplesFlushed * nOutChannels ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nOutput audio file writer error\n" ); goto cleanup; } /* Write ISm metadata to external file(s) */ if ( decodedGoodFrame && arg.outputConfig == IVAS_AUDIO_CONFIG_EXTERNAL ) { if ( bsFormat == IVAS_DEC_BS_OBJ || bsFormat == IVAS_DEC_BS_MASA_ISM || bsFormat == IVAS_DEC_BS_SBA_ISM ) { if ( ( error = IVAS_DEC_GetNumObjects( hIvasDec, &numObj ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetNumObjects: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } for ( i = 0; i < numObj; ++i ) { IVAS_ISM_METADATA IsmMetadata; if ( ( error = IVAS_DEC_GetObjectMetadata( hIvasDec, &IsmMetadata, 0, i ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetObjectMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } if ( ( IsmFileWriter_writeFrame( IsmMetadata, ismWriters[i] ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError writing ISM metadata to file %s\n", IsmFileWriter_getFilePath( ismWriters[i] ) ); goto cleanup; } } } if ( bsFormat == IVAS_DEC_BS_MASA || bsFormat == IVAS_DEC_BS_MASA_ISM ) { IVAS_MASA_DECODER_EXT_OUT_META_HANDLE hMasaExtOutMeta; #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT int16_t fullDelayNumSamples[3]; float delayMs; /* delayNumSamples is zeroed, and delayNumSamples_orig is updated only on first good frame, so need to re-fetch delay info */ if ( ( error = IVAS_DEC_GetDelay( hIvasDec, fullDelayNumSamples, &delayTimeScale ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nUnable to get delay of decoder: %s\n", ivas_error_to_string( error ) ); } #endif if ( ( error = IVAS_DEC_GetMasaMetadata( hIvasDec, &hMasaExtOutMeta, 0 ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nError in IVAS_DEC_GetMasaMetadata: %s\n", IVAS_DEC_GetErrorMessage( error ) ); goto cleanup; } #ifdef NONBE_FIX_984_OMASA_EXT_OUTPUT delayMs = (float) ( fullDelayNumSamples[0] ) / (float) ( delayTimeScale ); if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMasaExtOutMeta, &delayMs ) ) != IVAS_ERR_OK ) #else if ( ( error = MasaFileWriter_writeFrame( masaWriter, hMasaExtOutMeta ) ) != IVAS_ERR_OK ) #endif { fprintf( stderr, "\nError writing MASA metadata to file: %s\n", MasaFileWriter_getFilePath( masaWriter ) ); goto cleanup; } } } } #endif /*------------------------------------------------------------------------------------------* * Add zeros at the end to have equal length of synthesized signals *------------------------------------------------------------------------------------------*/ Loading
apps/encoder.c +1 −6 Original line number Diff line number Diff line Loading @@ -785,12 +785,7 @@ int main( } /* *** Encode one frame *** */ if ( ( error = IVAS_ENC_EncodeFrameToSerial( hIvasEnc, pcmBuf, pcmBufSize, bitStream, &numBits #ifdef DBG_BITSTREAM_ANALYSIS , frame #endif ) ) != IVAS_ERR_OK ) if ( ( error = IVAS_ENC_EncodeFrameToSerial( hIvasEnc, pcmBuf, pcmBufSize, bitStream, &numBits ) ) != IVAS_ERR_OK ) { fprintf( stderr, "\nencodeFrame failed: %s\n\n", IVAS_ENC_GetErrorMessage( error ) ); goto cleanup; Loading
lib_com/bitstream.c +21 −39 Original line number Diff line number Diff line Loading @@ -37,9 +37,6 @@ #include <assert.h> #include <stdint.h> #include "options.h" #ifdef DEBUGGING #include "debug.h" #endif #include "cnst.h" #include "prot.h" #include "stat_enc.h" Loading @@ -50,9 +47,12 @@ #include "ivas_cnst.h" #include "ivas_rom_com.h" #include "wmc_auto.h" #ifdef DEBUGGING #include "debug.h" #ifdef DBG_BITSTREAM_ANALYSIS #include <string.h> #endif #endif #ifdef DEBUGGING Loading Loading @@ -212,7 +212,7 @@ ivas_error ind_list_realloc( { new_ind_list[i].id = old_ind_list[i].id; new_ind_list[i].value = old_ind_list[i].value; #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( new_ind_list[i].function_name, old_ind_list[i].function_name, 100 ); #endif } Loading @@ -223,7 +223,7 @@ ivas_error ind_list_realloc( for ( ; i < max_num_indices; i++ ) { new_ind_list[i].nb_bits = -1; #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) sprintf( new_ind_list[i].function_name, "RESET in ind_list_realloc" ); #endif } Loading Loading @@ -812,7 +812,7 @@ void move_indices( new_ind_list[i].value = old_ind_list[i].value; new_ind_list[i].nb_bits = old_ind_list[i].nb_bits; #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( new_ind_list[i].function_name, old_ind_list[i].function_name, 100 ); #endif old_ind_list[i].nb_bits = -1; Loading @@ -825,12 +825,12 @@ void move_indices( new_ind_list[i].id = old_ind_list[i].id; new_ind_list[i].value = old_ind_list[i].value; new_ind_list[i].nb_bits = old_ind_list[i].nb_bits; #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( new_ind_list[i].function_name, old_ind_list[i].function_name, 100 ); #endif old_ind_list[i].nb_bits = -1; #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) sprintf( old_ind_list[i].function_name, "RESET in move_indices" ); #endif } Loading Loading @@ -909,7 +909,7 @@ ivas_error check_ind_list_limits( return error; } #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) const char *named_indices_table[] = { "IND_IVAS_FORMAT", "IND_SMODE_OMASA", Loading Loading @@ -2837,7 +2837,7 @@ ivas_error push_indice( hBstr->ind_list[j].id = hBstr->ind_list[j - 1].id; hBstr->ind_list[j].nb_bits = hBstr->ind_list[j - 1].nb_bits; hBstr->ind_list[j].value = hBstr->ind_list[j - 1].value; #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( hBstr->ind_list[j].function_name, hBstr->ind_list[j - 1].function_name, 100 ); #endif } Loading @@ -2848,7 +2848,7 @@ ivas_error push_indice( hBstr->ind_list[i].id = id; hBstr->ind_list[i].value = value; hBstr->ind_list[i].nb_bits = nb_bits; #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( hBstr->ind_list[i].function_name, named_indices_table[id], 100 ); #endif Loading @@ -2865,7 +2865,7 @@ ivas_error push_indice( * Push a new indice into the buffer at the next position *-------------------------------------------------------------------*/ #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) ivas_error push_next_indice_( const char *caller, #else Loading Loading @@ -2915,7 +2915,7 @@ ivas_error push_next_indice( hBstr->ind_list[hBstr->nb_ind_tot].value = value; hBstr->ind_list[hBstr->nb_ind_tot].nb_bits = nb_bits; #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( hBstr->ind_list[hBstr->nb_ind_tot].function_name, caller, 100 ); #endif Loading @@ -2932,7 +2932,7 @@ ivas_error push_next_indice( * Push a bit buffer into the buffer at the next position *-------------------------------------------------------------------*/ #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) ivas_error push_next_bits_( const char *caller, #else Loading Loading @@ -2978,7 +2978,7 @@ ivas_error push_next_bits( ptr->value = code; ptr->nb_bits = 16; ptr->id = prev_id; #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( ptr->function_name, caller, 100 ); #endif hBstr->nb_ind_tot++; Loading @@ -2997,7 +2997,7 @@ ivas_error push_next_bits( ptr->value = bits[i]; ptr->nb_bits = 1; ptr->id = prev_id; #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( ptr->function_name, caller, 100 ); #endif hBstr->nb_ind_tot++; Loading Loading @@ -3069,7 +3069,7 @@ uint16_t delete_indice( hBstr->ind_list[j].id = hBstr->ind_list[i].id; hBstr->ind_list[j].value = hBstr->ind_list[i].value; hBstr->ind_list[j].nb_bits = hBstr->ind_list[i].nb_bits; #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) strncpy( hBstr->ind_list[j].function_name, hBstr->ind_list[i].function_name, 100 ); #endif } Loading @@ -3083,7 +3083,7 @@ uint16_t delete_indice( { /* reset the shifted indices at the end of the list */ hBstr->ind_list[j].nb_bits = -1; #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) sprintf( hBstr->ind_list[j].function_name, "RESET in delete_indice" ); #endif } Loading Loading @@ -3388,10 +3388,6 @@ static ivas_error write_indices_element( uint16_t **pt_stream, /* i : pointer to bitstream buffer */ const int16_t is_SCE, /* i : flag to distingusih SCE and CPE */ const int16_t element_id /* i : id of the SCE or CPE */ #ifdef DBG_BITSTREAM_ANALYSIS , int32_t frame #endif ) { int16_t ch; Loading Loading @@ -3513,7 +3509,7 @@ static ivas_error write_indices_element( } #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) if ( is_SCE ) /* EVS and SCE */ { static FILE *f1 = 0; Loading Loading @@ -3625,10 +3621,6 @@ ivas_error write_indices_ivas( Encoder_Struct *st_ivas, /* i/o: encoder state structure */ uint16_t *bit_stream, /* i/o: output bitstream */ uint16_t *num_bits /* i : number of indices written to output */ #ifdef DBG_BITSTREAM_ANALYSIS , int32_t frame #endif ) { int16_t i, n; Loading Loading @@ -3694,22 +3686,12 @@ ivas_error write_indices_ivas( for ( n = 0; n < st_ivas->nSCE; n++ ) { write_indices_element( st_ivas, &pt_stream, 1, n #ifdef DBG_BITSTREAM_ANALYSIS , frame #endif ); write_indices_element( st_ivas, &pt_stream, 1, n ); } for ( n = 0; n < st_ivas->nCPE; n++ ) { write_indices_element( st_ivas, &pt_stream, 0, n #ifdef DBG_BITSTREAM_ANALYSIS , frame #endif ); write_indices_element( st_ivas, &pt_stream, 0, n ); } *num_bits = (uint16_t) ( pt_stream - bit_stream ); Loading
lib_com/options.h +2 −0 Original line number Diff line number Diff line Loading @@ -168,6 +168,8 @@ #define NONBE_FIX_1277_EVS_DTX_HIGH_RATE_THRESHOLD /* VA/Eri: FLP issue 1277: Fix Mismatch in DTX high-rate threshold between EVS float and BASOP */ #define NONBE_1319_M2R_PRECISION_ALIGN /* Nokia: bring updates from PC code related to OMASA masa2total ratios */ #define NONBE_FIX_864_JBM_RENDER_FRAMESIZE /* FhG: issue #864: fix different behaviour of JBM TSM with different render frame sizes */ /* #################### End FIXES switches ############################ */ Loading
lib_com/prot.h +3 −7 Original line number Diff line number Diff line Loading @@ -479,12 +479,12 @@ ivas_error push_indice( int16_t nb_bits /* i : number of bits used to quantize the indice */ ); #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) #define push_next_indice( ... ) push_next_indice_( __func__, __VA_ARGS__ ) #define push_next_bits( ... ) push_next_bits_( __func__, __VA_ARGS__ ); #endif #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) ivas_error push_next_indice_( const char *caller, #else Loading @@ -495,7 +495,7 @@ ivas_error push_next_indice( int16_t nb_bits /* i : number of bits used to quantize the indice */ ); #ifdef DBG_BITSTREAM_ANALYSIS #if defined( DEBUGGING ) && defined( DBG_BITSTREAM_ANALYSIS ) ivas_error push_next_bits_( const char *caller, #else Loading Loading @@ -595,10 +595,6 @@ ivas_error write_indices_ivas( Encoder_Struct *st_ivas, /* i/o: encoder state structure */ uint16_t *bit_stream, /* i/o: output bitstream */ uint16_t *num_bits /* i/o: number of bits written to output */ #ifdef DBG_BITSTREAM_ANALYSIS , int32_t frame #endif ); Word16 rate2EVSmode( Loading