29static void line_noise_avg_sse2(uint8_t *
dst,
const uint8_t *
src,
30 int len,
const int8_t *
const *
shift)
35 "mov %5, %%"FF_REG_a
" \n\t"
36 "pxor %%xmm4, %%xmm4 \n\t"
39 "movdqu (%1, %%"FF_REG_a
"), %%xmm1 \n\t"
40 "movdqu (%2, %%"FF_REG_a
"), %%xmm2 \n\t"
41 "movdqu (%3, %%"FF_REG_a
"), %%xmm3 \n\t"
42 "movdqu (%0, %%"FF_REG_a
"), %%xmm0 \n\t"
43 "paddb %%xmm2, %%xmm1 \n\t"
44 "paddb %%xmm3, %%xmm1 \n\t"
45 "movdqa %%xmm4, %%xmm5 \n\t"
46 "pcmpgtb %%xmm0, %%xmm5 \n\t"
47 "movdqa %%xmm0, %%xmm6 \n\t"
48 "movdqa %%xmm0, %%xmm2 \n\t"
49 "punpcklbw %%xmm5, %%xmm0 \n\t"
50 "punpckhbw %%xmm5, %%xmm2 \n\t"
51 "movdqa %%xmm4, %%xmm5 \n\t"
52 "pcmpgtb %%xmm1, %%xmm5 \n\t"
53 "movdqa %%xmm1, %%xmm3 \n\t"
54 "punpcklbw %%xmm5, %%xmm1 \n\t"
55 "punpckhbw %%xmm5, %%xmm3 \n\t"
56 "pmullw %%xmm0, %%xmm1 \n\t"
57 "pmullw %%xmm2, %%xmm3 \n\t"
58 "psraw $7, %%xmm1 \n\t"
59 "psraw $7, %%xmm3 \n\t"
60 "packsswb %%xmm3, %%xmm1 \n\t"
61 "paddb %%xmm6, %%xmm1 \n\t"
62 "movdqu %%xmm1, (%4, %%"FF_REG_a
") \n\t"
63 "add $16, %%"FF_REG_a
" \n\t"
65 ::
"r" (
src+xmm_len),
"r" (
shift[0]+xmm_len),
"r" (
shift[1]+xmm_len),
"r" (
shift[2]+xmm_len),
66 "r" (
dst+xmm_len),
"g" (-xmm_len)
68 "%xmm4",
"%xmm5",
"%xmm6",)
"%"FF_REG_a
78static void line_noise_sse2(uint8_t *
dst,
const uint8_t *
src,
85 "mov %3, %%"FF_REG_a
" \n\t"
86 "pcmpeqb %%xmm2, %%xmm2 \n\t"
87 "psllw $15, %%xmm2 \n\t"
88 "packsswb %%xmm2, %%xmm2 \n\t"
91 "movdqu (%0, %%"FF_REG_a
"), %%xmm0 \n\t"
92 "movdqu (%1, %%"FF_REG_a
"), %%xmm1 \n\t"
93 "pxor %%xmm2, %%xmm0 \n\t"
94 "paddsb %%xmm1, %%xmm0 \n\t"
95 "pxor %%xmm2, %%xmm0 \n\t"
96 "movdqu %%xmm0, (%2, %%"FF_REG_a
") \n\t"
97 "add $16, %%"FF_REG_a
" \n\t"
99 ::
"r" (
src+xmm_len),
"r" (
noise+xmm_len),
"r" (
dst+xmm_len),
"g" (-xmm_len)
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
#define XMM_CLOBBERS(...)
__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")
static int shift(int a, int b)
static const uint8_t shift2[6]
Macro definitions for various function/variable attributes.
static atomic_int cpu_flags
int av_get_cpu_flags(void)
Return the flags which specify extensions supported by the CPU.
#define INLINE_SSE2(flags)
static int noise(AVBSFContext *ctx, AVPacket *pkt)
void(* line_noise_avg)(uint8_t *dst, const uint8_t *src, int len, const int8_t *const *shift)
void(* line_noise)(uint8_t *dst, const uint8_t *src, const int8_t *noise, int len, int shift)
void ff_line_noise_avg_c(uint8_t *dst, const uint8_t *src, int len, const int8_t *const *shift)
void ff_line_noise_c(uint8_t *dst, const uint8_t *src, const int8_t *noise, int len, int shift)
void ff_noise_init_x86(NoiseContext *n)