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

📄 pst.h

📁 TI C54写的G729代码,视线8kbps高质量语音编码,汇编优化
💻 H
字号:
;==========================================================================
;  Copyright:      (c) Copyright 1996 MultiDSP, Inc
;
;  4865 Linaro Dr.
;  Cypress, CA 90630
;
;
;  File Name
;  ----------
;  PST.H
;
;
;  Revision Number       Author
;  ---------------       ------
;     1.0                LING WAN
;
;
;  Brief Description of the Code:
;  ------------------------------
;  Memory map for routines in PST.C
;
;  Ref
;  ------
;
;==========================================================================
  .include const.h

  .asg     "Addr_rr", Addr_pst_local_buf

  .asg     "Addr_pst_local_buf"                 , Addr_Post_local_buf
  .asg     "End_Of_Addr_Post_local_buf"         , Addr_pst_ltp_local_buf
  .asg     "End_Of_pst_ltp_local_buf1"          , Addr_search_del_local_buf
  .asg     "End_Of_Addr_Post_local_buf"         , Addr_calc_st_filt_local_buf
  .asg     "End_Of_Addr_calc_st_filt_buf"       , Addr_calc_rc0_h_local_buf
  .asg     "End_Of_Addr_Post_local_buf"         , Addr_filt_mu_local_buf
  .asg     "End_Of_Addr_Post_local_buf"         , Addr_scale_st_local_buf

;-----------------------------------
;  - Static arrays and variables -
;-----------------------------------
;  -- Arrays --
;  static Word16 apond2[LONG_H_ST]; /* global pointer : ptr_apond2   */
;  Note:  apond2[0] = 0x1000;

;  static Word16 mem_stp[M];        /* global pointer : ptr_mem_stp  */
;  static Word16 mem_zero[M];       /* global pointer : ptr_mem_zero */
;  static Word16 res2[SIZ_RES2];    /* global pointer : ptr_res2     */

;  -- pointers --
;  Word16 *res2_ptr;                /* main() local pointer : res2_ptr    */
;  Word16 *ptr_mem_stp;             /* main() local pointer : ptr_mem_stp */

;  -- Variables --
;  Word16 gain_prec;                /* main() local memory : ptr_gain_prec  */

;  Word16 sf_voic                   /* main() local memory : Addr_sf_voic   */

;=============================================================================
;-----------------------------------
;  ---- Memory map for Post() ----
;-----------------------------------
;  void Post(
;    Word16 t0,             /* input,  main() local memory : Addr_T0      */
;    Word16 *signal_ptr,    /* input,  global pointer      : ptr_synth    */
;    Word16 *coeff,         /* input,  main() local pointer: ptr_Az       */
;    Word16 *sig_out,       /* output, global pointer      : ptr_pst_out  */
;    Word16 *vo             /* output, global pointer      : Addr_sf_voic */
;                           /* Addr_sf_voic checked,stored to ptr_voicing */
;  )
;-----------------------------------
;  -- Local variables and arrays --
;-----------------------------------
;    Word16 apond1[MP1];        /* Post() local memory : Addr_apond1  */
     .asg     "Addr_Post_local_buf", Addr_apond1
; *** Addr_apond1 uses circular buffer, size of M ***

;    Word16 sig_ltp[L_SUBFRP1]; /* Post() local memory : Addr_sig_ltp */
     .asg     "Addr_Post_local_buf + M", Addr_sig_ltp

;    Word16 *sig_ltp_ptr;       /* sig_ltp_ptr = Addr_sig_ltp + 1     */
     .asg     "Addr_Post_local_buf + M + L_SUBFRP1", sig_ltp_ptr

;    Word16 parcor0;            /* Post() local memory : Addr_parcor0 */
     .asg     "Addr_Post_local_buf + M + L_SUBFRP1 + 1", Addr_parcor0

;the following memory is for Weight_AZ()
;    Word16 gamma;
     .asg     "Addr_Post_local_buf + M + L_SUBFRP1 + 2", gamma

     .asg     "gamma + 1", End_Of_Addr_Post_local_buf

;=============================================================================
;----------------------------------
;  -- Memory map for pst_ltp() --
;----------------------------------
;  static void pst_ltp(
;    Word16 t0,             /* input : Addr_T0                        */
;    Word16 *ptr_sig_in,    /* input : res2_ptr = ptr_res2 + MEM_RES2 */
;    Word16 *ptr_sig_pst0,  /* output: sig_ltp_ptr = Addr_sig_ltp + 1 */
;    Word16 *vo             /* output: Addr_sf_voic                   */
;  )
;
;Note: pst_ltp_local_buf1 and search_del_local_buf1 at the same page
;-----------------------------------
;  -- Local variables and arrays --
;-----------------------------------
     .asg     "Addr_pst_ltp_local_buf", pst_ltp_local_buf1

;    Word16 ltpdel, phase;
     .asg     "pst_ltp_local_buf1 + 0", ltpdel
     .asg     "pst_ltp_local_buf1 + 1", phase

;    Word16 num_gltp, den_gltp, num2_gltp, den2_gltp;
     .asg     "pst_ltp_local_buf1 + 2", num2_gltp
     .asg     "pst_ltp_local_buf1 + 3", num_gltp
     .asg     "pst_ltp_local_buf1 + 4", den2_gltp
     .asg     "pst_ltp_local_buf1 + 5", den_gltp

;    Word16 sh_num, sh_den, sh_num2, sh_den2;
     .asg     "pst_ltp_local_buf1 + 6", sh_num2
     .asg     "pst_ltp_local_buf1 + 7", sh_num
     .asg     "pst_ltp_local_buf1 + 8", sh_den2
     .asg     "pst_ltp_local_buf1 + 9", sh_den

;    Word16 gain_plt;
     .asg     "pst_ltp_local_buf1 + 10", gain_plt

;    Word16 nb_sh_sig, shift;
     .asg     "pst_ltp_local_buf1 + 11", nb_sh_sig
     .asg     "pst_ltp_local_buf1 + 11", shift

;    Word16 *ptr_y_up;
     .asg     "pst_ltp_local_buf1 + 12", ptr_y_up

;    Word16 off_yup;
     .asg     "pst_ltp_local_buf1 + 13", off_yup

;    Word16 *ptr_sig_cadr;
     .asg     "pst_ltp_local_buf1 + 14", ptr_sig_cadr

;the following memory is for Addr_select_ltp_local_buf
;    Word16 temp;
     .asg     "pst_ltp_local_buf1 + 15", temp

;    Word32 L_temp1, L_temp2;
     .asg     "pst_ltp_local_buf1 + 16", L_temp1
     .asg     "pst_ltp_local_buf1 + 18", L_temp2

     .asg     "pst_ltp_local_buf1 + 20", End_Of_pst_ltp_local_buf1


     .asg     "End_Of_search_del_local_buf1", pst_ltp_local_buf2

;    Word16 y_up[SIZ_Y_UP];
     .asg     "pst_ltp_local_buf2", Addr_y_up

;    Word16 sig_cadr[SIZ_RES2];
     .asg     "pst_ltp_local_buf2 + SIZ_Y_UP", Addr_sig_cadr


     .asg     "Addr_sig_cadr + SIZ_RES2", End_Of_Addr_pst_ltp_local_buf

;=============================================================================
;-------------------------------------
;  -- Memory map for search_del() --
;-------------------------------------
;  static void search_del(
;    Word16 t0,                /* input : Addr_T0                  */
;    Word16 *ptr_sig_in,       /* input : Addr_sig_cadr + MEM_RES2 */
;    Word16 *ltpdel,           /* output: ltpdel                   */
;    Word16 *phase,            /* output: phase                    */
;    Word16 *num_gltp,         /* output: num_gltp                 */
;    Word16 *den_gltp,         /* output: den_gltp                 */
;    Word16 *sh_num_gltp,      /* output: sh_num                   */
;    Word16 *sh_den_gltp,      /* output: sh_den                   */
;    Word16 *y_up,             /* output: Addr_y_up                */
;    Word16 *off_yup           /* output: off_yup                  */
;  )
;
;Note: pst_ltp_local_buf1 and search_del_local_buf1 at the same page
;-----------------------------------
;  -- Local variables and arrays --
;-----------------------------------
     .asg     "Addr_search_del_local_buf", search_del_local_buf1

