Mercurial > libavcodec.hg
annotate x86/h264_intrapred.asm @ 12003:3b761226ea35 libavcodec
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
author | darkshikari |
---|---|
date | Mon, 28 Jun 2010 23:53:07 +0000 |
parents | 9c8584f68754 |
children | 2002ea7c06f6 |
rev | line source |
---|---|
11951
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
1 ;****************************************************************************** |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
2 ;* H.264 intra prediction asm optimizations |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
3 ;* Copyright (c) 2010 Jason Garrett-Glaser |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
4 ;* |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
5 ;* This file is part of FFmpeg. |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
6 ;* |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
7 ;* FFmpeg is free software; you can redistribute it and/or |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
8 ;* modify it under the terms of the GNU Lesser General Public |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
9 ;* License as published by the Free Software Foundation; either |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
10 ;* version 2.1 of the License, or (at your option) any later version. |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
11 ;* |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
12 ;* FFmpeg is distributed in the hope that it will be useful, |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
13 ;* but WITHOUT ANY WARRANTY; without even the implied warranty of |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
14 ;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
15 ;* Lesser General Public License for more details. |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
16 ;* |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
17 ;* You should have received a copy of the GNU Lesser General Public |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
18 ;* License along with FFmpeg; if not, write to the Free Software |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
19 ;* 51, Inc., Foundation Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
20 ;****************************************************************************** |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
21 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
22 %include "x86inc.asm" |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
23 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
24 SECTION_RODATA |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
25 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
26 tm_shuf: times 8 db 0x03, 0x80 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
27 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
28 SECTION .text |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
29 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
30 cextern pb_3 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
31 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
32 ;----------------------------------------------------------------------------- |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
33 ; void pred16x16_vertical(uint8_t *src, int stride) |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
34 ;----------------------------------------------------------------------------- |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
35 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
36 cglobal pred16x16_vertical_mmx, 2,3 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
37 sub r0, r1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
38 mov r2, 8 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
39 movq mm0, [r0+0] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
40 movq mm1, [r0+8] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
41 .loop: |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
42 movq [r0+r1*1+0], mm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
43 movq [r0+r1*1+8], mm1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
44 movq [r0+r1*2+0], mm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
45 movq [r0+r1*2+8], mm1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
46 lea r0, [r0+r1*2] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
47 dec r2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
48 jg .loop |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
49 REP_RET |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
50 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
51 cglobal pred16x16_vertical_sse, 2,3 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
52 sub r0, r1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
53 mov r2, 4 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
54 movaps xmm0, [r0] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
55 .loop: |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
56 movaps [r0+r1*1], xmm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
57 movaps [r0+r1*2], xmm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
58 lea r0, [r0+r1*2] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
59 movaps [r0+r1*1], xmm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
60 movaps [r0+r1*2], xmm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
61 lea r0, [r0+r1*2] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
62 dec r2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
63 jg .loop |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
64 REP_RET |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
65 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
66 ;----------------------------------------------------------------------------- |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
67 ; void pred16x16_horizontal(uint8_t *src, int stride) |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
68 ;----------------------------------------------------------------------------- |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
69 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
70 %macro PRED16x16_H 1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
71 cglobal pred16x16_horizontal_%1, 2,3 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
72 mov r2, 8 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
73 %ifidn %1, ssse3 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
74 mova m2, [pb_3] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
75 %endif |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
76 .loop: |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
77 movd m0, [r0+r1*0-4] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
78 movd m1, [r0+r1*1-4] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
79 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
80 %ifidn %1, ssse3 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
81 pshufb m0, m2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
82 pshufb m1, m2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
83 %else |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
84 punpcklbw m0, m0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
85 punpcklbw m1, m1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
86 %ifidn %1, mmxext |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
87 pshufw m0, m0, 0xff |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
88 pshufw m1, m1, 0xff |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
89 %else |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
90 punpckhwd m0, m0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
91 punpckhwd m1, m1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
92 punpckhdq m0, m0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
93 punpckhdq m1, m1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
94 %endif |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
95 mova [r0+r1*0+8], m0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
96 mova [r0+r1*1+8], m1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
97 %endif |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
98 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
99 mova [r0+r1*0], m0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
100 mova [r0+r1*1], m1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
101 lea r0, [r0+r1*2] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
102 dec r2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
103 jg .loop |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
104 REP_RET |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
105 %endmacro |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
106 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
107 INIT_MMX |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
108 PRED16x16_H mmx |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
109 PRED16x16_H mmxext |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
110 INIT_XMM |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
111 PRED16x16_H ssse3 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
112 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
113 ;----------------------------------------------------------------------------- |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
114 ; void pred16x16_dc(uint8_t *src, int stride) |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
115 ;----------------------------------------------------------------------------- |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
116 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
117 %macro PRED16x16_DC 2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
118 cglobal pred16x16_dc_%1, 2,7 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
119 mov r4, r0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
120 sub r0, r1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
121 pxor mm0, mm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
122 pxor mm1, mm1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
123 psadbw mm0, [r0+0] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
124 psadbw mm1, [r0+8] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
125 dec r0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
126 movzx r5d, byte [r0+r1*1] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
127 paddw mm0, mm1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
128 movd r6d, mm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
129 lea r0, [r0+r1*2] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
130 %rep 7 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
131 movzx r2d, byte [r0+r1*0] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
132 movzx r3d, byte [r0+r1*1] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
133 add r5d, r2d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
134 add r6d, r3d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
135 lea r0, [r0+r1*2] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
136 %endrep |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
137 movzx r2d, byte [r0+r1*0] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
138 add r5d, r6d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
139 lea r2d, [r2+r5+16] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
140 shr r2d, 5 |
12001
953a0949c789
Fix some intra pred MMX functions that used MMXEXT instructions
darkshikari
parents:
11951
diff
changeset
|
141 %ifidn %1, mmxext |
11951
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
142 movd m0, r2d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
143 punpcklbw m0, m0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
144 pshufw m0, m0, 0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
145 %elifidn %1, sse |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
146 imul r2d, 0x01010101 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
147 movd m0, r2d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
148 shufps m0, m0, 0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
149 %elifidn %1, sse2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
150 movd m0, r2d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
151 punpcklbw m0, m0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
152 pshuflw m0, m0, 0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
153 punpcklqdq m0, m0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
154 %elifidn %1, ssse3 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
155 pxor m1, m1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
156 movd m0, r2d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
157 pshufb m0, m1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
158 %endif |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
159 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
160 %if mmsize==8 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
161 mov r3d, 8 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
162 .loop: |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
163 %2 [r4+r1*0+0], m0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
164 %2 [r4+r1*0+8], m0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
165 %2 [r4+r1*1+0], m0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
166 %2 [r4+r1*1+8], m0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
167 %else |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
168 mov r3d, 4 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
169 .loop: |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
170 %2 [r4+r1*0], m0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
171 %2 [r4+r1*1], m0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
172 lea r4, [r4+r1*2] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
173 %2 [r4+r1*0], m0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
174 %2 [r4+r1*1], m0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
175 %endif |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
176 lea r4, [r4+r1*2] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
177 dec r3d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
178 jg .loop |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
179 REP_RET |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
180 %endmacro |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
181 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
182 INIT_MMX |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
183 PRED16x16_DC mmxext, movq |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
184 INIT_XMM |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
185 PRED16x16_DC sse, movaps |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
186 PRED16x16_DC sse2, movdqa |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
187 PRED16x16_DC ssse3, movdqa |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
188 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
189 ;----------------------------------------------------------------------------- |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
190 ; void pred16x16_tm_vp8(uint8_t *src, int stride) |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
191 ;----------------------------------------------------------------------------- |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
192 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
193 %macro PRED16x16_TM_MMX 1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
194 cglobal pred16x16_tm_vp8_%1, 2,5 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
195 sub r0, r1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
196 pxor mm7, mm7 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
197 movq mm0, [r0+0] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
198 movq mm2, [r0+8] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
199 movq mm1, mm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
200 movq mm3, mm2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
201 punpcklbw mm0, mm7 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
202 punpckhbw mm1, mm7 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
203 punpcklbw mm2, mm7 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
204 punpckhbw mm3, mm7 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
205 movzx r3d, byte [r0-1] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
206 mov r4d, 16 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
207 .loop: |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
208 movzx r2d, byte [r0+r1-1] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
209 sub r2d, r3d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
210 movd mm4, r2d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
211 %ifidn %1, mmx |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
212 punpcklwd mm4, mm4 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
213 punpckldq mm4, mm4 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
214 %else |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
215 pshufw mm4, mm4, 0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
216 %endif |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
217 movq mm5, mm4 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
218 movq mm6, mm4 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
219 movq mm7, mm4 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
220 paddw mm4, mm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
221 paddw mm5, mm1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
222 paddw mm6, mm2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
223 paddw mm7, mm3 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
224 packuswb mm4, mm5 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
225 packuswb mm6, mm7 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
226 movq [r0+r1+0], mm4 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
227 movq [r0+r1+8], mm6 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
228 add r0, r1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
229 dec r4d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
230 jg .loop |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
231 REP_RET |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
232 %endmacro |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
233 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
234 PRED16x16_TM_MMX mmx |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
235 PRED16x16_TM_MMX mmxext |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
236 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
237 cglobal pred16x16_tm_vp8_sse2, 2,6,6 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
238 sub r0, r1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
239 pxor xmm2, xmm2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
240 movdqa xmm0, [r0] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
241 movdqa xmm1, xmm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
242 punpcklbw xmm0, xmm2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
243 punpckhbw xmm1, xmm2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
244 movzx r4d, byte [r0-1] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
245 mov r5d, 8 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
246 .loop: |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
247 movzx r2d, byte [r0+r1*1-1] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
248 movzx r3d, byte [r0+r1*2-1] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
249 sub r2d, r4d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
250 sub r3d, r4d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
251 movd xmm2, r2d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
252 movd xmm4, r3d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
253 pshuflw xmm2, xmm2, 0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
254 pshuflw xmm4, xmm4, 0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
255 punpcklqdq xmm2, xmm2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
256 punpcklqdq xmm4, xmm4 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
257 movdqa xmm3, xmm2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
258 movdqa xmm5, xmm4 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
259 paddw xmm2, xmm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
260 paddw xmm3, xmm1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
261 paddw xmm4, xmm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
262 paddw xmm5, xmm1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
263 packuswb xmm2, xmm3 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
264 packuswb xmm4, xmm5 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
265 movdqa [r0+r1*1], xmm2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
266 movdqa [r0+r1*2], xmm4 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
267 lea r0, [r0+r1*2] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
268 dec r5d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
269 jg .loop |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
270 REP_RET |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
271 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
272 ;----------------------------------------------------------------------------- |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
273 ; void pred8x8_vertical(uint8_t *src, int stride) |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
274 ;----------------------------------------------------------------------------- |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
275 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
276 cglobal pred8x8_vertical_mmx, 2,2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
277 sub r0, r1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
278 movq mm0, [r0] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
279 %rep 3 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
280 movq [r0+r1*1], mm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
281 movq [r0+r1*2], mm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
282 lea r0, [r0+r1*2] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
283 %endrep |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
284 movq [r0+r1*1], mm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
285 movq [r0+r1*2], mm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
286 RET |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
287 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
288 ;----------------------------------------------------------------------------- |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
289 ; void pred8x8_horizontal(uint8_t *src, int stride) |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
290 ;----------------------------------------------------------------------------- |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
291 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
292 %macro PRED8x8_H 1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
293 cglobal pred8x8_horizontal_%1, 2,3 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
294 mov r2, 4 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
295 %ifidn %1, ssse3 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
296 mova m2, [pb_3] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
297 %endif |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
298 .loop: |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
299 movd m0, [r0+r1*0-4] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
300 movd m1, [r0+r1*1-4] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
301 %ifidn %1, ssse3 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
302 pshufb m0, m2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
303 pshufb m1, m2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
304 %else |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
305 punpcklbw m0, m0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
306 punpcklbw m1, m1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
307 %ifidn %1, mmxext |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
308 pshufw m0, m0, 0xff |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
309 pshufw m1, m1, 0xff |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
310 %else |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
311 punpckhwd m0, m0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
312 punpckhwd m1, m1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
313 punpckhdq m0, m0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
314 punpckhdq m1, m1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
315 %endif |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
316 %endif |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
317 mova [r0+r1*0], m0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
318 mova [r0+r1*1], m1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
319 lea r0, [r0+r1*2] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
320 dec r2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
321 jg .loop |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
322 REP_RET |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
323 %endmacro |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
324 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
325 INIT_MMX |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
326 PRED8x8_H mmx |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
327 PRED8x8_H mmxext |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
328 PRED8x8_H ssse3 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
329 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
330 ;----------------------------------------------------------------------------- |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
331 ; void pred8x8_dc_rv40(uint8_t *src, int stride) |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
332 ;----------------------------------------------------------------------------- |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
333 |
12001
953a0949c789
Fix some intra pred MMX functions that used MMXEXT instructions
darkshikari
parents:
11951
diff
changeset
|
334 cglobal pred8x8_dc_rv40_mmxext, 2,7 |
11951
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
335 mov r4, r0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
336 sub r0, r1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
337 pxor mm0, mm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
338 psadbw mm0, [r0] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
339 dec r0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
340 movzx r5d, byte [r0+r1*1] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
341 movd r6d, mm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
342 lea r0, [r0+r1*2] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
343 %rep 3 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
344 movzx r2d, byte [r0+r1*0] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
345 movzx r3d, byte [r0+r1*1] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
346 add r5d, r2d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
347 add r6d, r3d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
348 lea r0, [r0+r1*2] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
349 %endrep |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
350 movzx r2d, byte [r0+r1*0] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
351 add r5d, r6d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
352 lea r2d, [r2+r5+8] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
353 shr r2d, 4 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
354 movd mm0, r2d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
355 punpcklbw mm0, mm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
356 pshufw mm0, mm0, 0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
357 mov r3d, 4 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
358 .loop: |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
359 movq [r4+r1*0], mm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
360 movq [r4+r1*1], mm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
361 lea r4, [r4+r1*2] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
362 dec r3d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
363 jg .loop |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
364 REP_RET |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
365 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
366 ;----------------------------------------------------------------------------- |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
367 ; void pred8x8_tm_vp8(uint8_t *src, int stride) |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
368 ;----------------------------------------------------------------------------- |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
369 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
370 %macro PRED8x8_TM_MMX 1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
371 cglobal pred8x8_tm_vp8_%1, 2,6 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
372 sub r0, r1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
373 pxor mm7, mm7 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
374 movq mm0, [r0] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
375 movq mm1, mm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
376 punpcklbw mm0, mm7 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
377 punpckhbw mm1, mm7 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
378 movzx r4d, byte [r0-1] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
379 mov r5d, 4 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
380 .loop: |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
381 movzx r2d, byte [r0+r1*1-1] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
382 movzx r3d, byte [r0+r1*2-1] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
383 sub r2d, r4d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
384 sub r3d, r4d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
385 movd mm2, r2d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
386 movd mm4, r3d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
387 %ifidn %1, mmx |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
388 punpcklwd mm2, mm2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
389 punpcklwd mm4, mm4 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
390 punpckldq mm2, mm2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
391 punpckldq mm4, mm4 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
392 %else |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
393 pshufw mm2, mm2, 0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
394 pshufw mm4, mm4, 0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
395 %endif |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
396 movq mm3, mm2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
397 movq mm5, mm4 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
398 paddw mm2, mm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
399 paddw mm3, mm1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
400 paddw mm4, mm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
401 paddw mm5, mm1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
402 packuswb mm2, mm3 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
403 packuswb mm4, mm5 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
404 movq [r0+r1*1], mm2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
405 movq [r0+r1*2], mm4 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
406 lea r0, [r0+r1*2] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
407 dec r5d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
408 jg .loop |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
409 REP_RET |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
410 %endmacro |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
411 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
412 PRED8x8_TM_MMX mmx |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
413 PRED8x8_TM_MMX mmxext |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
414 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
415 cglobal pred8x8_tm_vp8_sse2, 2,6,4 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
416 sub r0, r1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
417 pxor xmm1, xmm1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
418 movq xmm0, [r0] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
419 punpcklbw xmm0, xmm1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
420 movzx r4d, byte [r0-1] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
421 mov r5d, 4 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
422 .loop: |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
423 movzx r2d, byte [r0+r1*1-1] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
424 movzx r3d, byte [r0+r1*2-1] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
425 sub r2d, r4d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
426 sub r3d, r4d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
427 movd xmm2, r2d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
428 movd xmm3, r3d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
429 pshuflw xmm2, xmm2, 0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
430 pshuflw xmm3, xmm3, 0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
431 punpcklqdq xmm2, xmm2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
432 punpcklqdq xmm3, xmm3 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
433 paddw xmm2, xmm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
434 paddw xmm3, xmm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
435 packuswb xmm2, xmm3 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
436 movq [r0+r1*1], xmm2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
437 movhps [r0+r1*2], xmm2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
438 lea r0, [r0+r1*2] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
439 dec r5d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
440 jg .loop |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
441 REP_RET |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
442 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
443 cglobal pred8x8_tm_vp8_ssse3, 2,3,6 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
444 sub r0, r1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
445 movdqa xmm4, [tm_shuf] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
446 pxor xmm1, xmm1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
447 movq xmm0, [r0] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
448 punpcklbw xmm0, xmm1 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
449 movd xmm5, [r0-4] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
450 pshufb xmm5, xmm4 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
451 mov r2d, 4 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
452 .loop: |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
453 movd xmm2, [r0+r1*1-4] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
454 movd xmm3, [r0+r1*2-4] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
455 pshufb xmm2, xmm4 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
456 pshufb xmm3, xmm4 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
457 psubw xmm2, xmm5 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
458 psubw xmm3, xmm5 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
459 paddw xmm2, xmm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
460 paddw xmm3, xmm0 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
461 packuswb xmm2, xmm3 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
462 movq [r0+r1*1], xmm2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
463 movhps [r0+r1*2], xmm2 |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
464 lea r0, [r0+r1*2] |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
465 dec r2d |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
466 jg .loop |
afee30fe8c26
16x16 and 8x8c x86 SIMD intra pred functions for VP8 and H.264
darkshikari
parents:
diff
changeset
|
467 REP_RET |
12001
953a0949c789
Fix some intra pred MMX functions that used MMXEXT instructions
darkshikari
parents:
11951
diff
changeset
|
468 |
12002
9c8584f68754
Add missing comment header for predict_4x4_dc_mmxext
darkshikari
parents:
12001
diff
changeset
|
469 ;----------------------------------------------------------------------------- |
9c8584f68754
Add missing comment header for predict_4x4_dc_mmxext
darkshikari
parents:
12001
diff
changeset
|
470 ; void pred4x4_dc_mmxext(uint8_t *src, const uint8_t *topright, int stride) |
9c8584f68754
Add missing comment header for predict_4x4_dc_mmxext
darkshikari
parents:
12001
diff
changeset
|
471 ;----------------------------------------------------------------------------- |
9c8584f68754
Add missing comment header for predict_4x4_dc_mmxext
darkshikari
parents:
12001
diff
changeset
|
472 |
12001
953a0949c789
Fix some intra pred MMX functions that used MMXEXT instructions
darkshikari
parents:
11951
diff
changeset
|
473 cglobal pred4x4_dc_mmxext, 3,5 |
953a0949c789
Fix some intra pred MMX functions that used MMXEXT instructions
darkshikari
parents:
11951
diff
changeset
|
474 pxor mm7, mm7 |
953a0949c789
Fix some intra pred MMX functions that used MMXEXT instructions
darkshikari
parents:
11951
diff
changeset
|
475 mov r4, r0 |
953a0949c789
Fix some intra pred MMX functions that used MMXEXT instructions
darkshikari
parents:
11951
diff
changeset
|
476 sub r0, r2 |
953a0949c789
Fix some intra pred MMX functions that used MMXEXT instructions
darkshikari
parents:
11951
diff
changeset
|
477 movd mm0, [r0] |
953a0949c789
Fix some intra pred MMX functions that used MMXEXT instructions
darkshikari
parents:
11951
diff
changeset
|
478 psadbw mm0, mm7 |
953a0949c789
Fix some intra pred MMX functions that used MMXEXT instructions
darkshikari
parents:
11951
diff
changeset
|
479 movzx r1d, byte [r0+r2*1-1] |
953a0949c789
Fix some intra pred MMX functions that used MMXEXT instructions
darkshikari
parents:
11951
diff
changeset
|
480 movd r3d, mm0 |
953a0949c789
Fix some intra pred MMX functions that used MMXEXT instructions
darkshikari
parents:
11951
diff
changeset
|
481 add r3d, r1d |
953a0949c789
Fix some intra pred MMX functions that used MMXEXT instructions
darkshikari
parents:
11951
diff
changeset
|
482 movzx r1d, byte [r0+r2*2-1] |
953a0949c789
Fix some intra pred MMX functions that used MMXEXT instructions
darkshikari
parents:
11951
diff
changeset
|
483 lea r0, [r0+r2*2] |
953a0949c789
Fix some intra pred MMX functions that used MMXEXT instructions
darkshikari
parents:
11951
diff
changeset
|
484 add r3d, r1d |
953a0949c789
Fix some intra pred MMX functions that used MMXEXT instructions
darkshikari
parents:
11951
diff
changeset
|
485 movzx r1d, byte [r0+r2*1-1] |
953a0949c789
Fix some intra pred MMX functions that used MMXEXT instructions
darkshikari
parents:
11951
diff
changeset
|
486 add r3d, r1d |
953a0949c789
Fix some intra pred MMX functions that used MMXEXT instructions
darkshikari
parents:
11951
diff
changeset
|
487 movzx r1d, byte [r0+r2*2-1] |
953a0949c789
Fix some intra pred MMX functions that used MMXEXT instructions
darkshikari
parents:
11951
diff
changeset
|
488 add r3d, r1d |
953a0949c789
Fix some intra pred MMX functions that used MMXEXT instructions
darkshikari
parents:
11951
diff
changeset
|
489 add r3d, 4 |
953a0949c789
Fix some intra pred MMX functions that used MMXEXT instructions
darkshikari
parents:
11951
diff
changeset
|
490 shr r3d, 3 |
953a0949c789
Fix some intra pred MMX functions that used MMXEXT instructions
darkshikari
parents:
11951
diff
changeset
|
491 imul r3d, 0x01010101 |
953a0949c789
Fix some intra pred MMX functions that used MMXEXT instructions
darkshikari
parents:
11951
diff
changeset
|
492 mov [r4+r2*0], r3d |
953a0949c789
Fix some intra pred MMX functions that used MMXEXT instructions
darkshikari
parents:
11951
diff
changeset
|
493 mov [r0+r2*0], r3d |
953a0949c789
Fix some intra pred MMX functions that used MMXEXT instructions
darkshikari
parents:
11951
diff
changeset
|
494 mov [r0+r2*1], r3d |
953a0949c789
Fix some intra pred MMX functions that used MMXEXT instructions
darkshikari
parents:
11951
diff
changeset
|
495 mov [r0+r2*2], r3d |
953a0949c789
Fix some intra pred MMX functions that used MMXEXT instructions
darkshikari
parents:
11951
diff
changeset
|
496 RET |
12003
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
497 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
498 ;----------------------------------------------------------------------------- |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
499 ; void pred4x4_tm_vp8_mmxext(uint8_t *src, const uint8_t *topright, int stride) |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
500 ;----------------------------------------------------------------------------- |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
501 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
502 %macro PRED4x4_TM_MMX 1 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
503 cglobal pred4x4_tm_vp8_%1, 3,6 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
504 sub r0, r2 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
505 pxor mm7, mm7 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
506 movd mm0, [r0] |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
507 punpcklbw mm0, mm7 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
508 movzx r4d, byte [r0-1] |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
509 mov r5d, 2 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
510 .loop: |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
511 movzx r1d, byte [r0+r2*1-1] |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
512 movzx r3d, byte [r0+r2*2-1] |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
513 sub r1d, r4d |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
514 sub r3d, r4d |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
515 movd mm2, r1d |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
516 movd mm4, r3d |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
517 %ifidn %1, mmx |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
518 punpcklwd mm2, mm2 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
519 punpcklwd mm4, mm4 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
520 punpckldq mm2, mm2 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
521 punpckldq mm4, mm4 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
522 %else |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
523 pshufw mm2, mm2, 0 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
524 pshufw mm4, mm4, 0 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
525 %endif |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
526 paddw mm2, mm0 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
527 paddw mm4, mm0 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
528 packuswb mm2, mm2 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
529 packuswb mm4, mm4 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
530 movd [r0+r2*1], mm2 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
531 movd [r0+r2*2], mm4 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
532 lea r0, [r0+r2*2] |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
533 dec r5d |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
534 jg .loop |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
535 REP_RET |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
536 %endmacro |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
537 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
538 PRED4x4_TM_MMX mmx |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
539 PRED4x4_TM_MMX mmxext |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
540 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
541 cglobal pred4x4_tm_vp8_ssse3, 3,3 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
542 sub r0, r2 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
543 movq mm6, [tm_shuf] |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
544 pxor mm1, mm1 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
545 movd mm0, [r0] |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
546 punpcklbw mm0, mm1 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
547 movd mm7, [r0-4] |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
548 pshufb mm7, mm6 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
549 lea r1, [r0+r2*2] |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
550 movd mm2, [r0+r2*1-4] |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
551 movd mm3, [r0+r2*2-4] |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
552 movd mm4, [r1+r2*1-4] |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
553 movd mm5, [r1+r2*2-4] |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
554 pshufb mm2, mm6 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
555 pshufb mm3, mm6 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
556 pshufb mm4, mm6 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
557 pshufb mm5, mm6 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
558 psubw mm2, mm7 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
559 psubw mm3, mm7 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
560 psubw mm4, mm7 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
561 psubw mm5, mm7 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
562 paddw mm2, mm0 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
563 paddw mm3, mm0 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
564 paddw mm4, mm0 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
565 paddw mm5, mm0 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
566 packuswb mm2, mm2 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
567 packuswb mm3, mm3 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
568 packuswb mm4, mm4 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
569 packuswb mm5, mm5 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
570 movd [r0+r2*1], mm2 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
571 movd [r0+r2*2], mm3 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
572 movd [r1+r2*1], mm4 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
573 movd [r1+r2*2], mm5 |
3b761226ea35
Add mmx/mmxext/ssse3 4x4 TM intra pred functions for vp8
darkshikari
parents:
12002
diff
changeset
|
574 RET |