FFmpeg
Loading...
Searching...
No Matches
intrax8.h
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#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
29typedef struct IntraX8Context {
30 const VLCElem *j_ac_vlc_table[4]; // they point to the static j_mb_vlc.table
33
35
36 // set by ff_intrax8_common_init
37 uint8_t *prediction_table; // 2 * (mb_w * 2)
38 uint8_t permutated_scantable[3][64];
41 int16_t *block;
42
43 // set by the caller codec
46 int quant;
47 int dquant;
48 int qsum;
52
53 // calculated per frame
57 uint8_t *dest[3];
58 uint8_t scratchpad[42]; // size of the block is fixed (8x8 plus padding)
59
60 // changed per block
61 int edges;
66 int orient;
68
69 // block props
70 int mb_x, mb_y;
73
74/**
75 * Initialize IntraX8 frame decoder.
76 * @param avctx pointer to AVCodecContext
77 * @param w pointer to IntraX8Context
78 * @param block pointer to block array
79 * @param mb_width macroblock width
80 * @param mb_height macroblock height
81 * @return 0 on success, a negative AVERROR value on error
82 */
85 int16_t block[64],
86 int mb_width, int mb_height);
87
88/**
89 * Destroy IntraX8 frame structure.
90 * @param w pointer to IntraX8Context
91 */
93
94/**
95 * Decode single IntraX8 frame.
96 * lowres decoding is theoretically impossible.
97 * @param w pointer to IntraX8Context
98 * @param pict the output Picture containing an AVFrame
99 * @param gb open bitstream reader
100 * @param mb_x pointer to the x coordinate of the current macroblock
101 * @param mb_y pointer to the y coordinate of the current macroblock
102 * @param dquant doubled quantizer, it would be odd in case of VC-1 halfpq==1.
103 * @param quant_offset offset away from zero
104 * @param loopfilter enable filter after decoding a block
105 */
107 GetBitContext *gb, int *mb_x, int *mb_y,
108 int quant, int halfpq,
109 int loopfilter, int lowdelay);
110
111#endif /* AVCODEC_INTRAX8_H */
static int16_t block[64]
Definition dct.c:125
bitstream reader API header.
int ff_intrax8_decode_picture(IntraX8Context *w, MPVPicture *pict, GetBitContext *gb, int *mb_x, int *mb_y, int quant, int halfpq, int loopfilter, int lowdelay)
Decode single IntraX8 frame.
Definition intrax8.c:718
int ff_intrax8_common_init(AVCodecContext *avctx, IntraX8Context *w, int16_t block[64], int mb_width, int mb_height)
Initialize IntraX8 frame decoder.
Definition intrax8.c:679
void ff_intrax8_common_end(IntraX8Context *w)
Destroy IntraX8 frame structure.
Definition intrax8.c:713
uint8_t w
Definition llvidencdsp.c:39
main external API structure.
Definition avcodec.h:443
This structure describes decoded (raw) audio or video data.
Definition frame.h:472
BlockDSPContext bdsp
Definition intrax8.h:45
AVCodecContext * avctx
Definition intrax8.h:40
int chroma_orient
Definition intrax8.h:65
int divide_quant_dc_luma
Definition intrax8.h:55
int predicted_dc
Definition intrax8.h:63
int divide_quant_dc_chroma
Definition intrax8.h:56
int quant_dc_chroma
Definition intrax8.h:54
int16_t * block
Definition intrax8.h:41
uint8_t permutated_scantable[3][64]
Definition intrax8.h:38
uint8_t * prediction_table
Definition intrax8.h:37
uint8_t * dest[3]
Definition intrax8.h:57
IntraX8DSPContext dsp
Definition intrax8.h:44
IDCTDSPContext idsp
Definition intrax8.h:39
const VLCElem * j_orient_vlc_table
Definition intrax8.h:31
GetBitContext * gb
Definition intrax8.h:51
const VLCElem * j_dc_vlc_table[3]
Definition intrax8.h:32
AVFrame * frame
Definition intrax8.h:50
int use_quant_matrix
Definition intrax8.h:34
const VLCElem * j_ac_vlc_table[4]
Definition intrax8.h:30
uint8_t scratchpad[42]
Definition intrax8.h:58
MPVPicture.
Definition mpegpicture.h:58
Definition vlc.h:32
static const uint8_t quant[64]
Definition vmixdec.c:71