📄 g723_oal_linux.h
字号:
/******************************************************************************
// INTEL CORPORATION PROPRIETARY INFORMATION
// This software is supplied under the terms of a license agreement or
// nondisclosure agreement with Intel Corporation and may not be copied
// or disclosed except in accordance with the terms of that agreement.
// Copyright (c) 2000 Intel Corporation. All Rights Reserved.
//
// VSS:
// $Workfile: g723_oal_linux.h $
// $Revision: 1 $
// $Date: 05-05-24 17:57 $
// $Archive: /ipp_sample/ipp5/ipp50/dev/src/arm_ppc/speech/g723/include/g723_oal_linux.h $
//
// Description:
// OS adaptation layer - provides interface to OS-dependent services
// such as memory allocation, performance timer, file I/O, and audio I/O.
//
******************************************************************************/
#include <time.h>
#ifdef __cplusplus
extern "C" {
#endif
/* String parameters */
#define MAXFN 256 // Max filename len
#define MAXSTR 256 // Max string length, in characters
/* GUI parameters and constants */
#define MAX_LOADSTRING 100 // Max title bar len
// Performance timer parameters
#define TIMER_LABEL_MAX 256 /* maximum timer label length */
#define TIMER_NUM_MAX 25 /* maximum possible number of timers */
#define TIMER_NUM 2 /* number of timers */
#define T_ENC 0 /* G.723 encoder timer ID */
#define T_DEC 1 /* G.723 decoder timer ID */
/* Test vector compliance parameters */
#define TV_ENCODER 100 /* Test vector type: Encoder */
#define TV_DECODER 200 /* Test vector type: Decoder */
#define TV_CRC_DECODER 300 /* Decoder with CRC test vector type */
#define TV_MIX_ENCODER 400 /* Externally rate-controlled (5.3/6.3 mixed) encoder test vector */
#define TV_PASS 0 /* Test result: PASS */
#define TV_FAIL -1 /* Test result: FAIL */
#define TV_MISSING -2 /* Test result: MISSING vector */
#define ENCODER_TEST 0 /* Test type: Eencoder */
#define DECODER_TEST 1 /* Test type: Decoder */
// Performance timer state
typedef struct _performanceTimer
{
char label[TIMER_LABEL_MAX];
unsigned long acc;
clock_t tStart;
clock_t tStop;
int freq;
int blockCount;
int blockSize;
} performanceTimer;
/* Performance timer API */
int timerInit (int n, char *label);
int timerSetNum (int numTimers);
int timerGetNum (int *numTimers);
int timerReset (int n);
int timerStart (int n);
int timerStop (int n);
int timerDeltaAcc (int n);
int timerSetBlockSize (int n, int size);
int timerGetBlockSize (int n, int *blockSize);
int timerSetNumBlocks (int n, int newBlockCount);
int timerGetNumBlocks (int n, int *blockCount);
int timerGetAcc (int n, int *timerAcc);
int timerGetLabel (int n, void *label);
int timerSetFreq (int n, int freq);
int timerGetFreq (int n, int *timerFreq);
float getCpuUtilization (int n, int sampleRate);
int initTimers_G723 (void);
int destroyTimers_G723 (void);
/* Stream I/O */
int openPcmStream (IppPcmStream *s, char *mode);
int readPcmStream (IppPcmStream *s);
int writePcmStream (IppPcmStream *s);
int closePcmStream (IppPcmStream *s);
int openBitstream (IppBitstream *s, char *mode);
int readBitstream (IppBitstream *s, int frames);
int writeBitstream (IppBitstream *s);
int closeBitstream (IppBitstream *s);
/* Audio device management */
int OpenAudioDevice (int *, int, int, int);
void CloseAudioDevice (int);
void RenderSound (int *fp, IppPcmStream *pcm);
void waitfor (int time);
/* Codec control */
int initCodec_G723 (IppG723EncoderState *encState, IppG723DecoderState *decState,
IppPcmStream *inputSpeech, IppPcmStream *outputSpeech,
IppBitstream *bitstream, int pcmBufLen, int bitstreamBufLen);
int destroyCodec_G723 (IppPcmStream *inputSpeech, IppPcmStream *outputSpeech,
IppBitstream *bitstream);
/* Test vector compliance testing */
int TestCodecCompliance_G723 (int testsel, char *cfgfile );
int ReadTestConfigFile_G723 (char *tvpath, int *NumVect,
char ***tv, int **type, int **hpf,
int **postfilt, IppSpchBitRate **rate,
int **vad);
int RunTestVector_G723 (char *path, char *name, int type,
IppSpchBitRate rate, int filterEnable, int vadEnable);
void LogDecoderError_G723 (int frame, int byte, Ipp16s expected, Ipp16s actual);
void LogEncoderError_G723 (int frame, int byte, Ipp8u expected, Ipp8u actual);
#ifdef __cplusplus
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -