twinvq.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/float_dsp.h"
#include "avcodec.h"
#include "get_bits.h"
#include "fft.h"
#include "internal.h"
#include "lsp.h"
#include "sinewin.h"
#include <math.h>
#include <stdint.h>
#include "twinvq_data.h"
Include dependency graph for twinvq.c:

Go to the source code of this file.

Data Structures

struct  FrameMode
 Parameters and tables that are different for each frame type. More...
 
struct  ModeTab
 Parameters and tables that are different for every combination of bitrate/sample rate. More...
 
struct  TwinContext
 

Macros

#define PPC_SHAPE_CB_SIZE   64
 
#define PPC_SHAPE_LEN_MAX   60
 
#define SUB_AMP_MAX   4500.0
 
#define MULAW_MU   100.0
 
#define GAIN_BITS   8
 
#define AMP_MAX   13000.0
 
#define SUB_GAIN_BITS   5
 
#define WINDOW_TYPE_BITS   4
 
#define PGAIN_MU   200
 
#define LSP_COEFS_MAX   20
 
#define LSP_SPLIT_MAX   4
 
#define CHANNELS_MAX   2
 
#define SUBBLOCKS_MAX   16
 
#define BARK_N_COEF_MAX   4
 

Typedefs

typedef struct TwinContext TwinContext
 

Enumerations

enum  FrameType {
  ACTIVE_FRAME, SID_FRAME, UNTRANSMITTED_FRAME, INTRA_FRAME = 0,
  INTER_FRAME, SKIP_FRAME, FT_SHORT = 0, FT_MEDIUM,
  FT_LONG, FT_PPC
}
 

Functions

static void memset_float (float *buf, float val, int size)
 
static float eval_lpc_spectrum (const float *lsp, float cos_val, int order)
 Evaluate a single LPC amplitude spectrum envelope coefficient from the line spectrum pairs. More...
 
static void eval_lpcenv (TwinContext *tctx, const float *cos_vals, float *lpc)
 Evaluate the LPC amplitude spectrum envelope from the line spectrum pairs. More...
 
static void interpolate (float *out, float v1, float v2, int size)
 
static float get_cos (int idx, int part, const float *cos_tab, int size)
 
static void eval_lpcenv_or_interp (TwinContext *tctx, enum FrameType ftype, float *out, const float *in, int size, int step, int part)
 Evaluate the LPC amplitude spectrum envelope from the line spectrum pairs. More...
 
static void eval_lpcenv_2parts (TwinContext *tctx, enum FrameType ftype, const float *buf, float *lpc, int size, int step)
 
static void dequant (TwinContext *tctx, GetBitContext *gb, float *out, enum FrameType ftype, const int16_t *cb0, const int16_t *cb1, int cb_len)
 Inverse quantization. More...
 
static float mulawinv (float y, float clip, float mu)
 
static int very_broken_op (int a, int b)
 Evaluate a*b/400 rounded to the nearest integer. More...
 
static void add_peak (int period, int width, const float *shape, float ppc_gain, float *speech, int len)
 Sum to data a periodic peak of a given period, width and shape. More...
 
static void decode_ppc (TwinContext *tctx, int period_coef, const float *shape, float ppc_gain, float *speech)
 
static void dec_gain (TwinContext *tctx, GetBitContext *gb, enum FrameType ftype, float *out)
 
static void rearrange_lsp (int order, float *lsp, float min_dist)
 Rearrange the LSP coefficients so that they have a minimum distance of min_dist. More...
 
static void decode_lsp (TwinContext *tctx, int lpc_idx1, uint8_t *lpc_idx2, int lpc_hist_idx, float *lsp, float *hist)
 
static void dec_lpc_spectrum_inv (TwinContext *tctx, float *lsp, enum FrameType ftype, float *lpc)
 
static void imdct_and_window (TwinContext *tctx, enum FrameType ftype, int wtype, float *in, float *prev, int ch)
 
static void imdct_output (TwinContext *tctx, enum FrameType ftype, int wtype, float **out)
 
