1 ;******************************************************************************
2 ;* MMX optimized DSP utils
3 ;* Copyright (c) 2008 Loren Merritt
5 ;* This file is part of Libav.
7 ;* Libav is free software; you can redistribute it and/or
8 ;* modify it under the terms of the GNU Lesser General Public
9 ;* License as published by the Free Software Foundation; either
10 ;* version 2.1 of the License, or (at your option) any later version.
12 ;* Libav is distributed in the hope that it will be useful,
13 ;* but WITHOUT ANY WARRANTY; without even the implied warranty of
14 ;* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 ;* Lesser General Public License for more details.
17 ;* You should have received a copy of the GNU Lesser General Public
18 ;* License along with Libav; if not, write to the Free Software
19 ;* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 ;******************************************************************************
22 %include "libavutil/x86/x86util.asm"
25 pb_bswap32: db 3, 2, 1, 0, 7, 6, 5, 4, 11, 10, 9, 8, 15, 14, 13, 12
29 ; %1 = aligned/unaligned
43 pshuflw m0, m0, 10110001b
44 pshuflw m1, m1, 10110001b
45 pshufhw m0, m0, 10110001b
46 pshufhw m1, m1, 10110001b
71 pshuflw m0, m0, 10110001b
72 pshufhw m0, m0, 10110001b
83 ; void ff_bswap_buf(uint32_t *dst, const uint32_t *src, int w);
86 cglobal bswap32_buf, 3,4,3
90 cglobal bswap32_buf, 3,4,5