annotate i386/dsputil_yasm.asm @ 8105:b122cb798801 libavcodec

Fix illegal identifier, __ are reserved for the system.
author diego
date Mon, 03 Nov 2008 21:59:35 +0000
parents bb32f8a4c0f9
children 4877d4c6d8ae
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7570
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
1 ;******************************************************************************
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
2 ;* MMX optimized DSP utils
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
3 ;* Copyright (c) 2008 Loren Merritt
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
4 ;*
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
5 ;* This file is part of FFmpeg.
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
6 ;*
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
7 ;* FFmpeg is free software; you can redistribute it and/or
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
8 ;* modify it under the terms of the GNU Lesser General Public
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
9 ;* License as published by the Free Software Foundation; either
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
10 ;* version 2.1 of the License, or (at your option) any later version.
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
11 ;*
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
12 ;* FFmpeg is distributed in the hope that it will be useful,
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
13 ;* but WITHOUT ANY WARRANTY; without even the implied warranty of
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
14 ;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
15 ;* Lesser General Public License for more details.
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
16 ;*
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
17 ;* You should have received a copy of the GNU Lesser General Public
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
18 ;* License along with FFmpeg; if not, write to the Free Software
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
19 ;* 51, Inc., Foundation Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
20 ;******************************************************************************
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
21
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
22 %include "x86inc.asm"
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
23
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
24 section .text align=16
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
25
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
26 %macro PSWAPD_SSE 2
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
27 pshufw %1, %2, 0x4e
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
28 %endmacro
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
29 %macro PSWAPD_3DN1 2
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
30 movq %1, %2
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
31 psrlq %1, 32
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
32 punpckldq %1, %2
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
33 %endmacro
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
34
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
35 %macro FLOAT_TO_INT16_INTERLEAVE6 1
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
36 ; void ff_float_to_int16_interleave6_sse(int16_t *dst, const float **src, int len)
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
37 cglobal ff_float_to_int16_interleave6_%1, 2,7,0, dst, src, src1, src2, src3, src4, src5
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
38 %ifdef ARCH_X86_64
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
39 %define lend r10d
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
40 mov lend, r2d
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
41 %else
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
42 %define lend dword r2m
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
43 %endif
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
44 mov src1q, [srcq+1*gprsize]
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
45 mov src2q, [srcq+2*gprsize]
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
46 mov src3q, [srcq+3*gprsize]
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
47 mov src4q, [srcq+4*gprsize]
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
48 mov src5q, [srcq+5*gprsize]
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
49 mov srcq, [srcq]
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
50 sub src1q, srcq
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
51 sub src2q, srcq
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
52 sub src3q, srcq
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
53 sub src4q, srcq
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
54 sub src5q, srcq
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
55 .loop:
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
56 cvtps2pi mm0, [srcq]
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
57 cvtps2pi mm1, [srcq+src1q]
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
58 cvtps2pi mm2, [srcq+src2q]
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
59 cvtps2pi mm3, [srcq+src3q]
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
60 cvtps2pi mm4, [srcq+src4q]
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
61 cvtps2pi mm5, [srcq+src5q]
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
62 packssdw mm0, mm3
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
63 packssdw mm1, mm4
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
64 packssdw mm2, mm5
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
65 pswapd mm3, mm0
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
66 punpcklwd mm0, mm1
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
67 punpckhwd mm1, mm2
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
68 punpcklwd mm2, mm3
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
69 pswapd mm3, mm0
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
70 punpckldq mm0, mm2
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
71 punpckhdq mm2, mm1
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
72 punpckldq mm1, mm3
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
73 movq [dstq ], mm0
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
74 movq [dstq+16], mm2
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
75 movq [dstq+ 8], mm1
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
76 add srcq, 8
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
77 add dstq, 24
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
78 sub lend, 2
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
79 jg .loop
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
80 emms
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
81 RET
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
82 %endmacro ; FLOAT_TO_INT16_INTERLEAVE6
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
83
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
84 %define pswapd PSWAPD_SSE
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
85 FLOAT_TO_INT16_INTERLEAVE6 sse
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
86 %define cvtps2pi pf2id
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
87 %define pswapd PSWAPD_3DN1
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
88 FLOAT_TO_INT16_INTERLEAVE6 3dnow
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
89 %undef pswapd
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
90 FLOAT_TO_INT16_INTERLEAVE6 3dn2
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
91 %undef cvtps2pi
bb32f8a4c0f9 file which should have been added in r14749
lorenm
parents:
diff changeset
92