xine-lib 1.2.11
Macros | Functions | Variables
slice.c File Reference
#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)
 

Macro Definition Documentation

◆ bit_buf [1/11]

#define bit_buf   (decoder->bitstream_buf)

◆ bit_buf [2/11]

#define bit_buf   (decoder->bitstream_buf)

◆ bit_buf [3/11]

#define bit_buf   (decoder->bitstream_buf)

◆ bit_buf [4/11]

#define bit_buf   (decoder->bitstream_buf)

◆ bit_buf [5/11]

#define bit_buf   (decoder->bitstream_buf)

◆ bit_buf [6/11]

#define bit_buf   (decoder->bitstream_buf)

◆ bit_buf [7/11]

#define bit_buf   (decoder->bitstream_buf)

◆ bit_buf [8/11]

#define bit_buf   (decoder->bitstream_buf)

◆ bit_buf [9/11]

#define bit_buf   (decoder->bitstream_buf)

◆ bit_buf [10/11]

#define bit_buf   (decoder->bitstream_buf)

◆ bit_buf [11/11]

#define bit_buf   (decoder->bitstream_buf)

◆ bit_ptr [1/11]

#define bit_ptr   (decoder->bitstream_ptr)

◆ bit_ptr [2/11]

#define bit_ptr   (decoder->bitstream_ptr)

◆ bit_ptr [3/11]

#define bit_ptr   (decoder->bitstream_ptr)

◆ bit_ptr [4/11]

#define bit_ptr   (decoder->bitstream_ptr)

◆ bit_ptr [5/11]

#define bit_ptr   (decoder->bitstream_ptr)

◆ bit_ptr [6/11]

#define bit_ptr   (decoder->bitstream_ptr)

◆ bit_ptr [7/11]

#define bit_ptr   (decoder->bitstream_ptr)

◆ bit_ptr [8/11]

#define bit_ptr   (decoder->bitstream_ptr)

◆ bit_ptr [9/11]

#define bit_ptr   (decoder->bitstream_ptr)

◆ bit_ptr [10/11]

#define bit_ptr   (decoder->bitstream_ptr)

◆ bit_ptr [11/11]

#define bit_ptr   (decoder->bitstream_ptr)

◆ bits [1/11]

#define bits   (decoder->bitstream_bits)

◆ bits [2/11]

#define bits   (decoder->bitstream_bits)

◆ bits [3/11]

#define bits   (decoder->bitstream_bits)

◆ bits [4/11]

#define bits   (decoder->bitstream_bits)

◆ bits [5/11]

#define bits   (decoder->bitstream_bits)

◆ bits [6/11]

#define bits   (decoder->bitstream_bits)

◆ bits [7/11]

#define bits   (decoder->bitstream_bits)

◆ bits [8/11]

#define bits   (decoder->bitstream_bits)

◆ bits [9/11]

#define bits   (decoder->bitstream_bits)

◆ bits [10/11]

#define bits   (decoder->bitstream_bits)

◆ bits [11/11]

#define bits   (decoder->bitstream_bits)

◆ MOTION_420

