motion vector related code (prediction, reconstruction, motion compensation)


Functions

static void rv34_pred_mv (RV34DecContext *r, int block_type, int subblock_no, int dmv_no)
 motion vector prediction
static int calc_add_mv (MpegEncContext *s, int dir, int component)
 Calculate motion vector component that should be added for direct blocks.
static void rv34_pred_b_vector (int A[2], int B[2], int C[2], int A_avail, int B_avail, int C_avail, int *mx, int *my)
 Predict motion vector for B-frame macroblock.
static void rv34_pred_mv_b (RV34DecContext *r, int block_type, int dir)
 motion vector prediction for B-frames
static void rv34_mc (RV34DecContext *r, const int block_type, const int xoff, const int yoff, int mv_off, const int width, const int height, int dir, const int thirdpel, qpel_mc_func(*qpel_mc)[16], h264_chroma_mc_func(*chroma_mc))
 generic motion compensation function
static void rv34_mc_1mv (RV34DecContext *r, const int block_type, const int xoff, const int yoff, int mv_off, const int width, const int height, int dir)
static void rv34_mc_2mv (RV34DecContext *r, const int block_type)
static int rv34_decode_mv (RV34DecContext *r, int block_type)
 Decode motion vector differences and perform motion vector reconstruction and motion compensation.

Variables

static const uint8_t part_sizes_w [RV34_MB_TYPES] = { 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2 }
 macroblock partition width in 8x8 blocks
static const uint8_t part_sizes_h [RV34_MB_TYPES] = { 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2 }
 macroblock partition height in 8x8 blocks
static const uint8_t avail_indexes [4] = { 5, 6, 9, 10 }
 availability index for subblocks
static const int chroma_coeffs [3] = { 8, 5, 3 }
static const int num_mvs [RV34_MB_TYPES] = { 0, 0, 1, 4, 1, 1, 0, 0, 2, 2, 2, 1 }
 number of motion vectors in each macroblock type

Function Documentation

static int calc_add_mv ( MpegEncContext s,
int  dir,
int  component 
) [static]

Calculate motion vector component that should be added for direct blocks.

Definition at line 472 of file rv34.c.

Referenced by rv34_pred_mv_b().

static int rv34_decode_mv ( RV34DecContext r,
int  block_type 
) [static]

Decode motion vector differences and perform motion vector reconstruction and motion compensation.

Definition at line 677 of file rv34.c.

Referenced by rv34_decode_mb_header().

static void rv34_mc ( RV34DecContext r,
const int  block_type,
const int  xoff,
const int  yoff,
int  mv_off,
const int  width,
const int  height,
int  dir,
const int  thirdpel,
qpel_mc_func(*)  qpel_mc[16],
h264_chroma_mc_func chroma_mc 
) [inline, static]

generic motion compensation function

Parameters:
r decoder context
block_type type of the current block
xoff horizontal offset from the start of the current block
yoff vertical offset from the start of the current block
mv_off offset to the motion vector information
width width of the current partition in 8x8 blocks
height height of the current partition in 8x8 blocks

Definition at line 575 of file rv34.c.

Referenced by rv34_mc_1mv(), and rv34_mc_2mv().

static void rv34_mc_1mv ( RV34DecContext r,
const int  block_type,
const int  xoff,
const int  yoff,
int  mv_off,
const int  width,
const int  height,
int  dir 
) [static]

Definition at line 648 of file rv34.c.

Referenced by rv34_decode_mv().

static void rv34_mc_2mv ( RV34DecContext r,
const int  block_type 
) [static]

Definition at line 658 of file rv34.c.

Referenced by rv34_decode_mv().

static void rv34_pred_b_vector ( int  A[2],
int  B[2],
int  C[2],
int  A_avail,
int  B_avail,
int  C_avail,
int *  mx,
int *  my 
) [inline, static]

Predict motion vector for B-frame macroblock.

Definition at line 487 of file rv34.c.

Referenced by rv34_pred_mv_b().

static void rv34_pred_mv ( RV34DecContext r,
int  block_type,
int  subblock_no,
int  dmv_no 
) [static]

motion vector prediction

Motion prediction performed for the block by using median prediction of motion vectors from the left, top and right top blocks but in corner cases some other vectors may be used instead.

Definition at line 420 of file rv34.c.

Referenced by rv34_decode_mv().

static void rv34_pred_mv_b ( RV34DecContext r,
int  block_type,
int  dir 
) [static]

motion vector prediction for B-frames

Definition at line 507 of file rv34.c.

Referenced by rv34_decode_mv().


Variable Documentation

const uint8_t avail_indexes[4] = { 5, 6, 9, 10 } [static]

availability index for subblocks

Definition at line 411 of file rv34.c.

Referenced by rv34_pred_mv().

const int chroma_coeffs[3] = { 8, 5, 3 } [static]

Definition at line 562 of file rv34.c.

Referenced by rv34_mc().

const int num_mvs[RV34_MB_TYPES] = { 0, 0, 1, 4, 1, 1, 0, 0, 2, 2, 2, 1 } [static]

number of motion vectors in each macroblock type

Definition at line 671 of file rv34.c.

const uint8_t part_sizes_h[RV34_MB_TYPES] = { 2, 2, 2, 1, 2, 2, 2, 2, 1, 2, 2, 2 } [static]

macroblock partition height in 8x8 blocks

Definition at line 408 of file rv34.c.

Referenced by rv34_pred_mv().

const uint8_t part_sizes_w[RV34_MB_TYPES] = { 2, 2, 2, 1, 2, 2, 2, 2, 2, 1, 2, 2 } [static]

macroblock partition width in 8x8 blocks

Definition at line 405 of file rv34.c.

Referenced by rv34_pred_mv().


Generated on Sat Sep 6 21:25:27 2008 for ffmpeg by  doxygen 1.5.6