FFmpeg
|
IntraX8 (J-Frame) subdecoder, used by WMV2 and VC-1. More...
#include "libavutil/avassert.h"
#include "libavutil/thread.h"
#include "avcodec.h"
#include "get_bits.h"
#include "idctdsp.h"
#include "msmpeg4_vc1_data.h"
#include "intrax8huf.h"
#include "intrax8.h"
#include "intrax8dsp.h"
#include "mpegutils.h"
Go to the source code of this file.
Macros | |
#define | VLC_BUFFER_SIZE 28150 |
#define | MAX_TABLE_DEPTH(table_bits, max_bits) ((max_bits + table_bits - 1) / table_bits) |
#define | DC_VLC_BITS 9 |
#define | AC_VLC_BITS 9 |
#define | OR_VLC_BITS 7 |
#define | DC_VLC_MTD MAX_TABLE_DEPTH(DC_VLC_BITS, MAX_DC_VLC_BITS) |
#define | AC_VLC_MTD MAX_TABLE_DEPTH(AC_VLC_BITS, MAX_AC_VLC_BITS) |
#define | OR_VLC_MTD MAX_TABLE_DEPTH(OR_VLC_BITS, MAX_OR_VLC_BITS) |
#define | extra_bits(eb) (eb) |
#define | extra_run (0xFF << 8) |
#define | extra_level (0x00 << 8) |
#define | run_offset(r) ((r) << 16) |
#define | level_offset(l) ((l) << 24) |
#define | B(x, y) w->block[0][w->idct_permutation[(x) + (y) * 8]] |
#define | T(x) ((x) * dc_level + 0x8000) >> 16; |
Functions | |
static av_cold void | x8_init_vlc (VLC *vlc, int nb_bits, int nb_codes, int *offset, const uint8_t table[][2]) |
static av_cold void | x8_vlc_init (void) |
static void | x8_reset_vlc_tables (IntraX8Context *w) |
static void | x8_select_ac_table (IntraX8Context *const w, int mode) |
static int | x8_get_orient_vlc (IntraX8Context *w) |
static void | x8_get_ac_rlf (IntraX8Context *const w, const int mode, int *const run, int *const level, int *const final) |
static int | x8_get_dc_rlf (IntraX8Context *const w, const int mode, int *const level, int *const final) |
static int | x8_setup_spatial_predictor (IntraX8Context *const w, const int chroma) |
static void | x8_update_predictions (IntraX8Context *const w, const int orient, const int est_run) |
static void | x8_get_prediction_chroma (IntraX8Context *const w) |
static void | x8_get_prediction (IntraX8Context *const w) |
static void | x8_ac_compensation (IntraX8Context *const w, const int direction, const int dc_level) |
static void | dsp_x8_put_solidcolor (const uint8_t pix, uint8_t *dst, const ptrdiff_t linesize) |
static int | x8_decode_intra_mb (IntraX8Context *const w, const int chroma) |
static void | x8_init_block_index (IntraX8Context *w, AVFrame *frame) |
av_cold int | ff_intrax8_common_init (AVCodecContext *avctx, IntraX8Context *w, int16_t(*block)[64], int block_last_index[12], int mb_width, int mb_height) |
Initialize IntraX8 frame decoder. More... | |
av_cold void | ff_intrax8_common_end (IntraX8Context *w) |
Destroy IntraX8 frame structure. More... | |
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. More... | |
Variables | |
static VLC | j_ac_vlc [2][2][8] |
static VLC | j_dc_vlc [2][8] |
static VLC | j_orient_vlc [2][4] |
static const uint32_t | ac_decode_table [] |
static const uint8_t | dc_index_offset [] |
static const int16_t | quant_table [64] |
IntraX8 (J-Frame) subdecoder, used by WMV2 and VC-1.
Definition in file intrax8.c.
#define MAX_TABLE_DEPTH | ( | table_bits, | |
max_bits | |||
) | ((max_bits + table_bits - 1) / table_bits) |
#define DC_VLC_MTD MAX_TABLE_DEPTH(DC_VLC_BITS, MAX_DC_VLC_BITS) |
#define AC_VLC_MTD MAX_TABLE_DEPTH(AC_VLC_BITS, MAX_AC_VLC_BITS) |
#define OR_VLC_MTD MAX_TABLE_DEPTH(OR_VLC_BITS, MAX_OR_VLC_BITS) |
#define T | ( | x | ) | ((x) * dc_level + 0x8000) >> 16; |
|
static |
Definition at line 52 of file intrax8.c.
Referenced by x8_vlc_init().
|
static |
Definition at line 64 of file intrax8.c.
Referenced by ff_intrax8_common_init().
|
static |
Definition at line 93 of file intrax8.c.
Referenced by ff_intrax8_decode_picture().
|
inlinestatic |
Definition at line 100 of file intrax8.c.
Referenced by x8_decode_intra_mb().
|
inlinestatic |
Definition at line 115 of file intrax8.c.
Referenced by x8_setup_spatial_predictor().
|
static |
Definition at line 172 of file intrax8.c.
Referenced by x8_decode_intra_mb().
|
static |
Definition at line 252 of file intrax8.c.
Referenced by x8_decode_intra_mb().
|
static |
Definition at line 288 of file intrax8.c.
Referenced by ff_intrax8_decode_picture().
|
static |
Definition at line 346 of file intrax8.c.
Referenced by x8_decode_intra_mb().
|
static |
Definition at line 356 of file intrax8.c.
Referenced by ff_intrax8_decode_picture().
|
static |
Definition at line 372 of file intrax8.c.
Referenced by ff_intrax8_decode_picture().
|
static |
Definition at line 441 of file intrax8.c.
Referenced by x8_decode_intra_mb().
|
static |
Definition at line 512 of file intrax8.c.
Referenced by x8_decode_intra_mb().
|
static |
Definition at line 533 of file intrax8.c.
Referenced by ff_intrax8_decode_picture().
|
static |
Definition at line 677 of file intrax8.c.
Referenced by ff_intrax8_decode_picture().
av_cold int ff_intrax8_common_init | ( | AVCodecContext * | avctx, |
IntraX8Context * | w, | ||
int16_t(*) | block[64], | ||
int | block_last_index[12], | ||
int | mb_width, | ||
int | mb_height | ||
) |
Initialize IntraX8 frame decoder.
avctx | pointer to AVCodecContext |
w | pointer to IntraX8Context |
block | pointer to block array |
block_last_index | pointer to index array |
mb_width | macroblock width |
mb_height | macroblock height |
Definition at line 694 of file intrax8.c.
Referenced by vc1_decode_init_alloc_tables(), and wmv2_decode_init().
av_cold void ff_intrax8_common_end | ( | IntraX8Context * | w | ) |
Destroy IntraX8 frame structure.
w | pointer to IntraX8Context |
Definition at line 733 of file intrax8.c.
Referenced by ff_vc1_decode_end(), and wmv2_decode_end().
int ff_intrax8_decode_picture | ( | IntraX8Context * | w, |
Picture * | pict, | ||
GetBitContext * | gb, | ||
int * | mb_x, | ||
int * | mb_y, | ||
int | quant, | ||
int | halfpq, | ||
int | loopfilter, | ||
int | lowdelay | ||
) |
Decode single IntraX8 frame.
lowres decoding is theoretically impossible.
w | pointer to IntraX8Context |
pict | the output Picture containing an AVFrame |
gb | open bitstream reader |
mb_x | pointer to the x coordinate of the current macroblock |
mb_y | pointer to the y coordinate of the current macroblock |
dquant | doubled quantizer, it would be odd in case of VC-1 halfpq==1. |
quant_offset | offset away from zero |
loopfilter | enable filter after decoding a block |
Definition at line 738 of file intrax8.c.
Referenced by ff_vc1_decode_blocks(), and ff_wmv2_decode_secondary_picture_header().
|
static |
Definition at line 48 of file intrax8.c.
Referenced by x8_select_ac_table(), and x8_vlc_init().
|
static |
Definition at line 49 of file intrax8.c.
Referenced by x8_get_dc_rlf(), and x8_vlc_init().
|
static |
Definition at line 50 of file intrax8.c.
Referenced by x8_get_orient_vlc(), and x8_vlc_init().
|
static |
Definition at line 130 of file intrax8.c.
Referenced by x8_get_ac_rlf().
|
static |
Definition at line 248 of file intrax8.c.
Referenced by x8_get_dc_rlf().
|
static |
Definition at line 522 of file intrax8.c.
Referenced by read_quant_table(), read_quant_tables(), write_quant_table(), write_quant_tables(), and x8_decode_intra_mb().