;    Word32 L_num_int, L_den_int, L_den_max;
     .asg     "search_del_local_buf1 + 0", L_num_int
     .asg     "search_del_local_buf1 + 2", L_den_int
     .asg     "search_del_local_buf1 + 4", L_den_max

;    Word32 L_numsq, L_numsq_max;
     .asg     "search_del_local_buf1 + 6", L_numsq
     .asg     "search_del_local_buf1 + 8", L_numsq_max

;    Word32 *ptr_L_den0, *ptr_L_den1;
     .asg     "search_del_local_buf1 + 10", ptr_L_den0
     .asg     "search_del_local_buf1 + 11", ptr_L_den1

;    Word16 ener, sh_ener;
     .asg     "search_del_local_buf1 + 12", ener
     .asg     "search_del_local_buf1 + 13", sh_ener

;    Word16 num, den0, den1, den_max, num_max;
     .asg     "search_del_local_buf1 + 14", num
     .asg     "search_del_local_buf1 + 15", num_max
     .asg     "search_del_local_buf1 + 16", den0
     .asg     "search_del_local_buf1 + 16", den1
     .asg     "search_del_local_buf1 + 17", den_max

;    Word16 i_max, lambda, phi, phi_max, ioff;
     .asg     "search_del_local_buf1 + 18", i_max
     .asg     "search_del_local_buf1 + 19", lambda
     .asg     "search_del_local_buf1 + 20", phi_max
     .asg     "search_del_local_buf1 + 21", ioff

;    Word16 *ptr_sig_past0;
     .asg     "search_del_local_buf1 + 22", ptr_sig_past0

;    Word16 *ptr_y_up;
;    .asg     "pst_ltp_local_buf1 + 12", ptr_y_up

     .asg     "search_del_local_buf1 + 24", End_Of_search_del_local_buf1


     .asg     "End_Of_Addr_pst_ltp_local_buf+1", search_del_local_buf2

;    Word32 L_den0[F_UP_PST-1];
     .asg     "search_del_local_buf2", Addr_L_den0

;    Word32 L_den1[F_UP_PST-1];
     .asg     "search_del_local_buf2 + (F_UP_PST - 1)*2", Addr_L_den1


     .asg     "Addr_L_den1 + (F_UP_PST - 1)*2", End_Of_Addr_search_del_local_buf

;=============================================================================
;----------------------------------------
;  -- Memory map for compute_ltp_l() --
;----------------------------------------
;  static void compute_ltp_l(
;    Word16 *s_in,       /* input : ptr_sig_cadr= Addr_sig_cadr + MEM_RES2 */
;    Word16 ltpdel,      /* input : ltpdel                                 */
;    Word16 phase,       /* input : phase                                  */
;    Word16 *y_up,       /* output: sig_ltp_ptr = Addr_sig_ltp + 1         */
;    Word16 *num,        /* output: num2_gltp                              */
;    Word16 *den,        /* output: den2_gltp                              */
;    Word16 *sh_num,     /* output: sh_num2                                */
;    Word16 *sh_den      /* output: sh_den2                                */
;  )
;-----------------------------------
;  -- Local variables and arrays --
;-----------------------------------
;    None

;=============================================================================
;-------------------------------------
;  -- Memory map for select_ltp() --
;-------------------------------------
;  static Word16 select_ltp(  /* output : 1 = 1st gain, 2 = 2nd gain */
;    Word16 num1,       /* input : num_gltp  */
;    Word16 den1,       /* input : den_gltp  */
;    Word16 sh_num1,    /* input : sh_num    */
;    Word16 sh_den1,    /* input : sh_den    */
;    Word16 num2,       /* input : num2_gltp */
;    Word16 den2,       /* input : den2_gltp */
;    Word16 sh_num2,    /* input : sh_num2   */
;    Word16 sh_den2     /* input : sh_den2   */
;  )
;------------------------------------
;  -- Local variables and arrays --
;------------------------------------
;    Word32 L_temp1, L_temp2;
;    .asg    "Addr_select_ltp_local_buf", L_temp1
;    .asg    "Addr_select_ltp_local_buf + 2", L_temp2

