TvqEncodeFrame

(C)Copyright 2000 NTT Cyber Space Laboratories

# `TvqEncodeFrame()`

name
  `TvqEncodeFrame` - frame wise TwinVQ encoding process
style
  `#include "twinvq.h"
  #include "tvqenc.h"
  void TvqEncodeFrame(float in[], INDEX *index);
  `
function
  `TvqEncodeFrame()` encodes the frame-wise input audio data `in`, and stores the index codes in `index`. `in` has the length of (frame size)*(channel number). Frame length and the number of channels can be obtained by calling `TvqEncGetFrameSize()` and `TvqEncGetNumChannels()` .
data format

  input data is float type array and stores data as in the following figure depending on frameSize and numChannels.

  output data is a INDEX type struct. `TvqWriteBsFrame()` is used to extend to bit stream. In sample program, output is a file, but can be changed to others by changing `bfile()`.

return value

  no

note

  Array `in[]` needs memory allocation of data length.

related function

  `TvqEncGetFrameSize(), TvqEncGetNumChannels()`