Loading lib_com/ivas_prot.h +19 −0 Original line number Diff line number Diff line Loading @@ -5482,6 +5482,25 @@ void ivas_lfe_lpf_enc_apply( const int16_t input_frame /* i : input frame length per channel */ ); /*----------------------------------------------------------------------------------* * LFE decoder low pass filter prototypes *----------------------------------------------------------------------------------*/ ivas_error ivas_create_lfe_lpf_dec( ivas_filters_process_state_t **hLfeLpf, /* o : LFE LPF handle */ const int32_t input_Fs /* i : input sampling rate */ ); void ivas_lfe_lpf_dec_close( ivas_filters_process_state_t **hLfeLpf /* i/o: LFE LPF handle */ ); void ivas_lfe_lpf_dec_apply( ivas_filters_process_state_t *hLfeLpf, /* i/o: LFE LPF handle */ float data_lfe_ch[], /* i/o: LFE signal */ const int16_t input_frame /* i : input frame length per channel */ ); /*----------------------------------------------------------------------------------* * LFE Coding prototypes Loading lib_dec/ivas_init_dec.c +8 −0 Original line number Diff line number Diff line Loading @@ -1747,6 +1747,11 @@ ivas_error ivas_init_decoder( } else if ( st_ivas->ivas_format == MC_FORMAT ) { if ( ( error = ivas_create_lfe_lpf_dec( &st_ivas->hLfeLpf, hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { return error; } if ( st_ivas->mc_mode == MC_MODE_MCT ) { /* init EFAP for custom LS setup */ Loading Loading @@ -2691,6 +2696,9 @@ void ivas_destroy_dec( /* LFE handle */ ivas_lfe_dec_close( &( st_ivas->hLFE ) ); /* LFE low pass filter state */ ivas_lfe_lpf_dec_close( &( st_ivas->hLfeLpf ) ); /* Param-Upmix MC handle */ ivas_mc_paramupmix_dec_close( &( st_ivas->hMCParamUpmix ) ); Loading lib_dec/ivas_jbm_dec.c +3 −0 Original line number Diff line number Diff line Loading @@ -725,6 +725,9 @@ ivas_error ivas_jbm_dec_tc( ivas_mono_stereo_downmix_mcmasa( st_ivas, p_output, output_frame ); } } /* LFE low pass filter */ ivas_lfe_lpf_dec_apply( st_ivas->hLfeLpf, p_output[LFE_CHANNEL], output_frame ); } /*----------------------------------------------------------------* Loading lib_dec/ivas_lfe_dec.c +74 −0 Original line number Diff line number Diff line Loading @@ -473,3 +473,77 @@ void ivas_lfe_dec_close( return; } /*------------------------------------------------------------------------- * ivas_create_lfe_lpf_dec() * * Create, allocate and initialize IVAS decoder LFE low pass filter state handle *-------------------------------------------------------------------------*/ ivas_error ivas_create_lfe_lpf_dec( ivas_filters_process_state_t **hLfeLpf, /* o : LFE LPF handle */ const int32_t input_Fs /* i : input sampling rate */ ) { const float *filt_coeff; if ( hLfeLpf == NULL ) { return ( IVAS_ERROR( IVAS_ERR_UNEXPECTED_NULL_POINTER, "Can not allocate memory for LFE LPF\n" ) ); } /*-----------------------------------------------------------------* * Allocate LFE LPF handle *-----------------------------------------------------------------*/ if ( ( *hLfeLpf = (ivas_filters_process_state_t *) malloc( sizeof( ivas_filters_process_state_t ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LFE LPF\n" ) ); } ivas_lfe_lpf_select_filt_coeff( input_Fs, IVAS_FILTER_ORDER_4, &filt_coeff ); ivas_filters_init( *hLfeLpf, filt_coeff, IVAS_FILTER_ORDER_4 ); return IVAS_ERR_OK; } /*------------------------------------------------------------------------- * ivas_lfe_lpf_dec_close() * * Destroy IVAS decoder LFE low pass filter state *-------------------------------------------------------------------------*/ void ivas_lfe_lpf_dec_close( ivas_filters_process_state_t **hLfeLpf /* i/o: LFE LPF handle */ ) { if ( hLfeLpf == NULL || *hLfeLpf == NULL ) { return; } free( ( *hLfeLpf ) ); ( *hLfeLpf ) = NULL; return; } /*------------------------------------------------------------------------- * ivas_lfe_lpf_dec_apply() * * Apply IVAS decoder LFE low pass filter *-------------------------------------------------------------------------*/ void ivas_lfe_lpf_dec_apply( ivas_filters_process_state_t *hLfeLpf, /* i/o: LFE LPF handle */ float data_lfe_ch[], /* i/o: LFE signal */ const int16_t input_frame /* i : input frame length per channel */ ) { ivas_filter_process( hLfeLpf, data_lfe_ch, input_frame ); return; } lib_dec/ivas_stat_dec.h +1 −0 Original line number Diff line number Diff line Loading @@ -1094,6 +1094,7 @@ typedef struct Decoder_Struct MC_PARAMUPMIX_DEC_HANDLE hMCParamUpmix; /* MC Param-Upmix handle */ MASA_DECODER_HANDLE hMasa; /* MASA handle */ LFE_DEC_HANDLE hLFE; /* LFE handle */ ivas_filters_process_state_t *hLfeLpf; /* low pass filter state for LFE */ ISM_MODE ism_mode; /* ISM format mode */ int16_t nchan_ism; /* number of ISM channels */ Loading Loading
lib_com/ivas_prot.h +19 −0 Original line number Diff line number Diff line Loading @@ -5482,6 +5482,25 @@ void ivas_lfe_lpf_enc_apply( const int16_t input_frame /* i : input frame length per channel */ ); /*----------------------------------------------------------------------------------* * LFE decoder low pass filter prototypes *----------------------------------------------------------------------------------*/ ivas_error ivas_create_lfe_lpf_dec( ivas_filters_process_state_t **hLfeLpf, /* o : LFE LPF handle */ const int32_t input_Fs /* i : input sampling rate */ ); void ivas_lfe_lpf_dec_close( ivas_filters_process_state_t **hLfeLpf /* i/o: LFE LPF handle */ ); void ivas_lfe_lpf_dec_apply( ivas_filters_process_state_t *hLfeLpf, /* i/o: LFE LPF handle */ float data_lfe_ch[], /* i/o: LFE signal */ const int16_t input_frame /* i : input frame length per channel */ ); /*----------------------------------------------------------------------------------* * LFE Coding prototypes Loading
lib_dec/ivas_init_dec.c +8 −0 Original line number Diff line number Diff line Loading @@ -1747,6 +1747,11 @@ ivas_error ivas_init_decoder( } else if ( st_ivas->ivas_format == MC_FORMAT ) { if ( ( error = ivas_create_lfe_lpf_dec( &st_ivas->hLfeLpf, hDecoderConfig->output_Fs ) ) != IVAS_ERR_OK ) { return error; } if ( st_ivas->mc_mode == MC_MODE_MCT ) { /* init EFAP for custom LS setup */ Loading Loading @@ -2691,6 +2696,9 @@ void ivas_destroy_dec( /* LFE handle */ ivas_lfe_dec_close( &( st_ivas->hLFE ) ); /* LFE low pass filter state */ ivas_lfe_lpf_dec_close( &( st_ivas->hLfeLpf ) ); /* Param-Upmix MC handle */ ivas_mc_paramupmix_dec_close( &( st_ivas->hMCParamUpmix ) ); Loading
lib_dec/ivas_jbm_dec.c +3 −0 Original line number Diff line number Diff line Loading @@ -725,6 +725,9 @@ ivas_error ivas_jbm_dec_tc( ivas_mono_stereo_downmix_mcmasa( st_ivas, p_output, output_frame ); } } /* LFE low pass filter */ ivas_lfe_lpf_dec_apply( st_ivas->hLfeLpf, p_output[LFE_CHANNEL], output_frame ); } /*----------------------------------------------------------------* Loading
lib_dec/ivas_lfe_dec.c +74 −0 Original line number Diff line number Diff line Loading @@ -473,3 +473,77 @@ void ivas_lfe_dec_close( return; } /*------------------------------------------------------------------------- * ivas_create_lfe_lpf_dec() * * Create, allocate and initialize IVAS decoder LFE low pass filter state handle *-------------------------------------------------------------------------*/ ivas_error ivas_create_lfe_lpf_dec( ivas_filters_process_state_t **hLfeLpf, /* o : LFE LPF handle */ const int32_t input_Fs /* i : input sampling rate */ ) { const float *filt_coeff; if ( hLfeLpf == NULL ) { return ( IVAS_ERROR( IVAS_ERR_UNEXPECTED_NULL_POINTER, "Can not allocate memory for LFE LPF\n" ) ); } /*-----------------------------------------------------------------* * Allocate LFE LPF handle *-----------------------------------------------------------------*/ if ( ( *hLfeLpf = (ivas_filters_process_state_t *) malloc( sizeof( ivas_filters_process_state_t ) ) ) == NULL ) { return ( IVAS_ERROR( IVAS_ERR_FAILED_ALLOC, "Can not allocate memory for LFE LPF\n" ) ); } ivas_lfe_lpf_select_filt_coeff( input_Fs, IVAS_FILTER_ORDER_4, &filt_coeff ); ivas_filters_init( *hLfeLpf, filt_coeff, IVAS_FILTER_ORDER_4 ); return IVAS_ERR_OK; } /*------------------------------------------------------------------------- * ivas_lfe_lpf_dec_close() * * Destroy IVAS decoder LFE low pass filter state *-------------------------------------------------------------------------*/ void ivas_lfe_lpf_dec_close( ivas_filters_process_state_t **hLfeLpf /* i/o: LFE LPF handle */ ) { if ( hLfeLpf == NULL || *hLfeLpf == NULL ) { return; } free( ( *hLfeLpf ) ); ( *hLfeLpf ) = NULL; return; } /*------------------------------------------------------------------------- * ivas_lfe_lpf_dec_apply() * * Apply IVAS decoder LFE low pass filter *-------------------------------------------------------------------------*/ void ivas_lfe_lpf_dec_apply( ivas_filters_process_state_t *hLfeLpf, /* i/o: LFE LPF handle */ float data_lfe_ch[], /* i/o: LFE signal */ const int16_t input_frame /* i : input frame length per channel */ ) { ivas_filter_process( hLfeLpf, data_lfe_ch, input_frame ); return; }
lib_dec/ivas_stat_dec.h +1 −0 Original line number Diff line number Diff line Loading @@ -1094,6 +1094,7 @@ typedef struct Decoder_Struct MC_PARAMUPMIX_DEC_HANDLE hMCParamUpmix; /* MC Param-Upmix handle */ MASA_DECODER_HANDLE hMasa; /* MASA handle */ LFE_DEC_HANDLE hLFE; /* LFE handle */ ivas_filters_process_state_t *hLfeLpf; /* low pass filter state for LFE */ ISM_MODE ism_mode; /* ISM format mode */ int16_t nchan_ism; /* number of ISM channels */ Loading