mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-11 03:57:14 +00:00
[libvpx] Update to v1.12.0
This commit is contained in:
1 parent
287a71dc66
commit
b5046d2a76
572 files changed
+52900
-29493
No files matched your search
@@ -100,7 +100,7 @@ void vp8_dequant_idct_add_mmi(int16_t *input, int16_t *dq, unsigned char *dest,
|
||||
vp8_short_idct4x4llm_mmi(input, dest, stride, dest, stride);
|
||||
|
||||
__asm__ volatile(
|
||||
"xor %[ftmp0], %[ftmp0], %[ftmp0] \n\t"
|
||||
"pxor %[ftmp0], %[ftmp0], %[ftmp0] \n\t"
|
||||
"gssdlc1 %[ftmp0], 0x07(%[input]) \n\t"
|
||||
"gssdrc1 %[ftmp0], 0x00(%[input]) \n\t"
|
||||
"sdl $0, 0x0f(%[input]) \n\t"
|
||||
|
||||
@@ -13,25 +13,25 @@
|
||||
#include "vpx_ports/asmdefs_mmi.h"
|
||||
|
||||
#define TRANSPOSE_4H \
|
||||
"xor %[ftmp0], %[ftmp0], %[ftmp0] \n\t" \
|
||||
"pxor %[ftmp0], %[ftmp0], %[ftmp0] \n\t" \
|
||||
MMI_LI(%[tmp0], 0x93) \
|
||||
"mtc1 %[tmp0], %[ftmp10] \n\t" \
|
||||
"punpcklhw %[ftmp5], %[ftmp1], %[ftmp0] \n\t" \
|
||||
"punpcklhw %[ftmp9], %[ftmp2], %[ftmp0] \n\t" \
|
||||
"pshufh %[ftmp9], %[ftmp9], %[ftmp10] \n\t" \
|
||||
"or %[ftmp5], %[ftmp5], %[ftmp9] \n\t" \
|
||||
"por %[ftmp5], %[ftmp5], %[ftmp9] \n\t" \
|
||||
"punpckhhw %[ftmp6], %[ftmp1], %[ftmp0] \n\t" \
|
||||
"punpckhhw %[ftmp9], %[ftmp2], %[ftmp0] \n\t" \
|
||||
"pshufh %[ftmp9], %[ftmp9], %[ftmp10] \n\t" \
|
||||
"or %[ftmp6], %[ftmp6], %[ftmp9] \n\t" \
|
||||
"por %[ftmp6], %[ftmp6], %[ftmp9] \n\t" \
|
||||
"punpcklhw %[ftmp7], %[ftmp3], %[ftmp0] \n\t" \
|
||||
"punpcklhw %[ftmp9], %[ftmp4], %[ftmp0] \n\t" \
|
||||
"pshufh %[ftmp9], %[ftmp9], %[ftmp10] \n\t" \
|
||||
"or %[ftmp7], %[ftmp7], %[ftmp9] \n\t" \
|
||||
"por %[ftmp7], %[ftmp7], %[ftmp9] \n\t" \
|
||||
"punpckhhw %[ftmp8], %[ftmp3], %[ftmp0] \n\t" \
|
||||
"punpckhhw %[ftmp9], %[ftmp4], %[ftmp0] \n\t" \
|
||||
"pshufh %[ftmp9], %[ftmp9], %[ftmp10] \n\t" \
|
||||
"or %[ftmp8], %[ftmp8], %[ftmp9] \n\t" \
|
||||
"por %[ftmp8], %[ftmp8], %[ftmp9] \n\t" \
|
||||
"punpcklwd %[ftmp1], %[ftmp5], %[ftmp7] \n\t" \
|
||||
"punpckhwd %[ftmp2], %[ftmp5], %[ftmp7] \n\t" \
|
||||
"punpcklwd %[ftmp3], %[ftmp6], %[ftmp8] \n\t" \
|
||||
@@ -41,15 +41,19 @@ void vp8_short_idct4x4llm_mmi(int16_t *input, unsigned char *pred_ptr,
|
||||
int pred_stride, unsigned char *dst_ptr,
|
||||
int dst_stride) {
|
||||
double ftmp[12];
|
||||
uint32_t tmp[0];
|
||||
DECLARE_ALIGNED(8, const uint64_t, ff_ph_04) = { 0x0004000400040004ULL };
|
||||
DECLARE_ALIGNED(8, const uint64_t, ff_ph_4e7b) = { 0x4e7b4e7b4e7b4e7bULL };
|
||||
DECLARE_ALIGNED(8, const uint64_t, ff_ph_22a3) = { 0x22a322a322a322a3ULL };
|
||||
uint64_t tmp[1];
|
||||
double ff_ph_04, ff_ph_4e7b, ff_ph_22a3;
|
||||
|
||||
__asm__ volatile (
|
||||
"dli %[tmp0], 0x0004000400040004 \n\t"
|
||||
"dmtc1 %[tmp0], %[ff_ph_04] \n\t"
|
||||
"dli %[tmp0], 0x4e7b4e7b4e7b4e7b \n\t"
|
||||
"dmtc1 %[tmp0], %[ff_ph_4e7b] \n\t"
|
||||
"dli %[tmp0], 0x22a322a322a322a3 \n\t"
|
||||
"dmtc1 %[tmp0], %[ff_ph_22a3] \n\t"
|
||||
MMI_LI(%[tmp0], 0x02)
|
||||
"mtc1 %[tmp0], %[ftmp11] \n\t"
|
||||
"xor %[ftmp0], %[ftmp0], %[ftmp0] \n\t"
|
||||
"dmtc1 %[tmp0], %[ftmp11] \n\t"
|
||||
"pxor %[ftmp0], %[ftmp0], %[ftmp0] \n\t"
|
||||
|
||||
"gsldlc1 %[ftmp1], 0x07(%[ip]) \n\t"
|
||||
"gsldrc1 %[ftmp1], 0x00(%[ip]) \n\t"
|
||||
@@ -186,9 +190,10 @@ void vp8_short_idct4x4llm_mmi(int16_t *input, unsigned char *pred_ptr,
|
||||
[ftmp6]"=&f"(ftmp[6]), [ftmp7]"=&f"(ftmp[7]), [ftmp8]"=&f"(ftmp[8]),
|
||||
[ftmp9]"=&f"(ftmp[9]), [ftmp10]"=&f"(ftmp[10]),
|
||||
[ftmp11]"=&f"(ftmp[11]), [tmp0]"=&r"(tmp[0]),
|
||||
[pred_ptr]"+&r"(pred_ptr), [dst_ptr]"+&r"(dst_ptr)
|
||||
: [ip]"r"(input), [ff_ph_22a3]"f"(ff_ph_22a3),
|
||||
[ff_ph_4e7b]"f"(ff_ph_4e7b), [ff_ph_04]"f"(ff_ph_04),
|
||||
[pred_ptr]"+&r"(pred_ptr), [dst_ptr]"+&r"(dst_ptr),
|
||||
[ff_ph_4e7b]"=&f"(ff_ph_4e7b), [ff_ph_04]"=&f"(ff_ph_04),
|
||||
[ff_ph_22a3]"=&f"(ff_ph_22a3)
|
||||
: [ip]"r"(input),
|
||||
[pred_stride]"r"((mips_reg)pred_stride),
|
||||
[dst_stride]"r"((mips_reg)dst_stride)
|
||||
: "memory"
|
||||
@@ -198,12 +203,13 @@ void vp8_short_idct4x4llm_mmi(int16_t *input, unsigned char *pred_ptr,
|
||||
void vp8_dc_only_idct_add_mmi(int16_t input_dc, unsigned char *pred_ptr,
|
||||
int pred_stride, unsigned char *dst_ptr,
|
||||
int dst_stride) {
|
||||
int a1 = ((input_dc + 4) >> 3);
|
||||
double ftmp[5];
|
||||
int a0 = ((input_dc + 4) >> 3);
|
||||
double a1, ftmp[5];
|
||||
int low32;
|
||||
|
||||
__asm__ volatile (
|
||||
"xor %[ftmp0], %[ftmp0], %[ftmp0] \n\t"
|
||||
"pxor %[ftmp0], %[ftmp0], %[ftmp0] \n\t"
|
||||
"dmtc1 %[a0], %[a1] \n\t"
|
||||
"pshufh %[a1], %[a1], %[ftmp0] \n\t"
|
||||
"ulw %[low32], 0x00(%[pred_ptr]) \n\t"
|
||||
"mtc1 %[low32], %[ftmp1] \n\t"
|
||||
@@ -244,9 +250,9 @@ void vp8_dc_only_idct_add_mmi(int16_t input_dc, unsigned char *pred_ptr,
|
||||
"gsswrc1 %[ftmp1], 0x00(%[dst_ptr]) \n\t"
|
||||
: [ftmp0]"=&f"(ftmp[0]), [ftmp1]"=&f"(ftmp[1]), [ftmp2]"=&f"(ftmp[2]),
|
||||
[ftmp3]"=&f"(ftmp[3]), [ftmp4]"=&f"(ftmp[4]), [low32]"=&r"(low32),
|
||||
[dst_ptr]"+&r"(dst_ptr), [pred_ptr]"+&r"(pred_ptr)
|
||||
[dst_ptr]"+&r"(dst_ptr), [pred_ptr]"+&r"(pred_ptr), [a1]"=&f"(a1)
|
||||
: [dst_stride]"r"((mips_reg)dst_stride),
|
||||
[pred_stride]"r"((mips_reg)pred_stride), [a1]"f"(a1)
|
||||
[pred_stride]"r"((mips_reg)pred_stride), [a0]"r"(a0)
|
||||
: "memory"
|
||||
);
|
||||
}
|
||||
@@ -254,14 +260,15 @@ void vp8_dc_only_idct_add_mmi(int16_t input_dc, unsigned char *pred_ptr,
|
||||
void vp8_short_inv_walsh4x4_mmi(int16_t *input, int16_t *mb_dqcoeff) {
|
||||
int i;
|
||||
int16_t output[16];
|
||||
double ftmp[12];
|
||||
uint32_t tmp[1];
|
||||
DECLARE_ALIGNED(8, const uint64_t, ff_ph_03) = { 0x0003000300030003ULL };
|
||||
double ff_ph_03, ftmp[12];
|
||||
uint64_t tmp[1];
|
||||
|
||||
__asm__ volatile (
|
||||
"dli %[tmp0], 0x0003000300030003 \n\t"
|
||||
"dmtc1 %[tmp0], %[ff_ph_03] \n\t"
|
||||
MMI_LI(%[tmp0], 0x03)
|
||||
"xor %[ftmp0], %[ftmp0], %[ftmp0] \n\t"
|
||||
"mtc1 %[tmp0], %[ftmp11] \n\t"
|
||||
"pxor %[ftmp0], %[ftmp0], %[ftmp0] \n\t"
|
||||
"dmtc1 %[tmp0], %[ftmp11] \n\t"
|
||||
"gsldlc1 %[ftmp1], 0x07(%[ip]) \n\t"
|
||||
"gsldrc1 %[ftmp1], 0x00(%[ip]) \n\t"
|
||||
"gsldlc1 %[ftmp2], 0x0f(%[ip]) \n\t"
|
||||
@@ -317,8 +324,8 @@ void vp8_short_inv_walsh4x4_mmi(int16_t *input, int16_t *mb_dqcoeff) {
|
||||
[ftmp3]"=&f"(ftmp[3]), [ftmp4]"=&f"(ftmp[4]), [ftmp5]"=&f"(ftmp[5]),
|
||||
[ftmp6]"=&f"(ftmp[6]), [ftmp7]"=&f"(ftmp[7]), [ftmp8]"=&f"(ftmp[8]),
|
||||
[ftmp9]"=&f"(ftmp[9]), [ftmp10]"=&f"(ftmp[10]),
|
||||
[ftmp11]"=&f"(ftmp[11]), [tmp0]"=&r"(tmp[0])
|
||||
: [ip]"r"(input), [op]"r"(output), [ff_ph_03]"f"(ff_ph_03)
|
||||
[ftmp11]"=&f"(ftmp[11]), [tmp0]"=&r"(tmp[0]), [ff_ph_03]"=&f"(ff_ph_03)
|
||||
: [ip]"r"(input), [op]"r"(output)
|
||||
: "memory"
|
||||
);
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -70,9 +70,8 @@ static INLINE void vp8_filter_block1d_h6_mmi(unsigned char *src_ptr,
|
||||
unsigned int output_height,
|
||||
unsigned int output_width,
|
||||
const int16_t *vp8_filter) {
|
||||
uint32_t tmp[1];
|
||||
DECLARE_ALIGNED(8, const uint64_t, ff_ph_40) = { 0x0040004000400040ULL };
|
||||
|
||||
uint64_t tmp[1];
|
||||
double ff_ph_40;
|
||||
#if _MIPS_SIM == _ABIO32
|
||||
register double fzero asm("$f0");
|
||||
register double ftmp0 asm("$f2");
|
||||
@@ -103,18 +102,21 @@ static INLINE void vp8_filter_block1d_h6_mmi(unsigned char *src_ptr,
|
||||
register double ftmp11 asm("$f12");
|
||||
#endif // _MIPS_SIM == _ABIO32
|
||||
|
||||
/* clang-format off */
|
||||
__asm__ volatile (
|
||||
"dli %[tmp0], 0x0040004000400040 \n\t"
|
||||
"dmtc1 %[tmp0], %[ff_ph_40] \n\t"
|
||||
"ldc1 %[ftmp0], 0x00(%[vp8_filter]) \n\t"
|
||||
"ldc1 %[ftmp1], 0x10(%[vp8_filter]) \n\t"
|
||||
"ldc1 %[ftmp2], 0x20(%[vp8_filter]) \n\t"
|
||||
"ldc1 %[ftmp3], 0x30(%[vp8_filter]) \n\t"
|
||||
"ldc1 %[ftmp4], 0x40(%[vp8_filter]) \n\t"
|
||||
"ldc1 %[ftmp5], 0x50(%[vp8_filter]) \n\t"
|
||||
"xor %[fzero], %[fzero], %[fzero] \n\t"
|
||||
"li %[tmp0], 0x07 \n\t"
|
||||
"mtc1 %[tmp0], %[ftmp7] \n\t"
|
||||
"li %[tmp0], 0x08 \n\t"
|
||||
"mtc1 %[tmp0], %[ftmp11] \n\t"
|
||||
"pxor %[fzero], %[fzero], %[fzero] \n\t"
|
||||
"dli %[tmp0], 0x07 \n\t"
|
||||
"dmtc1 %[tmp0], %[ftmp7] \n\t"
|
||||
"dli %[tmp0], 0x08 \n\t"
|
||||
"dmtc1 %[tmp0], %[ftmp11] \n\t"
|
||||
|
||||
"1: \n\t"
|
||||
"gsldlc1 %[ftmp9], 0x05(%[src_ptr]) \n\t"
|
||||
@@ -137,12 +139,12 @@ static INLINE void vp8_filter_block1d_h6_mmi(unsigned char *src_ptr,
|
||||
"pmullh %[ftmp6], %[ftmp6], %[ftmp5] \n\t"
|
||||
"paddsh %[ftmp8], %[ftmp8], %[ftmp6] \n\t"
|
||||
|
||||
"dsrl %[ftmp10], %[ftmp10], %[ftmp11] \n\t"
|
||||
"ssrld %[ftmp10], %[ftmp10], %[ftmp11] \n\t"
|
||||
"punpcklbh %[ftmp6], %[ftmp10], %[fzero] \n\t"
|
||||
"pmullh %[ftmp6], %[ftmp6], %[ftmp2] \n\t"
|
||||
"paddsh %[ftmp8], %[ftmp8], %[ftmp6] \n\t"
|
||||
|
||||
"dsrl %[ftmp10], %[ftmp10], %[ftmp11] \n\t"
|
||||
"ssrld %[ftmp10], %[ftmp10], %[ftmp11] \n\t"
|
||||
"punpcklbh %[ftmp6], %[ftmp10], %[fzero] \n\t"
|
||||
"pmullh %[ftmp6], %[ftmp6], %[ftmp3] \n\t"
|
||||
"paddsh %[ftmp8], %[ftmp8], %[ftmp6] \n\t"
|
||||
@@ -166,21 +168,22 @@ static INLINE void vp8_filter_block1d_h6_mmi(unsigned char *src_ptr,
|
||||
[ftmp9]"=&f"(ftmp9), [ftmp10]"=&f"(ftmp10),
|
||||
[ftmp11]"=&f"(ftmp11), [tmp0]"=&r"(tmp[0]),
|
||||
[output_ptr]"+&r"(output_ptr), [output_height]"+&r"(output_height),
|
||||
[src_ptr]"+&r"(src_ptr)
|
||||
[src_ptr]"+&r"(src_ptr), [ff_ph_40]"=&f"(ff_ph_40)
|
||||
: [src_pixels_per_line]"r"((mips_reg)src_pixels_per_line),
|
||||
[vp8_filter]"r"(vp8_filter), [output_width]"r"(output_width),
|
||||
[ff_ph_40]"f"(ff_ph_40)
|
||||
[vp8_filter]"r"(vp8_filter), [output_width]"r"(output_width)
|
||||
: "memory"
|
||||
);
|
||||
/* clang-format on */
|
||||
}
|
||||
|
||||
/* Horizontal filter: pixel_step is always W */
|
||||
static INLINE void vp8_filter_block1dc_v6_mmi(
|
||||
uint16_t *src_ptr, unsigned char *output_ptr, unsigned int output_height,
|
||||
int output_pitch, unsigned int pixels_per_line, const int16_t *vp8_filter) {
|
||||
DECLARE_ALIGNED(8, const uint64_t, ff_ph_40) = { 0x0040004000400040ULL };
|
||||
uint32_t tmp[1];
|
||||
double ff_ph_40;
|
||||
uint64_t tmp[1];
|
||||
mips_reg addr[1];
|
||||
|
||||
#if _MIPS_SIM == _ABIO32
|
||||
register double fzero asm("$f0");
|
||||
register double ftmp0 asm("$f2");
|
||||
@@ -215,16 +218,19 @@ static INLINE void vp8_filter_block1dc_v6_mmi(
|
||||
register double ftmp13 asm("$f14");
|
||||
#endif // _MIPS_SIM == _ABIO32
|
||||
|
||||
/* clang-format off */
|
||||
__asm__ volatile (
|
||||
"dli %[tmp0], 0x0040004000400040 \n\t"
|
||||
"dmtc1 %[tmp0], %[ff_ph_40] \n\t"
|
||||
"ldc1 %[ftmp0], 0x00(%[vp8_filter]) \n\t"
|
||||
"ldc1 %[ftmp1], 0x10(%[vp8_filter]) \n\t"
|
||||
"ldc1 %[ftmp2], 0x20(%[vp8_filter]) \n\t"
|
||||
"ldc1 %[ftmp3], 0x30(%[vp8_filter]) \n\t"
|
||||
"ldc1 %[ftmp4], 0x40(%[vp8_filter]) \n\t"
|
||||
"ldc1 %[ftmp5], 0x50(%[vp8_filter]) \n\t"
|
||||
"xor %[fzero], %[fzero], %[fzero] \n\t"
|
||||
"li %[tmp0], 0x07 \n\t"
|
||||
"mtc1 %[tmp0], %[ftmp13] \n\t"
|
||||
"pxor %[fzero], %[fzero], %[fzero] \n\t"
|
||||
"dli %[tmp0], 0x07 \n\t"
|
||||
"dmtc1 %[tmp0], %[ftmp13] \n\t"
|
||||
|
||||
/* In order to make full use of memory load delay slot,
|
||||
* Operation of memory loading and calculating has been rearranged.
|
||||
@@ -285,15 +291,16 @@ static INLINE void vp8_filter_block1dc_v6_mmi(
|
||||
[ftmp11]"=&f"(ftmp11), [ftmp12]"=&f"(ftmp12),
|
||||
[ftmp13]"=&f"(ftmp13), [tmp0]"=&r"(tmp[0]),
|
||||
[addr0]"=&r"(addr[0]), [src_ptr]"+&r"(src_ptr),
|
||||
[output_ptr]"+&r"(output_ptr), [output_height]"+&r"(output_height)
|
||||
[output_ptr]"+&r"(output_ptr), [output_height]"+&r"(output_height),
|
||||
[ff_ph_40]"=&f"(ff_ph_40)
|
||||
: [pixels_per_line]"r"((mips_reg)pixels_per_line),
|
||||
[pixels_per_line_x2]"r"((mips_reg)(pixels_per_line<<1)),
|
||||
[pixels_per_line_x4]"r"((mips_reg)(pixels_per_line<<2)),
|
||||
[vp8_filter]"r"(vp8_filter),
|
||||
[output_pitch]"r"((mips_reg)output_pitch),
|
||||
[ff_ph_40]"f"(ff_ph_40)
|
||||
[output_pitch]"r"((mips_reg)output_pitch)
|
||||
: "memory"
|
||||
);
|
||||
/* clang-format on */
|
||||
}
|
||||
|
||||
/* When xoffset == 0, vp8_filter= {0,0,128,0,0,0},
|
||||
@@ -313,8 +320,9 @@ static INLINE void vp8_filter_block1d_h6_filter0_mmi(
|
||||
register double ftmp1 asm("$f2");
|
||||
#endif // _MIPS_SIM == _ABIO32
|
||||
|
||||
/* clang-format off */
|
||||
__asm__ volatile (
|
||||
"xor %[fzero], %[fzero], %[fzero] \n\t"
|
||||
"pxor %[fzero], %[fzero], %[fzero] \n\t"
|
||||
|
||||
"1: \n\t"
|
||||
"gsldlc1 %[ftmp0], 0x07(%[src_ptr]) \n\t"
|
||||
@@ -335,6 +343,7 @@ static INLINE void vp8_filter_block1d_h6_filter0_mmi(
|
||||
[output_width]"r"(output_width)
|
||||
: "memory"
|
||||
);
|
||||
/* clang-format on */
|
||||
}
|
||||
|
||||
static INLINE void vp8_filter_block1dc_v6_filter0_mmi(
|
||||
@@ -350,8 +359,9 @@ static INLINE void vp8_filter_block1dc_v6_filter0_mmi(
|
||||
register double ftmp1 asm("$f2");
|
||||
#endif // _MIPS_SIM == _ABIO32
|
||||
|
||||
/* clang-format on */
|
||||
__asm__ volatile (
|
||||
"xor %[fzero], %[fzero], %[fzero] \n\t"
|
||||
"pxor %[fzero], %[fzero], %[fzero] \n\t"
|
||||
|
||||
"1: \n\t"
|
||||
"gsldlc1 %[ftmp0], 0x07(%[src_ptr]) \n\t"
|
||||
@@ -371,6 +381,7 @@ static INLINE void vp8_filter_block1dc_v6_filter0_mmi(
|
||||
[output_pitch]"r"((mips_reg)output_pitch)
|
||||
: "memory"
|
||||
);
|
||||
/* clang-format on */
|
||||
}
|
||||
|
||||
#define sixtapNxM(n, m) \
|
||||
|
||||
@@ -122,10 +122,10 @@
|
||||
const uint8_t *psrc_m = (const uint8_t *)(psrc); \
|
||||
uint32_t val_m; \
|
||||
\
|
||||
asm volatile("ulw %[val_m], %[psrc_m] \n\t" \
|
||||
\
|
||||
: [val_m] "=r"(val_m) \
|
||||
: [psrc_m] "m"(*psrc_m)); \
|
||||
asm volatile("lwr %[val_m], 0(%[psrc_m]) \n\t" \
|
||||
"lwl %[val_m], 3(%[psrc_m]) \n\t" \
|
||||
: [val_m] "=&r"(val_m) \
|
||||
: [psrc_m] "r"(psrc_m)); \
|
||||
\
|
||||
val_m; \
|
||||
})
|
||||
@@ -136,10 +136,10 @@
|
||||
const uint8_t *psrc_m = (const uint8_t *)(psrc); \
|
||||
uint64_t val_m = 0; \
|
||||
\
|
||||
asm volatile("uld %[val_m], %[psrc_m] \n\t" \
|
||||
\
|
||||
: [val_m] "=r"(val_m) \
|
||||
: [psrc_m] "m"(*psrc_m)); \
|
||||
asm volatile("ldr %[val_m], 0(%[psrc_m]) \n\t" \
|
||||
"ldl %[val_m], 7(%[psrc_m]) \n\t" \
|
||||
: [val_m] "=&r"(val_m) \
|
||||
: [psrc_m] "r"(psrc_m)); \
|
||||
\
|
||||
val_m; \
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user