#define MOTION_420 (   table,
  ref,
  motion_x,
  motion_y,
  size,
 
)
Value:
pos_x = 2 * decoder->offset + motion_x; \
pos_y = 2 * decoder->v_offset + motion_y + 2 * y; \
if (unlikely (pos_x > decoder->limit_x)) { \
pos_x = ((int)pos_x < 0) ? 0 : decoder->limit_x; \
motion_x = pos_x - 2 * decoder->offset; \
} \
if (unlikely (pos_y > decoder->limit_y_ ## size)) { \
pos_y = ((int)pos_y < 0) ? 0 : decoder->limit_y_ ## size; \
motion_y = pos_y - 2 * decoder->v_offset - 2 * y; \
} \
xy_half = ((pos_y & 1) << 1) | (pos_x & 1); \
table[xy_half] (decoder->dest[0] + y * decoder->stride + decoder->offset, \
ref[0] + (pos_x >> 1) + (pos_y >> 1) * decoder->stride, \
decoder->stride, size); \
motion_x /= 2; motion_y /= 2; \
xy_half = ((motion_y & 1) << 1) | (motion_x & 1); \
offset = (((decoder->offset + motion_x) >> 1) + \
((((decoder->v_offset + motion_y) >> 1) + y/2) * \
decoder->uv_stride)); \
table[4+xy_half] (decoder->dest[1] + y/2 * decoder->uv_stride + \
(decoder->offset >> 1), ref[1] + offset, \
decoder->uv_stride, size/2); \
table[4+xy_half] (decoder->dest[2] + y/2 * decoder->uv_stride + \
(decoder->offset >> 1), ref[2] + offset, \
decoder->uv_stride, size/2)
#define unlikely(x)
Definition: attributes.h:32

◆ MOTION_422

#define MOTION_422 (   table,
  ref,
  motion_x,
  motion_y,
  size,
 
)
Value:
pos_x = 2 * decoder->offset + motion_x; \
pos_y = 2 * decoder->v_offset + motion_y + 2 * y; \
if (unlikely (pos_x > decoder->limit_x)) { \
pos_x = ((int)pos_x < 0) ? 0 : decoder->limit_x; \
motion_x = pos_x - 2 * decoder->offset; \
} \
if (unlikely (pos_y > decoder->limit_y_ ## size)) { \
pos_y = ((int)pos_y < 0) ? 0 : decoder->limit_y_ ## size; \
motion_y = pos_y - 2 * decoder->v_offset - 2 * y; \
} \
xy_half = ((pos_y & 1) << 1) | (pos_x & 1); \
offset = (pos_x >> 1) + (pos_y >> 1) * decoder->stride; \
table[xy_half] (decoder->dest[0] + y * decoder->stride + decoder->offset, \
ref[0] + offset, decoder->stride, size); \
offset = (offset + (motion_x & (motion_x < 0))) >> 1; \
motion_x /= 2; \
xy_half = ((pos_y & 1) << 1) | (motion_x & 1); \
table[4+xy_half] (decoder->dest[1] + y * decoder->uv_stride + \
(decoder->offset >> 1), ref[1] + offset, \
decoder->uv_stride, size); \
table[4+xy_half] (decoder->dest[2] + y * decoder->uv_stride + \
(decoder->offset >> 1), ref[2] + offset, \
decoder->uv_stride, size)

◆ MOTION_444

#define MOTION_444 (   table,
  ref,
  motion_x,
  motion_y,
  size,
 
)
Value:
pos_x = 2 * decoder->offset + motion_x; \
pos_y = 2 * decoder->v_offset + motion_y + 2 * y; \
if (unlikely (pos_x > decoder->limit_x)) { \
pos_x = ((int)pos_x < 0) ? 0 : decoder->limit_x; \
motion_x = pos_x - 2 * decoder->offset; \
} \
if (unlikely (pos_y > decoder->limit_y_ ## size)) { \
pos_y = ((int)pos_y < 0) ? 0 : decoder->limit_y_ ## size; \
motion_y = pos_y - 2 * decoder->v_offset - 2 * y; \
} \
xy_half = ((pos_y & 1) << 1) | (pos_x & 1); \
offset = (pos_x >> 1) + (pos_y >> 1) * decoder->stride; \
table[xy_half] (decoder->dest[0] + y * decoder->stride + decoder->offset, \
ref[0] + offset, decoder->stride, size); \
table[xy_half] (decoder->dest[1] + y * decoder->stride + decoder->offset, \
ref[1] + offset, decoder->stride, size); \
table[xy_half] (decoder->dest[2] + y * decoder->stride + decoder->offset, \
ref[2] + offset, decoder->stride, size)

◆ MOTION_CALL

#define MOTION_CALL (   routine,
  direction 
)
Value:
do { \
if ((direction) & MACROBLOCK_MOTION_FORWARD) \
routine (decoder, &(decoder->f_motion), mpeg2_mc.put); \
if ((direction) & MACROBLOCK_MOTION_BACKWARD) \
routine (decoder, &(decoder->b_motion), \
((direction) & MACROBLOCK_MOTION_FORWARD ? \
} while (0)
#define MACROBLOCK_MOTION_BACKWARD
Definition: mpeg2_internal.h:37
#define MACROBLOCK_MOTION_FORWARD
Definition: mpeg2_internal.h:38
mpeg2_mc_t mpeg2_mc
Definition: motion_comp.c:32
mpeg2_mc_fct * avg[8]
Definition: mpeg2_internal.h:286
mpeg2_mc_fct * put[8]
Definition: mpeg2_internal.h:285

◆ MOTION_DMV_420

#define MOTION_DMV_420 (   table,
  ref,
  motion_x,
  motion_y 
)

◆ MOTION_DMV_422

#define MOTION_DMV_422 (   table,
  ref,
  motion_x,
  motion_y 
)

◆ MOTION_DMV_444

#define MOTION_DMV_444 (   table,
  ref,
  motion_x,
  motion_y 
)
Value:
pos_x = 2 * decoder->offset + motion_x; \
pos_y = decoder->v_offset + motion_y; \
if (unlikely (pos_x > decoder->limit_x)) { \
pos_x = ((int)pos_x < 0) ? 0 : decoder->limit_x; \
motion_x = pos_x - 2 * decoder->offset; \
} \
if (unlikely (pos_y > decoder->limit_y)) { \
pos_y = ((int)pos_y < 0) ? 0 : decoder->limit_y; \
motion_y = pos_y - decoder->v_offset; \
} \
xy_half = ((pos_y & 1) << 1) | (pos_x & 1); \
offset = (pos_x >> 1) + (pos_y & ~1) * decoder->stride; \
table[xy_half] (decoder->dest[0] + decoder->offset, \
ref[0] + offset, 2 * decoder->stride, 8); \
table[xy_half] (decoder->dest[0] + decoder->stride + decoder->offset, \
ref[0] + decoder->stride + offset, \
2 * decoder->stride, 8); \
table[xy_half] (decoder->dest[1] + decoder->offset, \
ref[1] + offset, 2 * decoder->stride, 8); \
table[xy_half] (decoder->dest[1] + decoder->stride + decoder->offset, \
ref[1] + decoder->stride + offset, \
2 * decoder->stride, 8); \
table[xy_half] (decoder->dest[2] + decoder->offset, \
ref[2] + offset, 2 * decoder->stride, 8); \
table[xy_half] (decoder->dest[2] + decoder->stride + decoder->offset, \
ref[2] + decoder->stride + offset, \
2 * decoder->stride, 8)

◆ MOTION_FIELD_420

#define MOTION_FIELD_420 (   table,
  ref,
  motion_x,
  motion_y,
  dest_field,
  op,
  src_field 
)
Value:
pos_x = 2 * decoder->offset + motion_x; \
pos_y = decoder->v_offset + motion_y; \
if (unlikely (pos_x > decoder->limit_x)) { \
pos_x = ((int)pos_x < 0) ? 0 : decoder->limit_x; \
motion_x = pos_x - 2 * decoder->offset; \
} \
if (unlikely (pos_y > decoder->limit_y)) { \
pos_y = ((int)pos_y < 0) ? 0 : decoder->limit_y; \
motion_y = pos_y - decoder->v_offset; \
} \
xy_half = ((pos_y & 1) << 1) | (pos_x & 1); \
table[xy_half] (decoder->dest[0] + dest_field * decoder->stride + \
decoder->offset, \
(ref[0] + (pos_x >> 1) + \
((pos_y op) + src_field) * decoder->stride), \
2 * decoder->stride, 8); \
motion_x /= 2; motion_y /= 2; \
xy_half = ((motion_y & 1) << 1) | (motion_x & 1); \
offset = (((decoder->offset + motion_x) >> 1) + \
(((decoder->v_offset >> 1) + (motion_y op) + src_field) * \
decoder->uv_stride)); \
table[4+xy_half] (decoder->dest[1] + dest_field * decoder->uv_stride + \
(decoder->offset >> 1), ref[1] + offset, \
2 * decoder->uv_stride, 4); \
table[4+xy_half] (decoder->dest[2] + dest_field * decoder->uv_stride + \
(decoder->offset >> 1), ref[2] + offset, \
2 * decoder->uv_stride, 4)

