FFmpeg
Macros | Functions
vp9_lpf_lsx.c File Reference
#include "libavcodec/vp9dsp.h"
#include "libavutil/loongarch/loongson_intrinsics.h"
#include "libavutil/common.h"
#include "vp9dsp_loongarch.h"

Go to the source code of this file.

Macros

#define LSX_LD_8(_src, _stride, _stride2, _stride3, _stride4, _in0, _in1, _in2, _in3, _in4, _in5, _in6, _in7)
 
#define LSX_ST_8(_dst0, _dst1, _dst2, _dst3, _dst4, _dst5, _dst6, _dst7, _dst, _stride, _stride2, _stride3, _stride4)
 
#define VP9_LPF_FILTER4_4W(p1_src, p0_src, q0_src, q1_src, mask_src, hev_src, p1_dst, p0_dst, q0_dst, q1_dst)
 
#define VP9_FLAT4(p3_src, p2_src, p0_src, q0_src, q2_src, q3_src, flat_dst)
 
#define VP9_FLAT5(p7_src, p6_src, p5_src, p4_src, p0_src, q0_src, q4_src, q5_src, q6_src, q7_src, flat_src, flat2_dst)
 
#define VP9_FILTER8(p3_src, p2_src, p1_src, p0_src, q0_src, q1_src, q2_src, q3_src, p2_filt8_dst, p1_filt8_dst, p0_filt8_dst, q0_filt8_dst, q1_filt8_dst, q2_filt8_dst)
 
#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)
 

Functions

void ff_loop_filter_v_4_8_lsx (uint8_t *dst, ptrdiff_t stride, int32_t b_limit_ptr, int32_t limit_ptr, int32_t thresh_ptr)
 
void ff_loop_filter_v_44_16_lsx (uint8_t *dst, ptrdiff_t stride, int32_t b_limit_ptr, int32_t limit_ptr, int32_t thresh_ptr)
 
void ff_loop_filter_v_8_8_lsx (uint8_t *dst, ptrdiff_t stride, int32_t b_limit_ptr, int32_t limit_ptr, int32_t thresh_ptr)
 
void ff_loop_filter_v_88_16_lsx (uint8_t *dst, ptrdiff_t stride, int32_t b_limit_ptr, int32_t limit_ptr, int32_t thresh_ptr)
 
void ff_loop_filter_v_84_16_lsx (uint8_t *dst, ptrdiff_t stride, int32_t b_limit_ptr, int32_t limit_ptr, int32_t thresh_ptr)
 
void ff_loop_filter_v_48_16_lsx (uint8_t *dst, ptrdiff_t stride, int32_t b_limit_ptr, int32_t limit_ptr, int32_t thresh_ptr)
 
static int32_t vp9_hz_lpf_t4_and_t8_16w (uint8_t *dst, ptrdiff_t stride, uint8_t *filter48, int32_t b_limit_ptr, int32_t limit_ptr, int32_t thresh_ptr)
 
static void vp9_hz_lpf_t16_16w (uint8_t *dst, ptrdiff_t stride, uint8_t *filter48)
 
void ff_loop_filter_v_16_16_lsx (uint8_t *dst, ptrdiff_t stride, int32_t b_limit_ptr, int32_t limit_ptr, int32_t thresh_ptr)
 
void ff_loop_filter_v_16_8_lsx (uint8_t *dst, ptrdiff_t stride, int32_t b_limit_ptr, int32_t limit_ptr, int32_t thresh_ptr)
 
void ff_loop_filter_h_4_8_lsx (uint8_t *dst, ptrdiff_t stride, int32_t b_limit_ptr, int32_t limit_ptr, int32_t thresh_ptr)
 
void ff_loop_filter_h_44_16_lsx (uint8_t *dst, ptrdiff_t stride, int32_t b_limit_ptr, int32_t limit_ptr, int32_t thresh_ptr)
 
void ff_loop_filter_h_8_8_lsx (uint8_t *dst, ptrdiff_t stride, int32_t b_limit_ptr, int32_t limit_ptr, int32_t thresh_ptr)
 
void ff_loop_filter_h_88_16_lsx (uint8_t *dst, ptrdiff_t stride, int32_t b_limit_ptr, int32_t limit_ptr, int32_t thresh_ptr)
 
void ff_loop_filter_h_84_16_lsx (uint8_t *dst, ptrdiff_t stride, int32_t b_limit_ptr, int32_t limit_ptr, int32_t thresh_ptr)
 
void ff_loop_filter_h_48_16_lsx (uint8_t *dst, ptrdiff_t stride, int32_t b_limit_ptr, int32_t limit_ptr, int32_t thresh_ptr)
 
