FFmpeg
Macros | Functions
h264dsp_lasx.c File Reference
#include "libavutil/loongarch/loongson_intrinsics.h"
#include "h264dsp_lasx.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_chroma_8_lasx (uint8_t *data, ptrdiff_t img_width, int alpha_in, int beta_in, int8_t *tc)
 
void ff_h264_v_lpf_chroma_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_h_lpf_chroma_intra_8_lasx (uint8_t *data, ptrdiff_t img_width, int alpha_in, int beta_in)
 
void ff_h264_v_lpf_chroma_intra_8_lasx (uint8_t *data, ptrdiff_t img_width, int alpha_in, int beta_in)
 
void ff_biweight_h264_pixels16_8_lasx (uint8_t *dst, uint8_t *src, ptrdiff_t stride, int height, int log2_denom, int weight_dst, int weight_src, int offset_in)
 
static void avc_biwgt_8x4_lasx (uint8_t *src, uint8_t *dst, ptrdiff_t stride, int32_t log2_denom, int32_t weight_src, int32_t weight_dst, int32_t offset_in)
 
static void avc_biwgt_8x8_lasx (uint8_t *src, uint8_t *dst, ptrdiff_t stride, int32_t log2_denom, int32_t weight_src, int32_t weight_dst, int32_t offset_in)
 
static void avc_biwgt_8x16_lasx (uint8_t *src, uint8_t *dst, ptrdiff_t stride, int32_t log2_denom, int32_t weight_src, int32_t weight_dst, int32_t offset_in)
 
void ff_biweight_h264_pixels8_8_lasx (uint8_t *dst, uint8_t *src, ptrdiff_t stride, int height, int log2_denom, int weight_dst, int weight_src, int offset)
 
static void avc_biwgt_4x2_lasx (uint8_t *src, uint8_t *dst, ptrdiff_t stride, int32_t log2_denom, int32_t weight_src, int32_t weight_dst, int32_t offset_in)
 
static void avc_biwgt_4x4_lasx (uint8_t *src, uint8_t *dst, ptrdiff_t stride, int32_t log2_denom, int32_t weight_src, int32_t weight_dst, int32_t offset_in)
 
static void avc_biwgt_4x8_lasx (uint8_t *src, uint8_t *dst, ptrdiff_t stride, int32_t log2_denom, int32_t weight_src, int32_t weight_dst, int32_t offset_in)
 
void ff_biweight_h264_pixels4_8_lasx (uint8_t *dst, uint8_t *src, ptrdiff_t stride, int height, int log2_denom, int weight_dst, int weight_src, int offset)
 
void ff_weight_h264_pixels16_8_lasx (uint8_t *src, ptrdiff_t stride, int height, int log2_denom, int weight_src, int offset_in)
 
static void avc_wgt_8x4_lasx (uint8_t *src, ptrdiff_t stride, int32_t log2_denom, int32_t weight_src, int32_t offset_in)
 
static void avc_wgt_8x8_lasx (uint8_t *src, ptrdiff_t stride, int32_t log2_denom, int32_t src_weight, int32_t offset_in)
 
static void avc_wgt_8x16_lasx (uint8_t *src, ptrdiff_t stride, int32_t log2_denom, int32_t src_weight, int32_t offset_in)
 
void ff_weight_h264_pixels8_8_lasx (uint8_t *src, ptrdiff_t stride, int height, int log2_denom, int weight_src, int offset)
 
static void avc_wgt_4x2_lasx (uint8_t *src, ptrdiff_t stride, int32_t log2_denom, int32_t weight_src, int32_t offset_in)
 
static void avc_wgt_4x4_lasx (uint8_t *src, ptrdiff_t stride, int32_t log2_denom, int32_t weight_src, int32_t offset_in)
 
static void avc_wgt_4x8_lasx (uint8_t *src, ptrdiff_t stride, int32_t log2_denom, int32_t weight_src, int32_t offset_in)
 
