33 1, 2, 6, 7, 15, 16, 28, 29,
34 3, 5, 8, 14, 17, 27, 30, 43,
35 4, 9, 13, 18, 26, 31, 42, 44,
36 10, 12, 19, 25, 32, 41, 45, 54,
37 11, 20, 24, 33, 40, 46, 53, 55,
38 21, 23, 34, 39, 47, 52, 56, 61,
39 22, 35, 38, 48, 51, 57, 60, 62,
40 36, 37, 49, 50, 58, 59, 63, 64,
46 #define COMPILE_TEMPLATE_SSSE3 0
47 #define RENAME(a) a ## _sse2
52 #undef COMPILE_TEMPLATE_SSSE3
53 #define COMPILE_TEMPLATE_SSSE3 1
55 #define RENAME(a) a ## _ssse3
65 const int intra =
s->c.mb_intra;
66 int *sum=
s->dct_error_sum[intra];
67 uint16_t *
offset=
s->dct_offset[intra];
69 s->dct_count[intra]++;
72 "pxor %%xmm7, %%xmm7 \n\t"
74 "pxor %%xmm0, %%xmm0 \n\t"
75 "pxor %%xmm1, %%xmm1 \n\t"
76 "movdqa (%0), %%xmm2 \n\t"
77 "movdqa 16(%0), %%xmm3 \n\t"
78 "pcmpgtw %%xmm2, %%xmm0 \n\t"
79 "pcmpgtw %%xmm3, %%xmm1 \n\t"
80 "pxor %%xmm0, %%xmm2 \n\t"
81 "pxor %%xmm1, %%xmm3 \n\t"
82 "psubw %%xmm0, %%xmm2 \n\t"
83 "psubw %%xmm1, %%xmm3 \n\t"
84 "movdqa %%xmm2, %%xmm4 \n\t"
85 "movdqa %%xmm3, %%xmm5 \n\t"
86 "psubusw (%2), %%xmm2 \n\t"
87 "psubusw 16(%2), %%xmm3 \n\t"
88 "pxor %%xmm0, %%xmm2 \n\t"
89 "pxor %%xmm1, %%xmm3 \n\t"
90 "psubw %%xmm0, %%xmm2 \n\t"
91 "psubw %%xmm1, %%xmm3 \n\t"
92 "movdqa %%xmm2, (%0) \n\t"
93 "movdqa %%xmm3, 16(%0) \n\t"
94 "movdqa %%xmm4, %%xmm6 \n\t"
95 "movdqa %%xmm5, %%xmm0 \n\t"
96 "punpcklwd %%xmm7, %%xmm4 \n\t"
97 "punpckhwd %%xmm7, %%xmm6 \n\t"
98 "punpcklwd %%xmm7, %%xmm5 \n\t"
99 "punpckhwd %%xmm7, %%xmm0 \n\t"
100 "paddd (%1), %%xmm4 \n\t"
101 "paddd 16(%1), %%xmm6 \n\t"
102 "paddd 32(%1), %%xmm5 \n\t"
103 "paddd 48(%1), %%xmm0 \n\t"
104 "movdqa %%xmm4, (%1) \n\t"
105 "movdqa %%xmm6, 16(%1) \n\t"
106 "movdqa %%xmm5, 32(%1) \n\t"
107 "movdqa %%xmm0, 48(%1) \n\t"
116 "%xmm4",
"%xmm5",
"%xmm6",
"%xmm7")
124 const int dct_algo =
s->c.avctx->dct_algo;
132 s->dct_quantize = dct_quantize_sse2;
134 s->denoise_dct = denoise_dct_sse2;
137 #if HAVE_6REGS && HAVE_SSSE3_INLINE
139 s->dct_quantize = dct_quantize_ssse3;