#include "avcodec.h"
#include "get_bits.h"
#include "mpegvideo.h"
#include "msmpeg4data.h"
#include "intrax8huf.h"
#include "intrax8.h"
Go to the source code of this file.
Defines | |
#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 | init_ac_vlc(dst, src) |
#define | init_dc_vlc(dst, src) |
#define | init_or_vlc(dst, src) |
#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) s->block[0][s->dsp.idct_permutation[(x)+(y)*8]] |
#define | T(x) ((x) * dc_level + 0x8000) >> 16; |
Functions | |
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, int const 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, int const direction, int const dc_level) |
static void | dsp_x8_put_solidcolor (uint8_t const pix, uint8_t *dst, int const linesize) |
static int | x8_decode_intra_mb (IntraX8Context *const w, const int chroma) |
static void | x8_init_block_index (MpegEncContext *s) |
av_cold void | ff_intrax8_common_init (IntraX8Context *w, MpegEncContext *const s) |
Initialize IntraX8 frame decoder. | |
av_cold void | ff_intrax8_common_end (IntraX8Context *w) |
Destroy IntraX8 frame structure. | |
int | ff_intrax8_decode_picture (IntraX8Context *const w, int dquant, int quant_offset) |
Decode single IntraX8 frame. | |
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 [] = { 0, 1,2, 3,4, 5,7, 9,13, 17,25, 33,49, 65,97, 129,193} |
static const int16_t | quant_table [64] |
Definition in file intrax8.c.
#define AC_VLC_BITS 9 |
Definition at line 34 of file intrax8.c.
Referenced by vc1_decode_ac_coeff(), vc1_init_common(), and x8_get_ac_rlf().
#define AC_VLC_MTD MAX_TABLE_DEPTH(AC_VLC_BITS, MAX_AC_VLC_BITS) |
#define B | ( | x, | |||
y | ) | s->block[0][s->dsp.idct_permutation[(x)+(y)*8]] |
#define DC_VLC_BITS 9 |
Definition at line 33 of file intrax8.c.
Referenced by decode_dc(), decode_init(), ff_mpeg12_init_vlcs(), ff_msmpeg4_decode_init(), mpeg4_decode_dc(), msmpeg4_decode_dc(), rv10_decode_init(), rv_decode_dc(), vc1_decode_i_block(), vc1_decode_i_block_adv(), vc1_decode_intra_block(), and x8_get_dc_rlf().
#define DC_VLC_MTD MAX_TABLE_DEPTH(DC_VLC_BITS, MAX_DC_VLC_BITS) |
Value:
dst.table = &table[offset]; \ dst.table_allocated = sizes[sizeidx]; \ offset += sizes[sizeidx++]; \ init_vlc(&dst, \ AC_VLC_BITS,77, \ &src[1],4,2, \ &src[0],4,2, \ INIT_VLC_USE_NEW_STATIC)
Referenced by x8_vlc_init().
Value:
dst.table = &table[offset]; \ dst.table_allocated = sizes[sizeidx]; \ offset += sizes[sizeidx++]; \ init_vlc(&dst, \ DC_VLC_BITS,34, \ &src[1],4,2, \ &src[0],4,2, \ INIT_VLC_USE_NEW_STATIC);
Referenced by x8_vlc_init().
Value:
dst.table = &table[offset]; \ dst.table_allocated = sizes[sizeidx]; \ offset += sizes[sizeidx++]; \ init_vlc(&dst, \ OR_VLC_BITS,12, \ &src[1],4,2, \ &src[0],4,2, \ INIT_VLC_USE_NEW_STATIC);
Referenced by x8_vlc_init().
#define MAX_TABLE_DEPTH | ( | table_bits, | |||
max_bits | ) | ((max_bits+table_bits-1)/table_bits) |
#define OR_VLC_BITS 7 |
#define OR_VLC_MTD MAX_TABLE_DEPTH(OR_VLC_BITS, MAX_OR_VLC_BITS) |
#define T | ( | x | ) | ((x) * dc_level + 0x8000) >> 16; |
static void dsp_x8_put_solidcolor | ( | uint8_t const | pix, | |
uint8_t * | dst, | |||
int const | linesize | |||
) | [static] |
av_cold void ff_intrax8_common_end | ( | IntraX8Context * | w | ) |
Destroy IntraX8 frame structure.
w | pointer to IntraX8Context |
Definition at line 708 of file intrax8.c.
Referenced by vc1_decode_end(), and wmv2_decode_end().
av_cold void ff_intrax8_common_init | ( | IntraX8Context * | w, | |
MpegEncContext *const | s | |||
) |
Initialize IntraX8 frame decoder.
Requires valid MpegEncContext with valid s->mb_width before calling.
w | pointer to IntraX8Context | |
s | pointer to MpegEncContext of the parent codec |
Definition at line 692 of file intrax8.c.
Referenced by vc1_decode_init(), and wmv2_decode_init().
int ff_intrax8_decode_picture | ( | IntraX8Context *const | w, | |
int | dquant, | |||
int | quant_offset | |||
) |
Decode single IntraX8 frame.
The parent codec must fill s->loopfilter and s->gb (bitstream). The parent codec must call MPV_frame_start(), ff_er_frame_start() before calling this function. The parent codec must call ff_er_frame_end(), MPV_frame_end() after calling this function. This function does not use MPV_decode_mb(). lowres decoding is theoretically impossible.
w | pointer to IntraX8Context | |
dquant | doubled quantizer, it would be odd in case of VC-1 halfpq==1. | |
quant_offset | offset away from zero |
Definition at line 725 of file intrax8.c.
Referenced by ff_wmv2_decode_secondary_picture_header(), and vc1_decode_blocks().
static void x8_ac_compensation | ( | IntraX8Context *const | w, | |
int const | direction, | |||
int const | dc_level | |||
) | [static] |
static int x8_decode_intra_mb | ( | IntraX8Context *const | w, | |
const int | chroma | |||
) | [static] |
static void x8_get_ac_rlf | ( | IntraX8Context *const | w, | |
const int | mode, | |||
int *const | run, | |||
int *const | level, | |||
int *const | final | |||
) | [static] |
static int x8_get_dc_rlf | ( | IntraX8Context *const | w, | |
int const | mode, | |||
int *const | level, | |||
int *const | final | |||
) | [static] |
static int x8_get_orient_vlc | ( | IntraX8Context * | w | ) | [inline, static] |
static void x8_get_prediction | ( | IntraX8Context *const | w | ) | [static] |
static void x8_get_prediction_chroma | ( | IntraX8Context *const | w | ) | [static] |
static void x8_init_block_index | ( | MpegEncContext * | s | ) | [static] |
static void x8_reset_vlc_tables | ( | IntraX8Context * | w | ) | [static] |
static void x8_select_ac_table | ( | IntraX8Context *const | w, | |
int | mode | |||
) | [inline, static] |
static int x8_setup_spatial_predictor | ( | IntraX8Context *const | w, | |
const int | chroma | |||
) | [static] |
static void x8_update_predictions | ( | IntraX8Context *const | w, | |
const int | orient, | |||
const int | est_run | |||
) | [static] |
static av_cold void x8_vlc_init | ( | void | ) | [static] |
const uint32_t ac_decode_table[] [static] |
const uint8_t dc_index_offset[] = { 0, 1,2, 3,4, 5,7, 9,13, 17,25, 33,49, 65,97, 129,193} [static] |
VLC j_orient_vlc[2][4] [static] |
const int16_t quant_table[64] [static] |
Initial value:
{ 256, 256, 256, 256, 256, 256, 259, 262, 265, 269, 272, 275, 278, 282, 285, 288, 292, 295, 299, 303, 306, 310, 314, 317, 321, 325, 329, 333, 337, 341, 345, 349, 353, 358, 362, 366, 371, 375, 379, 384, 389, 393, 398, 403, 408, 413, 417, 422, 428, 433, 438, 443, 448, 454, 459, 465, 470, 476, 482, 488, 493, 499, 505, 511 }
Definition at line 516 of file intrax8.c.
Referenced by x8_decode_intra_mb().