FFmpeg
mpeg12vlc.h
Go to the documentation of this file.
1 /*
2  * MPEG-1/2 VLC
3  * copyright (c) 2000,2001 Fabrice Bellard
4  * copyright (c) 2002-2004 Michael Niedermayer <michaelni@gmx.at>
5  *
6  * This file is part of FFmpeg.
7  *
8  * FFmpeg is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * FFmpeg is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with FFmpeg; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 
23 /**
24  * @file
25  * MPEG-1/2 VLC.
26  */
27 
28 #ifndef AVCODEC_MPEG12VLC_H
29 #define AVCODEC_MPEG12VLC_H
30 
31 #include "vlc.h"
32 
33 #define DC_VLC_BITS 9
34 #define MV_VLC_BITS 8
35 #define TEX_VLC_BITS 9
36 
37 #define MBINCR_VLC_BITS 9
38 #define MB_PAT_VLC_BITS 9
39 #define MB_PTYPE_VLC_BITS 6
40 #define MB_BTYPE_VLC_BITS 6
41 
42 extern VLCElem ff_dc_lum_vlc[];
43 extern VLCElem ff_dc_chroma_vlc[];
44 extern VLCElem ff_mbincr_vlc[];
45 extern VLCElem ff_mb_ptype_vlc[];
46 extern VLCElem ff_mb_btype_vlc[];
47 extern VLCElem ff_mb_pat_vlc[];
48 extern VLCElem ff_mv_vlc[];
49 
50 void ff_mpeg12_init_vlcs(void);
51 
52 #define MPEG12_RL_NB_ELEMS 111
53 
54 extern const int8_t ff_mpeg12_level[MPEG12_RL_NB_ELEMS];
55 extern const int8_t ff_mpeg12_run[MPEG12_RL_NB_ELEMS];
56 
57 extern const uint16_t ff_mpeg1_vlc_table[MPEG12_RL_NB_ELEMS + 2][2];
58 extern const uint16_t ff_mpeg2_vlc_table[MPEG12_RL_NB_ELEMS + 2][2];
59 
62 
63 void ff_init_2d_vlc_rl(const uint16_t table_vlc[][2], RL_VLC_ELEM rl_vlc[],
64  const int8_t table_run[], const uint8_t table_level[],
65  int n, unsigned static_size, int flags);
66 
67 void ff_mpeg1_init_uni_ac_vlc(const int8_t max_level[], const uint8_t index_run[],
68  const uint16_t table_vlc[][2], uint8_t uni_ac_vlc_len[]);
69 
70 #endif /* AVCODEC_MPEG12VLC_H */
MPEG12_RL_NB_ELEMS
#define MPEG12_RL_NB_ELEMS
Definition: mpeg12vlc.h:52
ff_mv_vlc
VLCElem ff_mv_vlc[]
Definition: mpeg12.c:140
ff_mpeg1_init_uni_ac_vlc
void ff_mpeg1_init_uni_ac_vlc(const int8_t max_level[], const uint8_t index_run[], const uint16_t table_vlc[][2], uint8_t uni_ac_vlc_len[])
Definition: mpeg12enc.c:101
ff_mpeg1_vlc_table
const uint16_t ff_mpeg1_vlc_table[MPEG12_RL_NB_ELEMS+2][2]
Definition: mpeg12data.c:67
ff_dc_lum_vlc
VLCElem ff_dc_lum_vlc[]
Definition: mpeg12.c:142
ff_mb_pat_vlc
VLCElem ff_mb_pat_vlc[]
Definition: mpeg12.c:148
rl_vlc
static const VLCElem * rl_vlc[2]
Definition: mobiclip.c:278
ff_mpeg1_rl_vlc
RL_VLC_ELEM ff_mpeg1_rl_vlc[]
Definition: mpeg12.c:150
ff_init_2d_vlc_rl
void ff_init_2d_vlc_rl(const uint16_t table_vlc[][2], RL_VLC_ELEM rl_vlc[], const int8_t table_run[], const uint8_t table_level[], int n, unsigned static_size, int flags)
Definition: mpeg12.c:89
ff_mpeg2_vlc_table
const uint16_t ff_mpeg2_vlc_table[MPEG12_RL_NB_ELEMS+2][2]
Definition: mpeg12data.c:100
RL_VLC_ELEM
Definition: vlc.h:56
VLCElem
Definition: vlc.h:32
ff_mb_ptype_vlc
VLCElem ff_mb_ptype_vlc[]
Definition: mpeg12.c:146
ff_mpeg12_run
const int8_t ff_mpeg12_run[MPEG12_RL_NB_ELEMS]
Definition: mpeg12data.c:150
ff_mpeg12_level
const int8_t ff_mpeg12_level[MPEG12_RL_NB_ELEMS]
Definition: mpeg12data.c:133
ff_mpeg2_rl_vlc
RL_VLC_ELEM ff_mpeg2_rl_vlc[]
Definition: mpeg12.c:151
ff_dc_chroma_vlc
VLCElem ff_dc_chroma_vlc[]
Definition: mpeg12.c:143
ff_mpeg12_init_vlcs
void ff_mpeg12_init_vlcs(void)
Definition: mpeg12.c:188
ff_mbincr_vlc
VLCElem ff_mbincr_vlc[]
Definition: mpeg12.c:145
ff_mb_btype_vlc
VLCElem ff_mb_btype_vlc[]
Definition: mpeg12.c:147
vlc.h
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:482