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

Go to the source code of this file.

Macros

#define VP8_LPF_FILTER4_4W(p1_in_out, p0_in_out, q0_in_out, q1_in_out, mask_in, hev_in)
 
#define VP8_MBFILTER(p2, p1, p0, q0, q1, q2, mask, hev)
 
#define LPF_MASK_HEV(p3_src, p2_src, p1_src, p0_src, q0_src, q1_src, q2_src, q3_src, limit_src, b_limit_src, thresh_src, hev_dst, mask_dst, flat_dst)
 
#define VP8_ST6x1_UB(in0, in0_idx, in1, in1_idx, pdst, stride)
 
#define ST_W4(in, idx0, idx1, idx2, idx3, pdst, stride)
 

Functions

void ff_vp8_v_loop_filter16_lsx (uint8_t *dst, ptrdiff_t stride, int b_limit_in, int limit_in, int thresh_in)
 
void ff_vp8_v_loop_filter8uv_lsx (uint8_t *dst_u, uint8_t *dst_v, ptrdiff_t stride, int b_limit_in, int limit_in, int thresh_in)
 
void ff_vp8_h_loop_filter16_lsx (uint8_t *dst, ptrdiff_t stride, int b_limit_in, int limit_in, int thresh_in)
 
void ff_vp8_h_loop_filter8uv_lsx (uint8_t *dst_u, uint8_t *dst_v, ptrdiff_t stride, int b_limit_in, int limit_in, int thresh_in)
 
void ff_vp8_v_loop_filter16_inner_lsx (uint8_t *src, ptrdiff_t stride, int32_t e, int32_t i, int32_t h)
 
void ff_vp8_h_loop_filter16_inner_lsx (uint8_t *src, ptrdiff_t stride, int32_t e, int32_t i, int32_t h)
 

Macro Definition Documentation

◆ VP8_LPF_FILTER4_4W

#define VP8_LPF_FILTER4_4W (   p1_in_out,
  p0_in_out,
  q0_in_out,
  q1_in_out,
  mask_in,
  hev_in 
)

Definition at line 26 of file vp8_lpf_lsx.c.

◆ VP8_MBFILTER

#define VP8_MBFILTER (   p2,
  p1,
  p0,
  q0,
  q1,
  q2,
  mask,
  hev 
)

Definition at line 81 of file vp8_lpf_lsx.c.

◆ LPF_MASK_HEV

#define LPF_MASK_HEV (   p3_src,
  p2_src,
  p1_src,
  p0_src,
  q0_src,
  q1_src,
  q2_src,
  q3_src,
  limit_src,
  b_limit_src,
  thresh_src,
  hev_dst,
  mask_dst,
  flat_dst 
)
Value:
{ \
__m128i p3_asub_p2_m, p2_asub_p1_m, p1_asub_p0_m, q1_asub_q0_m; \
__m128i p1_asub_q1_m, p0_asub_q0_m, q3_asub_q2_m, q2_asub_q1_m; \
\
/* absolute subtraction of pixel values */ \
p3_asub_p2_m = __lsx_vabsd_bu(p3_src, p2_src); \
p2_asub_p1_m = __lsx_vabsd_bu(p2_src, p1_src); \
p1_asub_p0_m = __lsx_vabsd_bu(p1_src, p0_src); \
q1_asub_q0_m = __lsx_vabsd_bu(q1_src, q0_src); \
q2_asub_q1_m = __lsx_vabsd_bu(q2_src, q1_src); \
q3_asub_q2_m = __lsx_vabsd_bu(q3_src, q2_src); \
p0_asub_q0_m = __lsx_vabsd_bu(p0_src, q0_src); \
p1_asub_q1_m = __lsx_vabsd_bu(p1_src, q1_src); \
\
/* calculation of hev */ \
flat_dst = __lsx_vmax_bu(p1_asub_p0_m, q1_asub_q0_m); \
hev_dst = __lsx_vslt_bu(thresh_src, flat_dst); \
/* calculation of mask */ \
p0_asub_q0_m = __lsx_vsadd_bu(p0_asub_q0_m, p0_asub_q0_m); \
p1_asub_q1_m = __lsx_vsrli_b(p1_asub_q1_m, 1); \
p0_asub_q0_m = __lsx_vsadd_bu(p0_asub_q0_m, p1_asub_q1_m); \
mask_dst = __lsx_vslt_bu(b_limit_src, p0_asub_q0_m); \
mask_dst = __lsx_vmax_bu(flat_dst, mask_dst); \
p3_asub_p2_m = __lsx_vmax_bu(p3_asub_p2_m, p2_asub_p1_m); \
mask_dst = __lsx_vmax_bu(p3_asub_p2_m, mask_dst); \
q2_asub_q1_m = __lsx_vmax_bu(q2_asub_q1_m, q3_asub_q2_m); \
mask_dst = __lsx_vmax_bu(q2_asub_q1_m, mask_dst); \
mask_dst = __lsx_vslt_bu(limit_src, mask_dst); \
mask_dst = __lsx_vxori_b(mask_dst, 0xff); \
}