static void vp9_transpose_16x8_to_8x16 (uint8_t *input, ptrdiff_t in_pitch, uint8_t *output)
 
static void vp9_transpose_8x16_to_16x8 (uint8_t *input, uint8_t *output, ptrdiff_t out_pitch)
 
static void vp9_transpose_16x16 (uint8_t *input, int32_t in_stride, uint8_t *output, int32_t out_stride)
 
static int32_t vp9_vt_lpf_t4_and_t8_8w (uint8_t *src, uint8_t *filter48, uint8_t *src_org, int32_t pitch_org, int32_t b_limit_ptr, int32_t limit_ptr, int32_t thresh_ptr)
 
static int32_t vp9_vt_lpf_t16_8w (uint8_t *dst, uint8_t *dst_org, ptrdiff_t stride, uint8_t *filter48)
 
void ff_loop_filter_h_16_8_lsx (uint8_t *dst, ptrdiff_t stride, int32_t b_limit_ptr, int32_t limit_ptr, int32_t thresh_ptr)
 
static int32_t vp9_vt_lpf_t4_and_t8_16w (uint8_t *dst, uint8_t *filter48, uint8_t *dst_org, ptrdiff_t stride, int32_t b_limit_ptr, int32_t limit_ptr, int32_t thresh_ptr)
 
static int32_t vp9_vt_lpf_t16_16w (uint8_t *dst, uint8_t *dst_org, ptrdiff_t stride, uint8_t *filter48)
 
void ff_loop_filter_h_16_16_lsx (uint8_t *dst, ptrdiff_t stride, int32_t b_limit_ptr, int32_t limit_ptr, int32_t thresh_ptr)
 

Macro Definition Documentation

◆ LSX_LD_8

#define LSX_LD_8 (   _src,
  _stride,
  _stride2,
  _stride3,
  _stride4,
  _in0,
  _in1,
  _in2,
  _in3,
  _in4,
  _in5,
  _in6,
  _in7 
)
Value:
{ \
_in0 = __lsx_vld(_src, 0); \
_in1 = __lsx_vldx(_src, _stride); \
_in2 = __lsx_vldx(_src, _stride2); \
_in3 = __lsx_vldx(_src, _stride3); \
_src += _stride4; \
_in4 = __lsx_vld(_src, 0); \
_in5 = __lsx_vldx(_src, _stride); \
_in6 = __lsx_vldx(_src, _stride2); \
_in7 = __lsx_vldx(_src, _stride3); \
}

Definition at line 27 of file vp9_lpf_lsx.c.

◆ LSX_ST_8

#define LSX_ST_8 (   _dst0,
  _dst1,
  _dst2,
  _dst3,
  _dst4,
  _dst5,
  _dst6,
  _dst7,
  _dst,
  _stride,
  _stride2,
  _stride3,
  _stride4 
)
Value:
{ \
__lsx_vst(_dst0, _dst, 0); \
__lsx_vstx(_dst1, _dst, _stride); \
__lsx_vstx(_dst2, _dst, _stride2); \
__lsx_vstx(_dst3, _dst, _stride3); \
_dst += _stride4; \
__lsx_vst(_dst4, _dst, 0); \
__lsx_vstx(_dst5, _dst, _stride); \
__lsx_vstx(_dst6, _dst, _stride2); \
__lsx_vstx(_dst7, _dst, _stride3); \
}

Definition at line 41 of file vp9_lpf_lsx.c.

◆ VP9_LPF_FILTER4_4W

#define VP9_LPF_FILTER4_4W (   p1_src,
  p0_src,
  q0_src,
  q1_src,
  mask_src,
  hev_src,
  p1_dst,
  p0_dst,
  q0_dst,
  q1_dst 
)

Definition at line 55 of file vp9_lpf_lsx.c.

◆ VP9_FLAT4

#define VP9_FLAT4 (   p3_src,
  p2_src,
  p0_src,
  q0_src,
  q2_src,
  q3_src,
  flat_dst 
)
Value:
{ \
__m128i f_tmp = __lsx_vldi(1); \
__m128i p2_a_sub_p0, q2_a_sub_q0, p3_a_sub_p0, q3_a_sub_q0; \
\
p2_a_sub_p0 = __lsx_vabsd_bu(p2_src, p0_src); \
q2_a_sub_q0 = __lsx_vabsd_bu(q2_src, q0_src); \
p3_a_sub_p0 = __lsx_vabsd_bu(p3_src, p0_src); \
q3_a_sub_q0 = __lsx_vabsd_bu(q3_src, q0_src); \
\
p2_a_sub_p0 = __lsx_vmax_bu(p2_a_sub_p0, q2_a_sub_q0); \
flat_dst = __lsx_vmax_bu(p2_a_sub_p0, flat_dst); \
p3_a_sub_p0 = __lsx_vmax_bu(p3_a_sub_p0, q3_a_sub_q0); \
flat_dst = __lsx_vmax_bu(p3_a_sub_p0, flat_dst); \
\
flat_dst = __lsx_vslt_bu(f_tmp, flat_dst); \
flat_dst = __lsx_vxori_b(flat_dst, 0xff); \
flat_dst = flat_dst & mask; \
}

Definition at line 98 of file vp9_lpf_lsx.c.

◆ VP9_FLAT5

#define VP9_FLAT5 (   p7_src,
  p6_src,
  p5_src,
  p4_src,
  p0_src,
  q0_src,
  q4_src,
  q5_src,
  q6_src,
  q7_src,
  flat_src,
  flat2_dst 
)
Value:
{ \
__m128i f_tmp = __lsx_vldi(1); \
__m128i p4_a_sub_p0, q4_a_sub_q0, p5_a_sub_p0, q5_a_sub_q0; \
__m128i p6_a_sub_p0, q6_a_sub_q0, p7_a_sub_p0, q7_a_sub_q0; \
\
p4_a_sub_p0 = __lsx_vabsd_bu(p4_src, p0_src); \
q4_a_sub_q0 = __lsx_vabsd_bu(q4_src, q0_src); \
p5_a_sub_p0 = __lsx_vabsd_bu(p5_src, p0_src); \
q5_a_sub_q0 = __lsx_vabsd_bu(q5_src, q0_src); \
p6_a_sub_p0 = __lsx_vabsd_bu(p6_src, p0_src); \
q6_a_sub_q0 = __lsx_vabsd_bu(q6_src, q0_src); \
p7_a_sub_p0 = __lsx_vabsd_bu(p7_src, p0_src); \
q7_a_sub_q0 = __lsx_vabsd_bu(q7_src, q0_src); \
\
p4_a_sub_p0 = __lsx_vmax_bu(p4_a_sub_p0, q4_a_sub_q0); \
flat2_dst = __lsx_vmax_bu(p5_a_sub_p0, q5_a_sub_q0); \
flat2_dst = __lsx_vmax_bu(p4_a_sub_p0, flat2_dst); \
p6_a_sub_p0 = __lsx_vmax_bu(p6_a_sub_p0, q6_a_sub_q0); \
flat2_dst = __lsx_vmax_bu(p6_a_sub_p0, flat2_dst); \
p7_a_sub_p0 = __lsx_vmax_bu(p7_a_sub_p0, q7_a_sub_q0); \
flat2_dst = __lsx_vmax_bu(p7_a_sub_p0, flat2_dst); \
\
flat2_dst = __lsx_vslt_bu(f_tmp, flat2_dst); \
flat2_dst = __lsx_vxori_b(flat2_dst, 0xff); \
flat2_dst = flat2_dst & flat_src; \
}

Definition at line 118 of file vp9_lpf_lsx.c.

◆ VP9_FILTER8

#define VP9_FILTER8 (   p3_src,
  p2_src,
  p1_src,
  p0_src,
  q0_src,
  q1_src,
  q2_src,
  q3_src,
  p2_filt8_dst,
  p1_filt8_dst,
  p0_filt8_dst,
  q0_filt8_dst,
  q1_filt8_dst,
  q2_filt8_dst 
)

Definition at line 147 of file vp9_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 
)

Definition at line 192 of file vp9_lpf_lsx.c.

Function Documentation

◆ ff_loop_filter_v_4_8_lsx()

void ff_loop_filter_v_4_8_lsx ( uint8_t *  dst,
ptrdiff_t  stride,
int32_t  b_limit_ptr,
int32_t  limit_ptr,
int32_t  thresh_ptr 
)

Definition at line 229 of file vp9_lpf_lsx.c.

Referenced by ff_vp9dsp_init_loongarch().

◆ ff_loop_filter_v_44_16_lsx()

void ff_loop_filter_v_44_16_lsx ( uint8_t *  dst,
ptrdiff_t  stride,
int32_t  b_limit_ptr,
int32_t  limit_ptr,
int32_t  thresh_ptr 
)

Definition at line 262 of file vp9_lpf_lsx.c.

Referenced by ff_vp9dsp_init_loongarch().

◆ ff_loop_filter_v_8_8_lsx()

