residue_8.h 3.13 KB
Newer Older
Monty's avatar
 
Monty committed
1 2 3 4 5 6 7
/********************************************************************
 *                                                                  *
 * THIS FILE IS PART OF THE OggVorbis SOFTWARE CODEC SOURCE CODE.   *
 * USE, DISTRIBUTION AND REPRODUCTION OF THIS LIBRARY SOURCE IS     *
 * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
 * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
 *                                                                  *
8 9
 * THE OggVorbis SOURCE CODE IS (C) COPYRIGHT 1994-2007             *
 * by the Xiph.Org Foundation http://www.xiph.org/                  *
Monty's avatar
 
Monty committed
10 11 12 13 14 15 16 17 18 19 20 21
 *                                                                  *
 ********************************************************************

 function: toplevel residue templates 8/11kHz

 ********************************************************************/

#include "vorbis/codec.h"
#include "backends.h"

/***** residue backends *********************************************/

22
static const static_bookblock _resbook_8s_0={
Monty's avatar
 
Monty committed
23
  {
24 25 26 27 28 29 30 31 32
    {0},
    {0,0,&_8c0_s_p1_0},
    {0},
    {0,0,&_8c0_s_p3_0},
    {0,0,&_8c0_s_p4_0},
    {0,0,&_8c0_s_p5_0},
    {0,0,&_8c0_s_p6_0},
    {&_8c0_s_p7_0,&_8c0_s_p7_1},
    {&_8c0_s_p8_0,&_8c0_s_p8_1},
Monty's avatar
 
Monty committed
33 34 35
    {&_8c0_s_p9_0,&_8c0_s_p9_1,&_8c0_s_p9_2}
   }
};
36
static const static_bookblock _resbook_8s_1={
Monty's avatar
 
Monty committed
37
  {
38 39 40 41 42 43 44 45 46
    {0},
    {0,0,&_8c1_s_p1_0},
    {0},
    {0,0,&_8c1_s_p3_0},
    {0,0,&_8c1_s_p4_0},
    {0,0,&_8c1_s_p5_0},
    {0,0,&_8c1_s_p6_0},
    {&_8c1_s_p7_0,&_8c1_s_p7_1},
    {&_8c1_s_p8_0,&_8c1_s_p8_1},
Monty's avatar
 
Monty committed
47 48 49 50
    {&_8c1_s_p9_0,&_8c1_s_p9_1,&_8c1_s_p9_2}
   }
};

51
static const vorbis_residue_template _res_8s_0[]={
Monty's avatar
Monty committed
52
  {2,0,32,  &_residue_44_mid,
Monty's avatar
 
Monty committed
53
   &_huff_book__8c0_s_single,&_huff_book__8c0_s_single,
Monty's avatar
 
Monty committed
54 55
   &_resbook_8s_0,&_resbook_8s_0},
};
56
static const vorbis_residue_template _res_8s_1[]={
Monty's avatar
Monty committed
57
  {2,0,32,  &_residue_44_mid,
Monty's avatar
 
Monty committed
58 59
   &_huff_book__8c1_s_single,&_huff_book__8c1_s_single,
   &_resbook_8s_1,&_resbook_8s_1},
Monty's avatar
 
Monty committed
60 61
};

62
static const vorbis_mapping_template _mapres_template_8_stereo[2]={
Monty's avatar
 
Monty committed
63
  { _map_nominal, _res_8s_0 }, /* 0 */
Monty's avatar
 
Monty committed
64 65 66
  { _map_nominal, _res_8s_1 }, /* 1 */
};

67
static const static_bookblock _resbook_8u_0={
Monty's avatar
 
Monty committed
68 69 70 71 72 73 74 75 76 77 78
  {
    {0},
    {0,0,&_8u0__p1_0},
    {0,0,&_8u0__p2_0},
    {0,0,&_8u0__p3_0},
    {0,0,&_8u0__p4_0},
    {0,0,&_8u0__p5_0},
    {&_8u0__p6_0,&_8u0__p6_1},
    {&_8u0__p7_0,&_8u0__p7_1,&_8u0__p7_2}
   }
};
79
static const static_bookblock _resbook_8u_1={
Monty's avatar
 
Monty committed
80 81 82 83 84 85 86 87 88 89 90 91
  {
    {0},
    {0,0,&_8u1__p1_0},
    {0,0,&_8u1__p2_0},
    {0,0,&_8u1__p3_0},
    {0,0,&_8u1__p4_0},
    {0,0,&_8u1__p5_0},
    {0,0,&_8u1__p6_0},
    {&_8u1__p7_0,&_8u1__p7_1},
    {&_8u1__p8_0,&_8u1__p8_1},
    {&_8u1__p9_0,&_8u1__p9_1,&_8u1__p9_2}
   }
Monty's avatar
 
Monty committed
92 93
};

94
static const vorbis_residue_template _res_8u_0[]={
Monty's avatar
Monty committed
95
  {1,0,32,  &_residue_44_low_un,
Monty's avatar
 
Monty committed
96 97 98
   &_huff_book__8u0__single,&_huff_book__8u0__single,
   &_resbook_8u_0,&_resbook_8u_0},
};
99
static const vorbis_residue_template _res_8u_1[]={
Monty's avatar
Monty committed
100
  {1,0,32,  &_residue_44_mid_un,
Monty's avatar
 
Monty committed
101 102
   &_huff_book__8u1__single,&_huff_book__8u1__single,
   &_resbook_8u_1,&_resbook_8u_1},
Monty's avatar
 
Monty committed
103 104
};

105
static const vorbis_mapping_template _mapres_template_8_uncoupled[2]={
Monty's avatar
 
Monty committed
106
  { _map_nominal_u, _res_8u_0 }, /* 0 */
Monty's avatar
 
Monty committed
107
  { _map_nominal_u, _res_8u_1 }, /* 1 */
Monty's avatar
 
Monty committed
108
};