libavcodec/rv40dsp.c File Reference

RV40 decoder motion compensation functions. More...

#include "avcodec.h"
#include "dsputil.h"
#include "rv34dsp.h"

Go to the source code of this file.

Defines

#define RV40_LOWPASS(OPNAME, OP)
#define RV40_MC(OPNAME, SIZE)
#define op_avg(a, b)   a = (((a)+cm[b]+1)>>1)
#define op_put(a, b)   a = cm[b]
#define RV40_CHROMA_MC(OPNAME, OP)
#define op_avg(a, b)   a = (((a)+((b)>>6)+1)>>1)
#define op_put(a, b)   a = ((b)>>6)
#define RV40_WEIGHT_FUNC(size)
#define CLIP_SYMM(a, b)   av_clip(a, -(b), b)

Functions

static void rv40_weak_loop_filter (uint8_t *src, const int step, const int filter_p1, const int filter_q1, const int alpha, const int beta, const int lim_p0q0, const int lim_q1, const int lim_p1, const int diff_p1p0, const int diff_q1q0, const int diff_p1p2, const int diff_q1q2)
 weaker deblocking very similar to the one described in 4.4.2 of JVT-A003r1
static av_always_inline void rv40_adaptive_loop_filter (uint8_t *src, const int step, const int stride, const int dmode, const int lim_q1, const int lim_p1, const int alpha, const int beta, const int beta2, const int chroma, const int edge)
static void rv40_v_loop_filter (uint8_t *src, int stride, int dmode, int lim_q1, int lim_p1, int alpha, int beta, int beta2, int chroma, int edge)
static void rv40_h_loop_filter (uint8_t *src, int stride, int dmode, int lim_q1, int lim_p1, int alpha, int beta, int beta2, int chroma, int edge)
av_cold void ff_rv40dsp_init (RV34DSPContext *c, DSPContext *dsp)

Variables

static const int rv40_bias [4][4]
static const uint8_t rv40_dither_l [16]
 dither values for deblocking filter - left/top values
static const uint8_t rv40_dither_r [16]
 dither values for deblocking filter - right/bottom values


Detailed Description

RV40 decoder motion compensation functions.

Definition in file rv40dsp.c.


Define Documentation

#define CLIP_SYMM ( a,
 )     av_clip(a, -(b), b)

Definition at line 313 of file rv40dsp.c.

Referenced by rv40_weak_loop_filter().

#define op_avg ( a,
 )     a = (((a)+((b)>>6)+1)>>1)

Definition at line 274 of file rv40dsp.c.

#define op_avg ( a,
 )     a = (((a)+cm[b]+1)>>1)

Definition at line 274 of file rv40dsp.c.

#define op_put ( a,
 )     a = ((b)>>6)

Definition at line 275 of file rv40dsp.c.

#define op_put ( a,
 )     a = cm[b]

Definition at line 275 of file rv40dsp.c.

#define RV40_CHROMA_MC ( OPNAME,
OP   ) 

Definition at line 199 of file rv40dsp.c.

#define RV40_LOWPASS ( OPNAME,
OP   ) 

Definition at line 31 of file rv40dsp.c.

#define RV40_MC ( OPNAME,
SIZE   ) 

Definition at line 104 of file rv40dsp.c.

#define RV40_WEIGHT_FUNC ( size   ) 

Value:

static void rv40_weight_func_ ## size (uint8_t *dst, uint8_t *src1, uint8_t *src2, int w1, int w2, int stride)\
{\
    int i, j;\
\
    for (j = 0; j < size; j++) {\
        for (i = 0; i < size; i++)\
            dst[i] = (((w2 * src1[i]) >> 9) + ((w1 * src2[i]) >> 9) + 0x10) >> 5;\
        src1 += stride;\
        src2 += stride;\
        dst  += stride;\
    }\
}

Definition at line 280 of file rv40dsp.c.


Function Documentation

av_cold void ff_rv40dsp_init ( RV34DSPContext c,
DSPContext dsp 
)

Definition at line 455 of file rv40dsp.c.

Referenced by ff_rv34_decode_init().

static av_always_inline void rv40_adaptive_loop_filter ( uint8_t *  src,
const int  step,
const int  stride,
const int  dmode,
const int  lim_q1,
const int  lim_p1,
const int  alpha,
const int  beta,
const int  beta2,
const int  chroma,
const int  edge 
) [static]

Definition at line 351 of file rv40dsp.c.

Referenced by rv40_h_loop_filter(), and rv40_v_loop_filter().

static void rv40_h_loop_filter ( uint8_t *  src,
int  stride,
int  dmode,
int  lim_q1,
int  lim_p1,
int  alpha,
int  beta,
int  beta2,
int  chroma,
int  edge 
) [static]

Definition at line 448 of file rv40dsp.c.

Referenced by ff_rv40dsp_init().

static void rv40_v_loop_filter ( uint8_t *  src,
int  stride,
int  dmode,
int  lim_q1,
int  lim_p1,
int  alpha,
int  beta,
int  beta2,
int  chroma,
int  edge 
) [static]

Definition at line 442 of file rv40dsp.c.

Referenced by ff_rv40dsp_init().

static void rv40_weak_loop_filter ( uint8_t *  src,
const int  step,
const int  filter_p1,
const int  filter_q1,
const int  alpha,
const int  beta,
const int  lim_p0q0,
const int  lim_q1,
const int  lim_p1,
const int  diff_p1p0,
const int  diff_q1q0,
const int  diff_p1p2,
const int  diff_q1q2 
) [inline, static]

weaker deblocking very similar to the one described in 4.4.2 of JVT-A003r1

Definition at line 317 of file rv40dsp.c.

Referenced by rv40_adaptive_loop_filter().


Variable Documentation

const int rv40_bias[4][4] [static]

Initial value:

 {
    {  0, 16, 32, 16 },
    { 32, 28, 32, 28 },
    {  0, 32, 16, 32 },
    { 32, 28, 32, 28 }
}

Definition at line 192 of file rv40dsp.c.

const uint8_t rv40_dither_l[16] [static]

Initial value:

 {
    0x40, 0x50, 0x20, 0x60, 0x30, 0x50, 0x40, 0x30,
    0x50, 0x40, 0x50, 0x30, 0x60, 0x20, 0x50, 0x40
}
dither values for deblocking filter - left/top values

Definition at line 300 of file rv40dsp.c.

Referenced by rv40_adaptive_loop_filter().

const uint8_t rv40_dither_r[16] [static]

Initial value:

 {
    0x40, 0x30, 0x60, 0x20, 0x50, 0x30, 0x30, 0x40,
    0x40, 0x40, 0x50, 0x30, 0x20, 0x60, 0x30, 0x40
}
dither values for deblocking filter - right/bottom values

Definition at line 308 of file rv40dsp.c.


Generated on Fri Oct 26 02:43:49 2012 for FFmpeg by  doxygen 1.5.8