annotate unary.h @ 5811:2926fc2a0396 libavcodec

Disable unused code; fixes several gcc warnings: cabac.h:112: warning: ¡Æput_cabac_static¡Ç defined but not used cabac.h:158: warning: ¡Æput_cabac_terminate¡Ç defined but not used cabac.h:186: warning: ¡Æput_cabac_u¡Ç defined but not used cabac.h:221: warning: ¡Æput_cabac_ueg¡Ç defined but not used cabac.h:273: warning: ¡Ærefill2¡Ç defined but not used cabac.h:811: warning: ¡Æget_cabac_u¡Ç defined but not used cabac.h:827: warning: ¡Æget_cabac_ueg¡Ç defined but not used
author diego
date Fri, 12 Oct 2007 08:43:23 +0000
parents cf88751d8ab7
children 1d83e9c34641
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5605
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
1 /*
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
2 * copyright (c) 2004 Michael Niedermayer <michaelni@gmx.at>
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
3 *
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
4 * This file is part of FFmpeg.
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
5 *
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
6 * FFmpeg is free software; you can redistribute it and/or
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
7 * modify it under the terms of the GNU Lesser General Public
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
8 * License as published by the Free Software Foundation; either
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
9 * version 2.1 of the License, or (at your option) any later version.
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
10 *
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
11 * FFmpeg is distributed in the hope that it will be useful,
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
14 * Lesser General Public License for more details.
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
15 *
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
16 * You should have received a copy of the GNU Lesser General Public
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
17 * License along with FFmpeg; if not, write to the Free Software
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
19 */
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
20
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
21 #ifndef AVCODEC_UNARY_H
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
22 #define AVCODEC_UNARY_H
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
23
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
24 #include "bitstream.h"
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
25
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
26 /**
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
27 * Get unary code of limited length
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
28 * @param gb GetBitContext
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
29 * @param[in] stop The bitstop value (unary code of 1's or 0's)
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
30 * @param[in] len Maximum length
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
31 * @return Unary length/index
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
32 */
5606
0bc48f6f78a2 cleanup get_unary()
aurel
parents: 5605
diff changeset
33 static inline int get_unary(GetBitContext *gb, int stop, int len)
5605
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
34 {
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
35 int i;
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
36
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
37 for(i = 0; i < len && get_bits1(gb) != stop; i++);
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
38 return i;
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
39 }
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
40
5607
5b80d560cdca add get_unary_0_33() to help gcc with inlining
aurel
parents: 5606
diff changeset
41 /**
5b80d560cdca add get_unary_0_33() to help gcc with inlining
aurel
parents: 5606
diff changeset
42 * Get unary code terminated by a 0 with a maximum length of 33
5b80d560cdca add get_unary_0_33() to help gcc with inlining
aurel
parents: 5606
diff changeset
43 * @param gb GetBitContext
5b80d560cdca add get_unary_0_33() to help gcc with inlining
aurel
parents: 5606
diff changeset
44 * @return Unary length/index
5b80d560cdca add get_unary_0_33() to help gcc with inlining
aurel
parents: 5606
diff changeset
45 */
5b80d560cdca add get_unary_0_33() to help gcc with inlining
aurel
parents: 5606
diff changeset
46 static inline int get_unary_0_33(GetBitContext *gb)
5b80d560cdca add get_unary_0_33() to help gcc with inlining
aurel
parents: 5606
diff changeset
47 {
5b80d560cdca add get_unary_0_33() to help gcc with inlining
aurel
parents: 5606
diff changeset
48 return get_unary(gb, 0, 33);
5b80d560cdca add get_unary_0_33() to help gcc with inlining
aurel
parents: 5606
diff changeset
49 }
5b80d560cdca add get_unary_0_33() to help gcc with inlining
aurel
parents: 5606
diff changeset
50
5628
cf88751d8ab7 Remove reimplementation of get_unary.
vitor
parents: 5607
diff changeset
51 static inline int get_unary_0_9(GetBitContext *gb)
cf88751d8ab7 Remove reimplementation of get_unary.
vitor
parents: 5607
diff changeset
52 {
cf88751d8ab7 Remove reimplementation of get_unary.
vitor
parents: 5607
diff changeset
53 return get_unary(gb, 0, 9);
cf88751d8ab7 Remove reimplementation of get_unary.
vitor
parents: 5607
diff changeset
54 }
cf88751d8ab7 Remove reimplementation of get_unary.
vitor
parents: 5607
diff changeset
55
5605
d92fa6e5fc8c move get_unary() to its own file
aurel
parents:
diff changeset
56 #endif /* AVCODEC_UNARY_H */