FFmpeg
intrax8.h
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_INTRAX8_H
20 #define AVCODEC_INTRAX8_H
21 
22 #include "blockdsp.h"
23 #include "get_bits.h"
24 #include "idctdsp.h"
25 #include "intrax8dsp.h"
26 #include "wmv2dsp.h"
27 #include "mpegpicture.h"
28 
29 typedef struct IntraX8Context {
30  VLC *j_ac_vlc[4]; // they point to the static j_mb_vlc
31  VLC *j_orient_vlc;
32  VLC *j_dc_vlc[3];
33 
34  int use_quant_matrix;
35 
36  // set by ff_intrax8_common_init
37  uint8_t *prediction_table; // 2 * (mb_w * 2)
38  ScanTable scantable[3];
39  WMV2DSPContext wdsp;
40  uint8_t idct_permutation[64];
41  AVCodecContext *avctx;
43  int16_t (*block)[64];
44 
45  // set by the caller codec
47  IDCTDSPContext idsp;
48  BlockDSPContext bdsp;
49  int quant;
50  int dquant;
51  int qsum;
52  int loopfilter;
53  AVFrame *frame;
54  GetBitContext *gb;
55 
56  // calculated per frame
57  int quant_dc_chroma;
58  int divide_quant_dc_luma;
59  int divide_quant_dc_chroma;
60  uint8_t *dest[3];
61  uint8_t scratchpad[42]; // size of the block is fixed (8x8 plus padding)
62 
63  // changed per block
64  int edges;
65  int flat_dc;
66  int predicted_dc;
67  int raw_orient;
68  int chroma_orient;
69  int orient;
70  int est_run;
71 
72  // block props
73  int mb_x, mb_y;
74  int mb_width, mb_height;
76 
90  int16_t (*block)[64],
91  int block_last_index[12],
92  int mb_width, int mb_height);
93 
99 
113  GetBitContext *gb, int *mb_x, int *mb_y,
114  int quant, int halfpq,
115  int loopfilter, int lowdelay);
116 
117 #endif /* AVCODEC_INTRAX8_H */
This structure describes decoded (raw) audio or video data.
Definition: frame.h:218
Scantable.
Definition: idctdsp.h:31
av_cold int ff_intrax8_common_init(AVCodecContext *avctx, IntraX8Context *w, IDCTDSPContext *idsp, int16_t(*block)[64], int block_last_index[12], int mb_width, int mb_height)
Initialize IntraX8 frame decoder.
Definition: intrax8.c:728
int ff_intrax8_decode_picture(IntraX8Context *w, Picture *pict, GetBitContext *gb, int *mb_x, int *mb_y, int dquant, int quant_offset, int loopfilter, int lowdelay)
Decode single IntraX8 frame.
Definition: intrax8.c:773
bitstream reader API header.
int * block_last_index
last nonzero coefficient in block
Definition: intrax8.h:42
Definition: vlc.h:26
Definition: intrax8.h:29
av_cold void ff_intrax8_common_end(IntraX8Context *w)
Destroy IntraX8 frame structure.
Definition: intrax8.c:768
Picture.
Definition: mpegpicture.h:45
Definition: blockdsp.h:35
Definition: wmv2dsp.h:26
main external API structure.
Definition: avcodec.h:1518
Definition: idctdsp.h:53
Definition: get_bits.h:56
Definition: intrax8dsp.h:25