xine-lib 1.2.11
|
#include "config.h"
#include <inttypes.h>
#include "../include/mpeg2.h"
#include "../include/attributes.h"
#include "mpeg2_internal.h"
#include "vlc.h"
Macros | |
#define | bit_buf (decoder->bitstream_buf) |
#define | bits (decoder->bitstream_bits) |
#define | bit_ptr (decoder->bitstream_ptr) |
#define | bit_buf (decoder->bitstream_buf) |
#define | bits (decoder->bitstream_bits) |
#define | bit_ptr (decoder->bitstream_ptr) |
#define | bit_buf (decoder->bitstream_buf) |
#define | bits (decoder->bitstream_bits) |
#define | bit_ptr (decoder->bitstream_ptr) |
#define | bit_buf (decoder->bitstream_buf) |
#define | bits (decoder->bitstream_bits) |
#define | bit_ptr (decoder->bitstream_ptr) |
#define | bit_buf (decoder->bitstream_buf) |
#define | bits (decoder->bitstream_bits) |
#define | bit_ptr (decoder->bitstream_ptr) |
#define | bit_buf (decoder->bitstream_buf) |
#define | bits (decoder->bitstream_bits) |
#define | bit_ptr (decoder->bitstream_ptr) |
#define | bit_buf (decoder->bitstream_buf) |
#define | bits (decoder->bitstream_bits) |
#define | bit_ptr (decoder->bitstream_ptr) |
#define | SATURATE(val) |
#define | bit_buf (decoder->bitstream_buf) |
#define | bits (decoder->bitstream_bits) |
#define | bit_ptr (decoder->bitstream_ptr) |
#define | MOTION_420(table, ref, motion_x, motion_y, size, y) |
#define | MOTION_FIELD_420(table, ref, motion_x, motion_y, dest_field, op, src_field) |
#define | MOTION_DMV_420(table, ref, motion_x, motion_y) |
#define | MOTION_ZERO_420(table, ref) |
#define | MOTION_422(table, ref, motion_x, motion_y, size, y) |
#define | MOTION_FIELD_422(table, ref, motion_x, motion_y, dest_field, op, src_field) |
#define | MOTION_DMV_422(table, ref, motion_x, motion_y) |
#define | MOTION_ZERO_422(table, ref) |
#define | MOTION_444(table, ref, motion_x, motion_y, size, y) |
#define | MOTION_FIELD_444(table, ref, motion_x, motion_y, dest_field, op, src_field) |
#define | MOTION_DMV_444(table, ref, motion_x, motion_y) |
#define | MOTION_ZERO_444(table, ref) |
#define | bit_buf (decoder->bitstream_buf) |
#define | bits (decoder->bitstream_bits) |
#define | bit_ptr (decoder->bitstream_ptr) |
#define | MOTION_FUNCTIONS(FORMAT, MOTION, MOTION_FIELD, MOTION_DMV, MOTION_ZERO) |
#define | MOTION_CALL(routine, direction) |
#define | NEXT_MACROBLOCK |
#define | bit_buf (decoder->bitstream_buf) |
#define | bits (decoder->bitstream_bits) |
#define | bit_ptr (decoder->bitstream_ptr) |
#define | bit_buf (decoder->bitstream_buf) |
#define | bits (decoder->bitstream_bits) |
#define | bit_ptr (decoder->bitstream_ptr) |
Functions | |
static int | get_macroblock_modes (mpeg2_decoder_t *const decoder) |
static void | get_quantizer_scale (mpeg2_decoder_t *const decoder) |
static int | get_motion_delta (mpeg2_decoder_t *const decoder, const int f_code) |
static int | bound_motion_vector (const int vector, const int f_code) |
static int | get_dmv (mpeg2_decoder_t *const decoder) |
static int | get_coded_block_pattern (mpeg2_decoder_t *const decoder) |
static int | get_luma_dc_dct_diff (mpeg2_decoder_t *const decoder) |
static int | get_chroma_dc_dct_diff (mpeg2_decoder_t *const decoder) |
static void | get_intra_block_B14 (mpeg2_decoder_t *const decoder, const uint16_t *const quant_matrix) |
static void | get_intra_block_B15 (mpeg2_decoder_t *const decoder, const uint16_t *const quant_matrix) |
static int | get_non_intra_block (mpeg2_decoder_t *const decoder, const uint16_t *const quant_matrix) |
static void | get_mpeg1_intra_block (mpeg2_decoder_t *const decoder) |
static int | get_mpeg1_non_intra_block (mpeg2_decoder_t *const decoder) |
static void | slice_intra_DCT (mpeg2_decoder_t *const decoder, const int cc, uint8_t *const dest, const int stride) |
static void | slice_non_intra_DCT (mpeg2_decoder_t *const decoder, const int cc, uint8_t *const dest, const int stride) |
static void | motion_mp1 (mpeg2_decoder_t *const decoder, motion_t *const motion, mpeg2_mc_fct *const *const table) |
static void | motion_fr_frame_420 (mpeg2_decoder_t *const decoder, motion_t *const motion, mpeg2_mc_fct *const *const table) |
static void | motion_fr_field_420 (mpeg2_decoder_t *const decoder, motion_t *const motion, mpeg2_mc_fct *const *const table) |
static void | motion_fr_dmv_420 (mpeg2_decoder_t *const decoder, motion_t *const motion, mpeg2_mc_fct *const *const table) |
static void | motion_reuse_420 (mpeg2_decoder_t *const decoder, motion_t *const motion, mpeg2_mc_fct *const *const table) |
static void | motion_zero_420 (mpeg2_decoder_t *const decoder, motion_t *const motion, mpeg2_mc_fct *const *const table) |
static void | motion_fi_field_420 (mpeg2_decoder_t *const decoder, motion_t *const motion, mpeg2_mc_fct *const *const table) |
static void | motion_fi_16x8_420 (mpeg2_decoder_t *const decoder, motion_t *const motion, mpeg2_mc_fct *const *const table) |
static void | motion_fi_dmv_420 (mpeg2_decoder_t *const decoder, motion_t *const motion, mpeg2_mc_fct *const *const table) |
static void | motion_fr_frame_422 (mpeg2_decoder_t *const decoder, motion_t *const motion, mpeg2_mc_fct *const *const table) |
static void | motion_fr_field_422 (mpeg2_decoder_t *const decoder, motion_t *const motion, mpeg2_mc_fct *const *const table) |
static void | motion_fr_dmv_422 (mpeg2_decoder_t *const decoder, motion_t *const motion, mpeg2_mc_fct *const *const table) |
static void | motion_reuse_422 (mpeg2_decoder_t *const decoder, motion_t *const motion, mpeg2_mc_fct *const *const table) |
static void | motion_zero_422 (mpeg2_decoder_t *const decoder, motion_t *const motion, mpeg2_mc_fct *const *const table) |
static void | motion_fi_field_422 (mpeg2_decoder_t *const decoder, motion_t *const motion, mpeg2_mc_fct *const *const table) |
static void | motion_fi_16x8_422 (mpeg2_decoder_t *const decoder, motion_t *const motion, mpeg2_mc_fct *const *const table) |
static void | motion_fi_dmv_422 (mpeg2_decoder_t *const decoder, motion_t *const motion, mpeg2_mc_fct *const *const table) |
static void | motion_fr_frame_444 (mpeg2_decoder_t *const decoder, motion_t *const motion, mpeg2_mc_fct *const *const table) |
static void | motion_fr_field_444 (mpeg2_decoder_t *const decoder, motion_t *const motion, mpeg2_mc_fct *const *const table) |
static void | motion_fr_dmv_444 (mpeg2_decoder_t *const decoder, motion_t *const motion, mpeg2_mc_fct *const *const table) |
static void | motion_reuse_444 (mpeg2_decoder_t *const decoder, motion_t *const motion, mpeg2_mc_fct *const *const table) |
static void | motion_zero_444 (mpeg2_decoder_t *const decoder, motion_t *const motion, mpeg2_mc_fct *const *const table) |
static void | motion_fi_field_444 (mpeg2_decoder_t *const decoder, motion_t *const motion, mpeg2_mc_fct *const *const table) |
static void | motion_fi_16x8_444 (mpeg2_decoder_t *const decoder, motion_t *const motion, mpeg2_mc_fct *const *const table) |
static void | motion_fi_dmv_444 (mpeg2_decoder_t *const decoder, motion_t *const motion, mpeg2_mc_fct *const *const table) |
static void | motion_fr_conceal (mpeg2_decoder_t *const decoder) |
static void | motion_fi_conceal (mpeg2_decoder_t *const decoder) |
void | mpeg2_init_fbuf (mpeg2_decoder_t *decoder, uint8_t *current_fbuf[3], uint8_t *forward_fbuf[3], uint8_t *backward_fbuf[3]) |
static int | slice_init (mpeg2_decoder_t *const decoder, int code) |
void | mpeg2_slice (mpeg2_decoder_t *const decoder, const int code, const uint8_t *const buffer) |
Variables | |
mpeg2_mc_t | mpeg2_mc |
void(* | mpeg2_idct_copy )(int16_t *block, uint8_t *dest, int stride) |
void(* | mpeg2_idct_add )(int last, int16_t *block, uint8_t *dest, int stride) |
void(* | mpeg2_cpu_state_save )(cpu_state_t *state) |
void(* | mpeg2_cpu_state_restore )(cpu_state_t *state) |
#define bit_buf (decoder->bitstream_buf) |
#define bit_buf (decoder->bitstream_buf) |
#define bit_buf (decoder->bitstream_buf) |
#define bit_buf (decoder->bitstream_buf) |
#define bit_buf (decoder->bitstream_buf) |
#define bit_buf (decoder->bitstream_buf) |
#define bit_buf (decoder->bitstream_buf) |
#define bit_buf (decoder->bitstream_buf) |
#define bit_buf (decoder->bitstream_buf) |
#define bit_buf (decoder->bitstream_buf) |
#define bit_buf (decoder->bitstream_buf) |
#define bit_ptr (decoder->bitstream_ptr) |
#define bit_ptr (decoder->bitstream_ptr) |
#define bit_ptr (decoder->bitstream_ptr) |
#define bit_ptr (decoder->bitstream_ptr) |
#define bit_ptr (decoder->bitstream_ptr) |
#define bit_ptr (decoder->bitstream_ptr) |
#define bit_ptr (decoder->bitstream_ptr) |
#define bit_ptr (decoder->bitstream_ptr) |
#define bit_ptr (decoder->bitstream_ptr) |
#define bit_ptr (decoder->bitstream_ptr) |
#define bit_ptr (decoder->bitstream_ptr) |
#define bits (decoder->bitstream_bits) |
#define bits (decoder->bitstream_bits) |
#define bits (decoder->bitstream_bits) |
#define bits (decoder->bitstream_bits) |
#define bits (decoder->bitstream_bits) |
#define bits (decoder->bitstream_bits) |
#define bits (decoder->bitstream_bits) |
#define bits (decoder->bitstream_bits) |
#define bits (decoder->bitstream_bits) |
#define bits (decoder->bitstream_bits) |
#define bits (decoder->bitstream_bits) |
#define MOTION_420 | ( | table, | |
ref, | |||
motion_x, | |||
motion_y, | |||
size, | |||
y | |||
) |
#define MOTION_422 | ( | table, | |
ref, | |||
motion_x, | |||
motion_y, | |||
size, | |||
y | |||
) |
#define MOTION_444 | ( | table, | |
ref, | |||
motion_x, | |||
motion_y, | |||
size, | |||
y | |||
) |
#define MOTION_CALL | ( | routine, | |
direction | |||
) |
#define MOTION_DMV_420 | ( | table, | |
ref, | |||
motion_x, | |||
motion_y | |||
) |
#define MOTION_DMV_422 | ( | table, | |
ref, | |||
motion_x, | |||
motion_y | |||
) |
#define MOTION_DMV_444 | ( | table, | |
ref, | |||
motion_x, | |||
motion_y | |||
) |
#define MOTION_FIELD_420 | ( | table, | |
ref, | |||
motion_x, | |||
motion_y, | |||
dest_field, | |||
op, | |||
src_field | |||
) |
#define MOTION_FIELD_422 | ( | table, | |
ref, | |||
motion_x, | |||
motion_y, | |||
dest_field, | |||
op, | |||
src_field | |||
) |
#define MOTION_FIELD_444 | ( | table, | |
ref, | |||
motion_x, | |||
motion_y, | |||
dest_field, | |||
op, | |||
src_field | |||
) |
#define MOTION_FUNCTIONS | ( | FORMAT, | |
MOTION, | |||
MOTION_FIELD, | |||
MOTION_DMV, | |||
MOTION_ZERO | |||
) |
#define MOTION_ZERO_420 | ( | table, | |
ref | |||
) |
#define MOTION_ZERO_422 | ( | table, | |
ref | |||
) |
#define MOTION_ZERO_444 | ( | table, | |
ref | |||
) |
#define NEXT_MACROBLOCK |
#define SATURATE | ( | val | ) |
|
inlinestatic |
Referenced by motion_fr_conceal(), and motion_mp1().
|
inlinestatic |
References bit_buf, bit_ptr, bits, DC_chrom_5, DC_long, DUMPBITS, mpeg2_decoder_s::intra_dc_precision, DCtab::len, NEEDBITS, SBITS, DCtab::size, and UBITS.
Referenced by slice_intra_DCT().
|
inlinestatic |
References bit_buf, bit_ptr, bits, CBPtab::cbp, CBP_7, CBP_9, DUMPBITS, CBPtab::len, NEEDBITS, and UBITS.
|
inlinestatic |
References bit_buf, bits, DMVtab::dmv, DMV_2, DUMPBITS, DMVtab::len, and UBITS.
|
static |
References bit_buf, bit_ptr, bits, mpeg2_decoder_s::bitstream_bits, mpeg2_decoder_s::bitstream_buf, mpeg2_decoder_s::bitstream_ptr, DCT_13, DCT_15, DCT_16, DCT_B14_10, DCT_B14_8, DCT_B14AC_5, mpeg2_decoder_s::DCTblock, DUMPBITS, GETWORD, DCTtab::len, DCTtab::level, NEEDBITS, DCTtab::run, SATURATE, SBITS, mpeg2_decoder_s::scan, and UBITS.
Referenced by slice_intra_DCT().
|
static |
References bit_buf, bit_ptr, bits, mpeg2_decoder_s::bitstream_bits, mpeg2_decoder_s::bitstream_buf, mpeg2_decoder_s::bitstream_ptr, DCT_13, DCT_15, DCT_16, DCT_B15_10, DCT_B15_8, mpeg2_decoder_s::DCTblock, DUMPBITS, GETWORD, DCTtab::len, DCTtab::level, NEEDBITS, DCTtab::run, SATURATE, SBITS, mpeg2_decoder_s::scan, and UBITS.
Referenced by slice_intra_DCT().
|
inlinestatic |
References bit_buf, bit_ptr, bits, DC_long, DC_lum_5, DUMPBITS, mpeg2_decoder_s::intra_dc_precision, DCtab::len, NEEDBITS, SBITS, DCtab::size, and UBITS.
Referenced by slice_intra_DCT().
|
inlinestatic |
References B_TYPE, bit_buf, bits, mpeg2_decoder_s::coding_type, D_TYPE, DCT_TYPE_INTERLACED, DUMPBITS, FRAME_PICTURE, mpeg2_decoder_s::frame_pred_frame_dct, I_TYPE, MBtab::len, MACROBLOCK_INTRA, MACROBLOCK_MOTION_FORWARD, MACROBLOCK_PATTERN, MB_B, MB_I, MB_P, MC_FRAME, MBtab::modes, MOTION_TYPE_SHIFT, P_TYPE, mpeg2_decoder_s::picture_structure, and UBITS.
|
inlinestatic |
References bit_buf, bit_ptr, bits, MVtab::delta, DUMPBITS, MVtab::len, MV_10, MV_4, NEEDBITS, SBITS, and UBITS.
Referenced by motion_fr_conceal(), and motion_mp1().
|
static |
References bit_buf, bit_ptr, bits, mpeg2_decoder_s::bitstream_bits, mpeg2_decoder_s::bitstream_buf, mpeg2_decoder_s::bitstream_ptr, DCT_13, DCT_15, DCT_16, DCT_B14_10, DCT_B14_8, DCT_B14AC_5, mpeg2_decoder_s::DCTblock, DUMPBITS, GETWORD, DCTtab::len, DCTtab::level, NEEDBITS, mpeg2_decoder_s::quantizer_matrix, DCTtab::run, SATURATE, SBITS, mpeg2_decoder_s::scan, and UBITS.
Referenced by slice_intra_DCT().
|
static |
References bit_buf, bit_ptr, bits, mpeg2_decoder_s::bitstream_bits, mpeg2_decoder_s::bitstream_buf, mpeg2_decoder_s::bitstream_ptr, DCT_13, DCT_15, DCT_16, DCT_B14_10, DCT_B14_8, DCT_B14AC_5, DCT_B14DC_5, mpeg2_decoder_s::DCTblock, DUMPBITS, GETWORD, DCTtab::len, DCTtab::level, NEEDBITS, mpeg2_decoder_s::quantizer_matrix, DCTtab::run, SATURATE, SBITS, mpeg2_decoder_s::scan, and UBITS.
Referenced by slice_non_intra_DCT().
|
static |
References bit_buf, bit_ptr, bits, mpeg2_decoder_s::bitstream_bits, mpeg2_decoder_s::bitstream_buf, mpeg2_decoder_s::bitstream_ptr, DCT_13, DCT_15, DCT_16, DCT_B14_10, DCT_B14_8, DCT_B14AC_5, DCT_B14DC_5, mpeg2_decoder_s::DCTblock, DUMPBITS, GETWORD, DCTtab::len, DCTtab::level, NEEDBITS, DCTtab::run, SATURATE, SBITS, mpeg2_decoder_s::scan, and UBITS.
Referenced by slice_non_intra_DCT().
|
inlinestatic |
|
static |
Referenced by mpeg2_init_fbuf().
|
static |
Referenced by mpeg2_init_fbuf().
|
static |
Referenced by mpeg2_init_fbuf().
|
static |
|
static |
Referenced by mpeg2_init_fbuf().
|
static |
Referenced by mpeg2_init_fbuf().
|
static |
Referenced by mpeg2_init_fbuf().
|
static |
Referenced by mpeg2_init_fbuf().
|
static |
Referenced by mpeg2_init_fbuf().
|
static |
Referenced by mpeg2_init_fbuf().
|
static |
References bit_buf, bit_ptr, bits, bound_motion_vector(), get_motion_delta(), and NEEDBITS.
|
static |
Referenced by mpeg2_init_fbuf().
|
static |
Referenced by mpeg2_init_fbuf().
|
static |
Referenced by mpeg2_init_fbuf().
|
static |
Referenced by mpeg2_init_fbuf().
|
static |
Referenced by mpeg2_init_fbuf().
|
static |
Referenced by mpeg2_init_fbuf().
|
static |
Referenced by mpeg2_init_fbuf().
|
static |
Referenced by mpeg2_init_fbuf().
|
static |
Referenced by mpeg2_init_fbuf().
|
static |
References bit_buf, bit_ptr, bits, bound_motion_vector(), motion_t::f_code, get_motion_delta(), MOTION_420, NEEDBITS, motion_t::pmv, and motion_t::ref.
Referenced by mpeg2_init_fbuf().
|
static |
Referenced by mpeg2_init_fbuf().
|
static |
Referenced by mpeg2_init_fbuf().
|
static |
Referenced by mpeg2_init_fbuf().
|
static |
Referenced by mpeg2_init_fbuf().
|
static |
Referenced by mpeg2_init_fbuf().
|
static |
Referenced by mpeg2_init_fbuf().
void mpeg2_init_fbuf | ( | mpeg2_decoder_t * | decoder, |
uint8_t * | current_fbuf[3], | ||
uint8_t * | forward_fbuf[3], | ||
uint8_t * | backward_fbuf[3] | ||
) |
References mpeg2_decoder_s::b_motion, B_TYPE, BOTTOM_FIELD, mpeg2_decoder_s::chroma_format, mpeg2_decoder_s::coding_type, mpeg2_decoder_s::dmv_offset, mpeg2_decoder_s::f_motion, FRAME_PICTURE, height, mpeg2_decoder_s::height, mpeg2_decoder_s::limit_x, mpeg2_decoder_s::limit_y, mpeg2_decoder_s::limit_y_16, mpeg2_decoder_s::limit_y_8, MC_16X8, MC_DMV, MC_FIELD, MC_FRAME, motion_fi_16x8_420(), motion_fi_16x8_422(), motion_fi_16x8_444(), motion_fi_dmv_420(), motion_fi_dmv_422(), motion_fi_dmv_444(), motion_fi_field_420(), motion_fi_field_422(), motion_fi_field_444(), motion_fr_dmv_420(), motion_fr_dmv_422(), motion_fr_dmv_444(), motion_fr_field_420(), motion_fr_field_422(), motion_fr_field_444(), motion_fr_frame_420(), motion_fr_frame_422(), motion_fr_frame_444(), motion_mp1(), mpeg2_decoder_s::motion_parser, motion_reuse_420(), motion_reuse_422(), motion_reuse_444(), motion_zero_420(), motion_zero_422(), motion_zero_444(), mpeg2_decoder_s::mpeg1, mpeg2_decoder_s::picture_dest, mpeg2_decoder_s::picture_structure, motion_t::ref, motion_t::ref2, mpeg2_decoder_s::second_field, mpeg2_decoder_s::slice_stride, mpeg2_decoder_s::slice_uv_stride, mpeg2_decoder_s::stride, mpeg2_decoder_s::stride_frame, mpeg2_decoder_s::uv_stride, and mpeg2_decoder_s::width.
Referenced by mpeg2_header_slice_start().
void mpeg2_slice | ( | mpeg2_decoder_t *const | decoder, |
const int | code, | ||
const uint8_t *const | buffer | ||
) |
|
inlinestatic |
|
inlinestatic |
References bit_buf, bit_ptr, bits, mpeg2_decoder_s::coding_type, D_TYPE, mpeg2_decoder_s::dc_dct_pred, mpeg2_decoder_s::DCTblock, get_chroma_dc_dct_diff(), get_intra_block_B14(), get_intra_block_B15(), get_luma_dc_dct_diff(), get_mpeg1_intra_block(), mpeg2_decoder_s::intra_vlc_format, mpeg2_decoder_s::mpeg1, mpeg2_idct_copy, NEEDBITS, and mpeg2_decoder_s::quantizer_matrix.
|
inlinestatic |
|
extern |
Referenced by mpeg2_cpu_state_init(), mpeg2_slice(), and mpeg2_xvmc_slice().
|
extern |
Referenced by mpeg2_cpu_state_init(), mpeg2_slice(), and mpeg2_xvmc_slice().
|
extern |
Referenced by slice_non_intra_DCT().
|
extern |
Referenced by mpeg2_idct_init(), and slice_intra_DCT().
|
extern |
Referenced by motion_fi_dmv(), motion_fr_dmv(), mpeg2_mc_init(), and mpeg2_xvmc_slice().