Loading lib_dec/ivas_dec.c +24 −0 Original line number Diff line number Diff line Loading @@ -179,6 +179,19 @@ ivas_error ivas_dec( if ( st_ivas->bfi && st_ivas->ini_frame == 0 ) { #ifdef FIX_264_AUDIO_CHANNELS_TO_HEAP for ( n = 0; n < nchan_out; n++ ) { /* note: these are intra-frame heap memories */ if ( ( st_ivas->p_output_f[n] = (float *) malloc( ( 48000 / FRAMES_PER_SEC ) * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for floating-point output audio buffer!\n" ) ); } output[n] = st_ivas->p_output_f[n]; p_output[n] = output[n]; } #endif /* zero output when first frame(s) is lost */ for ( n = 0; n < nchan_out; n++ ) { Loading Loading @@ -1255,6 +1268,17 @@ ivas_error ivas_dec( st_ivas->last_ivas_format = st_ivas->ivas_format; #endif #ifdef FIX_264_AUDIO_CHANNELS_TO_HEAP if ( st_ivas->bfi && st_ivas->ini_frame == 0 ) { for ( n = 0; n < nchan_out; n++ ) { free( st_ivas->p_output_f[n] ); st_ivas->p_output_f[n] = NULL; } } #endif #ifdef DEBUG_MODE_INFO dbgwrite( &st_ivas->bfi, sizeof( int16_t ), 1, output_frame, "res/bfi" ); dbgwrite( &st_ivas->BER_detect, sizeof( int16_t ), 1, output_frame, "res/BER_detect" ); Loading Loading
lib_dec/ivas_dec.c +24 −0 Original line number Diff line number Diff line Loading @@ -179,6 +179,19 @@ ivas_error ivas_dec( if ( st_ivas->bfi && st_ivas->ini_frame == 0 ) { #ifdef FIX_264_AUDIO_CHANNELS_TO_HEAP for ( n = 0; n < nchan_out; n++ ) { /* note: these are intra-frame heap memories */ if ( ( st_ivas->p_output_f[n] = (float *) malloc( ( 48000 / FRAMES_PER_SEC ) * sizeof( float ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for floating-point output audio buffer!\n" ) ); } output[n] = st_ivas->p_output_f[n]; p_output[n] = output[n]; } #endif /* zero output when first frame(s) is lost */ for ( n = 0; n < nchan_out; n++ ) { Loading Loading @@ -1255,6 +1268,17 @@ ivas_error ivas_dec( st_ivas->last_ivas_format = st_ivas->ivas_format; #endif #ifdef FIX_264_AUDIO_CHANNELS_TO_HEAP if ( st_ivas->bfi && st_ivas->ini_frame == 0 ) { for ( n = 0; n < nchan_out; n++ ) { free( st_ivas->p_output_f[n] ); st_ivas->p_output_f[n] = NULL; } } #endif #ifdef DEBUG_MODE_INFO dbgwrite( &st_ivas->bfi, sizeof( int16_t ), 1, output_frame, "res/bfi" ); dbgwrite( &st_ivas->BER_detect, sizeof( int16_t ), 1, output_frame, "res/BER_detect" ); Loading