◆ MOTION_FIELD_422

#define MOTION_FIELD_422 (   table,
  ref,
  motion_x,
  motion_y,
  dest_field,
  op,
  src_field 
)
Value:
pos_x = 2 * decoder->offset + motion_x; \
pos_y = decoder->v_offset + motion_y; \
if (unlikely (pos_x > decoder->limit_x)) { \
pos_x = ((int)pos_x < 0) ? 0 : decoder->limit_x; \
motion_x = pos_x - 2 * decoder->offset; \
} \
if (unlikely (pos_y > decoder->limit_y)) { \
pos_y = ((int)pos_y < 0) ? 0 : decoder->limit_y; \
motion_y = pos_y - decoder->v_offset; \
} \
xy_half = ((pos_y & 1) << 1) | (pos_x & 1); \
offset = (pos_x >> 1) + ((pos_y op) + src_field) * decoder->stride; \
table[xy_half] (decoder->dest[0] + dest_field * decoder->stride + \
decoder->offset, ref[0] + offset, \
2 * decoder->stride, 8); \
offset = (offset + (motion_x & (motion_x < 0))) >> 1; \
motion_x /= 2; \
xy_half = ((pos_y & 1) << 1) | (motion_x & 1); \
table[4+xy_half] (decoder->dest[1] + dest_field * decoder->uv_stride + \
(decoder->offset >> 1), ref[1] + offset, \
2 * decoder->uv_stride, 8); \
table[4+xy_half] (decoder->dest[2] + dest_field * decoder->uv_stride + \
(decoder->offset >> 1), ref[2] + offset, \
2 * decoder->uv_stride, 8)

◆ MOTION_FIELD_444

#define MOTION_FIELD_444 (   table,
  ref,
  motion_x,
  motion_y,
  dest_field,
  op,
  src_field 
)
Value:
pos_x = 2 * decoder->offset + motion_x; \
pos_y = decoder->v_offset + motion_y; \
if (unlikely (pos_x > decoder->limit_x)) { \
pos_x = ((int)pos_x < 0) ? 0 : decoder->limit_x; \
motion_x = pos_x - 2 * decoder->offset; \
} \
if (unlikely (pos_y > decoder->limit_y)) { \
pos_y = ((int)pos_y < 0) ? 0 : decoder->limit_y; \
motion_y = pos_y - decoder->v_offset; \
} \
xy_half = ((pos_y & 1) << 1) | (pos_x & 1); \
offset = (pos_x >> 1) + ((pos_y op) + src_field) * decoder->stride; \
table[xy_half] (decoder->dest[0] + dest_field * decoder->stride + \
decoder->offset, ref[0] + offset, \
2 * decoder->stride, 8); \
table[xy_half] (decoder->dest[1] + dest_field * decoder->stride + \
decoder->offset, ref[1] + offset, \
2 * decoder->stride, 8); \
table[xy_half] (decoder->dest[2] + dest_field * decoder->stride + \
decoder->offset, ref[2] + offset, \
2 * decoder->stride, 8)

◆ MOTION_FUNCTIONS

#define MOTION_FUNCTIONS (   FORMAT,
  MOTION,
  MOTION_FIELD,
  MOTION_DMV,
  MOTION_ZERO 
)

◆ MOTION_ZERO_420

#define MOTION_ZERO_420 (   table,
  ref 
)
Value:
table[0] (decoder->dest[0] + decoder->offset, \
(ref[0] + decoder->offset + \
decoder->v_offset * decoder->stride), decoder->stride, 16); \
offset = ((decoder->offset >> 1) + \
(decoder->v_offset >> 1) * decoder->uv_stride); \
table[4] (decoder->dest[1] + (decoder->offset >> 1), \
ref[1] + offset, decoder->uv_stride, 8); \
table[4] (decoder->dest[2] + (decoder->offset >> 1), \
ref[2] + offset, decoder->uv_stride, 8)

◆ MOTION_ZERO_422

