FFmpeg
Main Page
Related Pages
Modules
Namespaces
Data Structures
Files
Examples
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Groups
Pages
libavcodec
vlc.h
Go to the documentation of this file.
1
/*
2
* This file is part of FFmpeg.
3
*
4
* FFmpeg is free software; you can redistribute it and/or
5
* modify it under the terms of the GNU Lesser General Public
6
* License as published by the Free Software Foundation; either
7
* version 2.1 of the License, or (at your option) any later version.
8
*
9
* FFmpeg is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12
* Lesser General Public License for more details.
13
*
14
* You should have received a copy of the GNU Lesser General Public
15
* License along with FFmpeg; if not, write to the Free Software
16
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17
*/
18
19
#ifndef AVCODEC_VLC_H
20
#define AVCODEC_VLC_H
21
22
#include <stdint.h>
23
24
#define VLC_TYPE int16_t
25
26
typedef
struct
VLC
{
27
int
bits
;
28
VLC_TYPE
(*
table
)[2];
///< code, bits
29
int
table_size
,
table_allocated
;
30
}
VLC
;
31
32
typedef
struct
RL_VLC_ELEM
{
33
int16_t
level
;
34
int8_t
len
;
35
uint8_t
run
;
36
}
RL_VLC_ELEM
;
37
38
#define init_vlc(vlc, nb_bits, nb_codes, \
39
bits, bits_wrap, bits_size, \
40
codes, codes_wrap, codes_size, \
41
flags) \
42
ff_init_vlc_sparse(vlc, nb_bits, nb_codes, \
43
bits, bits_wrap, bits_size, \
44
codes, codes_wrap, codes_size, \
45
NULL, 0, 0, flags)
46
47
int
ff_init_vlc_sparse
(
VLC
*vlc,
int
nb_bits,
int
nb_codes,
48
const
void
*
bits
,
int
bits_wrap,
int
bits_size,
49
const
void
*codes,
int
codes_wrap,
int
codes_size,
50
const
void
*symbols,
int
symbols_wrap,
int
symbols_size,
51
int
flags
);
52
void
ff_free_vlc
(
VLC
*vlc);
53
54
#define INIT_VLC_LE 2
55
#define INIT_VLC_USE_NEW_STATIC 4
56
57
#define INIT_VLC_STATIC(vlc, bits, a, b, c, d, e, f, g, static_size) \
58
do { \
59
static VLC_TYPE table[static_size][2]; \
60
(vlc)->table = table; \
61
(vlc)->table_allocated = static_size; \
62
init_vlc(vlc, bits, a, b, c, d, e, f, g, INIT_VLC_USE_NEW_STATIC); \
63
} while (0)
64
65
#endif
/* AVCODEC_VLC_H */
ff_free_vlc
void ff_free_vlc(VLC *vlc)
Definition:
bitstream.c:360
RL_VLC_ELEM
Definition:
vlc.h:32
VLC::table_size
int table_size
Definition:
vlc.h:29
bits
uint8_t bits
Definition:
crc.c:296
uint8_t
uint8_t
Definition:
audio_convert.c:194
RL_VLC_ELEM::len
int8_t len
Definition:
vlc.h:34
VLC
Definition:
vlc.h:26
ff_init_vlc_sparse
int ff_init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes, const void *bits, int bits_wrap, int bits_size, const void *codes, int codes_wrap, int codes_size, const void *symbols, int symbols_wrap, int symbols_size, int flags)
Definition:
bitstream.c:275
VLC::bits
int bits
Definition:
vlc.h:27
VLC::table_allocated
int table_allocated
Definition:
vlc.h:29
flags
static int flags
Definition:
cpu.c:47
RL_VLC_ELEM::run
uint8_t run
Definition:
vlc.h:35
VLC::table
VLC_TYPE(* table)[2]
code, bits
Definition:
vlc.h:28
RL_VLC_ELEM::level
int16_t level
Definition:
vlc.h:33
VLC_TYPE
#define VLC_TYPE
Definition:
vlc.h:24
Generated on Mon Jun 27 2016 02:34:41 for FFmpeg by
1.8.6