FFmpeg
hq_hqa.h
Go to the documentation of this file.
1 /*
2  * Canopus HQ/HQA 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_HQ_HQA_H
22 #define AVCODEC_HQ_HQA_H
23 
24 #include <stdint.h>
25 
26 #include "avcodec.h"
27 #include "bytestream.h"
28 #include "hq_hqadsp.h"
29 #include "vlc.h"
30 
31 #define NUM_HQ_AC_ENTRIES 746
32 #define NUM_HQ_PROFILES 22
33 #define NUM_HQ_QUANTS 16
34 
35 typedef struct HQContext {
39 
42  DECLARE_ALIGNED(16, int16_t, block)[12][64];
43 } HQContext;
44 
45 typedef struct HQProfile {
46  const uint8_t *perm_tab;
47  int width, height;
49  int tab_w, tab_h;
50 } HQProfile;
51 
52 extern const int32_t * const ff_hq_quants[16][2][4];
54 
56 extern const int16_t ff_hq_ac_syms [NUM_HQ_AC_ENTRIES];
57 
59 
60 #endif /* AVCODEC_HQ_HQA_H */
int width
Definition: hq_hqa.h:47
int16_t block[12][64]
Definition: hq_hqa.h:42
const int32_t *const ff_hq_quants[16][2][4]
Definition: hq_hqadata.c:1126
const HQProfile ff_hq_profile[NUM_HQ_PROFILES]
Definition: hq_hqadata.c:8343
const uint8_t * perm_tab
Definition: hq_hqa.h:46
VLC hq_ac_vlc
Definition: hq_hqa.h:40
HQ/HQA variant of AAN IDCT It differs from the standard AAN IDCT in precision and in the second stage...
uint8_t
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
Definition: undefined.txt:32
#define DECLARE_ALIGNED(n, t, v)
Declare a variable that is aligned in memory.
Definition: mem.h:112
#define height
int num_slices
Definition: hq_hqa.h:48
VLC hqa_cbp_vlc
Definition: hq_hqa.h:41
Definition: vlc.h:26
int ff_hq_init_vlcs(HQContext *c)
Definition: hq_hqadata.c:8368
int32_t
#define NUM_HQ_AC_ENTRIES
Definition: hq_hqa.h:31
#define NUM_HQ_PROFILES
Definition: hq_hqa.h:32
GetByteContext gbc
Definition: hq_hqa.h:38
Libavcodec external API header.
main external API structure.
Definition: avcodec.h:657
const int16_t ff_hq_ac_syms[NUM_HQ_AC_ENTRIES]
Definition: hq_hqadata.c:1342
int tab_w
Definition: hq_hqa.h:49
AVCodecContext * avctx
Definition: hq_hqa.h:36
HQDSPContext hqhqadsp
Definition: hq_hqa.h:37
const uint8_t ff_hq_ac_skips[NUM_HQ_AC_ENTRIES]
Definition: hq_hqadata.c:1292