FFmpeg
Macros | Functions | Variables
rv40dsp.c File Reference
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "h264qpel.h"
#include "mathops.h"
#include "pixels.h"
#include "rnd_avg.h"
#include "rv34dsp.h"
#include "libavutil/avassert.h"

Go to the source code of this file.

Macros

#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 PIXOP2(OPNAME, OP)
 
#define op_avg(a, b)   a = rnd_avg32(a, b)
 
#define op_put(a, b)   a = 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 put_rv40_qpel16_mc33_c (uint8_t *dst, const uint8_t *src, ptrdiff_t stride)
 
static void avg_rv40_qpel16_mc33_c (uint8_t *dst, const uint8_t *src, ptrdiff_t stride)
 
static void put_rv40_qpel8_mc33_c (uint8_t *dst, const uint8_t *src, ptrdiff_t stride)
 
static void avg_rv40_qpel8_mc33_c (uint8_t *dst, const uint8_t *src, ptrdiff_t stride)
 
static av_always_inline void rv40_weak_loop_filter (uint8_t *src, const int step, const ptrdiff_t stride, 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)
 weaker deblocking very similar to the one described in 4.4.2 of JVT-A003r1 More...
 
static void rv40_h_weak_loop_filter (uint8_t *src, const ptrdiff_t stride, 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)
 
static void rv40_v_weak_loop_filter (uint8_t *src, const ptrdiff_t stride, 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)
 
static av_always_inline void rv40_strong_loop_filter (uint8_t *src, const int step, const ptrdiff_t stride, const int alpha, const int lims, const int dmode, const int chroma)
 
static void rv40_h_strong_loop_filter (uint8_t *src, const ptrdiff_t stride, const int alpha, const int lims, const int dmode, const int chroma)
 
static void rv40_v_strong_loop_filter (uint8_t *src, const ptrdiff_t stride, const int alpha, const int lims, const int dmode, const int chroma)
 
static av_always_inline int rv40_loop_filter_strength (uint8_t *src, int step, ptrdiff_t stride, int beta, int beta2, int edge, int *p1, int *q1)
 
static int rv40_h_loop_filter_strength (uint8_t *src, ptrdiff_t stride, int beta, int beta2, int edge, int *p1, int *q1)
 
static int rv40_v_loop_filter_strength (uint8_t *src, ptrdiff_t stride, int beta, int beta2, int edge, int *p1, int *q1)
 
av_cold void ff_rv40dsp_init (RV34DSPContext *c)
 

Variables

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

Detailed Description

RV40 decoder motion compensation functions

Definition in file rv40dsp.c.

Macro Definition Documentation

◆ RV40_LOWPASS

#define RV40_LOWPASS (   OPNAME,
  OP 
)

Definition at line 37 of file rv40dsp.c.

◆ RV40_MC

#define RV40_MC (   OPNAME,
  SIZE 
)

Definition at line 110 of file rv40dsp.c.

◆ op_avg [1/3]

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

Definition at line 375 of file rv40dsp.c.

◆ op_put [1/3]

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

Definition at line 376 of file rv40dsp.c.

◆ PIXOP2

#define PIXOP2 (   OPNAME,
  OP 
)

Definition at line 210 of file rv40dsp.c.

◆ op_avg [2/3]

#define op_avg (   a,
  b 
)    a = rnd_avg32(a, b)

Definition at line 375 of file rv40dsp.c.

◆ op_put [2/3]

#define op_put (   a,
  b 
)    a = b

Definition at line 376 of file rv40dsp.c.

◆ RV40_CHROMA_MC

#define RV40_CHROMA_MC (   OPNAME,
  OP 
)

Definition at line 294 of file rv40dsp.c.

◆ op_avg [3/3]

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

Definition at line 375 of file rv40dsp.c.

◆ op_put [3/3]

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

Definition at line 376 of file rv40dsp.c.

◆ RV40_WEIGHT_FUNC

#define RV40_WEIGHT_FUNC (   size)
Value:
static void rv40_weight_func_rnd_ ## size (uint8_t *dst, uint8_t *src1, uint8_t *src2, int w1, int w2, ptrdiff_t stride)\
{\
int i, j;\
for (j = 0; j < size; j++) {\
for (i = 0; i < size; i++)\
dst[i] = ((((unsigned)w2 * src1[i]) >> 9) + (((unsigned)w1 * src2[i]) >> 9) + 0x10) >> 5;\
src1 += stride;\
src2 += stride;\
dst += stride;\
}\
}\
static void rv40_weight_func_nornd_ ## size (uint8_t *dst, uint8_t *src1, uint8_t *src2, int w1, int w2, ptrdiff_t stride)\
{\
int i, j;\
for (j = 0; j < size; j++) {\
for (i = 0; i < size; i++)\
dst[i] = ((unsigned)w2 * src1[i] + (unsigned)w1 * src2[i] + 0x10) >> 5;\
src1 += stride;\
src2 += stride;\
dst += stride;\
}\
}

Definition at line 381 of file rv40dsp.c.

◆ CLIP_SYMM

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