#define MOTION_ZERO_422 (   table,
  ref 
)
Value:
offset = decoder->offset + decoder->v_offset * decoder->stride; \
table[0] (decoder->dest[0] + decoder->offset, \
ref[0] + offset, decoder->stride, 16); \
offset >>= 1; \
table[4] (decoder->dest[1] + (decoder->offset >> 1), \
ref[1] + offset, decoder->uv_stride, 16); \
table[4] (decoder->dest[2] + (decoder->offset >> 1), \
ref[2] + offset, decoder->uv_stride, 16)

◆ MOTION_ZERO_444

#define MOTION_ZERO_444 (   table,
  ref 
)
Value:
offset = decoder->offset + decoder->v_offset * decoder->stride; \
table[0] (decoder->dest[0] + decoder->offset, \
ref[0] + offset, decoder->stride, 16); \
table[4] (decoder->dest[1] + decoder->offset, \
ref[1] + offset, decoder->stride, 16); \
table[4] (decoder->dest[2] + (decoder->offset >> 1), \
ref[2] + offset, decoder->stride, 16)

◆ NEXT_MACROBLOCK

#define NEXT_MACROBLOCK
Value:
do { \
decoder->offset += 16; \
if (decoder->offset == decoder->width) { \
do { /* just so we can use the break statement */ \
if (decoder->convert) { \
decoder->convert (decoder->convert_id, decoder->dest, \
decoder->v_offset); \
if (decoder->coding_type == B_TYPE) \
break; \
} \
decoder->dest[0] += decoder->slice_stride; \
decoder->dest[1] += decoder->slice_uv_stride; \
decoder->dest[2] += decoder->slice_uv_stride; \
} while (0); \
decoder->v_offset += 16; \
if (decoder->v_offset > decoder->limit_y) { \
mpeg2_cpu_state_restore (&cpu_state); \
return; \
} \
decoder->offset = 0; \
} \
} while (0)
#define B_TYPE
Definition: ff_mpeg_parser.c:45
void(* mpeg2_cpu_state_restore)(cpu_state_t *state)
Definition: cpu_state.c:34

◆ SATURATE

#define SATURATE (   val)
Value:
do { \
val <<= 4; \
if (unlikely (val != (int16_t) val)) \
val = (SBITS (val, 1) ^ 2047) << 4; \
} while (0)
#define SBITS(bit_buf, num)
Definition: vlc.h:58

Function Documentation

◆ bound_motion_vector()

static int bound_motion_vector ( const int  vector,
const int  f_code 
)
inlinestatic

Referenced by motion_fr_conceal(), and motion_mp1().

◆ get_chroma_dc_dct_diff()

static int get_chroma_dc_dct_diff ( mpeg2_decoder_t *const  decoder)
inlinestatic

◆ get_coded_block_pattern()

static int get_coded_block_pattern ( mpeg2_decoder_t *const  decoder)
inlinestatic

◆ get_dmv()

static int get_dmv ( mpeg2_decoder_t *const  decoder)
inlinestatic

◆ get_intra_block_B14()

static void get_intra_block_B14 ( mpeg2_decoder_t *const  decoder,
const uint16_t *const  quant_matrix 
)
static

◆ get_intra_block_B15()

static void get_intra_block_B15 ( mpeg2_decoder_t *const  decoder,
const uint16_t *const  quant_matrix 
)
static

◆ get_luma_dc_dct_diff()

static int get_luma_dc_dct_diff ( mpeg2_decoder_t *const  decoder)
inlinestatic

◆ get_macroblock_modes()

static int get_macroblock_modes ( mpeg2_decoder_t *const  decoder)
inlinestatic

◆ get_motion_delta()

static int get_motion_delta ( mpeg2_decoder_t *const  decoder,
const int  f_code 
)
inlinestatic

◆ get_mpeg1_intra_block()

static void get_mpeg1_intra_block ( mpeg2_decoder_t *const  decoder)
static

◆ get_mpeg1_non_intra_block()

static int get_mpeg1_non_intra_block ( mpeg2_decoder_t *const  decoder)
static

◆ get_non_intra_block()

static int get_non_intra_block ( mpeg2_decoder_t *const  decoder,
const uint16_t *const  quant_matrix 
)
static

◆ get_quantizer_scale()

static void get_quantizer_scale ( mpeg2_decoder_t *const  decoder)
inlinestatic

