33 #define MAX_ABS (512 >> (SCALE_OFFSET>0 ? SCALE_OFFSET : 0)) 35 static int DEF(try_8x8basis)(int16_t rem[64], int16_t
weight[64], int16_t
basis[64],
int scale)
44 "pxor %%mm7, %%mm7 \n\t" 46 "punpcklwd %%mm5, %%mm5 \n\t" 47 "punpcklwd %%mm5, %%mm5 \n\t" 50 "movq (%1, %0), %%mm0 \n\t" 51 "movq 8(%1, %0), %%mm1 \n\t" 52 PMULHRW(%%mm0, %%mm1, %%mm5, %%mm6)
53 "paddw (%2, %0), %%mm0 \n\t" 54 "paddw 8(%2, %0), %%mm1 \n\t" 55 "psraw $6, %%mm0 \n\t" 56 "psraw $6, %%mm1 \n\t" 57 "pmullw (%3, %0), %%mm0 \n\t" 58 "pmullw 8(%3, %0), %%mm1 \n\t" 59 "pmaddwd %%mm0, %%mm0 \n\t" 60 "pmaddwd %%mm1, %%mm1 \n\t" 61 "paddd %%mm1, %%mm0 \n\t" 62 "psrld $4, %%mm0 \n\t" 63 "paddd %%mm0, %%mm7 \n\t" 68 "psrld $2, %%mm7 \n\t" 77 static void DEF(add_8x8basis)(int16_t rem[64], int16_t
basis[64],
int scale)
86 "punpcklwd %%mm5, %%mm5 \n\t" 87 "punpcklwd %%mm5, %%mm5 \n\t" 90 "movq (%1, %0), %%mm0 \n\t" 91 "movq 8(%1, %0), %%mm1 \n\t" 92 PMULHRW(%%mm0, %%mm1, %%mm5, %%mm6)
93 "paddw (%2, %0), %%mm0 \n\t" 94 "paddw 8(%2, %0), %%mm1 \n\t" 95 "movq %%mm0, (%2, %0) \n\t" 96 "movq %%mm1, 8(%2, %0) \n\t" 102 :
"r"(
basis),
"r"(rem),
"g"(scale)
105 for(i=0; i<8*8; i++){
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.
#define DEF(type, name, bytes, read, write)
simple assert() macros that are a bit more flexible than ISO C assert().
#define FFABS(a)
Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they are not representable ...
static int weight(int i, int blen, int offset)
common internal and external API header
static int16_t basis[64][64]
__asm__(".macro parse_r var r\n\t""\\var = -1\n\t"_IFC_REG(0) _IFC_REG(1) _IFC_REG(2) _IFC_REG(3) _IFC_REG(4) _IFC_REG(5) _IFC_REG(6) _IFC_REG(7) _IFC_REG(8) _IFC_REG(9) _IFC_REG(10) _IFC_REG(11) _IFC_REG(12) _IFC_REG(13) _IFC_REG(14) _IFC_REG(15) _IFC_REG(16) _IFC_REG(17) _IFC_REG(18) _IFC_REG(19) _IFC_REG(20) _IFC_REG(21) _IFC_REG(22) _IFC_REG(23) _IFC_REG(24) _IFC_REG(25) _IFC_REG(26) _IFC_REG(27) _IFC_REG(28) _IFC_REG(29) _IFC_REG(30) _IFC_REG(31)".iflt \\var\n\t"".error \"Unable to parse register name \\r\"\n\t"".endif\n\t"".endm")