static void dec_bark_env (TwinContext *tctx, const uint8_t *in, int use_hist, int ch, float *out, float gain, enum FrameType ftype)
 
static void read_and_decode_spectrum (TwinContext *tctx, GetBitContext *gb, float *out, enum FrameType ftype)
 
static int twin_decode_frame (AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
 
static av_cold int init_mdct_win (TwinContext *tctx)
 Init IMDCT and windowing tables. More...
 
static void permutate_in_line (int16_t *tab, int num_vect, int num_blocks, int block_size, const uint8_t line_len[2], int length_div, enum FrameType ftype)
 Interpret the data as if it were a num_blocks x line_len[0] matrix and for each line do a cyclic permutation, i.e. More...
 
static void transpose_perm (int16_t *out, int16_t *in, int num_vect, const uint8_t line_len[2], int length_div)
 Interpret the input data as in the following table: More...
 
static void linear_perm (int16_t *out, int16_t *in, int n_blocks, int size)
 
static av_cold void construct_perm_table (TwinContext *tctx, enum FrameType ftype)
 
static av_cold void init_bitstream_params (TwinContext *tctx)
 
static av_cold int twin_decode_close (AVCodecContext *avctx)
 
static av_cold int twin_decode_init (AVCodecContext *avctx)
 

Variables

static const ModeTab mode_08_08
 
static const ModeTab mode_11_08
 
static const ModeTab mode_11_10
 
static const ModeTab mode_16_16
 
static const ModeTab mode_22_20
 
static const ModeTab mode_22_24
 
static const ModeTab mode_22_32
 
static const ModeTab mode_44_40
 
static const ModeTab mode_44_48
 
AVCodec ff_twinvq_decoder
 

Macro Definition Documentation

#define AMP_MAX   13000.0

Definition at line 213 of file twinvq.c.

Referenced by dec_gain().

#define BARK_N_COEF_MAX   4

Definition at line 221 of file twinvq.c.

Referenced by read_and_decode_spectrum().

#define CHANNELS_MAX   2

Definition at line 219 of file twinvq.c.

Referenced by read_and_decode_spectrum(), and twin_decode_init().

#define GAIN_BITS   8

Definition at line 212 of file twinvq.c.

Referenced by dec_gain(), and init_bitstream_params().

#define LSP_COEFS_MAX   20

Definition at line 217 of file twinvq.c.

Referenced by read_and_decode_spectrum().

#define LSP_SPLIT_MAX   4

Definition at line 218 of file twinvq.c.

Referenced by read_and_decode_spectrum().

#define MULAW_MU   100.0

Definition at line 211 of file twinvq.c.

Referenced by dec_gain().

#define PGAIN_MU   200

Definition at line 216 of file twinvq.c.

Referenced by read_and_decode_spectrum().

#define PPC_SHAPE_CB_SIZE   64

Definition at line 208 of file twinvq.c.

Referenced by read_and_decode_spectrum().

#define PPC_SHAPE_LEN_MAX   60

Definition at line 209 of file twinvq.c.

Referenced by read_and_decode_spectrum().

#define SUB_AMP_MAX   4500.0

Definition at line 210 of file twinvq.c.

Referenced by dec_gain().

#define SUB_GAIN_BITS   5

Definition at line 214 of file twinvq.c.

Referenced by dec_gain(), and init_bitstream_params().

#define SUBBLOCKS_MAX   16

Definition at line 220 of file twinvq.c.

Referenced by read_and_decode_spectrum().

#define WINDOW_TYPE_BITS   4

Definition at line 215 of file twinvq.c.

Referenced by init_bitstream_params(), and twin_decode_frame().

Typedef Documentation

typedef struct TwinContext TwinContext

Enumeration Type Documentation

enum FrameType
Enumerator
ACTIVE_FRAME 

Active speech.

SID_FRAME 

Silence Insertion Descriptor frame.

UNTRANSMITTED_FRAME 
INTRA_FRAME 
INTER_FRAME 
SKIP_FRAME 
FT_SHORT 

Short frame (divided in n sub-blocks)

FT_MEDIUM 

Medium frame (divided in m<n sub-blocks)

FT_LONG 

Long frame (single sub-block + PPC)

FT_PPC 

Periodic Peak Component (part of the long frame)

Definition at line 36 of file twinvq.c.

Function Documentation

static void add_peak ( int  period,
int  width,
const float *  shape,
float  ppc_gain,
float *  speech,
int  len 
)
static

Sum to data a periodic peak of a given period, width and shape.

Parameters
periodthe period of the peak divised by 400.0

Definition at line 453 of file twinvq.c.

Referenced by decode_ppc().

static av_cold void construct_perm_table ( TwinContext tctx,
enum FrameType  ftype 
)
static

Definition at line 988 of file twinvq.c.

Referenced by init_bitstream_params().

static void dec_bark_env ( TwinContext tctx,
const uint8_t in,
int  use_hist,
int  ch,
float *  out,
float  gain,
enum FrameType  ftype 
)
static

Definition at line 697 of file twinvq.c.

Referenced by read_and_decode_spectrum().

static void dec_gain ( TwinContext tctx,
GetBitContext gb,
enum FrameType  ftype,
float *  out 
)
static

Definition at line 502 of file twinvq.c.

Referenced by read_and_decode_spectrum().

static void dec_lpc_spectrum_inv ( TwinContext tctx,
float *  lsp,
enum FrameType  ftype,
float *  lpc 
)
static

Definition at line 590 of file twinvq.c.

Referenced by read_and_decode_spectrum().

static void decode_lsp ( TwinContext tctx,
int  lpc_idx1,
uint8_t lpc_idx2,
int  lpc_hist_idx,
float *  lsp,
float *  hist 
)
static

Definition at line 551 of file twinvq.c.

Referenced by read_and_decode_spectrum().

static void decode_ppc ( TwinContext tctx,
int  period_coef,
const float *  shape,
float  ppc_gain,
float *  speech 
)
static

Definition at line 477 of file twinvq.c.

Referenced by read_and_decode_spectrum().

static void dequant ( TwinContext tctx,
GetBitContext gb,
float *  out,
enum FrameType  ftype,
const int16_t *  cb0,
const int16_t *  cb1,
int  cb_len 
)
static

Inverse quantization.

Read CB coefficients for cb1 and cb2 from the bitstream, sum the corresponding vectors and write the result to *out after permutation.

Definition at line 362 of file twinvq.c.

Referenced by read_and_decode_spectrum().

static float eval_lpc_spectrum ( const float *  lsp,
float  cos_val,
int  order 
)
static

Evaluate a single LPC amplitude spectrum envelope coefficient from the line spectrum pairs.

Parameters
lspa vector of the cosinus of the LSP values
cos_valcos(PI*i/N) where i is the index of the LPC amplitude
orderthe order of the LSP (and the size of the *lsp buffer). Must be a multiple of four.
Returns
the LPC value
Todo:
reuse code from Vorbis decoder: vorbis_floor0_decode

Definition at line 242 of file twinvq.c.

Referenced by eval_lpcenv(), and eval_lpcenv_or_interp().

static void eval_lpcenv ( TwinContext tctx,
const float *  cos_vals,
float *  lpc 
)
static

Evaluate the LPC amplitude spectrum envelope from the line spectrum pairs.

Definition at line 267 of file twinvq.c.

Referenced by dec_lpc_spectrum_inv().

static void eval_lpcenv_2parts ( TwinContext tctx,
enum FrameType  ftype,
const float *  buf,
float *  lpc,
int  size,
int  step 
)
static

Definition at line 345 of file twinvq.c.

Referenced by dec_lpc_spectrum_inv().

static void eval_lpcenv_or_interp ( TwinContext tctx,
enum FrameType  ftype,
float *  out,
const float *  in,
int  size,
int  step,
int  part 
)
inlinestatic

Evaluate the LPC amplitude spectrum envelope from the line spectrum pairs.

Probably for speed reasons, the coefficients are evaluated as siiiibiiiisiiiibiiiisiiiibiiiisiiiibiiiis ... where s is an evaluated value, i is a value interpolated from the others and b might be either calculated or interpolated, depending on an unexplained condition.

Parameters
stepthe size of a block "siiiibiiii"
inthe cosinus of the LSP data
partis 0 for 0...PI (positive cossinus values) and 1 for PI...2PI (negative cossinus values)
sizethe size of the whole output

Definition at line 311 of file twinvq.c.

Referenced by eval_lpcenv_2parts().

static float get_cos ( int  idx,
int  part,
const float *  cos_tab,
int  size 
)
inlinestatic

Definition at line 291 of file twinvq.c.

Referenced by eval_lpcenv_or_interp().

static void imdct_and_window ( TwinContext tctx,
enum FrameType  ftype,
int  wtype,
float *  in,
float *  prev,
int  ch 
)
static

Definition at line 612 of file twinvq.c.

Referenced by imdct_output().

static void imdct_output ( TwinContext tctx,
enum FrameType  ftype,
int  wtype,
float **  out 
)
static

Definition at line 666 of file twinvq.c.

Referenced by twin_decode_frame().

static av_cold void init_bitstream_params ( TwinContext tctx)
static

Definition at line 1014 of file twinvq.c.

Referenced by twin_decode_init().

static av_cold int init_mdct_win ( TwinContext tctx)
static

Init IMDCT and windowing tables.

Definition at line 871 of file twinvq.c.

Referenced by twin_decode_init().

static void interpolate ( float *  out,
float  v1,
float  v2,
int  size 
)
static

Definition at line 280 of file twinvq.c.

Referenced by eval_lpcenv_2parts(), and eval_lpcenv_or_interp().

static void linear_perm ( int16_t *  out,
int16_t *  in,
int  n_blocks,
int  size 
)
static

Definition at line 979 of file twinvq.c.

Referenced by construct_perm_table().

static void memset_float ( float *  buf,
float  val,
int  size 
)
static
Note
not speed critical, hence not optimized

Definition at line 224 of file twinvq.c.

Referenced by dec_bark_env(), eval_lpcenv_2parts(), and twin_decode_init().

static float mulawinv ( float  y,
float  clip,
float  mu 
)
inlinestatic

Definition at line 406 of file twinvq.c.

Referenced by dec_gain(), and read_and_decode_spectrum().

static void permutate_in_line ( int16_t *  tab,
int  num_vect,
int  num_blocks,
int  block_size,
const uint8_t  line_len[2],
int  length_div,
enum FrameType  ftype 
)
static

Interpret the data as if it were a num_blocks x line_len[0] matrix and for each line do a cyclic permutation, i.e.

abcdefghijklm -> defghijklmabc where the amount to be shifted is evaluated depending on the column.

Definition at line 928 of file twinvq.c.

Referenced by construct_perm_table().

static void read_and_decode_spectrum ( TwinContext tctx,
GetBitContext gb,
float *  out,
enum FrameType  ftype 
)
static

Definition at line 724 of file twinvq.c.

Referenced by twin_decode_frame().

static void rearrange_lsp ( int  order,
float *  lsp,
float  min_dist 
)
static

Rearrange the LSP coefficients so that they have a minimum distance of min_dist.

This function does it exactly as described in section of 3.2.4 of the G.729 specification (but interestingly is different from what the reference decoder actually does).

Definition at line 538 of file twinvq.c.

Referenced by decode_lsp().

static void transpose_perm ( int16_t *  out,
int16_t *  in,
int  num_vect,
const uint8_t  line_len[2],
int  length_div 
)
static

Interpret the input data as in the following table:

*
* abcdefgh
* ijklmnop
* qrstuvw
* x123456
*
* 

and transpose it, giving the output aiqxbjr1cks2dlt3emu4fvn5gow6hp

Definition at line 969 of file twinvq.c.

Referenced by construct_perm_table().

static av_cold int twin_decode_close ( AVCodecContext avctx)
static

Definition at line 1083 of file twinvq.c.

Referenced by twin_decode_init().

static int twin_decode_frame ( AVCodecContext avctx,
void data,
int *  got_frame_ptr,
AVPacket avpkt 
)
static

Definition at line 809 of file twinvq.c.

static av_cold int twin_decode_init ( AVCodecContext avctx)
static

Definition at line 1102 of file twinvq.c.

static int very_broken_op ( int  a,
int  b 
)
static

Evaluate a*b/400 rounded to the nearest integer.

When, for example, a*b == 200 and the nearest integer is ill-defined, use a table to emulate the following broken float-based implementation used by the binary decoder:

1 static int very_broken_op(int a, int b)
2 {
3  static float test; // Ugh, force gcc to do the division first...
4 
5  test = a/400.;
6  return b * test + 0.5;
7 }
Note
if this function is replaced by just ROUNDED_DIV(a*b,400.), the stddev between the original file (before encoding with Yamaha encoder) and the decoded output increases, which leads one to believe that the encoder expects exactly this broken calculation.

Definition at line 432 of file twinvq.c.

Referenced by add_peak().

Variable Documentation

AVCodec ff_twinvq_decoder
Initial value:
= {
.name = "twinvq",
.priv_data_size = sizeof(TwinContext),
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("VQF TwinVQ"),
.sample_fmts = (const enum AVSampleFormat[]) { AV_SAMPLE_FMT_FLTP,
}
static av_cold int twin_decode_close(AVCodecContext *avctx)
Definition: twinvq.c:1083
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
struct TwinContext TwinContext
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
float, planar
Definition: samplefmt.h:60
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static void close(AVCodecParserContext *s)
Definition: h264_parser.c:375
static int twin_decode_frame(AVCodecContext *avctx, void *data, int *got_frame_ptr, AVPacket *avpkt)
Definition: twinvq.c:809
AVSampleFormat
Audio Sample Formats.
Definition: samplefmt.h:49
static av_cold int twin_decode_init(AVCodecContext *avctx)
Definition: twinvq.c:1102
static int decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: crystalhd.c:868

Definition at line 1173 of file twinvq.c.

const ModeTab mode_08_08
static
Initial value:
= {
{
{ 8, bark_tab_s08_64, 10, tab.fcb08s , 1, 5, tab.cb0808s0, tab.cb0808s1, 18},
{ 2, bark_tab_m08_256, 20, tab.fcb08m , 2, 5, tab.cb0808m0, tab.cb0808m1, 16},
},
512 , 12, tab.lsp08, 1, 5, 3, 3, tab.shape08 , 8, 28, 20, 6, 40
}
static const uint16_t bark_tab_m08_256[]
Definition: twinvq_data.h:80
int16_t cb0808l0[1088]
Definition: twinvq_data.h:145
static const uint16_t bark_tab_s08_64[]
Definition: twinvq_data.h:110
int16_t fcb08m[320]
Definition: twinvq_data.h:141
int16_t cb0808m1[1024]
Definition: twinvq_data.h:150
int16_t fcb08l[640]
Definition: twinvq_data.h:140
int16_t cb0808l1[1088]
Definition: twinvq_data.h:146
int16_t shape08[1280]
Definition: twinvq_data.h:143
int16_t cb0808s1[1152]
Definition: twinvq_data.h:148
int16_t cb0808m0[1024]
Definition: twinvq_data.h:149
static const struct twinvq_data tab
static const uint16_t bark_tab_l08_512[]
Definition: twinvq_data.h:41
int16_t cb0808s0[1152]
Definition: twinvq_data.h:147
int16_t fcb08s[320]
Definition: twinvq_data.h:142
float lsp08[504]
Definition: twinvq_data.h:139

Definition at line 96 of file twinvq.c.

Referenced by twin_decode_init().

const ModeTab mode_11_08
static
Initial value:
= {
{
{ 8, bark_tab_s11_64, 10, tab.fcb11s , 1, 5, tab.cb1108s0, tab.cb1108s1, 29},
{ 2, bark_tab_m11_256, 20, tab.fcb11m , 2, 5, tab.cb1108m0, tab.cb1108m1, 24},
},
512 , 16, tab.lsp11, 1, 6, 4, 3, tab.shape11 , 9, 36, 30, 7, 90
}
int16_t cb1108l1[1728]
Definition: twinvq_data.h:153
int16_t cb1108m1[1536]
Definition: twinvq_data.h:155
int16_t fcb11l[640]
Definition: twinvq_data.h:159
static const uint16_t bark_tab_s11_64[]
Definition: twinvq_data.h:114
static const uint16_t bark_tab_l11_512[]
Definition: twinvq_data.h:47
int16_t cb1108l0[1728]
Definition: twinvq_data.h:152
int16_t shape11[1280]
Definition: twinvq_data.h:162
static const uint16_t bark_tab_m11_256[]
Definition: twinvq_data.h:85
float lsp11[1312]
Definition: twinvq_data.h:163
int16_t cb1108s1[1856]
Definition: twinvq_data.h:157
int16_t fcb11m[320]
Definition: twinvq_data.h:160
int16_t cb1108m0[1536]
Definition: twinvq_data.h:154
static const struct twinvq_data tab
int16_t fcb11s[320]
Definition: twinvq_data.h:161
int16_t cb1108s0[1856]
Definition: twinvq_data.h:156

Definition at line 105 of file twinvq.c.

Referenced by twin_decode_init().

const ModeTab mode_11_10
static
Initial value:
= {
{
{ 8, bark_tab_s11_64, 10, tab.fcb11s , 1, 5, tab.cb1110s0, tab.cb1110s1, 21},
{ 2, bark_tab_m11_256, 20, tab.fcb11m , 2, 5, tab.cb1110m0, tab.cb1110m1, 18},
},
512 , 16, tab.lsp11, 1, 6, 4, 3, tab.shape11 , 9, 36, 30, 7, 90
}
int16_t cb1110s1[1344]
Definition: twinvq_data.h:170
int16_t cb1110l1[1280]
Definition: twinvq_data.h:166
int16_t cb1110s0[1344]
Definition: twinvq_data.h:169
int16_t fcb11l[640]
Definition: twinvq_data.h:159
static const uint16_t bark_tab_s11_64[]
Definition: twinvq_data.h:114
static const uint16_t bark_tab_l11_512[]
Definition: twinvq_data.h:47
int16_t shape11[1280]
Definition: twinvq_data.h:162
static const uint16_t bark_tab_m11_256[]
Definition: twinvq_data.h:85
int16_t cb1110l0[1280]
Definition: twinvq_data.h:165
int16_t cb1110m0[1152]
Definition: twinvq_data.h:167
float lsp11[1312]
Definition: twinvq_data.h:163
int16_t fcb11m[320]
Definition: twinvq_data.h:160
int16_t cb1110m1[1152]
Definition: twinvq_data.h:168
static const struct twinvq_data tab
int16_t fcb11s[320]
Definition: twinvq_data.h:161

Definition at line 114 of file twinvq.c.

Referenced by twin_decode_init().

const ModeTab mode_16_16
static
Initial value:
= {
{
{ 8, bark_tab_s16_128, 10, tab.fcb16s , 1, 5, tab.cb1616s0, tab.cb1616s1, 16},
{ 2, bark_tab_m16_512, 20, tab.fcb16m , 2, 5, tab.cb1616m0, tab.cb1616m1, 15},
},
1024, 16, tab.lsp16, 1, 6, 4, 3, tab.shape16 , 9, 56, 60, 7, 180
}
int16_t cb1616l0[1024]
Definition: twinvq_data.h:178
int16_t cb1616s0[1024]
Definition: twinvq_data.h:182
int16_t fcb16m[320]
Definition: twinvq_data.h:173
int16_t cb1616l1[1024]
Definition: twinvq_data.h:179
int16_t fcb16l[640]
Definition: twinvq_data.h:172
int16_t cb1616m0[960]
Definition: twinvq_data.h:180
static const uint16_t bark_tab_m16_512[]
Definition: twinvq_data.h:90
int16_t fcb16s[320]
Definition: twinvq_data.h:174
int16_t cb1616s1[1024]
Definition: twinvq_data.h:183
float lsp16[1400]
Definition: twinvq_data.h:176
static const uint16_t bark_tab_l16_1024[]
Definition: twinvq_data.h:53
int16_t cb1616m1[960]
Definition: twinvq_data.h:181
static const uint16_t bark_tab_s16_128[]
Definition: twinvq_data.h:118
int16_t shape16[1920]
Definition: twinvq_data.h:175
static const struct twinvq_data tab

Definition at line 123 of file twinvq.c.

Referenced by twin_decode_init().

const ModeTab mode_22_20
static
Initial value:
= {
{
},
1024, 16, tab.lsp22_1, 1, 6, 4, 3, tab.shape22_1, 9, 56, 36, 7, 144
}
int16_t cb2220m1[1088]
Definition: twinvq_data.h:188
static const uint16_t bark_tab_s22_128[]
Definition: twinvq_data.h:122
static const uint16_t bark_tab_l22_1024[]
Definition: twinvq_data.h:59
int16_t fcb22m_1[640]
Definition: twinvq_data.h:193
int16_t cb2220l1[1152]
Definition: twinvq_data.h:186
int16_t cb2220s0[1152]
Definition: twinvq_data.h:189
static const uint16_t bark_tab_m22_512[]
Definition: twinvq_data.h:100
int16_t cb2220m0[1088]
Definition: twinvq_data.h:187
int16_t fcb22s_1[640]
Definition: twinvq_data.h:194
int16_t cb2220l0[1152]
Definition: twinvq_data.h:185
int16_t shape22_1[1152]
Definition: twinvq_data.h:195
float lsp22_1[1312]
Definition: twinvq_data.h:196
int16_t fcb22l_1[512]
Definition: twinvq_data.h:192
int16_t cb2220s1[1152]
Definition: twinvq_data.h:190
static const struct twinvq_data tab

Definition at line 132 of file twinvq.c.

Referenced by twin_decode_init().

const ModeTab mode_22_24
static
Initial value:
= {
{
},
1024, 16, tab.lsp22_1, 1, 6, 4, 3, tab.shape22_1, 9, 56, 36, 7, 144
}
int16_t cb2224s0[960]
Definition: twinvq_data.h:202
static const uint16_t bark_tab_s22_128[]
Definition: twinvq_data.h:122
static const uint16_t bark_tab_l22_1024[]
Definition: twinvq_data.h:59
int16_t fcb22m_1[640]
Definition: twinvq_data.h:193
int16_t cb2224l0[960]
Definition: twinvq_data.h:198
static const uint16_t bark_tab_m22_512[]
Definition: twinvq_data.h:100
int16_t cb2224s1[960]
Definition: twinvq_data.h:203
int16_t fcb22s_1[640]
Definition: twinvq_data.h:194
int16_t cb2224m0[896]
Definition: twinvq_data.h:200
int16_t shape22_1[1152]
Definition: twinvq_data.h:195
float lsp22_1[1312]
Definition: twinvq_data.h:196
int16_t cb2224l1[960]
Definition: twinvq_data.h:199
int16_t fcb22l_1[512]
Definition: twinvq_data.h:192
int16_t cb2224m1[896]
Definition: twinvq_data.h:201
static const struct twinvq_data tab

Definition at line 141 of file twinvq.c.

Referenced by twin_decode_init().

const ModeTab mode_22_32
static
Initial value:
= {
{
},
512 , 16, tab.lsp22_2, 1, 6, 4, 4, tab.shape22_2, 9, 56, 36, 7, 72
}
int16_t cb2232m0[704]
Definition: twinvq_data.h:213
int16_t cb2232l0[768]
Definition: twinvq_data.h:211
int16_t cb2232s1[704]
Definition: twinvq_data.h:216
int16_t fcb22l_2[512]
Definition: twinvq_data.h:205
int16_t cb2232m1[704]
Definition: twinvq_data.h:214
static const uint16_t bark_tab_s22_128[]
Definition: twinvq_data.h:122
int16_t shape22_2[1152]
Definition: twinvq_data.h:208
int16_t cb2232l1[768]
Definition: twinvq_data.h:212
static const uint16_t bark_tab_m22_256[]
Definition: twinvq_data.h:95
static const uint16_t bark_tab_l22_512[]
Definition: twinvq_data.h:66
int16_t fcb22m_2[640]
Definition: twinvq_data.h:206
float lsp22_2[1312]
Definition: twinvq_data.h:209
int16_t fcb22s_2[640]
Definition: twinvq_data.h:207
static const struct twinvq_data tab
int16_t cb2232s0[704]
Definition: twinvq_data.h:215

Definition at line 150 of file twinvq.c.

Referenced by twin_decode_init().

const ModeTab mode_44_40
static
Initial value:
= {
{
{16, bark_tab_s44_128, 10, tab.fcb44s , 1, 6, tab.cb4440s0, tab.cb4440s1, 18},
{ 4, bark_tab_m44_512, 20, tab.fcb44m , 2, 6, tab.cb4440m0, tab.cb4440m1, 17},
},
2048, 20, tab.lsp44, 1, 6, 4, 4, tab.shape44 , 9, 84, 54, 7, 432
}
static const uint16_t bark_tab_m44_512[]
Definition: twinvq_data.h:105
int16_t fcb44l[640]
Definition: twinvq_data.h:225
int16_t cb4440s1[1152]
Definition: twinvq_data.h:223
int16_t cb4440m1[1088]
Definition: twinvq_data.h:221
int16_t fcb44m[640]
Definition: twinvq_data.h:226
static const uint16_t bark_tab_l44_2048[]
Definition: twinvq_data.h:73
int16_t cb4440l0[1088]
Definition: twinvq_data.h:218
static const uint16_t bark_tab_s44_128[]
Definition: twinvq_data.h:126
int16_t fcb44s[640]
Definition: twinvq_data.h:227
float lsp44[1640]
Definition: twinvq_data.h:229
int16_t cb4440s0[1152]
Definition: twinvq_data.h:222
int16_t shape44[1152]
Definition: twinvq_data.h:228
int16_t cb4440m0[1088]
Definition: twinvq_data.h:220
int16_t cb4440l1[1088]
Definition: twinvq_data.h:219
static const struct twinvq_data tab

Definition at line 159 of file twinvq.c.

Referenced by twin_decode_init().

const ModeTab mode_44_48
static
Initial value:
= {
{
{16, bark_tab_s44_128, 10, tab.fcb44s , 1, 6, tab.cb4448s0, tab.cb4448s1, 15},
{ 4, bark_tab_m44_512, 20, tab.fcb44m , 2, 6, tab.cb4448m0, tab.cb4448m1, 14},
},
2048, 20, tab.lsp44, 1, 6, 4, 4, tab.shape44 , 9, 84, 54, 7, 432
}
static const uint16_t bark_tab_m44_512[]
Definition: twinvq_data.h:105
int16_t fcb44l[640]
Definition: twinvq_data.h:225
int16_t cb4448l1[896]
Definition: twinvq_data.h:232
int16_t fcb44m[640]
Definition: twinvq_data.h:226
int16_t cb4448m0[896]
Definition: twinvq_data.h:233
static const uint16_t bark_tab_l44_2048[]
Definition: twinvq_data.h:73
static const uint16_t bark_tab_s44_128[]
Definition: twinvq_data.h:126
int16_t cb4448s0[960]
Definition: twinvq_data.h:235
int16_t fcb44s[640]
Definition: twinvq_data.h:227
float lsp44[1640]
Definition: twinvq_data.h:229
int16_t shape44[1152]
Definition: twinvq_data.h:228
int16_t cb4448m1[896]
Definition: twinvq_data.h:234
int16_t cb4448s1[960]
Definition: twinvq_data.h:236
static const struct twinvq_data tab
int16_t cb4448l0[896]
Definition: twinvq_data.h:231

Definition at line 168 of file twinvq.c.

Referenced by twin_decode_init().