◆ motion_fi_16x8_420()

static void motion_fi_16x8_420 ( mpeg2_decoder_t *const  decoder,
motion_t *const  motion,
mpeg2_mc_fct *const *const  table 
)
static

Referenced by mpeg2_init_fbuf().

◆ motion_fi_16x8_422()

static void motion_fi_16x8_422 ( mpeg2_decoder_t *const  decoder,
motion_t *const  motion,
mpeg2_mc_fct *const *const  table 
)
static

Referenced by mpeg2_init_fbuf().

◆ motion_fi_16x8_444()

static void motion_fi_16x8_444 ( mpeg2_decoder_t *const  decoder,
motion_t *const  motion,
mpeg2_mc_fct *const *const  table 
)
static

Referenced by mpeg2_init_fbuf().

◆ motion_fi_conceal()

static void motion_fi_conceal ( mpeg2_decoder_t *const  decoder)
static

◆ motion_fi_dmv_420()

static void motion_fi_dmv_420 ( mpeg2_decoder_t *const  decoder,
motion_t *const  motion,
mpeg2_mc_fct *const *const  table 
)
static

Referenced by mpeg2_init_fbuf().

◆ motion_fi_dmv_422()

static void motion_fi_dmv_422 ( mpeg2_decoder_t *const  decoder,
motion_t *const  motion,
mpeg2_mc_fct *const *const  table 
)
static

Referenced by mpeg2_init_fbuf().

◆ motion_fi_dmv_444()

static void motion_fi_dmv_444 ( mpeg2_decoder_t *const  decoder,
motion_t *const  motion,
mpeg2_mc_fct *const *const  table 
)
static

Referenced by mpeg2_init_fbuf().

◆ motion_fi_field_420()

static void motion_fi_field_420 ( mpeg2_decoder_t *const  decoder,
motion_t *const  motion,
mpeg2_mc_fct *const *const  table 
)
static

Referenced by mpeg2_init_fbuf().

◆ motion_fi_field_422()

static void motion_fi_field_422 ( mpeg2_decoder_t *const  decoder,
motion_t *const  motion,
mpeg2_mc_fct *const *const  table 
)
static

Referenced by mpeg2_init_fbuf().

◆ motion_fi_field_444()

static void motion_fi_field_444 ( mpeg2_decoder_t *const  decoder,
motion_t *const  motion,
mpeg2_mc_fct *const *const  table 
)
static

Referenced by mpeg2_init_fbuf().

◆ motion_fr_conceal()

static void motion_fr_conceal ( mpeg2_decoder_t *const  decoder)
static

◆ motion_fr_dmv_420()

static void motion_fr_dmv_420 ( mpeg2_decoder_t *const  decoder,
motion_t *const  motion,
mpeg2_mc_fct *const *const  table 
)
static

Referenced by mpeg2_init_fbuf().

◆ motion_fr_dmv_422()

static void motion_fr_dmv_422 ( mpeg2_decoder_t *const  decoder,
motion_t *const  motion,
mpeg2_mc_fct *const *const  table 
)
static

Referenced by mpeg2_init_fbuf().

◆ motion_fr_dmv_444()

static void motion_fr_dmv_444 ( mpeg2_decoder_t *const  decoder,
motion_t *const  motion,
mpeg2_mc_fct *const *const  table 
)
static

Referenced by mpeg2_init_fbuf().

◆ motion_fr_field_420()

static void motion_fr_field_420 ( mpeg2_decoder_t *const  decoder,
motion_t *const  motion,
mpeg2_mc_fct *const *const  table 
)
static

Referenced by mpeg2_init_fbuf().

◆ motion_fr_field_422()

static void motion_fr_field_422 ( mpeg2_decoder_t *const  decoder,
motion_t *const  motion,
mpeg2_mc_fct *const *const  table 
)
static

Referenced by mpeg2_init_fbuf().

◆ motion_fr_field_444()

static void motion_fr_field_444 ( mpeg2_decoder_t *const  decoder,
motion_t *const  motion,
mpeg2_mc_fct *const *const  table 
)
static

Referenced by mpeg2_init_fbuf().

