Mercurial > mplayer.hg
annotate libfaad2/codebook/hcb_6.h @ 24787:02535b3216c5
Avoid text deformation and subtitles moving outside the screen in pan-and-scan
mode.
For this, crop amounts are passed from vo_gl as negative margins sizes. They
are used to calculate aspect ratio. They are ignored when calculating subtitle
positions, so subtitles will stay on screen most of the time.
Based on a patch by Jindrich Makovicka [makovick gmail com].
author | eugeni |
---|---|
date | Fri, 19 Oct 2007 18:16:23 +0000 |
parents | 1d5a49e6d9db |
children | e83eef58b30a |
rev | line source |
---|---|
10725 | 1 /* |
2 ** FAAD2 - Freeware Advanced Audio (AAC) Decoder including SBR decoding | |
3 ** Copyright (C) 2003 M. Bakker, Ahead Software AG, http://www.nero.com | |
4 ** | |
5 ** This program is free software; you can redistribute it and/or modify | |
6 ** it under the terms of the GNU General Public License as published by | |
7 ** the Free Software Foundation; either version 2 of the License, or | |
8 ** (at your option) any later version. | |
9 ** | |
10 ** This program is distributed in the hope that it will be useful, | |
11 ** but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 ** GNU General Public License for more details. | |
14 ** | |
15 ** You should have received a copy of the GNU General Public License | |
16 ** along with this program; if not, write to the Free Software | |
17 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | |
18 ** | |
19 ** Any non-GPL usage of this software or parts of this software is strictly | |
20 ** forbidden. | |
21 ** | |
22 ** Commercial non-GPL licensing of this software is possible. | |
23 ** For more info contact Ahead Software through Mpeg4AAClicense@nero.com. | |
24 ** | |
14726
1d5a49e6d9db
Remove modification notice from files that have not been locally modified.
diego
parents:
12625
diff
changeset
|
25 ** $Id: hcb_6.h,v 1.3 2003/09/09 18:12:01 menno Exp $ |
10725 | 26 **/ |
27 | |
28 /* 2-step huffman table HCB_6 */ | |
29 | |
30 | |
31 /* 1st step: 5 bits | |
32 * 2^5 = 32 entries | |
33 * | |
34 * Used to find offset into 2nd step table and number of extra bits to get | |
35 */ | |
36 static hcb hcb6_1[] = { | |
37 /* 4 bit codewords */ | |
38 { /* 00000 */ 0, 0 }, | |
39 { /* */ 0, 0 }, | |
40 { /* 00010 */ 1, 0 }, | |
41 { /* */ 1, 0 }, | |
42 { /* 00100 */ 2, 0 }, | |
43 { /* */ 2, 0 }, | |
44 { /* 00110 */ 3, 0 }, | |
45 { /* */ 3, 0 }, | |
46 { /* 01000 */ 4, 0 }, | |
47 { /* */ 4, 0 }, | |
48 { /* 01010 */ 5, 0 }, | |
49 { /* */ 5, 0 }, | |
50 { /* 01100 */ 6, 0 }, | |
51 { /* */ 6, 0 }, | |
52 { /* 01110 */ 7, 0 }, | |
53 { /* */ 7, 0 }, | |
54 { /* 10000 */ 8, 0 }, | |
55 { /* */ 8, 0 }, | |
56 | |
57 /* 6 bit codewords */ | |
58 { /* 10010 */ 9, 1 }, | |
59 { /* 10011 */ 11, 1 }, | |
60 { /* 10100 */ 13, 1 }, | |
61 { /* 10101 */ 15, 1 }, | |
62 { /* 10110 */ 17, 1 }, | |
63 { /* 10111 */ 19, 1 }, | |
64 { /* 11000 */ 21, 1 }, | |
65 { /* 11001 */ 23, 1 }, | |
66 | |
67 /* 7 bit codewords */ | |
68 { /* 11010 */ 25, 2 }, | |
69 { /* 11011 */ 29, 2 }, | |
70 { /* 11100 */ 33, 2 }, | |
71 | |
72 /* 7/8 bit codewords */ | |
73 { /* 11101 */ 37, 3 }, | |
74 | |
75 /* 8/9 bit codewords */ | |
76 { /* 11110 */ 45, 4 }, | |
77 | |
78 /* 9/10/11 bit codewords */ | |
79 { /* 11111 */ 61, 6 } | |
80 }; | |
81 | |
82 /* 2nd step table | |
83 * | |
84 * Gives size of codeword and actual data (x,y,v,w) | |
85 */ | |
86 static hcb_2_pair hcb6_2[] = { | |
87 /* 4 bit codewords */ | |
88 { 4, 0, 0 }, | |
89 { 4, 1, 0 }, | |
90 { 4, 0, -1 }, | |
91 { 4, 0, 1 }, | |
92 { 4, -1, 0 }, | |
93 { 4, 1, 1 }, | |
94 { 4, -1, 1 }, | |
95 { 4, 1, -1 }, | |
96 { 4, -1, -1 }, | |
97 | |
98 /* 6 bit codewords */ | |
99 { 6, 2, -1 }, | |
100 { 6, 2, 1 }, | |
101 { 6, -2, 1 }, | |
102 { 6, -2, -1 }, | |
103 { 6, -2, 0 }, | |
104 { 6, -1, 2 }, | |
105 { 6, 2, 0 }, | |
106 { 6, 1, -2 }, | |
107 { 6, 1, 2 }, | |
108 { 6, 0, -2 }, | |
109 { 6, -1, -2 }, | |
110 { 6, 0, 2 }, | |
111 { 6, 2, -2 }, | |
112 { 6, -2, 2 }, | |
113 { 6, -2, -2 }, | |
114 { 6, 2, 2 }, | |
115 | |
116 /* 7 bit codewords */ | |
117 { 7, -3, 1 }, | |
118 { 7, 3, 1 }, | |
119 { 7, 3, -1 }, | |
120 { 7, -1, 3 }, | |
121 { 7, -3, -1 }, | |
122 { 7, 1, 3 }, | |
123 { 7, 1, -3 }, | |
124 { 7, -1, -3 }, | |
125 { 7, 3, 0 }, | |
126 { 7, -3, 0 }, | |
127 { 7, 0, -3 }, | |
128 { 7, 0, 3 }, | |
129 | |
130 /* 7/8 bit codewords */ | |
131 { 7, 3, 2 }, { 7, 3, 2 }, | |
132 { 8, -3, -2 }, | |
133 { 8, -2, 3 }, | |
134 { 8, 2, 3 }, | |
135 { 8, 3, -2 }, | |
136 { 8, 2, -3 }, | |
137 { 8, -2, -3 }, | |
138 | |
139 /* 8 bit codewords */ | |
140 { 8, -3, 2 }, { 8, -3, 2 }, | |
141 { 8, 3, 3 }, { 8, 3, 3 }, | |
142 { 9, 3, -3 }, | |
143 { 9, -3, -3 }, | |
144 { 9, -3, 3 }, | |
145 { 9, 1, -4 }, | |
146 { 9, -1, -4 }, | |
147 { 9, 4, 1 }, | |
148 { 9, -4, 1 }, | |
149 { 9, -4, -1 }, | |
150 { 9, 1, 4 }, | |
151 { 9, 4, -1 }, | |
152 { 9, -1, 4 }, | |
153 { 9, 0, -4 }, | |
154 | |
155 /* 9/10/11 bit codewords */ | |
156 { 9, -4, 2 }, { 9, -4, 2 }, { 9, -4, 2 }, { 9, -4, 2 }, | |
157 { 9, -4, -2 }, { 9, -4, -2 }, { 9, -4, -2 }, { 9, -4, -2 }, | |
158 { 9, 2, 4 }, { 9, 2, 4 }, { 9, 2, 4 }, { 9, 2, 4 }, | |
159 { 9, -2, -4 }, { 9, -2, -4 }, { 9, -2, -4 }, { 9, -2, -4 }, | |
160 { 9, -4, 0 }, { 9, -4, 0 }, { 9, -4, 0 }, { 9, -4, 0 }, | |
161 { 9, 4, 2 }, { 9, 4, 2 }, { 9, 4, 2 }, { 9, 4, 2 }, | |
162 { 9, 4, -2 }, { 9, 4, -2 }, { 9, 4, -2 }, { 9, 4, -2 }, | |
163 { 9, -2, 4 }, { 9, -2, 4 }, { 9, -2, 4 }, { 9, -2, 4 }, | |
164 { 9, 4, 0 }, { 9, 4, 0 }, { 9, 4, 0 }, { 9, 4, 0 }, | |
165 { 9, 2, -4 }, { 9, 2, -4 }, { 9, 2, -4 }, { 9, 2, -4 }, | |
166 { 9, 0, 4 }, { 9, 0, 4 }, { 9, 0, 4 }, { 9, 0, 4 }, | |
167 { 10, -3, -4 }, { 10, -3, -4 }, | |
168 { 10, -3, 4 }, { 10, -3, 4 }, | |
169 { 10, 3, -4 }, { 10, 3, -4 }, | |
170 { 10, 4, -3 }, { 10, 4, -3 }, | |
171 { 10, 3, 4 }, { 10, 3, 4 }, | |
172 { 10, 4, 3 }, { 10, 4, 3 }, | |
173 { 10, -4, 3 }, { 10, -4, 3 }, | |
174 { 10, -4, -3 }, { 10, -4, -3 }, | |
175 { 11, 4, 4 }, | |
176 { 11, -4, 4 }, | |
177 { 11, -4, -4 }, | |
178 { 11, 4, -4 } | |
179 }; |