void ff_weight_h264_pixels4_8_lasx (uint8_t *src, ptrdiff_t stride, int height, int log2_denom, int weight_src, int offset)
 
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 544 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 573 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_chroma_8_lasx()

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

Definition at line 366 of file h264dsp_lasx.c.

Referenced by ff_h264dsp_init_loongarch().

◆ ff_h264_v_lpf_chroma_8_lasx()

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

Definition at line 474 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 584 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 760 of file h264dsp_lasx.c.

Referenced by ff_h264dsp_init_loongarch().

◆ ff_h264_h_lpf_chroma_intra_8_lasx()

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

Definition at line 880 of file h264dsp_lasx.c.

Referenced by ff_h264dsp_init_loongarch().

◆ ff_h264_v_lpf_chroma_intra_8_lasx()

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

Definition at line 960 of file h264dsp_lasx.c.

Referenced by ff_h264dsp_init_loongarch().

◆ ff_biweight_h264_pixels16_8_lasx()

void ff_biweight_h264_pixels16_8_lasx ( uint8_t *  dst,
uint8_t *  src,
ptrdiff_t  stride,
int  height,
int  log2_denom,
int  weight_dst,
int  weight_src,
int  offset_in 
)

Definition at line 1004 of file h264dsp_lasx.c.

Referenced by ff_h264dsp_init_loongarch().

◆ avc_biwgt_8x4_lasx()

static void avc_biwgt_8x4_lasx ( uint8_t *  src,
uint8_t *  dst,
ptrdiff_t  stride,
int32_t  log2_denom,
int32_t  weight_src,
int32_t  weight_dst,
int32_t  offset_in 
)
static

Definition at line 1173 of file h264dsp_lasx.c.

Referenced by ff_biweight_h264_pixels8_8_lasx().

◆ avc_biwgt_8x8_lasx()

static void avc_biwgt_8x8_lasx ( uint8_t *  src,
uint8_t *  dst,
ptrdiff_t  stride,
int32_t  log2_denom,
int32_t  weight_src,
int32_t  weight_dst,
int32_t  offset_in 
)
static

Definition at line 1216 of file h264dsp_lasx.c.

Referenced by ff_biweight_h264_pixels8_8_lasx().

◆ avc_biwgt_8x16_lasx()

static void avc_biwgt_8x16_lasx ( uint8_t *  src,
uint8_t *  dst,
ptrdiff_t  stride,
int32_t  log2_denom,
int32_t  weight_src,
int32_t  weight_dst,
int32_t  offset_in 
)
static

Definition at line 1282 of file h264dsp_lasx.c.

Referenced by ff_biweight_h264_pixels8_8_lasx().

◆ ff_biweight_h264_pixels8_8_lasx()

void ff_biweight_h264_pixels8_8_lasx ( uint8_t *  dst,
uint8_t *  src,
ptrdiff_t  stride,
int  height,
int  log2_denom,
int  weight_dst,
int  weight_src,
int  offset 
)

Definition at line 1391 of file h264dsp_lasx.c.

Referenced by ff_h264dsp_init_loongarch().

◆ avc_biwgt_4x2_lasx()

static void avc_biwgt_4x2_lasx ( uint8_t *  src,
uint8_t *  dst,
ptrdiff_t  stride,
int32_t  log2_denom,
int32_t  weight_src,
int32_t  weight_dst,
int32_t  offset_in 
)
static

Definition at line 1408 of file h264dsp_lasx.c.

Referenced by ff_biweight_h264_pixels4_8_lasx().

◆ avc_biwgt_4x4_lasx()

static void avc_biwgt_4x4_lasx ( uint8_t *  src,
uint8_t *  dst,
ptrdiff_t  stride,
int32_t  log2_denom,
int32_t  weight_src,
int32_t  weight_dst,
int32_t  offset_in 
)
static

Definition at line 1440 of file h264dsp_lasx.c.

Referenced by ff_biweight_h264_pixels4_8_lasx().

◆ avc_biwgt_4x8_lasx()

