• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /******************************************************************************
2  *                                                                            *
3  * Copyright (C) 2018 The Android Open Source Project
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at:
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  *****************************************************************************
18  * Originally developed and contributed by Ittiam Systems Pvt. Ltd, Bangalore
19 */
20 #include <limits.h>
21 
22 #include <ixheaacd_type_def.h>
23 #include "ixheaacd_interface.h"
24 #include "ixheaacd_bitbuffer.h"
25 #include "ixheaacd_info.h"
26 
27 ia_huff_code_word_struct ixheaacd_huff_book_scl[] = {
28 
29     {0, 18, 262120},   {1, 18, 262118},   {2, 18, 262119},   {3, 18, 262117},
30     {4, 19, 524277},   {5, 19, 524273},   {6, 19, 524269},   {7, 19, 524278},
31     {8, 19, 524270},   {9, 19, 524271},   {10, 19, 524272},  {11, 19, 524284},
32     {12, 19, 524285},  {13, 19, 524287},  {14, 19, 524286},  {15, 19, 524279},
33     {16, 19, 524280},  {17, 19, 524283},  {18, 19, 524281},  {19, 18, 262116},
34     {20, 19, 524282},  {21, 18, 262115},  {22, 17, 131055},  {23, 17, 131056},
35     {24, 16, 65525},   {25, 17, 131054},  {26, 16, 65522},   {27, 16, 65523},
36     {28, 16, 65524},   {29, 16, 65521},   {30, 15, 32758},   {31, 15, 32759},
37     {32, 14, 16377},   {33, 14, 16373},   {34, 14, 16375},   {35, 14, 16371},
38     {36, 14, 16374},   {37, 14, 16370},   {38, 13, 8183},    {39, 13, 8181},
39     {40, 12, 4089},    {41, 12, 4087},    {42, 12, 4086},    {43, 11, 2041},
40     {44, 12, 4084},    {45, 11, 2040},    {46, 10, 1017},    {47, 10, 1015},
41     {48, 10, 1013},    {49, 9, 504},      {50, 9, 503},      {51, 8, 250},
42     {52, 8, 248},      {53, 8, 246},      {54, 7, 121},      {55, 6, 58},
43     {56, 6, 56},       {57, 5, 26},       {58, 4, 11},       {59, 3, 4},
44     {60, 1, 0},        {61, 4, 10},       {62, 4, 12},       {63, 5, 27},
45     {64, 6, 57},       {65, 6, 59},       {66, 7, 120},      {67, 7, 122},
46     {68, 8, 247},      {69, 8, 249},      {70, 9, 502},      {71, 9, 505},
47     {72, 10, 1012},    {73, 10, 1014},    {74, 10, 1016},    {75, 11, 2037},
48     {76, 11, 2036},    {77, 11, 2038},    {78, 11, 2039},    {79, 12, 4085},
49     {80, 12, 4088},    {81, 13, 8180},    {82, 13, 8182},    {83, 13, 8184},
50     {84, 14, 16376},   {85, 14, 16372},   {86, 16, 65520},   {87, 15, 32756},
51     {88, 16, 65526},   {89, 15, 32757},   {90, 18, 262114},  {91, 19, 524249},
52     {92, 19, 524250},  {93, 19, 524251},  {94, 19, 524252},  {95, 19, 524253},
53     {96, 19, 524254},  {97, 19, 524248},  {98, 19, 524242},  {99, 19, 524243},
54     {100, 19, 524244}, {101, 19, 524245}, {102, 19, 524246}, {103, 19, 524274},
55     {104, 19, 524255}, {105, 19, 524263}, {106, 19, 524264}, {107, 19, 524265},
56     {108, 19, 524266}, {109, 19, 524267}, {110, 19, 524262}, {111, 19, 524256},
57     {112, 19, 524257}, {113, 19, 524258}, {114, 19, 524259}, {115, 19, 524260},
58     {116, 19, 524261}, {117, 19, 524247}, {118, 19, 524268}, {119, 19, 524276},
59     {120, 19, 524275}};
60 WORD32 ixheaacd_book_scl_index[33] = {
61     0x00000000, 0x10100004, 0x2040000c, 0x00a0003b, 0x30d0007a, 0x412000fa,
62     0x516001f9, 0x61c003f9, 0x722007f9, 0x82800ff9, 0x92d01ff8, 0xa3503ff9,
63     0xb400fff6, 0xc431fff0, 0x0687ffef, 0x0707fff7, 0x0747fffb, 0x0767fffd,
64     0x0777fffe, 0x0787ffff, 0x0030000b, 0x0060001b, 0x00f000f7, 0x014001f7,
65     0x01a003f7, 0x020007f7, 0x02600ff7, 0x02c01ff7, 0x03303ff7, 0x03907ff7,
66     0x0421ffef, 0x14a3ffe8, 0x0587ffdf};
67 WORD16 ixheaacd_book_scl_code_book[122] = {
68     0x0013, 0x0781, 0x0763, 0x07a4, 0x0744, 0x07c4, 0x0725, 0x07e5, 0x0706,
69     0x0806, 0x06e6, 0x0826, 0x0847, 0x06c7, 0x0867, 0x06a8, 0x0888, 0x0688,
70     0x08a8, 0x0668, 0x08c9, 0x0649, 0x0629, 0x08e9, 0x090a, 0x060a, 0x092a,
71     0x05ea, 0x094a, 0x05ca, 0x098b, 0x096b, 0x09ab, 0x09cb, 0x05ab, 0x056b,
72     0x058c, 0x09ec, 0x054c, 0x052c, 0x0a0c, 0x050c, 0x0a2d, 0x04ed, 0x0a4d,
73     0x04cd, 0x0a6d, 0x04ae, 0x046e, 0x0aae, 0x042e, 0x048e, 0x044e, 0x0a8e,
74     0x040e, 0x0aef, 0x0b2f, 0x03cf, 0x03ef, 0x0ad0, 0x03b0, 0x0350, 0x0370,
75     0x0390, 0x0310, 0x0b10, 0x0331, 0x02d1, 0x02f1, 0x0b52, 0x02b2, 0x0272,
76     0x0072, 0x0032, 0x0052, 0x0012, 0x0c53, 0x0c73, 0x0c93, 0x0cb3, 0x0cd3,
77     0x0eb3, 0x0c33, 0x0b73, 0x0b93, 0x0bb3, 0x0bd3, 0x0bf3, 0x0c13, 0x0d13,
78     0x0df3, 0x0e13, 0x0e33, 0x0e53, 0x0e73, 0x0e93, 0x0dd3, 0x0d33, 0x0d53,
79     0x0d73, 0x0d93, 0x0db3, 0x0ed3, 0x00d3, 0x0113, 0x0133, 0x0153, 0x00b3,
80     0x0cf3, 0x0f13, 0x0ef3, 0x0093, 0x00f3, 0x01f3, 0x0213, 0x0253, 0x0293,
81     0x0233, 0x0173, 0x0193, 0x01d3, 0x01b3};
82