2 ; Copyright (c) 2010 The WebM project authors. All Rights Reserved.
4 ; Use of this source code is governed by a BSD-style license
5 ; that can be found in the LICENSE file in the root of the source
6 ; tree. An additional intellectual property rights grant can be found
7 ; in the file PATENTS. All contributing project authors may
8 ; be found in the AUTHORS file in the root of the source tree.
11 %include "third_party/x86inc/x86inc.asm"
17 cglobal convolve_%1, 4, 7, 4, src, src_stride, dst, dst_stride, \
18 fx, fxs, fy, fys, w, h
56 movu m2, [srcq+src_strideq]
57 movu m3, [srcq+src_strideq+16]
58 lea srcq, [srcq+src_strideq*2]
62 pavgb m2, [dstq+dst_strideq]
63 pavgb m3, [dstq+dst_strideq+16]
67 mova [dstq+dst_strideq ], m2
68 mova [dstq+dst_strideq+16], m3
69 lea dstq, [dstq+dst_strideq*2]
76 lea r5q, [src_strideq*3]
77 lea r6q, [dst_strideq*3]
80 movu m1, [srcq+src_strideq]
81 movu m2, [srcq+src_strideq*2]
83 lea srcq, [srcq+src_strideq*4]
86 pavgb m1, [dstq+dst_strideq]
87 pavgb m2, [dstq+dst_strideq*2]
91 mova [dstq+dst_strideq ], m1
92 mova [dstq+dst_strideq*2], m2
94 lea dstq, [dstq+dst_strideq*4]
102 lea r5q, [src_strideq*3]
103 lea r6q, [dst_strideq*3]
106 movu m1, [srcq+src_strideq]
107 movu m2, [srcq+src_strideq*2]
109 lea srcq, [srcq+src_strideq*4]
112 pavgb m1, [dstq+dst_strideq]
113 pavgb m2, [dstq+dst_strideq*2]
117 mova [dstq+dst_strideq ], m1
118 mova [dstq+dst_strideq*2], m2
120 lea dstq, [dstq+dst_strideq*4]
127 lea r5q, [src_strideq*3]
128 lea r6q, [dst_strideq*3]
131 movh m1, [srcq+src_strideq]
132 movh m2, [srcq+src_strideq*2]
134 lea srcq, [srcq+src_strideq*4]
137 movh m5, [dstq+dst_strideq]
138 movh m6, [dstq+dst_strideq*2]
146 movh [dstq+dst_strideq ], m1
147 movh [dstq+dst_strideq*2], m2
149 lea dstq, [dstq+dst_strideq*4]