Definition at line 426 of file rv40dsp.c.

Function Documentation

◆ put_rv40_qpel16_mc33_c()

static void put_rv40_qpel16_mc33_c ( uint8_t dst,
const uint8_t src,
ptrdiff_t  stride 
)
static

Definition at line 270 of file rv40dsp.c.

Referenced by ff_rv40dsp_init().

◆ avg_rv40_qpel16_mc33_c()

static void avg_rv40_qpel16_mc33_c ( uint8_t dst,
const uint8_t src,
ptrdiff_t  stride 
)
static

Definition at line 274 of file rv40dsp.c.

Referenced by ff_rv40dsp_init().

◆ put_rv40_qpel8_mc33_c()

static void put_rv40_qpel8_mc33_c ( uint8_t dst,
const uint8_t src,
ptrdiff_t  stride 
)
static

Definition at line 278 of file rv40dsp.c.

Referenced by ff_rv40dsp_init().

◆ avg_rv40_qpel8_mc33_c()

static void avg_rv40_qpel8_mc33_c ( uint8_t dst,
const uint8_t src,
ptrdiff_t  stride 
)
static

Definition at line 282 of file rv40dsp.c.

Referenced by ff_rv40dsp_init().

◆ rv40_weak_loop_filter()

static av_always_inline void rv40_weak_loop_filter ( uint8_t src,
const int  step,
const ptrdiff_t  stride,
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 
)
static

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

Definition at line 430 of file rv40dsp.c.

Referenced by rv40_h_weak_loop_filter(), and rv40_v_weak_loop_filter().

◆ rv40_h_weak_loop_filter()

static void rv40_h_weak_loop_filter ( uint8_t src,
const ptrdiff_t  stride,
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 
)
static

Definition at line 478 of file rv40dsp.c.

Referenced by ff_rv40dsp_init().

◆ rv40_v_weak_loop_filter()

static void rv40_v_weak_loop_filter ( uint8_t src,
const ptrdiff_t  stride,
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 
)
static

Definition at line 488 of file rv40dsp.c.

Referenced by ff_rv40dsp_init().

◆ rv40_strong_loop_filter()

static av_always_inline void rv40_strong_loop_filter ( uint8_t src,
const int  step,
const ptrdiff_t  stride,
const int  alpha,
const int  lims,
const int  dmode,
const int  chroma 
)
static

Definition at line 498 of file rv40dsp.c.

Referenced by rv40_h_strong_loop_filter(), and rv40_v_strong_loop_filter().

◆ rv40_h_strong_loop_filter()

static void rv40_h_strong_loop_filter ( uint8_t src,
const ptrdiff_t  stride,
const int  alpha,
const int  lims,
const int  dmode,
const int  chroma 
)
static

Definition at line 556 of file rv40dsp.c.

Referenced by ff_rv40dsp_init().

◆ rv40_v_strong_loop_filter()

static void rv40_v_strong_loop_filter ( uint8_t src,
const ptrdiff_t  stride,
const int  alpha,
const int  lims,
const int  dmode,
const int  chroma 
)
static

Definition at line 563 of file rv40dsp.c.

Referenced by ff_rv40dsp_init().

◆ rv40_loop_filter_strength()

static av_always_inline int rv40_loop_filter_strength ( uint8_t src,
int  step,
ptrdiff_t  stride,
int  beta,
int  beta2,
int  edge,
int p1,
int q1 
)
static

Definition at line 570 of file rv40dsp.c.

Referenced by rv40_h_loop_filter_strength(), and rv40_v_loop_filter_strength().

◆ rv40_h_loop_filter_strength()

static int rv40_h_loop_filter_strength ( uint8_t src,
ptrdiff_t  stride,
int  beta,
int  beta2,
int  edge,
int p1,
int q1 
)
static

Definition at line 606 of file rv40dsp.c.

Referenced by ff_rv40dsp_init().

◆ rv40_v_loop_filter_strength()

static int rv40_v_loop_filter_strength ( uint8_t src,
ptrdiff_t  stride,
int  beta,
int  beta2,
int  edge,
int p1,
int q1 
)
static

Definition at line 613 of file rv40dsp.c.

Referenced by ff_rv40dsp_init().

◆ ff_rv40dsp_init()

av_cold void ff_rv40dsp_init ( RV34DSPContext c)

Definition at line 620 of file rv40dsp.c.

Referenced by ff_rv34_decode_init().

Variable Documentation

◆ rv40_bias

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 287 of file rv40dsp.c.

◆ rv40_dither_l

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 413 of file rv40dsp.c.

Referenced by rv40_strong_loop_filter().

◆ rv40_dither_r

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 421 of file rv40dsp.c.

Referenced by rv40_strong_loop_filter().

stride
int stride
Definition: mace.c:144
for
for(j=16;j >0;--j)
Definition: h264pred_template.c:469
size
int size
Definition: twinvq_data.h:11134
src1
#define src1
Definition: h264pred.c:139
i
#define i(width, name, range_min, range_max)
Definition: cbs_h2645.c:259
uint8_t
uint8_t
Definition: audio_convert.c:194