Definition at line 193 of file vp8_lpf_lsx.c.

◆ VP8_ST6x1_UB

#define VP8_ST6x1_UB (   in0,
  in0_idx,
  in1,
  in1_idx,
  pdst,
  stride 
)
Value:
{ \
__lsx_vstelm_w(in0, pdst, 0, in0_idx); \
__lsx_vstelm_h(in1, pdst + stride, 0, in1_idx); \
}

Definition at line 228 of file vp8_lpf_lsx.c.

◆ ST_W4

#define ST_W4 (   in,
  idx0,
  idx1,
  idx2,
  idx3,
  pdst,
  stride 
)
Value:
{ \
__lsx_vstelm_w(in, pdst, 0, idx0); \
pdst += stride; \
__lsx_vstelm_w(in, pdst, 0, idx1); \
pdst += stride; \
__lsx_vstelm_w(in, pdst, 0, idx2); \
pdst += stride; \
__lsx_vstelm_w(in, pdst, 0, idx3); \
pdst += stride; \
}

Definition at line 234 of file vp8_lpf_lsx.c.

Function Documentation

◆ ff_vp8_v_loop_filter16_lsx()

void ff_vp8_v_loop_filter16_lsx ( uint8_t *  dst,
ptrdiff_t  stride,
int  b_limit_in,
int  limit_in,
int  thresh_in 
)

Definition at line 246 of file vp8_lpf_lsx.c.

Referenced by ff_vp8dsp_init_loongarch().

◆ ff_vp8_v_loop_filter8uv_lsx()

void ff_vp8_v_loop_filter8uv_lsx ( uint8_t *  dst_u,
uint8_t *  dst_v,
ptrdiff_t  stride,
int  b_limit_in,
int  limit_in,
int  thresh_in 
)

Definition at line 278 of file vp8_lpf_lsx.c.

Referenced by ff_vp8dsp_init_loongarch().

◆ ff_vp8_h_loop_filter16_lsx()

void ff_vp8_h_loop_filter16_lsx ( uint8_t *  dst,
ptrdiff_t  stride,
int  b_limit_in,
int  limit_in,
int  thresh_in 
)

Definition at line 329 of file vp8_lpf_lsx.c.

Referenced by ff_vp8dsp_init_loongarch().

◆ ff_vp8_h_loop_filter8uv_lsx()

void ff_vp8_h_loop_filter8uv_lsx ( uint8_t *  dst_u,
uint8_t *  dst_v,
ptrdiff_t  stride,
int  b_limit_in,
int  limit_in,
int  thresh_in 
)

Definition at line 415 of file vp8_lpf_lsx.c.

Referenced by ff_vp8dsp_init_loongarch().

◆ ff_vp8_v_loop_filter16_inner_lsx()

void ff_vp8_v_loop_filter16_inner_lsx ( uint8_t *  src,
ptrdiff_t  stride,
int32_t  e,
int32_t  i,
int32_t  h 
)

Definition at line 505 of file vp8_lpf_lsx.c.

Referenced by ff_vp8dsp_init_loongarch().

◆ ff_vp8_h_loop_filter16_inner_lsx()

void ff_vp8_h_loop_filter16_inner_lsx ( uint8_t *  src,
ptrdiff_t  stride,
int32_t  e,
int32_t  i,
int32_t  h 
)

Definition at line 537 of file vp8_lpf_lsx.c.

Referenced by ff_vp8dsp_init_loongarch().

stride
int stride
Definition: mace.c:144