libsent/src/adin/zc-e.c

音声区間検出のための零交差数カウント [詳細]

#include <sent/stddefs.h>
zc-e.cのインクルード依存関係図

ソースコードを見る。

マクロ定義

#define UNDEF   2
 Undefined mark used for sign.
#define POSITIVE   1
 Positive mark used for sign.
#define NEGATIVE   -1
 Negative mark used for sign.

関数

void init_count_zc_e (int c_trigger, int c_length, int c_offset)
void end_count_zc_e ()
int count_zc_e (SP16 *buf, int step)
int count_zc_e_level (SP16 *buf, int step, int *levelp)
void zc_copy_buffer (SP16 *newbuf, int *len)

変数

static int trigger
 Level threshold.
static int length
 Cycle buffer size = number of samples to hold.
static int offset
 Static data DC offset.
static int * is_zc
 Zero-crossing point flag list.
static SP16data
 Data cycle buffer.
static int zero_cross
 Total zerocross num in data.
static int sign
 Current sign of sample for zerocross counting.
static int is_trig
 Triggering sign.
static int top
 Current pointer of buffer.
static int valid_len
 Valid samples in buffer (for short input).

説明

音声区間検出のための零交差数カウント

作者:
Akinobu LEE
日付:
Mon Feb 14 19:11:34 2005

与えられたバッファ長内の零交差数をカウントします. 同時に, 呼ばれたバッファを順次バッファ長分だけ古いものに入れ替えます. このため入力はバッファ長分だけ遅延することになります.

Revision
1.3

zc-e.c で定義されています。


関数

void init_count_zc_e ( int  c_trigger,
int  c_length,
int  c_offset 
)

Initialize all parameters and buffers for zero-cross counting.

引数:
c_trigger [in] Tgigger level threshold
c_length [in] Cycle buffer size = Number of samples to hold
c_offset [in] Static DC offset of input data

zc-e.c63 行で定義されています。

参照元 adin_cut().

void end_count_zc_e (  ) 

End procedure: free all buffers.

zc-e.c91 行で定義されています。

参照元 adin_cut().

int count_zc_e ( SP16 buf,
int  step 
)

Adding buf[0..step-1] to the cycle buffer and update the count of zero cross. Also swap them with the oldest ones in the cycle buffer.

引数:
buf [I/O] new samples given, and swapped samples will be returned.
step [in] length of above.
戻り値:
zero-cross count of the samples in the cycle buffer.

zc-e.c107 行で定義されています。

参照元 adin_cut().

int count_zc_e_level ( SP16 buf,
int  step,
int *  levelp 
)

Adding buf[0..step-1] to the cycle buffer and update the count of zero cross. Also swap them with the oldest ones in the cycle buffer. Also get the maximum level in the cycle buffer.

引数:
buf [I/O] new samples, will be swapped by old samples when returned.
step [in] length of above.
levelp [out] maximum level in the cycle buffer.
戻り値:
zero-cross count of the samples in the cycle buffer.

zc-e.c157 行で定義されています。

void zc_copy_buffer ( SP16 newbuf,
int *  len 
)

Flush samples in the current cycle buffer.

引数:
newbuf [out] the samples in teh cycle buffer will be written here.
len [out] length of above.

zc-e.c205 行で定義されています。

参照元 adin_cut().


Juliusに対してTue Sep 22 00:15:02 2009に生成されました。  doxygen 1.6.0