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 #undef COMPILE_TEMPLATE_SSE2
47 #undef COMPILE_TEMPLATE_SSSE3
48 #define COMPILE_TEMPLATE_SSE2 1
49 #define COMPILE_TEMPLATE_SSSE3 0
52 #define RENAME(a) a ## _sse2
53 #define RENAME_FDCT(a) a ## _sse2
58 #undef COMPILE_TEMPLATE_SSE2
59 #undef COMPILE_TEMPLATE_SSSE3
60 #define COMPILE_TEMPLATE_SSE2 1
61 #define COMPILE_TEMPLATE_SSSE3 1
64 #define RENAME(a) a ## _ssse3
65 #define RENAME_FDCT(a) a ## _sse2
74 const int intra=
s->mb_intra;
75 int *sum=
s->dct_error_sum[intra];
76 uint16_t *
offset=
s->dct_offset[intra];
78 s->dct_count[intra]++;
81 "pxor %%xmm7, %%xmm7 \n\t"
83 "pxor %%xmm0, %%xmm0 \n\t"
84 "pxor %%xmm1, %%xmm1 \n\t"
85 "movdqa (%0), %%xmm2 \n\t"
86 "movdqa 16(%0), %%xmm3 \n\t"
87 "pcmpgtw %%xmm2, %%xmm0 \n\t"
88 "pcmpgtw %%xmm3, %%xmm1 \n\t"
89 "pxor %%xmm0, %%xmm2 \n\t"
90 "pxor %%xmm1, %%xmm3 \n\t"
91 "psubw %%xmm0, %%xmm2 \n\t"
92 "psubw %%xmm1, %%xmm3 \n\t"
93 "movdqa %%xmm2, %%xmm4 \n\t"
94 "movdqa %%xmm3, %%xmm5 \n\t"
95 "psubusw (%2), %%xmm2 \n\t"
96 "psubusw 16(%2), %%xmm3 \n\t"
97 "pxor %%xmm0, %%xmm2 \n\t"
98 "pxor %%xmm1, %%xmm3 \n\t"
99 "psubw %%xmm0, %%xmm2 \n\t"
100 "psubw %%xmm1, %%xmm3 \n\t"
101 "movdqa %%xmm2, (%0) \n\t"
102 "movdqa %%xmm3, 16(%0) \n\t"
103 "movdqa %%xmm4, %%xmm6 \n\t"
104 "movdqa %%xmm5, %%xmm0 \n\t"
105 "punpcklwd %%xmm7, %%xmm4 \n\t"
106 "punpckhwd %%xmm7, %%xmm6 \n\t"
107 "punpcklwd %%xmm7, %%xmm5 \n\t"
108 "punpckhwd %%xmm7, %%xmm0 \n\t"
109 "paddd (%1), %%xmm4 \n\t"
110 "paddd 16(%1), %%xmm6 \n\t"
111 "paddd 32(%1), %%xmm5 \n\t"
112 "paddd 48(%1), %%xmm0 \n\t"
113 "movdqa %%xmm4, (%1) \n\t"
114 "movdqa %%xmm6, 16(%1) \n\t"
115 "movdqa %%xmm5, 32(%1) \n\t"
116 "movdqa %%xmm0, 48(%1) \n\t"
125 "%xmm4",
"%xmm5",
"%xmm6",
"%xmm7")
133 const int dct_algo =
s->avctx->dct_algo;
141 s->dct_quantize = dct_quantize_sse2;
143 s->denoise_dct = denoise_dct_sse2;
146 #if HAVE_6REGS && HAVE_SSSE3_INLINE
148 s->dct_quantize = dct_quantize_ssse3;