Changeset 5633 for pjproject/trunk/third_party/yuv/source/rotate_win.cc
- Timestamp:
- Jul 28, 2017 2:51:44 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/third_party/yuv/source/rotate_win.cc
r5358 r5633 9 9 */ 10 10 11 #include "libyuv/rotate_row.h" 11 12 #include "libyuv/row.h" 12 #include "libyuv/rotate_row.h"13 13 14 14 #ifdef __cplusplus … … 20 20 #if !defined(LIBYUV_DISABLE_X86) && defined(_M_IX86) 21 21 22 __declspec(naked) 23 void TransposeWx8_SSSE3(const uint8* src, int src_stride, 24 uint8* dst, int dst_stride, int width) { 22 __declspec(naked) void TransposeWx8_SSSE3(const uint8* src, 23 int src_stride, 24 uint8* dst, 25 int dst_stride, 26 int width) { 25 27 __asm { 26 28 push edi 27 29 push esi 28 30 push ebp 29 mov eax, [esp + 12 + 4] 30 mov edi, [esp + 12 + 8] 31 mov eax, [esp + 12 + 4] // src 32 mov edi, [esp + 12 + 8] // src_stride 31 33 mov edx, [esp + 12 + 12] // dst 32 34 mov esi, [esp + 12 + 16] // dst_stride … … 111 113 } 112 114 113 __declspec(naked) 114 void TransposeUVWx8_SSE2(const uint8* src, int src_stride, 115 uint8* dst_a, int dst_stride_a, 116 uint8* dst_b, int dst_stride_b, 117 int w) { 115 __declspec(naked) void TransposeUVWx8_SSE2(const uint8* src, 116 int src_stride, 117 uint8* dst_a, 118 int dst_stride_a, 119 uint8* dst_b, 120 int dst_stride_b, 121 int w) { 118 122 __asm { 119 123 push ebx … … 121 125 push edi 122 126 push ebp 123 mov eax, [esp + 16 + 4] 124 mov edi, [esp + 16 + 8] 127 mov eax, [esp + 16 + 4] // src 128 mov edi, [esp + 16 + 8] // src_stride 125 129 mov edx, [esp + 16 + 12] // dst_a 126 130 mov esi, [esp + 16 + 16] // dst_stride_a … … 134 138 135 139 align 4 136 convertloop:137 140 // Read in the data from the source pointer. 138 141 // First round of bit swap. 142 convertloop: 139 143 movdqu xmm0, [eax] 140 144 movdqu xmm1, [eax + edi] … … 163 167 movdqu [esp], xmm5 // backup xmm5 164 168 neg edi 165 movdqa xmm5, xmm6 169 movdqa xmm5, xmm6 // use xmm5 as temp register. 166 170 punpcklbw xmm6, xmm7 167 171 punpckhbw xmm5, xmm7 … … 184 188 movdqu xmm5, [esp] // restore xmm5 185 189 movdqu [esp], xmm6 // backup xmm6 186 movdqa xmm6, xmm5 190 movdqa xmm6, xmm5 // use xmm6 as temp register. 187 191 punpcklwd xmm5, xmm7 188 192 punpckhwd xmm6, xmm7 189 193 movdqa xmm7, xmm6 194 190 195 // Third round of bit swap. 191 196 // Write to the destination pointer. … … 201 206 movhpd qword ptr [ebx + ebp], xmm4 202 207 lea ebx, [ebx + 2 * ebp] 203 movdqa xmm0, xmm2 208 movdqa xmm0, xmm2 // use xmm0 as the temp register. 204 209 punpckldq xmm2, xmm6 205 210 movlpd qword ptr [edx], xmm2 … … 210 215 movhpd qword ptr [ebx + ebp], xmm0 211 216 lea ebx, [ebx + 2 * ebp] 212 movdqa xmm0, xmm1 217 movdqa xmm0, xmm1 // use xmm0 as the temp register. 213 218 punpckldq xmm1, xmm5 214 219 movlpd qword ptr [edx], xmm1 … … 219 224 movhpd qword ptr [ebx + ebp], xmm0 220 225 lea ebx, [ebx + 2 * ebp] 221 movdqa xmm0, xmm3 226 movdqa xmm0, xmm3 // use xmm0 as the temp register. 222 227 punpckldq xmm3, xmm7 223 228 movlpd qword ptr [edx], xmm3
Note: See TracChangeset
for help on using the changeset viewer.