(C)Copyright 2000 NTT Cyber Space Laboratories
Prior to encoding process, the following initialization is mandatory.
Setup information is stored as the member of struct headerInfo and encSpecificInfo. headerInfo has common information and encSpecificInfo has encoder specific information.
typedef struct{ int N_CAN_GLOBAL; /* number of preselection candidates of VQ*/ /* the smaller, the faster */ /* the larger, the higher quality */ } encSpecificInfo; |
Refer to combnation of parameters
In sample program, setup parameters are obtained from commandline. Audio parameters are obtained from header of WAVE header.
In sample program, input and output file names are set from command line.
Initialization should be done as follows.
Encoder module is initialized by TvqEncInitialize()
Bit stream generation module is initialized by TvqInitBsWriter()
Audio buffer need memory of {number of samples per frame}x{number of channels}
Number of samples and number of channels can be obtained by TvqEncGetFrameSize() and TvqEncGetNumChannels()
Header objects are generated by TvqCreateHeaderChunk(),
which is in ChunkHelper.cxx. In TvqCreateHeaderChunk(),
extended information is obtained from configuration file,
while standard information is obtained
from the struct headerInfo
.
Header objects are written by TvqPutBsHeaderInfo()
.