;=============================================================================
;-----------------------------------
;  -- Memory map for filt_plt() --
;-----------------------------------
;  static void filt_plt(
;    Word16 *s_in,       /* input : res2_ptr -> s_in           */
;    Word16 *s_ltp,      /* input : ptr_y_up -> s_ltp          */
;    Word16 *s_out,      /* output: sig_ltp_ptr = sig_ltp + 1  */
;    Word16 gain_plt     /* input : gain_plt                   */
;  )
;------------------------------------
;  -- Local variables and arrays --
;------------------------------------
;    None

;=============================================================================
;---------------------------------------
;  -- Memory map for calc_st_filt() --
;---------------------------------------
;  static void calc_st_filt(
;    Word16 *apond2,      /* input : ptr_apond2  -> apond2 */
;    Word16 *apond1,      /* input : Addr_apond1           */
;    Word16 *parcor0,     /* output: Addr_parcor0          */
;    Word16 *sig_ltp_ptr  /* in/out: sig_ltp_ptr           */
;  )
;------------------------------------
;  -- Local variables and arrays --
;------------------------------------
;    Word16 h[LONG_H_ST];
     .asg    "Addr_calc_st_filt_local_buf", Addr_h

;    Word32 L_g0;
     .asg    "Addr_calc_st_filt_local_buf + LONG_H_ST", L_g0

     .asg    "L_g0", End_Of_Addr_calc_st_filt_buf

;=============================================================================
;---------------------------------------
;  -- Memory map for calc_rc0_h() --
;---------------------------------------
;  static void calc_rc0_h(
;    Word16 *h,      /* input : Addr_h       */
;    Word16 *rc0     /* output: Addr_parcor0 */
;  )
;------------------------------------
;  -- Local variables and arrays --
;------------------------------------
;    Word16 acf0, sh_acf, acf1;
     .asg    "Addr_calc_rc0_h_local_buf + 0", acf0
     .asg    "Addr_calc_rc0_h_local_buf + 1", sh_acf
     .asg    "Addr_calc_rc0_h_local_buf + 1", acf1

;=============================================================================
;----------------------------------
;  -- Memory map for filt_mu() --
;----------------------------------
;  static void filt_mu(
;    Word16 *sig_in,     /* input : Addr_sig_ltp (beginning at sample -1) */
;    Word16 *sig_out,    /* output: ptr_pst_out  -> sig_out               */
;    Word16 parcor0      /* input : Addr_parcor0 (mu = parcor0 * gamma3)  */
;  )
;------------------------------------
;  -- Local variables and arrays --
;------------------------------------
;    Word16 mu, ga;
     .asg    "Addr_filt_mu_local_buf", mu
     .asg    "Addr_filt_mu_local_buf + 1", ga

;    Word32 L_fact;
     .asg    "Addr_filt_mu_local_buf + 2", L_fact

;=============================================================================
;-----------------------------------
;  -- Memory map for scale_st() --
;-----------------------------------
;  static void scale_st(
;    Word16 *sig_in,     /* input : ptr_synth   -> sig_in  */
;    Word16 *sig_out,    /* in/out: ptr_pst_out -> sig_out */
;    Word16 *gain_prec   /* in/out: ptr_gain_prec          */
;  )
;------------------------------------
;  -- Local variables and arrays --
;------------------------------------
;    Word16 scal_in, scal_out;
     .asg    "Addr_scale_st_local_buf + 0", scal_in
     .asg    "Addr_scale_st_local_buf + 1", scal_out

;    Word16 s_g_in, s_g_out, sh_g0, g0;
     .asg    "Addr_scale_st_local_buf + 2", s_g_in
     .asg    "Addr_scale_st_local_buf + 3", s_g_out
     .asg    "Addr_scale_st_local_buf + 4", sh_g0
     .asg    "Addr_scale_st_local_buf + 5", g0

;    Word16 gain;
     .asg    "Addr_scale_st_local_buf + 0", gain

;    Word16 AGC_FAC_buf;
     .asg    "Addr_scale_st_local_buf + 1", AGC_FAC_buf

;    Word16 round_bit;
     .asg    "Addr_scale_st_local_buf + 2", round_bit

⌨️ 快捷键说明

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