FFmpeg
Macros | Functions | Variables
vp8_mc_lsx.c File Reference
#include "libavcodec/vp8dsp.h"
#include "libavutil/loongarch/loongson_intrinsics.h"
#include "vp8dsp_loongarch.h"

Go to the source code of this file.

Macros

#define DPADD_SH3_SH(in0, in1, in2, coeff0, coeff1, coeff2)
 
#define VSHF_B3_SB(in0, in1, in2, in3, in4, in5, mask0, mask1, mask2, out0, out1, out2)
 
#define HORIZ_6TAP_FILT(src0, src1, mask0, mask1, mask2, filt_h0, filt_h1, filt_h2)
 
#define HORIZ_6TAP_8WID_4VECS_FILT(src0, src1, src2, src3, mask0, mask1, mask2, filt0, filt1, filt2, out0, out1, out2, out3)
 
#define FILT_4TAP_DPADD_S_H(vec0, vec1, filt0, filt1)
 
#define HORIZ_4TAP_FILT(src0, src1, mask0, mask1, filt_h0, filt_h1)
 

Functions

void ff_put_vp8_epel8_h6_lsx (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
 
void ff_put_vp8_epel16_h6_lsx (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
 
void ff_put_vp8_epel8_v6_lsx (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
 
void ff_put_vp8_epel16_v6_lsx (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
 
void ff_put_vp8_epel8_h6v6_lsx (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
 
void ff_put_vp8_epel16_h6v6_lsx (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
 
void ff_put_vp8_epel8_v4_lsx (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
 
void ff_put_vp8_epel16_v4_lsx (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
 
void ff_put_vp8_epel8_h6v4_lsx (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
 
void ff_put_vp8_epel16_h6v4_lsx (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
 
void ff_put_vp8_epel8_h4v6_lsx (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
 
void ff_put_vp8_epel16_h4v6_lsx (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
 
void ff_put_vp8_pixels8_lsx (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
 
void ff_put_vp8_pixels16_lsx (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int height, int mx, int my)
 

Variables

static const uint8_t mc_filt_mask_arr [16 *3]
 
static const int8_t subpel_filters_lsx [7][8]
 

Macro Definition Documentation

◆ DPADD_SH3_SH

#define DPADD_SH3_SH (   in0,
  in1,
  in2,
  coeff0,
  coeff1,
  coeff2 
)
Value:
( { \
__m128i out0_m; \
\
out0_m = __lsx_vdp2_h_b(in0, coeff0); \
out0_m = __lsx_vdp2add_h_b(out0_m, in1, coeff1); \
out0_m = __lsx_vdp2add_h_b(out0_m, in2, coeff2); \
\
out0_m; \
} )

Definition at line 43 of file vp8_mc_lsx.c.

◆ VSHF_B3_SB

#define VSHF_B3_SB (   in0,
  in1,
  in2,
  in3,
  in4,
  in5,
  mask0,
  mask1,
  mask2,
  out0,
  out1,
  out2 
)
Value:
{ \
DUP2_ARG3(__lsx_vshuf_b, in1, in0, mask0, in3, in2, mask1, \
out0, out1); \
out2 = __lsx_vshuf_b(in5, in4, mask2); \
}

Definition at line 54 of file vp8_mc_lsx.c.

◆ HORIZ_6TAP_FILT

#define HORIZ_6TAP_FILT (   src0,
  src1,
  mask0,
  mask1,
  mask2,
  filt_h0,
  filt_h1,
  filt_h2 
)
Value:
( { \
__m128i vec0_m, vec1_m, vec2_m; \
__m128i hz_out_m; \
VSHF_B3_SB(src0, src1, src0, src1, src0, src1, mask0, mask1, mask2, \
vec0_m, vec1_m, vec2_m); \
hz_out_m = DPADD_SH3_SH(vec0_m, vec1_m, vec2_m, \
filt_h0, filt_h1, filt_h2); \
\
hz_out_m = __lsx_vsrari_h(hz_out_m, 7); \
hz_out_m = __lsx_vsat_h(hz_out_m, 7); \
\
hz_out_m; \
} )

Definition at line 62 of file vp8_mc_lsx.c.

◆ HORIZ_6TAP_8WID_4VECS_FILT

#define HORIZ_6TAP_8WID_4VECS_FILT (   src0,
  src1,
  src2,
  src3,
  mask0,
  mask1,
  mask2,
  filt0,
  filt1,
  filt2,
  out0,
  out1,
  out2,
  out3 
)
Value:
{ \
__m128i vec0_m, vec1_m, vec2_m, vec3_m, vec4_m, vec5_m, vec6_m, vec7_m; \
DUP4_ARG3(__lsx_vshuf_b, src0, src0, mask0, src1, src1, mask0, src2, src2, \
mask0, src3, src3, mask0, vec0_m, vec1_m, vec2_m, vec3_m); \
DUP4_ARG2(__lsx_vdp2_h_b, vec0_m, filt0, vec1_m, filt0, vec2_m, filt0, \
vec3_m, filt0, out0, out1, out2, out3); \
DUP4_ARG3(__lsx_vshuf_b, src0, src0, mask1, src1, src1, mask1, src2, src2, \
mask1, src3, src3, mask1, vec0_m, vec1_m, vec2_m, vec3_m); \
DUP4_ARG3(__lsx_vshuf_b, src0, src0, mask2, src1, src1, mask2, src2, src2, \
mask2, src3, src3, mask2, vec4_m, vec5_m, vec6_m, vec7_m); \
DUP4_ARG3(__lsx_vdp2add_h_b, out0, vec0_m, filt1, out1, vec1_m, filt1, \
out2, vec2_m, filt1, out3, vec3_m, filt1, out0, out1, out2, out3); \
DUP4_ARG3(__lsx_vdp2add_h_b, out0, vec4_m, filt2, out1, vec5_m, filt2, \
out2, vec6_m, filt2, out3, vec7_m, filt2, out0, out1, out2, out3); \
}

Definition at line 79 of file vp8_mc_lsx.c.

◆ FILT_4TAP_DPADD_S_H

#define FILT_4TAP_DPADD_S_H (   vec0,
  vec1,
  filt0,
  filt1 
)
Value:
( { \
__m128i tmp0; \
\
tmp0 = __lsx_vdp2_h_b(vec0, filt0); \
tmp0 = __lsx_vdp2add_h_b(tmp0, vec1, filt1); \
\
tmp0; \
} )

Definition at line 100 of file vp8_mc_lsx.c.

◆ HORIZ_4TAP_FILT

#define HORIZ_4TAP_FILT (   src0,
  src1,
  mask0,
  mask1,
  filt_h0,
  filt_h1 
)
Value:
( { \
__m128i vec0_m, vec1_m; \
__m128i hz_out_m; \
DUP2_ARG3(__lsx_vshuf_b, src1, src0, mask0, src1, src0, mask1, \
vec0_m, vec1_m); \
hz_out_m = FILT_4TAP_DPADD_S_H(vec0_m, vec1_m, filt_h0, filt_h1); \
\
hz_out_m = __lsx_vsrari_h(hz_out_m, 7); \
hz_out_m = __lsx_vsat_h(hz_out_m, 7); \
\
hz_out_m; \
} )

Definition at line 110 of file vp8_mc_lsx.c.

Function Documentation

◆ ff_put_vp8_epel8_h6_lsx()

void ff_put_vp8_epel8_h6_lsx ( uint8_t *  dst,
ptrdiff_t  dst_stride,
const uint8_t *  src,
ptrdiff_t  src_stride,
int  height,
int  mx,
int  my 
)

Definition at line 124 of file vp8_mc_lsx.c.

◆ ff_put_vp8_epel16_h6_lsx()

void ff_put_vp8_epel16_h6_lsx ( uint8_t *  dst,
ptrdiff_t  dst_stride,
const uint8_t *  src,
ptrdiff_t  src_stride,
int  height,
int  mx,
int  my 
)

Definition at line 189 of file vp8_mc_lsx.c.

◆ ff_put_vp8_epel8_v6_lsx()

void ff_put_vp8_epel8_v6_lsx ( uint8_t *  dst,
ptrdiff_t  dst_stride,
const uint8_t *  src,
ptrdiff_t  src_stride,
int  height,
int  mx,
int  my 
)

Definition at line 243 of file vp8_mc_lsx.c.

◆ ff_put_vp8_epel16_v6_lsx()

void ff_put_vp8_epel16_v6_lsx ( uint8_t *  dst,
ptrdiff_t  dst_stride,
const uint8_t *  src,
ptrdiff_t  src_stride,
int  height,
int  mx,
int  my 
)

Definition at line 310 of file vp8_mc_lsx.c.

◆ ff_put_vp8_epel8_h6v6_lsx()

void ff_put_vp8_epel8_h6v6_lsx ( uint8_t *  dst,
ptrdiff_t  dst_stride,
const uint8_t *  src,
ptrdiff_t  src_stride,
int  height,
int  mx,
int  my 
)

Definition at line 391 of file vp8_mc_lsx.c.

Referenced by ff_put_vp8_epel16_h6v6_lsx().

◆ ff_put_vp8_epel16_h6v6_lsx()

void ff_put_vp8_epel16_h6v6_lsx ( uint8_t *  dst,
ptrdiff_t  dst_stride,
const uint8_t *  src,
ptrdiff_t  src_stride,
int  height,
int  mx,
int  my 
)

Definition at line 493 of file vp8_mc_lsx.c.

◆ ff_put_vp8_epel8_v4_lsx()

void ff_put_vp8_epel8_v4_lsx ( uint8_t *  dst,
ptrdiff_t  dst_stride,
const uint8_t *  src,
ptrdiff_t  src_stride,
int  height,
int  mx,
int  my 
)

Definition at line 506 of file vp8_mc_lsx.c.

◆ ff_put_vp8_epel16_v4_lsx()

void ff_put_vp8_epel16_v4_lsx ( uint8_t *  dst,
ptrdiff_t  dst_stride,
const uint8_t *  src,
ptrdiff_t  src_stride,
int  height,
int  mx,
int  my 
)

Definition at line 563 of file vp8_mc_lsx.c.

◆ ff_put_vp8_epel8_h6v4_lsx()

void ff_put_vp8_epel8_h6v4_lsx ( uint8_t *  dst,
ptrdiff_t  dst_stride,
const uint8_t *  src,
ptrdiff_t  src_stride,
int  height,
int  mx,
int  my 
)

Definition at line 633 of file vp8_mc_lsx.c.

Referenced by ff_put_vp8_epel16_h6v4_lsx().

◆ ff_put_vp8_epel16_h6v4_lsx()

void ff_put_vp8_epel16_h6v4_lsx ( uint8_t *  dst,
ptrdiff_t  dst_stride,
const uint8_t *  src,
ptrdiff_t  src_stride,
int  height,
int  mx,
int  my 
)

Definition at line 716 of file vp8_mc_lsx.c.

◆ ff_put_vp8_epel8_h4v6_lsx()

void ff_put_vp8_epel8_h4v6_lsx ( uint8_t *  dst,
ptrdiff_t  dst_stride,
const uint8_t *  src,
ptrdiff_t  src_stride,
int  height,
int  mx,
int  my 
)

Definition at line 730 of file vp8_mc_lsx.c.

Referenced by ff_put_vp8_epel16_h4v6_lsx().

◆ ff_put_vp8_epel16_h4v6_lsx()

void ff_put_vp8_epel16_h4v6_lsx ( uint8_t *  dst,
ptrdiff_t  dst_stride,
const uint8_t *  src,
ptrdiff_t  src_stride,
int  height,
int  mx,
int  my 
)

Definition at line 820 of file vp8_mc_lsx.c.

◆ ff_put_vp8_pixels8_lsx()

void ff_put_vp8_pixels8_lsx ( uint8_t *  dst,
ptrdiff_t  dst_stride,
const uint8_t *  src,
ptrdiff_t  src_stride,
int  height,
int  mx,
int  my 
)

Definition at line 834 of file vp8_mc_lsx.c.

◆ ff_put_vp8_pixels16_lsx()

void ff_put_vp8_pixels16_lsx ( uint8_t *  dst,
ptrdiff_t  dst_stride,
const uint8_t *  src,
ptrdiff_t  src_stride,
int  height,
int  mx,
int  my 
)

Definition at line 891 of file vp8_mc_lsx.c.

Variable Documentation

◆ mc_filt_mask_arr

const uint8_t mc_filt_mask_arr[16 *3]
static
Initial value:
= {
0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8,
0, 1, 1, 2, 2, 3, 3, 4, 16, 17, 17, 18, 18, 19, 19, 20,
8, 9, 9, 10, 10, 11, 11, 12, 24, 25, 25, 26, 26, 27, 27, 28
}

Definition at line 24 of file vp8_mc_lsx.c.

Referenced by ff_put_vp8_epel16_h6_lsx(), ff_put_vp8_epel8_h4v6_lsx(), ff_put_vp8_epel8_h6_lsx(), ff_put_vp8_epel8_h6v4_lsx(), and ff_put_vp8_epel8_h6v6_lsx().

◆ subpel_filters_lsx

const int8_t subpel_filters_lsx[7][8]
static
Initial value:
= {
{-6, 123, 12, -1, 0, 0, 0, 0},
{2, -11, 108, 36, -8, 1, 0, 0},
{-9, 93, 50, -6, 0, 0, 0, 0},
{3, -16, 77, 77, -16, 3, 0, 0},
{-6, 50, 93, -9, 0, 0, 0, 0},
{1, -8, 36, 108, -11, 2, 0, 0},
{-1, 12, 123, -6, 0, 0, 0, 0},
}

Definition at line 33 of file vp8_mc_lsx.c.

Referenced by ff_put_vp8_epel16_h6_lsx(), ff_put_vp8_epel16_v4_lsx(), ff_put_vp8_epel16_v6_lsx(), ff_put_vp8_epel8_h4v6_lsx(), ff_put_vp8_epel8_h6_lsx(), ff_put_vp8_epel8_h6v4_lsx(), ff_put_vp8_epel8_h6v6_lsx(), ff_put_vp8_epel8_v4_lsx(), and ff_put_vp8_epel8_v6_lsx().

src1
const pixel * src1
Definition: h264pred_template.c:421
VSHF_B3_SB
#define VSHF_B3_SB(in0, in1, in2, in3, in4, in5, mask0, mask1, mask2, out0, out1, out2)
Definition: vp8_mc_lsx.c:54
FILT_4TAP_DPADD_S_H
#define FILT_4TAP_DPADD_S_H(vec0, vec1, filt0, filt1)
Definition: vp8_mc_lsx.c:100
src2
const pixel * src2
Definition: h264pred_template.c:422
DPADD_SH3_SH
#define DPADD_SH3_SH(in0, in1, in2, coeff0, coeff1, coeff2)
Definition: vp8_mc_lsx.c:43
src0
const pixel *const src0
Definition: h264pred_template.c:420
DUP4_ARG3
#define DUP4_ARG3(_INS, _IN0, _IN1, _IN2, _IN3, _IN4, _IN5, _IN6, _IN7, _IN8, _IN9, _IN10, _IN11, _OUT0, _OUT1, _OUT2, _OUT3)
Definition: loongson_intrinsics.h:83