diff options
| author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-04-03 00:38:22 +0200 |
|---|---|---|
| committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-04-03 00:38:22 +0200 |
| commit | 0ed2cd4f34189ec303dfac5a30de0abae0decba8 (patch) | |
| tree | 7a8d08d25ca7c81daa9d6cd65fd4f633fd676b41 /src/libffmpeg/libavcodec/ppc/mathops.h | |
| parent | 6081bc9a06ee97333769f77a9e5c18a15afb29da (diff) | |
| parent | 3dd7d925c2feb7868a49e7a1a0b953a5aab233f0 (diff) | |
| download | xine-lib-0ed2cd4f34189ec303dfac5a30de0abae0decba8.tar.gz xine-lib-0ed2cd4f34189ec303dfac5a30de0abae0decba8.tar.bz2 | |
Merge changes happened in 1.1 development.
Diffstat (limited to 'src/libffmpeg/libavcodec/ppc/mathops.h')
| -rw-r--r-- | src/libffmpeg/libavcodec/ppc/mathops.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/libffmpeg/libavcodec/ppc/mathops.h b/src/libffmpeg/libavcodec/ppc/mathops.h new file mode 100644 index 000000000..6af23f246 --- /dev/null +++ b/src/libffmpeg/libavcodec/ppc/mathops.h @@ -0,0 +1,33 @@ +/* + * simple math operations + * Copyright (c) 2001, 2002 Fabrice Bellard. + * Copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at> et al + * + * This file is part of FFmpeg. + * + * FFmpeg is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * FFmpeg is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with FFmpeg; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#if defined(ARCH_POWERPC_405) +/* signed 16x16 -> 32 multiply add accumulate */ +# define MAC16(rt, ra, rb) \ + asm ("maclhw %0, %2, %3" : "=r" (rt) : "0" (rt), "r" (ra), "r" (rb)); + +/* signed 16x16 -> 32 multiply */ +# define MUL16(ra, rb) \ + ({ int __rt; + asm ("mullhw %0, %1, %2" : "=r" (__rt) : "r" (ra), "r" (rb)); + __rt; }) +#endif |
