FFmpeg
Macros | Functions
h264dsp_lasx.c File Reference
#include "libavutil/loongarch/loongson_intrinsics.h"
#include "h264dsp_loongarch.h"

Go to the source code of this file.

Macros

#define AVC_LPF_P1_OR_Q1(p0_or_q0_org_in, q0_or_p0_org_in, p1_or_q1_org_in, p2_or_q2_org_in, neg_tc_in, tc_in, p1_or_q1_out)
 
#define AVC_LPF_P0Q0(q0_or_p0_org_in, p0_or_q0_org_in, p1_or_q1_org_in, q1_or_p1_org_in, neg_threshold_in, threshold_in, p0_or_q0_out, q0_or_p0_out)
 
#define AVC_LPF_P0P1P2_OR_Q0Q1Q2(p3_or_q3_org_in, p0_or_q0_org_in, q3_or_p3_org_in, p1_or_q1_org_in, p2_or_q2_org_in, q1_or_p1_org_in, p0_or_q0_out, p1_or_q1_out, p2_or_q2_out)
 
#define AVC_LPF_P0_OR_Q0(p0_or_q0_org_in, q1_or_p1_org_in, p1_or_q1_org_in, p0_or_q0_out)
 

Functions

void ff_h264_h_lpf_luma_8_lasx (uint8_t *data, ptrdiff_t img_width, int alpha_in, int beta_in, int8_t *tc)
 
void ff_h264_v_lpf_luma_8_lasx (uint8_t *data, ptrdiff_t img_width, int alpha_in, int beta_in, int8_t *tc)
 
void ff_h264_h_lpf_luma_intra_8_lasx (uint8_t *data, ptrdiff_t img_width, int alpha_in, int beta_in)
 
void ff_h264_v_lpf_luma_intra_8_lasx (uint8_t *data, ptrdiff_t img_width, int alpha_in, int beta_in)
 
void ff_h264_add_pixels4_8_lasx (uint8_t *_dst, int16_t *_src, int stride)
 
void ff_h264_add_pixels8_8_lasx (uint8_t *_dst, int16_t *_src, int stride)
 

Macro Definition Documentation

◆ AVC_LPF_P1_OR_Q1

#define AVC_LPF_P1_OR_Q1 (   p0_or_q0_org_in,
  q0_or_p0_org_in,
  p1_or_q1_org_in,
  p2_or_q2_org_in,
  neg_tc_in,
  tc_in,
  p1_or_q1_out 
)
Value:
{ \
__m256i clip3, temp; \
\
clip3 = __lasx_xvavgr_hu(p0_or_q0_org_in, \
q0_or_p0_org_in); \
temp = __lasx_xvslli_h(p1_or_q1_org_in, 1); \
clip3 = __lasx_xvsub_h(clip3, temp); \
clip3 = __lasx_xvavg_h(p2_or_q2_org_in, clip3); \
clip3 = __lasx_xvclip_h(clip3, neg_tc_in, tc_in); \
p1_or_q1_out = __lasx_xvadd_h(p1_or_q1_org_in, clip3); \
}

Definition at line 28 of file h264dsp_lasx.c.

◆ AVC_LPF_P0Q0

#define AVC_LPF_P0Q0 (   q0_or_p0_org_in,
  p0_or_q0_org_in,
  p1_or_q1_org_in,
  q1_or_p1_org_in,
  neg_threshold_in,
  threshold_in,
  p0_or_q0_out,
  q0_or_p0_out 
)
Value:
{ \
__m256i q0_sub_p0, p1_sub_q1, delta; \
\
q0_sub_p0 = __lasx_xvsub_h(q0_or_p0_org_in, \
p0_or_q0_org_in); \
p1_sub_q1 = __lasx_xvsub_h(p1_or_q1_org_in, \
q1_or_p1_org_in); \
q0_sub_p0 = __lasx_xvslli_h(q0_sub_p0, 2); \
p1_sub_q1 = __lasx_xvaddi_hu(p1_sub_q1, 4); \
delta = __lasx_xvadd_h(q0_sub_p0, p1_sub_q1); \
delta = __lasx_xvsrai_h(delta, 3); \
delta = __lasx_xvclip_h(delta, neg_threshold_in, \
threshold_in); \
p0_or_q0_out = __lasx_xvadd_h(p0_or_q0_org_in, delta); \
q0_or_p0_out = __lasx_xvsub_h(q0_or_p0_org_in, delta); \
\
p0_or_q0_out = __lasx_xvclip255_h(p0_or_q0_out); \
q0_or_p0_out = __lasx_xvclip255_h(q0_or_p0_out); \
}

Definition at line 43 of file h264dsp_lasx.c.

◆ AVC_LPF_P0P1P2_OR_Q0Q1Q2