void ff_loop_filter_v_8_8_lsx ( uint8_t *  dst,
ptrdiff_t  stride,
int32_t  b_limit_ptr,
int32_t  limit_ptr,
int32_t  thresh_ptr 
)

Definition at line 302 of file vp9_lpf_lsx.c.

Referenced by ff_vp9dsp_init_loongarch().

◆ ff_loop_filter_v_88_16_lsx()

void ff_loop_filter_v_88_16_lsx ( uint8_t *  dst,
ptrdiff_t  stride,
int32_t  b_limit_ptr,
int32_t  limit_ptr,
int32_t  thresh_ptr 
)

Definition at line 374 of file vp9_lpf_lsx.c.

Referenced by ff_vp9dsp_init_loongarch().

◆ ff_loop_filter_v_84_16_lsx()

void ff_loop_filter_v_84_16_lsx ( uint8_t *  dst,
ptrdiff_t  stride,
int32_t  b_limit_ptr,
int32_t  limit_ptr,
int32_t  thresh_ptr 
)

Definition at line 465 of file vp9_lpf_lsx.c.

Referenced by ff_vp9dsp_init_loongarch().

◆ ff_loop_filter_v_48_16_lsx()

void ff_loop_filter_v_48_16_lsx ( uint8_t *  dst,
ptrdiff_t  stride,
int32_t  b_limit_ptr,
int32_t  limit_ptr,
int32_t  thresh_ptr 
)

Definition at line 547 of file vp9_lpf_lsx.c.

Referenced by ff_vp9dsp_init_loongarch().

◆ vp9_hz_lpf_t4_and_t8_16w()

static int32_t vp9_hz_lpf_t4_and_t8_16w ( uint8_t *  dst,
ptrdiff_t  stride,
uint8_t *  filter48,
int32_t  b_limit_ptr,
int32_t  limit_ptr,
int32_t  thresh_ptr 
)
static

Definition at line 629 of file vp9_lpf_lsx.c.

Referenced by ff_loop_filter_v_16_16_lsx().

◆ vp9_hz_lpf_t16_16w()

static void vp9_hz_lpf_t16_16w ( uint8_t *  dst,
ptrdiff_t  stride,
uint8_t *  filter48 
)
static

Definition at line 716 of file vp9_lpf_lsx.c.

Referenced by ff_loop_filter_v_16_16_lsx().

◆ ff_loop_filter_v_16_16_lsx()

void ff_loop_filter_v_16_16_lsx ( uint8_t *  dst,
ptrdiff_t  stride,
int32_t  b_limit_ptr,
int32_t  limit_ptr,
int32_t  thresh_ptr 
)

Definition at line 1080 of file vp9_lpf_lsx.c.

Referenced by ff_vp9dsp_init_loongarch().

◆ ff_loop_filter_v_16_8_lsx()

void ff_loop_filter_v_16_8_lsx ( uint8_t *  dst,
ptrdiff_t  stride,
int32_t  b_limit_ptr,
int32_t  limit_ptr,
int32_t  thresh_ptr 
)

Definition at line 1096 of file vp9_lpf_lsx.c.

Referenced by ff_vp9dsp_init_loongarch().

◆ ff_loop_filter_h_4_8_lsx()

void ff_loop_filter_h_4_8_lsx ( uint8_t *  dst,
ptrdiff_t  stride,
int32_t  b_limit_ptr,
int32_t  limit_ptr,
int32_t  thresh_ptr 
)

Definition at line 1350 of file vp9_lpf_lsx.c.

Referenced by ff_vp9dsp_init_loongarch().

◆ ff_loop_filter_h_44_16_lsx()

void ff_loop_filter_h_44_16_lsx ( uint8_t *  dst,
ptrdiff_t  stride,
int32_t  b_limit_ptr,
int32_t  limit_ptr,
int32_t  thresh_ptr 
)

Definition at line 1396 of file vp9_lpf_lsx.c.

Referenced by ff_vp9dsp_init_loongarch().

◆ ff_loop_filter_h_8_8_lsx()

void ff_loop_filter_h_8_8_lsx ( uint8_t *  dst,
ptrdiff_t  stride,
int32_t  b_limit_ptr,
int32_t  limit_ptr,
int32_t  thresh_ptr 
)

Definition at line 1476 of file vp9_lpf_lsx.c.

Referenced by ff_vp9dsp_init_loongarch().

◆ ff_loop_filter_h_88_16_lsx()

void ff_loop_filter_h_88_16_lsx ( uint8_t *  dst,
ptrdiff_t  stride,
int32_t  b_limit_ptr,
int32_t  limit_ptr,
int32_t  thresh_ptr 
)

Definition at line 1594 of file vp9_lpf_lsx.c.

Referenced by ff_vp9dsp_init_loongarch().

◆ ff_loop_filter_h_84_16_lsx()

void ff_loop_filter_h_84_16_lsx ( uint8_t *  dst,
ptrdiff_t  stride,
int32_t  b_limit_ptr,
int32_t  limit_ptr,
int32_t  thresh_ptr 
)

Definition at line 1779 of file vp9_lpf_lsx.c.

Referenced by ff_vp9dsp_init_loongarch().

◆ ff_loop_filter_h_48_16_lsx()

void ff_loop_filter_h_48_16_lsx ( uint8_t *  dst,
ptrdiff_t  stride,
int32_t  b_limit_ptr,
int32_t  limit_ptr,
int32_t  thresh_ptr 
)

Definition at line 1954 of file vp9_lpf_lsx.c.

Referenced by ff_vp9dsp_init_loongarch().

◆ vp9_transpose_16x8_to_8x16()

static void vp9_transpose_16x8_to_8x16 ( uint8_t *  input,
ptrdiff_t  in_pitch,
uint8_t *  output 
)
static

Definition at line 2130 of file vp9_lpf_lsx.c.

Referenced by ff_loop_filter_h_16_8_lsx().

◆ vp9_transpose_8x16_to_16x8()

static void vp9_transpose_8x16_to_16x8 ( uint8_t *  input,
uint8_t *  output,
ptrdiff_t  out_pitch 
)
static

Definition at line 2172 of file vp9_lpf_lsx.c.

Referenced by ff_loop_filter_h_16_8_lsx().

◆ vp9_transpose_16x16()

static void vp9_transpose_16x16 ( uint8_t *  input,
int32_t  in_stride,
uint8_t *  output,
int32_t  out_stride 
)
static

Definition at line 2195 of file vp9_lpf_lsx.c.

Referenced by ff_loop_filter_h_16_16_lsx().

◆ vp9_vt_lpf_t4_and_t8_8w()

static int32_t vp9_vt_lpf_t4_and_t8_8w ( uint8_t *  src,
uint8_t *  filter48,
uint8_t *  src_org,
int32_t  pitch_org,
int32_t  b_limit_ptr,
int32_t  limit_ptr,
int32_t  thresh_ptr 
)
static

Definition at line 2262 of file vp9_lpf_lsx.c.

Referenced by ff_loop_filter_h_16_8_lsx().

◆ vp9_vt_lpf_t16_8w()

static int32_t vp9_vt_lpf_t16_8w ( uint8_t *  dst,
uint8_t *  dst_org,
ptrdiff_t  stride,
uint8_t *  filter48 
)
static

Definition at line 2356 of file vp9_lpf_lsx.c.

Referenced by ff_loop_filter_h_16_8_lsx().

◆ ff_loop_filter_h_16_8_lsx()

void ff_loop_filter_h_16_8_lsx ( uint8_t *  dst,
ptrdiff_t  stride,
int32_t  b_limit_ptr,
int32_t  limit_ptr,
int32_t  thresh_ptr 
)

Definition at line 2612 of file vp9_lpf_lsx.c.

Referenced by ff_vp9dsp_init_loongarch().

◆ vp9_vt_lpf_t4_and_t8_16w()

static int32_t vp9_vt_lpf_t4_and_t8_16w ( uint8_t *  dst,
uint8_t *  filter48,
uint8_t *  dst_org,
ptrdiff_t  stride,
int32_t  b_limit_ptr,
int32_t  limit_ptr,
int32_t  thresh_ptr 
)
static

Definition at line 2637 of file vp9_lpf_lsx.c.

Referenced by ff_loop_filter_h_16_16_lsx().

◆ vp9_vt_lpf_t16_16w()

static int32_t vp9_vt_lpf_t16_16w ( uint8_t *  dst,
uint8_t *  dst_org,
ptrdiff_t  stride,
uint8_t *  filter48 
)
static

Definition at line 2749 of file vp9_lpf_lsx.c.

Referenced by ff_loop_filter_h_16_16_lsx().

◆ ff_loop_filter_h_16_16_lsx()

void ff_loop_filter_h_16_16_lsx ( uint8_t *  dst,
ptrdiff_t  stride,
int32_t  b_limit_ptr,
int32_t  limit_ptr,
int32_t  thresh_ptr 
)

Definition at line 3118 of file vp9_lpf_lsx.c.

Referenced by ff_vp9dsp_init_loongarch().

_stride
ptrdiff_t _stride
Definition: h264pred_template.c:411
mask
static const uint16_t mask[17]
Definition: lzw.c:38