34 #ifndef __EST_CHANNELTYPE_H__ 
   35 #define __EST_CHANNELTYPE_H__ 
   49 enum EST_CoefficientType
 
   99 #define EST_ChannelTypeCT(T) ( (T) >> 3 ) 
  101 #define EST_ChannelTypeD(T) ( (T) >> 1 & 3 ) 
  103 #define EST_ChannelTypeSE(T) ( (T) & 1 ) 
  106 #define EST_ChannelTypeStart(T) EST_CoefChannelId(\ 
  107                          EST_ChannelTypeCT(T),  \ 
  108                          EST_ChannelTypeD(T), \ 
  111 #define EST_ChannelTypeEnd(T) EST_CoefChannelId(\ 
  112                          EST_ChannelTypeCT(T),  \ 
  113                          EST_ChannelTypeD(T), \ 
  116 #define EST_ChannelTypeIncD(T) EST_CoefChannelId(\ 
  117                          EST_ChannelTypeCT(T),  \ 
  118                          EST_ChannelTypeD(T)+1, \ 
  119                          EST_ChannelTypeSE(T)) 
  121 #define EST_ChannelTypeDelta(T, N) EST_CoefChannelId(\ 
  122                          EST_ChannelTypeCT(T),  \ 
  123                          EST_ChannelTypeD(T)+(N), \ 
  124                          EST_ChannelTypeSE(T)) 
  126 #define EST_ChannelTypeDecD(T) EST_CoefChannelId(\ 
  127                          EST_ChannelTypeCT(T),  \ 
  128                          EST_ChannelTypeD(T)-1, \ 
  129                          EST_ChannelTypeSE(T)) 
  138 #define EST_CoefChannelId(CT,D,SE) ( (CT)<<3 | ((D)<<1 & 6) | ((SE)&1) ) 
  146 #define EST_DiffChannelId(N,D) ( EST_CoefChannelId(((N)>>1)+(int)cot_free, D, (N)&1) ) 
  152 #define EST_ChannelId(N) EST_CoefChannelId((N)>>1, 3, (N)&1) 
  168 enum EST_ChannelType {
 
  170   channel_unknown   =  EST_ChannelId(0),
 
  172   channel_order     = EST_ChannelId(1),
 
  174   first_channel_type=channel_order,
 
  176   channel_peak      = EST_ChannelId(2),     
 
  178   channel_duration  = EST_ChannelId(3), 
 
  180   channel_length    = EST_ChannelId(4), 
 
  182   channel_offset    = EST_ChannelId(5), 
 
  184   channel_voiced    = EST_ChannelId(6), 
 
  186   channel_frame     = EST_ChannelId(7), 
 
  188   channel_time      = EST_ChannelId(8),     
 
  191   channel_power     = EST_DiffChannelId(0,0),   
 
  192   channel_power_d   = EST_DiffChannelId(0,1),   
 
  193   channel_power_a   = EST_DiffChannelId(0,2),   
 
  195   channel_energy    = EST_DiffChannelId(1,0),   
 
  196   channel_energy_d  = EST_DiffChannelId(1,1),   
 
  197   channel_energy_a  = EST_DiffChannelId(1,2),   
 
  199   channel_f0        = EST_DiffChannelId(2,0),   
 
  200   channel_f0_d      = EST_DiffChannelId(2,1),   
 
  201   channel_f0_a      = EST_DiffChannelId(2,2),   
 
  203   channel_lpc_0         = EST_CoefChannelId(cot_lpc,0,0),
 
  204   channel_lpc_N         = EST_CoefChannelId(cot_lpc,0,1),
 
  205   channel_lpc_d_0       = EST_CoefChannelId(cot_lpc,1,0),
 
  206   channel_lpc_d_N       = EST_CoefChannelId(cot_lpc,1,1),
 
  207   channel_lpc_a_0       = EST_CoefChannelId(cot_lpc,2,0),
 
  208   channel_lpc_a_N       = EST_CoefChannelId(cot_lpc,2,1),
 
  210   channel_reflection_0      = EST_CoefChannelId(cot_reflection,0,0),
 
  211   channel_reflection_N      = EST_CoefChannelId(cot_reflection,0,1),
 
  212   channel_reflection_d_0    = EST_CoefChannelId(cot_reflection,1,0),
 
  213   channel_reflection_d_N    = EST_CoefChannelId(cot_reflection,1,1),
 
  214   channel_reflection_a_0    = EST_CoefChannelId(cot_reflection,2,0),
 
  215   channel_reflection_a_N    = EST_CoefChannelId(cot_reflection,2,1),
 
  218   channel_cepstrum_0        = EST_CoefChannelId(cot_cepstrum,0,0),
 
  219   channel_cepstrum_N        = EST_CoefChannelId(cot_cepstrum,0,1),
 
  220   channel_cepstrum_d_0      = EST_CoefChannelId(cot_cepstrum,1,0),
 
  221   channel_cepstrum_d_N      = EST_CoefChannelId(cot_cepstrum,1,1),
 
  222   channel_cepstrum_a_0      = EST_CoefChannelId(cot_cepstrum,2,0),
 
  223   channel_cepstrum_a_N      = EST_CoefChannelId(cot_cepstrum,2,1),
 
  226   channel_melcepstrum_0     = EST_CoefChannelId(cot_melcepstrum,0,0),
 
  227   channel_melcepstrum_N     = EST_CoefChannelId(cot_melcepstrum,0,1),
 
  228   channel_melcepstrum_d_0   = EST_CoefChannelId(cot_melcepstrum,1,0),
 
  229   channel_melcepstrum_d_N   = EST_CoefChannelId(cot_melcepstrum,1,1),
 
  230   channel_melcepstrum_a_0   = EST_CoefChannelId(cot_melcepstrum,2,0),
 
  231   channel_melcepstrum_a_N   = EST_CoefChannelId(cot_melcepstrum,2,1),
 
  233   channel_fbank_0       = EST_CoefChannelId(cot_fbank,0,0),
 
  234   channel_fbank_N       = EST_CoefChannelId(cot_fbank,0,1),
 
  235   channel_fbank_d_0     = EST_CoefChannelId(cot_fbank,1,0),
 
  236   channel_fbank_d_N     = EST_CoefChannelId(cot_fbank,1,1),
 
  237   channel_fbank_a_0     = EST_CoefChannelId(cot_fbank,2,0),
 
  238   channel_fbank_a_N     = EST_CoefChannelId(cot_fbank,2,1),
 
  241   channel_lsf_0         = EST_CoefChannelId(cot_lsf,0,0),
 
  242   channel_lsf_N         = EST_CoefChannelId(cot_lsf,0,1),
 
  243   channel_lsf_d_0       = EST_CoefChannelId(cot_lsf,1,0),
 
  244   channel_lsf_d_N       = EST_CoefChannelId(cot_lsf,1,1),
 
  245   channel_lsf_a_0       = EST_CoefChannelId(cot_lsf,2,0),
 
  246   channel_lsf_a_N       = EST_CoefChannelId(cot_lsf,2,1),
 
  249   channel_tubearea_0        = EST_CoefChannelId(cot_tubearea,0,0),
 
  250   channel_tubearea_N        = EST_CoefChannelId(cot_tubearea,0,1),
 
  251   channel_tubearea_d_0      = EST_CoefChannelId(cot_tubearea,1,0),
 
  252   channel_tubearea_d_N      = EST_CoefChannelId(cot_tubearea,1,1),
 
  253   channel_tubearea_a_0      = EST_CoefChannelId(cot_tubearea,2,0),
 
  254   channel_tubearea_a_N      = EST_CoefChannelId(cot_tubearea,2,1),
 
  257   channel_filter_0      = EST_CoefChannelId(cot_filter,0,0),
 
  258   channel_filter_N      = EST_CoefChannelId(cot_filter,0,1),
 
  259   channel_filter_d_0        = EST_CoefChannelId(cot_filter,1,0),
 
  260   channel_filter_d_N        = EST_CoefChannelId(cot_filter,1,1),
 
  261   channel_filter_a_0        = EST_CoefChannelId(cot_filter,2,0),
 
  262   channel_filter_a_N        = EST_CoefChannelId(cot_filter,2,1),
 
  265   channel_user1_0       = EST_CoefChannelId(cot_user1,0,0),
 
  266   channel_user1_N       = EST_CoefChannelId(cot_user1,0,1),
 
  267   channel_user1_d_0     = EST_CoefChannelId(cot_user1,1,0),
 
  268   channel_user1_d_N     = EST_CoefChannelId(cot_user1,1,1),
 
  269   channel_user1_a_0     = EST_CoefChannelId(cot_user1,2,0),
 
  270   channel_user1_a_N     = EST_CoefChannelId(cot_user1,2,1),
 
  273   channel_user2_0       = EST_CoefChannelId(cot_user2,0,0),
 
  274   channel_user2_N       = EST_CoefChannelId(cot_user2,0,1),
 
  275   channel_user2_d_0     = EST_CoefChannelId(cot_user2,1,0),
 
  276   channel_user2_d_N     = EST_CoefChannelId(cot_user2,1,1),
 
  277   channel_user2_a_0     = EST_CoefChannelId(cot_user2,2,0),
 
  278   channel_user2_a_N     = EST_CoefChannelId(cot_user2,2,1),
 
  282   last_channel_type = channel_f0_a,
 
  287 typedef enum EST_ChannelType EST_ChannelType;