#define AVC_LPF_P0P1P2_OR_Q0Q1Q2 (   p3_or_q3_org_in,
  p0_or_q0_org_in,
  q3_or_p3_org_in,
  p1_or_q1_org_in,
  p2_or_q2_org_in,
  q1_or_p1_org_in,
  p0_or_q0_out,
  p1_or_q1_out,
  p2_or_q2_out 
)
Value:
{ \
__m256i threshold; \
__m256i const2, const3 = __lasx_xvldi(0); \
\
const2 = __lasx_xvaddi_hu(const3, 2); \
const3 = __lasx_xvaddi_hu(const3, 3); \
threshold = __lasx_xvadd_h(p0_or_q0_org_in, q3_or_p3_org_in); \
threshold = __lasx_xvadd_h(p1_or_q1_org_in, threshold); \
\
p0_or_q0_out = __lasx_xvslli_h(threshold, 1); \
p0_or_q0_out = __lasx_xvadd_h(p0_or_q0_out, p2_or_q2_org_in); \
p0_or_q0_out = __lasx_xvadd_h(p0_or_q0_out, q1_or_p1_org_in); \
p0_or_q0_out = __lasx_xvsrar_h(p0_or_q0_out, const3); \
\
p1_or_q1_out = __lasx_xvadd_h(p2_or_q2_org_in, threshold); \
p1_or_q1_out = __lasx_xvsrar_h(p1_or_q1_out, const2); \
\
p2_or_q2_out = __lasx_xvmul_h(p2_or_q2_org_in, const3); \
p2_or_q2_out = __lasx_xvadd_h(p2_or_q2_out, p3_or_q3_org_in); \
p2_or_q2_out = __lasx_xvadd_h(p2_or_q2_out, p3_or_q3_org_in); \
p2_or_q2_out = __lasx_xvadd_h(p2_or_q2_out, threshold); \
p2_or_q2_out = __lasx_xvsrar_h(p2_or_q2_out, const3); \
}

Definition at line 366 of file h264dsp_lasx.c.

◆ AVC_LPF_P0_OR_Q0

#define AVC_LPF_P0_OR_Q0 (   p0_or_q0_org_in,
  q1_or_p1_org_in,
  p1_or_q1_org_in,
  p0_or_q0_out 
)
Value:
{ \
__m256i const2 = __lasx_xvldi(0); \
const2 = __lasx_xvaddi_hu(const2, 2); \
p0_or_q0_out = __lasx_xvadd_h(p0_or_q0_org_in, q1_or_p1_org_in); \
p0_or_q0_out = __lasx_xvadd_h(p0_or_q0_out, p1_or_q1_org_in); \
p0_or_q0_out = __lasx_xvadd_h(p0_or_q0_out, p1_or_q1_org_in); \
p0_or_q0_out = __lasx_xvsrar_h(p0_or_q0_out, const2); \
}

Definition at line 395 of file h264dsp_lasx.c.

Function Documentation

◆ ff_h264_h_lpf_luma_8_lasx()

void ff_h264_h_lpf_luma_8_lasx ( uint8_t *  data,
ptrdiff_t  img_width,
int  alpha_in,
int  beta_in,
int8_t *  tc 
)

Definition at line 67 of file h264dsp_lasx.c.

Referenced by ff_h264dsp_init_loongarch().

◆ ff_h264_v_lpf_luma_8_lasx()

void ff_h264_v_lpf_luma_8_lasx ( uint8_t *  data,
ptrdiff_t  img_width,
int  alpha_in,
int  beta_in,
int8_t *  tc 
)

Definition at line 244 of file h264dsp_lasx.c.

Referenced by ff_h264dsp_init_loongarch().

◆ ff_h264_h_lpf_luma_intra_8_lasx()

void ff_h264_h_lpf_luma_intra_8_lasx ( uint8_t *  data,
ptrdiff_t  img_width,
int  alpha_in,
int  beta_in 
)

Definition at line 406 of file h264dsp_lasx.c.

Referenced by ff_h264dsp_init_loongarch().

◆ ff_h264_v_lpf_luma_intra_8_lasx()

void ff_h264_v_lpf_luma_intra_8_lasx ( uint8_t *  data,
ptrdiff_t  img_width,
int  alpha_in,
int  beta_in 
)

Definition at line 582 of file h264dsp_lasx.c.

Referenced by ff_h264dsp_init_loongarch().

◆ ff_h264_add_pixels4_8_lasx()

void ff_h264_add_pixels4_8_lasx ( uint8_t *  _dst,
int16_t *  _src,
int  stride 
)

Definition at line 702 of file h264dsp_lasx.c.

Referenced by ff_h264dsp_init_loongarch().

◆ ff_h264_add_pixels8_8_lasx()

void ff_h264_add_pixels8_8_lasx ( uint8_t *  _dst,
int16_t *  _src,
int  stride 
)

Definition at line 729 of file h264dsp_lasx.c.

Referenced by ff_h264dsp_init_loongarch().

delta
float delta
Definition: vorbis_enc_data.h:430
temp
else temp
Definition: vf_mcdeint.c:263