FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
hqx.h
Go to the documentation of this file.
1 /*
2  * Canopus HQX decoder
3  *
4  * This file is part of FFmpeg.
5  *
6  * FFmpeg is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * FFmpeg is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with FFmpeg; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef AVCODEC_HQX_H
22 #define AVCODEC_HQX_H
23 
24 #include <stdint.h>
25 #include "libavutil/mem.h"
26 #include "get_bits.h"
27 
28 enum HQXACMode {
29  HQX_AC_Q0 = 0,
36 };
37 
38 typedef struct HQXLUT {
39  int16_t lev;
41  int8_t bits;
42 } HQXLUT;
43 
44 typedef struct HQXAC {
46  const HQXLUT *lut;
47 } HQXAC;
48 
49 typedef struct HQXContext {
52 
53  DECLARE_ALIGNED(16, int16_t, block)[16][64];
54 
56  VLC dc_vlc[3];
57 } HQXContext;
58 
59 #define HQX_DC_VLC_BITS 9
60 
61 extern const HQXAC ff_hqx_ac[NUM_HQX_AC];
62 
64 
65 #endif /* AVCODEC_HQX_H */