◆ motion_fr_frame_420()

static void motion_fr_frame_420 ( mpeg2_decoder_t *const  decoder,
motion_t *const  motion,
mpeg2_mc_fct *const *const  table 
)
static

Referenced by mpeg2_init_fbuf().

◆ motion_fr_frame_422()

static void motion_fr_frame_422 ( mpeg2_decoder_t *const  decoder,
motion_t *const  motion,
mpeg2_mc_fct *const *const  table 
)
static

Referenced by mpeg2_init_fbuf().

◆ motion_fr_frame_444()

static void motion_fr_frame_444 ( mpeg2_decoder_t *const  decoder,
motion_t *const  motion,
mpeg2_mc_fct *const *const  table 
)
static

Referenced by mpeg2_init_fbuf().

◆ motion_mp1()

static void motion_mp1 ( mpeg2_decoder_t *const  decoder,
motion_t *const  motion,
mpeg2_mc_fct *const *const  table 
)
static

◆ motion_reuse_420()

static void motion_reuse_420 ( mpeg2_decoder_t *const  decoder,
motion_t *const  motion,
mpeg2_mc_fct *const *const  table 
)
static

Referenced by mpeg2_init_fbuf().

◆ motion_reuse_422()

static void motion_reuse_422 ( mpeg2_decoder_t *const  decoder,
motion_t *const  motion,
mpeg2_mc_fct *const *const  table 
)
static

Referenced by mpeg2_init_fbuf().

◆ motion_reuse_444()

static void motion_reuse_444 ( mpeg2_decoder_t *const  decoder,
motion_t *const  motion,
mpeg2_mc_fct *const *const  table 
)
static

Referenced by mpeg2_init_fbuf().

◆ motion_zero_420()

static void motion_zero_420 ( mpeg2_decoder_t *const  decoder,
motion_t *const  motion,
mpeg2_mc_fct *const *const  table 
)
static

Referenced by mpeg2_init_fbuf().

◆ motion_zero_422()

static void motion_zero_422 ( mpeg2_decoder_t *const  decoder,
motion_t *const  motion,
mpeg2_mc_fct *const *const  table 
)
static

Referenced by mpeg2_init_fbuf().

◆ motion_zero_444()

static void motion_zero_444 ( mpeg2_decoder_t *const  decoder,
motion_t *const  motion,
mpeg2_mc_fct *const *const  table 
)
static

Referenced by mpeg2_init_fbuf().

◆ 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] 
)

◆ mpeg2_slice()

void mpeg2_slice ( mpeg2_decoder_t *const  decoder,
const int  code,
const uint8_t *const  buffer 
)

◆ slice_init()

static int slice_init ( mpeg2_decoder_t *const  decoder,
int  code 
)
inlinestatic

◆ slice_intra_DCT()

static void slice_intra_DCT ( mpeg2_decoder_t *const  decoder,
const int  cc,
uint8_t *const  dest,
const int  stride 
)
inlinestatic

◆ slice_non_intra_DCT()

static void slice_non_intra_DCT ( mpeg2_decoder_t *const  decoder,
const int  cc,
uint8_t *const  dest,
const int  stride 
)
inlinestatic

Variable Documentation

◆ mpeg2_cpu_state_restore

void(* mpeg2_cpu_state_restore) (cpu_state_t *state) ( cpu_state_t state)
extern

◆ mpeg2_cpu_state_save

void(* mpeg2_cpu_state_save) (cpu_state_t *state) ( cpu_state_t state)
extern

◆ mpeg2_idct_add

void(* mpeg2_idct_add) (int last, int16_t *block, uint8_t *dest, int stride) ( int  last,
int16_t *  block,
uint8_t *  dest,
int  stride 
)
extern

Referenced by slice_non_intra_DCT().

◆ mpeg2_idct_copy

void(* mpeg2_idct_copy) (int16_t *block, uint8_t *dest, int stride) ( int16_t *  block,
uint8_t *  dest,
int  stride 
)
extern

Referenced by mpeg2_idct_init(), and slice_intra_DCT().

◆ mpeg2_mc

mpeg2_mc_t mpeg2_mc
extern