FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions | Variables
vc1_mc.c File Reference

VC-1 and WMV3 block decoding routines. More...

#include "avcodec.h"
#include "h264chroma.h"
#include "mathops.h"
#include "mpegvideo.h"
#include "vc1.h"

Go to the source code of this file.

Functions

static av_always_inline void vc1_scale_luma (uint8_t *srcY, int k, int linesize)
 
static av_always_inline void vc1_scale_chroma (uint8_t *srcU, uint8_t *srcV, int k, int uvlinesize)
 
static av_always_inline void vc1_lut_scale_luma (uint8_t *srcY, uint8_t *lut1, uint8_t *lut2, int k, int linesize)
 
static av_always_inline void vc1_lut_scale_chroma (uint8_t *srcU, uint8_t *srcV, uint8_t *lut1, uint8_t *lut2, int k, int uvlinesize)
 
static av_always_inline int get_luma_mv (VC1Context *v, int dir, int16_t *tx, int16_t *ty)
 
static av_always_inline int get_chroma_mv (VC1Context *v, int dir, int16_t *tx, int16_t *ty)
 
void ff_vc1_mc_1mv (VC1Context *v, int dir)
 Do motion compensation over 1 macroblock Mostly adapted hpel_motion and qpel_motion from mpegvideo.c. More...
 
void ff_vc1_mc_4mv_luma (VC1Context *v, int n, int dir, int avg)
 Do motion compensation for 4-MV macroblock - luminance block. More...
 
void ff_vc1_mc_4mv_chroma (VC1Context *v, int dir)
 Do motion compensation for 4-MV macroblock - both chroma blocks. More...
 
void ff_vc1_mc_4mv_chroma4 (VC1Context *v, int dir, int dir2, int avg)
 Do motion compensation for 4-MV interlaced frame chroma macroblock (both U and V) More...
 
void ff_vc1_interp_mc (VC1Context *v)
 Motion compensation for direct or interpolated blocks in B-frames. More...
 

Variables

static const uint8_t popcount4 [16] = { 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4 }
 

Detailed Description

VC-1 and WMV3 block decoding routines.

Definition in file vc1_mc.c.

Function Documentation

static av_always_inline void vc1_scale_luma ( uint8_t srcY,
int  k,
int  linesize 
)
static

Definition at line 35 of file vc1_mc.c.

Referenced by ff_vc1_interp_mc(), ff_vc1_mc_1mv(), and ff_vc1_mc_4mv_luma().

static av_always_inline void vc1_scale_chroma ( uint8_t srcU,
uint8_t srcV,
int  k,
int  uvlinesize 
)
static

Definition at line 46 of file vc1_mc.c.

Referenced by ff_vc1_interp_mc(), ff_vc1_mc_1mv(), and ff_vc1_mc_4mv_chroma().

static av_always_inline void vc1_lut_scale_luma ( uint8_t srcY,
uint8_t lut1,
uint8_t lut2,
int  k,
int  linesize 
)
static

Definition at line 60 of file vc1_mc.c.

Referenced by ff_vc1_interp_mc(), ff_vc1_mc_1mv(), and ff_vc1_mc_4mv_luma().

static av_always_inline void vc1_lut_scale_chroma ( uint8_t srcU,
uint8_t srcV,
uint8_t lut1,
uint8_t lut2,
int  k,
int  uvlinesize 
)
static
static av_always_inline int get_luma_mv ( VC1Context v,
int  dir,
int16_t *  tx,
int16_t *  ty 
)
static

Definition at line 108 of file vc1_mc.c.

Referenced by ff_vc1_mc_4mv_chroma(), and ff_vc1_mc_4mv_luma().

static av_always_inline int get_chroma_mv ( VC1Context v,
int  dir,
int16_t *  tx,
int16_t *  ty 
)
static

Definition at line 140 of file vc1_mc.c.

Referenced by ff_vc1_mc_4mv_chroma().

void ff_vc1_mc_1mv ( VC1Context v,
int  dir 
)

Do motion compensation over 1 macroblock Mostly adapted hpel_motion and qpel_motion from mpegvideo.c.

Definition at line 172 of file vc1_mc.c.

Referenced by vc1_b_mc(), vc1_decode_b_mb_intfr(), vc1_decode_p_mb(), vc1_decode_p_mb_intfi(), and vc1_decode_p_mb_intfr().

void ff_vc1_mc_4mv_luma ( VC1Context v,
int  n,
int  dir,
int  avg 
)

Do motion compensation for 4-MV macroblock - luminance block.

Definition at line 452 of file vc1_mc.c.

Referenced by vc1_decode_b_mb_intfi(), vc1_decode_b_mb_intfr(), vc1_decode_p_mb(), vc1_decode_p_mb_intfi(), and vc1_decode_p_mb_intfr().

void ff_vc1_mc_4mv_chroma ( VC1Context v,
int  dir 
)

Do motion compensation for 4-MV macroblock - both chroma blocks.

Definition at line 634 of file vc1_mc.c.

Referenced by vc1_decode_b_mb_intfi(), vc1_decode_p_mb(), and vc1_decode_p_mb_intfi().

void ff_vc1_mc_4mv_chroma4 ( VC1Context v,
int  dir,
int  dir2,
int  avg 
)

Do motion compensation for 4-MV interlaced frame chroma macroblock (both U and V)

Definition at line 839 of file vc1_mc.c.

Referenced by vc1_decode_b_mb_intfr(), and vc1_decode_p_mb_intfr().

void ff_vc1_interp_mc ( VC1Context v)

Motion compensation for direct or interpolated blocks in B-frames.

Definition at line 1004 of file vc1_mc.c.

Referenced by vc1_b_mc(), and vc1_decode_b_mb_intfr().

Variable Documentation

const uint8_t popcount4[16] = { 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4 }
static

Definition at line 106 of file vc1_mc.c.

Referenced by get_chroma_mv(), and get_luma_mv().