static void avc_biwgt_4x8_lasx ( uint8_t *  src,
uint8_t *  dst,
ptrdiff_t  stride,
int32_t  log2_denom,
int32_t  weight_src,
int32_t  weight_dst,
int32_t  offset_in 
)
static

Definition at line 1482 of file h264dsp_lasx.c.

Referenced by ff_biweight_h264_pixels4_8_lasx().

◆ ff_biweight_h264_pixels4_8_lasx()

void ff_biweight_h264_pixels4_8_lasx ( uint8_t *  dst,
uint8_t *  src,
ptrdiff_t  stride,
int  height,
int  log2_denom,
int  weight_dst,
int  weight_src,
int  offset 
)

Definition at line 1542 of file h264dsp_lasx.c.

Referenced by ff_h264dsp_init_loongarch().

◆ ff_weight_h264_pixels16_8_lasx()

void ff_weight_h264_pixels16_8_lasx ( uint8_t *  src,
ptrdiff_t  stride,
int  height,
int  log2_denom,
int  weight_src,
int  offset_in 
)

Definition at line 1559 of file h264dsp_lasx.c.

Referenced by ff_h264dsp_init_loongarch().

◆ avc_wgt_8x4_lasx()

static void avc_wgt_8x4_lasx ( uint8_t *  src,
ptrdiff_t  stride,
int32_t  log2_denom,
int32_t  weight_src,
int32_t  offset_in 
)
static

Definition at line 1711 of file h264dsp_lasx.c.

Referenced by ff_weight_h264_pixels8_8_lasx().

◆ avc_wgt_8x8_lasx()

static void avc_wgt_8x8_lasx ( uint8_t *  src,
ptrdiff_t  stride,
int32_t  log2_denom,
int32_t  src_weight,
int32_t  offset_in 
)
static

Definition at line 1750 of file h264dsp_lasx.c.

Referenced by ff_weight_h264_pixels8_8_lasx().

◆ avc_wgt_8x16_lasx()

static void avc_wgt_8x16_lasx ( uint8_t *  src,
ptrdiff_t  stride,
int32_t  log2_denom,
int32_t  src_weight,
int32_t  offset_in 
)
static

Definition at line 1805 of file h264dsp_lasx.c.

Referenced by ff_weight_h264_pixels8_8_lasx().

◆ ff_weight_h264_pixels8_8_lasx()

void ff_weight_h264_pixels8_8_lasx ( uint8_t *  src,
ptrdiff_t  stride,
int  height,
int  log2_denom,
int  weight_src,
int  offset 
)

Definition at line 1903 of file h264dsp_lasx.c.

Referenced by ff_h264dsp_init_loongarch().

◆ avc_wgt_4x2_lasx()

static void avc_wgt_4x2_lasx ( uint8_t *  src,
ptrdiff_t  stride,
int32_t  log2_denom,
int32_t  weight_src,
int32_t  offset_in 
)
static

Definition at line 1916 of file h264dsp_lasx.c.

Referenced by ff_weight_h264_pixels4_8_lasx().

◆ avc_wgt_4x4_lasx()

static void avc_wgt_4x4_lasx ( uint8_t *  src,
ptrdiff_t  stride,
int32_t  log2_denom,
int32_t  weight_src,
int32_t  offset_in 
)
static

Definition at line 1941 of file h264dsp_lasx.c.

Referenced by ff_weight_h264_pixels4_8_lasx().

◆ avc_wgt_4x8_lasx()

static void avc_wgt_4x8_lasx ( uint8_t *  src,
ptrdiff_t  stride,
int32_t  log2_denom,
int32_t  weight_src,
int32_t  offset_in 
)
static

Definition at line 1972 of file h264dsp_lasx.c.

Referenced by ff_weight_h264_pixels4_8_lasx().

◆ ff_weight_h264_pixels4_8_lasx()

void ff_weight_h264_pixels4_8_lasx ( uint8_t *  src,
ptrdiff_t  stride,
int  height,
int  log2_denom,
int  weight_src,
int  offset 
)

Definition at line 2021 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 2034 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 2061 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:248