FFmpeg
hq_common.c
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 #include "hq_common.h"
20 
21 #define REPEAT(x) x x
22 #define ELEM(_sym, _len) {.sym = _sym << 4 | _sym, .len = _len },
23 #define LEN5(sym) ELEM(sym, 5)
24 #define LEN4(sym) REPEAT(ELEM(sym, 4))
25 #define LEN2(sym) REPEAT(REPEAT(REPEAT(ELEM(sym, 2))))
26 
28  LEN2(0xF)
29  LEN4(0x0)
30  LEN4(0xE)
31  LEN4(0xD)
32  LEN4(0xB)
33  LEN4(0x7)
34  LEN4(0x3)
35  LEN4(0xC)
36  LEN4(0x5)
37  LEN4(0xA)
38  LEN5(0x9)
39  LEN5(0x6)
40  LEN5(0x1)
41  LEN5(0x2)
42  LEN5(0x4)
43  LEN5(0x8)
44 };
HQ_CBP_VLC_BITS
#define HQ_CBP_VLC_BITS
Definition: hq_common.h:25
ff_hq_cbp_vlc
const VLCElem ff_hq_cbp_vlc[1<< HQ_CBP_VLC_BITS]
Definition: hq_common.c:27
VLCElem
Definition: vlc.h:32
LEN5
#define LEN5(sym)
Definition: hq_common.c:23
LEN2
#define LEN2(sym)
Definition: hq_common.c:25
LEN4
#define LEN4(sym)
Definition: hq_common.c:24
hq_common.h