⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 q_plsf_3.asm

📁 基于TMS320F2812的AMR+RS编解码+OFDM调制解调源程序。是stand alone运行版本
💻 ASM
字号:
*****************************************************************************
** Description:     Q_plsf_3 in q_plsf_3                                   **
**                                                                         **
** Inputs                                                                  **
**                                                                         **
**   xar5---Word16 st->past_rq[M]                                          **
**   xar3---Word16 *lsp1                                                   **
**   xar2---Word16 *lsp1_q                                                 **
**   xar4---Word16 *indice                                                 **
**                                                                         **
** Outputs:                                                                **
**                                                                         **
**   xar2---Word16 *lsf                                                    **
**                                                                         **
** Return value :       none                                               **
**                                                                         **
** Attribute    :       Cycles:167832	  Pm:67                            **
**                      Modified Registers: acc,t,c,ar0,xar1-3,xar6,xar7   **
**                                                                         **
** Programmer   :       YANG zhiwei                                        **
*****************************************************************************
      .global _Q_plsf_3
  
      .ref _lsf_lsp
      .ref _lsf_wt
      .ref _lsp_lsf
      .ref _reorder    
      .ref _Vq_subvec3
      .ref _Vq_subvec4
      .ref _buffer3
	  .ref mean_lsf
	  .ref pred_fac
	  .ref dico1_lsf
	  .ref dico2_lsf
	  .ref mr515_3_lsf
	  .ref M
	  .ref LSF_GAP
	  .ref DICO1_SIZE
	  .ref DICO2_SIZE
	  .ref MR515_3_SIZE
	  		
_Q_plsf_3:  
      push		xar2				;store lsp1_q  
      push      xar5				;store st->past_rq[M]
      push      xar4				;store indice
      
	  movl		xar2,#_buffer3+M		;xar2 point to lsf1
	  lcr		_lsp_lsf	
	  
	  movl		xar3,#_buffer3+M+M		;xar3 point to wf1
	  lcr		_lsf_wt
	  	
	  mov		ar0,#0				;i = 0
	  movl      xar2,#_buffer3+M+3*M	;xar2 point to lsf_r1
	  movl		xar3,#mean_lsf		;xar3 point to mean_lsf
	  movl		xar4,#pred_fac		;xar4 point to pred_fac
	  movl 		xar6,#_buffer3+M		;xar6 point to lsf1
	  movl 		xar7,#_buffer3+M+2*M	;xar7 point to lsf_p 	
_loop_219:
			mov		t,*+xar5[ar0]		;t = st->past_rq[i]	  
	        mpy		acc,t,*+xar4[ar0]
	        lsl		acc,1				;ah = mult(st->past_rq[i],pred_fac[i])
	        add 	ah,*+xar3[ar0]		;ah = add(mean_lsf[i],mult(st->past_rq[i],pred_fac[i]))
         	mov		*+xar7[ar0],ah		;lsf_p[i] = ah
         	
         	mov		al,*+xar6[ar0]		;al = lsf1[i]
         	sub     al,ah				;al = sub(lsf1[i], lsf_p[i])
         	mov		*+xar2[ar0],al		;lsf_r1[i] = al
         	inc 	ar0
         	cmp     ar0,#M
         	bf		_loop_219,lt		;if( i < M ) then ,jump to _loop_219
       
       movl		xar3,#dico1_lsf		;xar3 point to dico1_lsf  	  	
       movl		xar4,#_buffer3+M+M		;xar4 point to wf1
       movb		xar7,#0				;use_flag = 0
       mov 		ar7,#DICO1_SIZE
       lcr		_Vq_subvec3
       pop		xar4				;restore indice
       mov		*xar4,al			;indice = Vq_subvec3(&lsf_r1[0], dico1_lsf, &wf1[0], DICO1_SIZE, 0)
       push		xar4				;store indice
       
       movl		xar3,#dico2_lsf		;xar3 point to dico2_lsf  	  
       movl		xar4,#_buffer3+M+M+3	;xar4 point to wf1[3]
       movl		xar7,#0x00010000	;use_flag = 1
       mov		ar7,#DICO2_SIZE/2
       lcr		_Vq_subvec3
       pop		xar4				;restore indice
       mov		ar0,#1
       mov		*+xar4[ar0],al		;indice[1] = Vq_subvec3(&lsf_r1[3], dico2_lsf, &wf1[3], DICO2_SIZE/2, 1)
       push		xar4				;store indice
       
       movl		xar3,#mr515_3_lsf	;xar3 point to mr515_3_lsf
       movl		xar4,#_buffer3+M+M+6	;xar4 point to wf1[6]
       mov		ar7,#MR515_3_SIZE
       lcr		_Vq_subvec4
       pop		xar4				;restore indice
       mov		ar0,#2
       mov		*+xar4[ar0],al		;indice[2] = Vq_subvec4(&lsf_r1[6], mr515_3_lsf, &wf1[6], MR515_3_SIZE)
       
       movl     xar7,#_buffer3+M+4*M	;xar7 point to lsf1_q
       movl		xar2,#_buffer3+M+3*M	;xar2 point to lsf_r1
       movl		xar3,#_buffer3+M+2*M	;xar3 point to lsf_p
       pop 		xar5				;restore st->past_rq[M]
       mov		ar0,#0				;i = 0
_loop_239:
	   		mov		al,*+xar2[ar0]		;al = lsf_r1[i]
	   		mov		*+xar5[ar0],al		;st->past_rq[i] = lsf_r1[i]
	   		add		al,*+xar3[ar0]		;al = add(lsf_r1[i], lsf_p[i])
	   		mov		*+xar7[ar0],al 		;lsf1_q[i] = al
	   		inc		ar0					;i++
	   		cmp 	ar0,#M
	   		bf		_loop_239,lt		;if( i < M ) then jump to _loop_239
	   		
	   mov		ar1,#LSF_GAP
	   mov		ar2,#M
	   lcr		_reorder			
	   
	   movl		xar2,#_buffer3+M+4*M	;xar2 point to lsf1_q
	   pop		xar3				;xar3 point to lsp1_q
	   lcr		_lsf_lsp
	   
	   
           LRETR

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -