FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
vp9_intra_msa.c File Reference
#include "libavcodec/vp9dsp.h"
#include "libavutil/mips/generic_macros_msa.h"
#include "vp9dsp_mips.h"

Go to the source code of this file.

Macros

#define IPRED_SUBS_UH2_UH(in0, in1, out0, out1)
 
#define INTRA_DC_TL_4x4(dir)
 
#define INTRA_DC_TL_8x8(dir)
 
#define INTRA_DC_TL_16x16(dir)
 
#define INTRA_DC_TL_32x32(dir)
 
#define INTRA_PREDICT_VALDC_16X16_MSA(val)
 
#define INTRA_PREDICT_VALDC_32X32_MSA(val)
 

Functions

void ff_vert_16x16_msa (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *left, const uint8_t *src)
 
void ff_vert_32x32_msa (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *left, const uint8_t *src)
 
void ff_hor_16x16_msa (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, const uint8_t *top)
 
void ff_hor_32x32_msa (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, const uint8_t *top)
 
void ff_dc_4x4_msa (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src_left, const uint8_t *src_top)
 
 INTRA_DC_TL_4x4 (top)
 
 INTRA_DC_TL_4x4 (left)
 
void ff_dc_8x8_msa (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src_left, const uint8_t *src_top)
 
 INTRA_DC_TL_8x8 (top)
 
 INTRA_DC_TL_8x8 (left)
 
void ff_dc_16x16_msa (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src_left, const uint8_t *src_top)
 
 INTRA_DC_TL_16x16 (top)
 
 INTRA_DC_TL_16x16 (left)
 
void ff_dc_32x32_msa (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src_left, const uint8_t *src_top)
 
 INTRA_DC_TL_32x32 (top)
 
 INTRA_DC_TL_32x32 (left)
 
 INTRA_PREDICT_VALDC_16X16_MSA (127)
 
 INTRA_PREDICT_VALDC_16X16_MSA (128)
 
 INTRA_PREDICT_VALDC_16X16_MSA (129)
 
 INTRA_PREDICT_VALDC_32X32_MSA (127)
 
 INTRA_PREDICT_VALDC_32X32_MSA (128)
 
 INTRA_PREDICT_VALDC_32X32_MSA (129)
 
void ff_tm_4x4_msa (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src_left, const uint8_t *src_top_ptr)
 
void ff_tm_8x8_msa (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src_left, const uint8_t *src_top_ptr)
 
void ff_tm_16x16_msa (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src_left, const uint8_t *src_top_ptr)
 
void ff_tm_32x32_msa (uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src_left, const uint8_t *src_top_ptr)
 

Macro Definition Documentation

#define IPRED_SUBS_UH2_UH (   in0,
  in1,
  out0,
  out1 
)
Value:
{ \
out0 = __msa_subs_u_h(out0, in0); \
out1 = __msa_subs_u_h(out1, in1); \
}

Definition at line 25 of file vp9_intra_msa.c.

Referenced by ff_tm_16x16_msa(), ff_tm_32x32_msa(), ff_tm_4x4_msa(), and ff_tm_8x8_msa().

#define INTRA_DC_TL_4x4 (   dir)
Value:
void ff_dc_##dir##_4x4_msa(uint8_t *dst, ptrdiff_t dst_stride, \
const uint8_t *left, \
const uint8_t *top) \
{ \
uint32_t val0; \
v16i8 store, data = { 0 }; \
v8u16 sum_h; \
v4u32 sum_w; \
\
val0 = LW(dir); \
data = (v16i8) __msa_insert_w((v4i32) data, 0, val0); \
sum_h = __msa_hadd_u_h((v16u8) data, (v16u8) data); \
sum_w = __msa_hadd_u_w(sum_h, sum_h); \
sum_w = (v4u32) __msa_srari_w((v4i32) sum_w, 2); \
store = __msa_splati_b((v16i8) sum_w, 0); \
val0 = __msa_copy_u_w((v4i32) store, 0); \
SW4(val0, val0, val0, val0, dst, dst_stride); \
}
ptrdiff_t const GLvoid * data
Definition: opengl_enc.c:101
#define LW(psrc)
uint8_t
#define SW4(in0, in1, in2, in3, pdst, stride)

Definition at line 130 of file vp9_intra_msa.c.

#define INTRA_DC_TL_8x8 (   dir)
Value:
void ff_dc_##dir##_8x8_msa(uint8_t *dst, ptrdiff_t dst_stride, \
const uint8_t *left, \
const uint8_t *top) \
{ \
uint64_t val0; \
v16i8 store; \
v16u8 data = { 0 }; \
v8u16 sum_h; \
v4u32 sum_w; \
v2u64 sum_d; \
\
val0 = LD(dir); \
data = (v16u8) __msa_insert_d((v2i64) data, 0, val0); \
sum_h = __msa_hadd_u_h(data, data); \
sum_w = __msa_hadd_u_w(sum_h, sum_h); \
sum_d = __msa_hadd_u_d(sum_w, sum_w); \
sum_w = (v4u32) __msa_srari_w((v4i32) sum_d, 3); \
store = __msa_splati_b((v16i8) sum_w, 0); \
val0 = __msa_copy_u_d((v2i64) store, 0); \
SD4(val0, val0, val0, val0, dst, dst_stride); \
dst += (4 * dst_stride); \
SD4(val0, val0, val0, val0, dst, dst_stride); \
}
ptrdiff_t const GLvoid * data
Definition: opengl_enc.c:101
static void sum_d(const int *input, int *output, int len)
Definition: dcadct.c:51
uint8_t
#define LD(psrc)
#define SD4(in0, in1, in2, in3, pdst, stride)

Definition at line 180 of file vp9_intra_msa.c.

#define INTRA_DC_TL_16x16 (   dir)
Value:
void ff_dc_##dir##_16x16_msa(uint8_t *dst, ptrdiff_t dst_stride, \
const uint8_t *left, \
const uint8_t *top) \
{ \
v16u8 data, out; \
v8u16 sum_h; \
v4u32 sum_w; \
v2u64 sum_d; \
\
data = LD_UB(dir); \
sum_h = __msa_hadd_u_h(data, data); \
sum_w = __msa_hadd_u_w(sum_h, sum_h); \
sum_d = __msa_hadd_u_d(sum_w, sum_w); \
sum_w = (v4u32) __msa_pckev_w((v4i32) sum_d, (v4i32) sum_d); \
sum_d = __msa_hadd_u_d(sum_w, sum_w); \
sum_w = (v4u32) __msa_srari_w((v4i32) sum_d, 4); \
out = (v16u8) __msa_splati_b((v16i8) sum_w, 0); \
ST_UB8(out, out, out, out, out, out, out, out, dst, dst_stride); \
dst += (8 * dst_stride); \
ST_UB8(out, out, out, out, out, out, out, out, dst, dst_stride); \
}
ptrdiff_t const GLvoid * data
Definition: opengl_enc.c:101
static void sum_d(const int *input, int *output, int len)
Definition: dcadct.c:51
uint8_t
#define ST_UB8(...)
#define LD_UB(...)
FILE * out
Definition: movenc.c:54

Definition at line 233 of file vp9_intra_msa.c.

#define INTRA_DC_TL_32x32 (   dir)
Value:
void ff_dc_##dir##_32x32_msa(uint8_t *dst, ptrdiff_t dst_stride, \
const uint8_t *left, \
const uint8_t *top) \
{ \
uint32_t row; \
v16u8 data0, data1, out; \
v8u16 sum_h, sum_data0, sum_data1; \
v4u32 sum_w; \
v2u64 sum_d; \
LD_UB2(dir, 16, data0, data1); \
HADD_UB2_UH(data0, data1, sum_data0, sum_data1); \
sum_h = sum_data0 + sum_data1; \
sum_w = __msa_hadd_u_w(sum_h, sum_h); \
sum_d = __msa_hadd_u_d(sum_w, sum_w); \
sum_w = (v4u32) __msa_pckev_w((v4i32) sum_d, (v4i32) sum_d); \
sum_d = __msa_hadd_u_d(sum_w, sum_w); \
sum_w = (v4u32) __msa_srari_w((v4i32) sum_d, 5); \
out = (v16u8) __msa_splati_b((v16i8) sum_w, 0); \
for (row = 16; row--;) \
{ \
ST_UB2(out, out, dst, 16); \
dst += dst_stride; \
ST_UB2(out, out, dst, 16); \
dst += dst_stride; \
} \
}
static void sum_d(const int *input, int *output, int len)
Definition: dcadct.c:51
uint8_t
#define LD_UB2(...)
#define ST_UB2(...)
#define HADD_UB2_UH(...)
FILE * out
Definition: movenc.c:54
for(j=16;j >0;--j)

Definition at line 290 of file vp9_intra_msa.c.

#define INTRA_PREDICT_VALDC_16X16_MSA (   val)
Value:
void ff_dc_##val##_16x16_msa(uint8_t *dst, ptrdiff_t dst_stride, \
const uint8_t *left, const uint8_t *top) \
{ \
v16u8 out = (v16u8) __msa_ldi_b(val); \
ST_UB8(out, out, out, out, out, out, out, out, dst, dst_stride); \
dst += (8 * dst_stride); \
ST_UB8(out, out, out, out, out, out, out, out, dst, dst_stride); \
}
const char const char void * val
Definition: avisynth_c.h:771
uint8_t
#define ST_UB8(...)
FILE * out
Definition: movenc.c:54

Definition at line 322 of file vp9_intra_msa.c.

#define INTRA_PREDICT_VALDC_32X32_MSA (   val)
Value:
void ff_dc_##val##_32x32_msa(uint8_t *dst, ptrdiff_t dst_stride, \
const uint8_t *left, const uint8_t *top) \
{ \
uint32_t row; \
v16u8 out = (v16u8) __msa_ldi_b(val); \
for (row = 16; row--;) \
{ \
ST_UB2(out, out, dst, 16); \
dst += dst_stride; \
ST_UB2(out, out, dst, 16); \
dst += dst_stride; \
} \
}
const char const char void * val
Definition: avisynth_c.h:771
uint8_t
#define ST_UB2(...)
FILE * out
Definition: movenc.c:54
for(j=16;j >0;--j)

Definition at line 337 of file vp9_intra_msa.c.

Function Documentation

void ff_vert_16x16_msa ( uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t left,
const uint8_t src 
)

Definition at line 31 of file vp9_intra_msa.c.

void ff_vert_32x32_msa ( uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t left,
const uint8_t src 
)

Definition at line 45 of file vp9_intra_msa.c.

void ff_hor_16x16_msa ( uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t src,
const uint8_t top 
)

Definition at line 60 of file vp9_intra_msa.c.

void ff_hor_32x32_msa ( uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t src,
const uint8_t top 
)

Definition at line 81 of file vp9_intra_msa.c.

void ff_dc_4x4_msa ( uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t src_left,
const uint8_t src_top 
)

Definition at line 108 of file vp9_intra_msa.c.

INTRA_DC_TL_4x4 ( top  )
INTRA_DC_TL_4x4 ( left  )
void ff_dc_8x8_msa ( uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t src_left,
const uint8_t src_top 
)

Definition at line 153 of file vp9_intra_msa.c.

INTRA_DC_TL_8x8 ( top  )
INTRA_DC_TL_8x8 ( left  )
void ff_dc_16x16_msa ( uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t src_left,
const uint8_t src_top 
)

Definition at line 209 of file vp9_intra_msa.c.

INTRA_DC_TL_16x16 ( top  )
INTRA_DC_TL_16x16 ( left  )
void ff_dc_32x32_msa ( uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t src_left,
const uint8_t src_top 
)

Definition at line 259 of file vp9_intra_msa.c.

INTRA_DC_TL_32x32 ( top  )
INTRA_DC_TL_32x32 ( left  )
INTRA_PREDICT_VALDC_16X16_MSA ( 127  )
INTRA_PREDICT_VALDC_16X16_MSA ( 128  )
INTRA_PREDICT_VALDC_16X16_MSA ( 129  )
INTRA_PREDICT_VALDC_32X32_MSA ( 127  )
INTRA_PREDICT_VALDC_32X32_MSA ( 128  )
INTRA_PREDICT_VALDC_32X32_MSA ( 129  )
void ff_tm_4x4_msa ( uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t src_left,
const uint8_t src_top_ptr 
)

Definition at line 357 of file vp9_intra_msa.c.

void ff_tm_8x8_msa ( uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t src_left,
const uint8_t src_top_ptr 
)

Definition at line 384 of file vp9_intra_msa.c.

void ff_tm_16x16_msa ( uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t src_left,
const uint8_t src_top_ptr 
)

Definition at line 417 of file vp9_intra_msa.c.

void ff_tm_32x32_msa ( uint8_t dst,
ptrdiff_t  dst_stride,
const uint8_t src_left,
const uint8_t src_top_ptr 
)

Definition at line 468 of file vp9_intra_msa.c.