📄 speech_decode_frame_init.asm
字号:
*****************************************************************************
** Description: Speech_Decode_Frame_init() in sp_dec.c **
** **
** Inputs **
** **
** Speech_Decode_FrameState *state **
** **
** Outputs: **
** **
** Speech_Decode_FrameState *state **
** **
** Return value : **
** **
** Attribute : Cycles: 40 Pm: 388 **
** Modified Registers: acc,p,t,ar0,xar2-4 **
** **
** Programmer : YANG zhiwei **
*****************************************************************************
.global _Speech_Decode_Frame_init
.ref _copy
.ref ltpGainHistory
.ref past_r_q
.ref past_lsf_q
.ref dec_past_qua_en
.ref dec_past_qua_en_MR122
.ref cbGainHistory
.ref hangVar
.ref hangCount
.ref lsp_meanSave
.ref gainMem
.ref prevState
.ref prevCbGain
.ref lockFull
.ref onset
.ref dec_exc
.ref dec_old_exc
.ref dec_mem_syn
.ref dec_sharp
.ref old_T0
.ref dec_lsp_old
.ref mem_pre
.ref past_gain
.ref mem_syn_pst
.ref res2
.ref synth_buf
.ref dec_y2_hi
.ref dec_y2_lo
.ref dec_y1_hi
.ref dec_y1_lo
.ref dec_x0
.ref dec_x1
.ref dec_mean_lsf
.ref lsp_init_data
.ref M
.ref MIN_ENERGY
.ref MIN_ENERGY_MR122
.ref L_CBGAINHIST
.ref PHDGAINMEMSIZE
.ref PIT_MAX
.ref L_INTERPOL
.ref SHARPMIN
.ref L_SUBFR
.ref L_FRAME
_Speech_Decode_Frame_init:
;Decoder_amr_init(&s->decoder_amrState)
movl xar2,#ltpGainHistory ;xar2 point to s->decoder_amrState->ltpGainHistory
rpt #9-1
||mov *xar2++,#0 ;s->decoder_amrState->ltpGainHistory[i] = 0
;D_plsf_init(&decoder_amrState->lsfState)
movl xar2,#past_r_q ;xar2 point to s->decoder_amrState->lsfState->past_r_q
rpt #M-1
||mov *xar2++,#0 ;s->decoder_amrState->lsfState->past_r_q[i] = 0
movl xar2,#dec_mean_lsf
movl xar3,#past_lsf_q ;xar3 point to s->decoder_amrState->lsfState->past_lsf_q
mov ar1,#M
lcr _copy ;Copy(dec_mean_lsf, &s->decoder_amrState->lsfState->past_lsf_q[0],M)
;gc_pred_init(&decoder_amrState->pred_state)
movl xar2,#dec_past_qua_en ;xar2 point to s->decoder_amrState->pred_state->past_qua_en
rpt #4-1
||mov *xar2++,#MIN_ENERGY
movl xar2,#dec_past_qua_en_MR122 ;xar2 point to s->decoder_amrState->pred_state->past_qua_en_MR122
rpt #4-1
||mov *xar2++,#MIN_ENERGY_MR122
;Cb_gain_average_init(&decoder_amrState->Cb_gain_averState)
movl xar2,#cbGainHistory ;xar2 point to s->decoder_amrState->Cb_gain_averState->cbGainHistory
rpt #L_CBGAINHIST-1
||mov *xar2++,#0
movl xar2,#hangVar ;xar2 point to s->decoder_amrState->Cb_gain_averState->hangVar
mov *xar2,#0
movl xar2,#hangCount ;xar2 point to s->decoder_amrState->Cb_gain_averState->hangCount
mov *xar2,#0
;lsp_avg_init(&decoder_amrState->lsp_avg_st)
movl xar2,#dec_mean_lsf
movl xar3,#lsp_meanSave ;xar3 point to s->decoder_amrState->lsp_avg_st->lsp_meanSave
mov ar1,#M
lcr _copy
;ph_disp_init(&decoder_amrState->ph_disp_st)
movl xar2,#gainMem ;xar2 point to s->decoder_amrState->ph_disp_st->gainMem
rpt #PHDGAINMEMSIZE-1
||mov *xar2++,#0
movl xar2,#prevState ;xar2 point to s->decoder_amrState->ph_disp_st->prevState
mov *xar2,#0
movl xar2,#prevCbGain ;xar2 point to s->decoder_amrState->ph_disp_st->prevCbGain
mov *xar2,#0
movl xar2,#lockFull ;xar2 point to s->decoder_amrState->ph_disp_st->lockFull
mov *xar2,#0
movl xar2,#onset ;xar2 point to s->decoder_amrState->ph_disp_st->onset
mov *xar2,#0
movl xar2,#dec_exc+1 ;xar2 point to s->decoder_amrState->exc
movl xar3,#dec_old_exc + PIT_MAX + L_INTERPOL
movl *xar2,xar3 ;s->decoder_amrState->exc = s->decoder_amrState->old_exc + PIT_MAX + L_INTERPOL
movl xar2,#dec_old_exc ;xar2 point to s->decoder_amrState->old_exc
rpt #PIT_MAX + L_INTERPOL - 1
||mov *xar2++,#0
movl xar2,#dec_mem_syn ;xar2 point to s->decoder_amrState->mem_syn
nop
rpt #M - 1
||mov *xar2++,#0
movl xar2,#dec_sharp ;xar2 point to s->decoder_amrState->sharp
mov *xar2,#SHARPMIN
movl xar2,#old_T0 ;xar2 point to s->decoder_amrState->old_T0
mov *xar2,#40
movl xar2,#lsp_init_data ;xar2 point to lsp_init_data
movl xar3,#dec_lsp_old ;xar3 point to s->decoder_amrState->lsp_old
mov ar1,#M
lcr _copy ;Copy(lsp_init_data, &s->decoder_amrState->lsp_old[0], M)
;Post_Filter_init(&s->post_state)
;preemphasis_init(&s->post_state->preemph_state)
movl xar2,#mem_pre ;xar2 point to s->post_state->preemph_state->mem_pre
mov *xar2,#0
;agc_init(&s->post_state->agc_state)
movl xar2,#past_gain ;xar2 point to s->post_state->preemph_state->past_gain
mov *xar2,#4096
movl xar2,#mem_syn_pst ;xar2 point to s->post_state->mem_syn_pst
rpt #M - 1
||mov *xar2++,#0
movl xar2,#res2 ;xar2 point to s->post_state->res2
rpt #L_SUBFR - 1
||mov *xar2++,#0
movl xar2,#synth_buf ;xar2 point to s->post_state->synth_buf
rpt #L_FRAME + M - 1
||mov *xar2++,#0
;Post_Process_init(&s->postHP_state)
movl xar2,#dec_y2_hi ;xar2 point to s->postHP_state->y2_hi
mov *xar2,#0
movl xar2,#dec_y2_lo ;xar2 point to s->postHP_state->y2_lo
mov *xar2,#0
movl xar2,#dec_y1_hi ;xar2 point to s->postHP_state->y1_hi
mov *xar2,#0
movl xar2,#dec_y1_lo ;xar2 point to s->postHP_state->y1_lo
mov *xar2,#0
movl xar2,#dec_x0 ;xar2 point to s->postHP_state->x0
mov *xar2,#0
movl xar2,#dec_x1 ;xar2 point to s->postHP_state->x1
mov *xar2,#0
lretr
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -