annotate x86_cpu.h @ 798:41da9d9d39b7 libavutil

Implement av_bmg_next(), a Box-Muller Gaussian random generator. See the thread: "[FFmpeg-devel] [PATCH] Box-Muller gaussian generator".
author stefano
date Sat, 12 Dec 2009 16:24:37 +0000
parents 1ca023f2f39d
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
108
11be8e0d1344 Add official LGPL license headers to the files that were missing them.
diego
parents: 93
diff changeset
1 /*
11be8e0d1344 Add official LGPL license headers to the files that were missing them.
diego
parents: 93
diff changeset
2 * copyright (c) 2006 Michael Niedermayer <michaelni@gmx.at>
11be8e0d1344 Add official LGPL license headers to the files that were missing them.
diego
parents: 93
diff changeset
3 *
116
d76a36742464 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 108
diff changeset
4 * This file is part of FFmpeg.
d76a36742464 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 108
diff changeset
5 *
d76a36742464 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 108
diff changeset
6 * FFmpeg is free software; you can redistribute it and/or
108
11be8e0d1344 Add official LGPL license headers to the files that were missing them.
diego
parents: 93
diff changeset
7 * modify it under the terms of the GNU Lesser General Public
11be8e0d1344 Add official LGPL license headers to the files that were missing them.
diego
parents: 93
diff changeset
8 * License as published by the Free Software Foundation; either
116
d76a36742464 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 108
diff changeset
9 * version 2.1 of the License, or (at your option) any later version.
108
11be8e0d1344 Add official LGPL license headers to the files that were missing them.
diego
parents: 93
diff changeset
10 *
116
d76a36742464 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 108
diff changeset
11 * FFmpeg is distributed in the hope that it will be useful,
108
11be8e0d1344 Add official LGPL license headers to the files that were missing them.
diego
parents: 93
diff changeset
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11be8e0d1344 Add official LGPL license headers to the files that were missing them.
diego
parents: 93
diff changeset
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11be8e0d1344 Add official LGPL license headers to the files that were missing them.
diego
parents: 93
diff changeset
14 * Lesser General Public License for more details.
11be8e0d1344 Add official LGPL license headers to the files that were missing them.
diego
parents: 93
diff changeset
15 *
11be8e0d1344 Add official LGPL license headers to the files that were missing them.
diego
parents: 93
diff changeset
16 * You should have received a copy of the GNU Lesser General Public
116
d76a36742464 Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents: 108
diff changeset
17 * License along with FFmpeg; if not, write to the Free Software
108
11be8e0d1344 Add official LGPL license headers to the files that were missing them.
diego
parents: 93
diff changeset
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
11be8e0d1344 Add official LGPL license headers to the files that were missing them.
diego
parents: 93
diff changeset
19 */
11be8e0d1344 Add official LGPL license headers to the files that were missing them.
diego
parents: 93
diff changeset
20
567
bd4052d9050c Globally rename the header inclusion guard names.
stefano
parents: 518
diff changeset
21 #ifndef AVUTIL_X86_CPU_H
bd4052d9050c Globally rename the header inclusion guard names.
stefano
parents: 518
diff changeset
22 #define AVUTIL_X86_CPU_H
52
7df307dfe85c Move REG_* macros from libavcodec/i386/mmx.h to libavutil/x86_cpu.h
lucabe
parents:
diff changeset
23
507
04cb71bddd8e Add required stdint.h header.
diego
parents: 506
diff changeset
24 #include <stdint.h>
469
bdc8433d739e Add #include "config.h" to headers that need it.
diego
parents: 452
diff changeset
25 #include "config.h"
bdc8433d739e Add #include "config.h" to headers that need it.
diego
parents: 452
diff changeset
26
603
880c6441f56a Change semantic of CONFIG_*, HAVE_* and ARCH_*.
aurel
parents: 570
diff changeset
27 #if ARCH_X86_64
452
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
28 # define REG_a "rax"
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
29 # define REG_b "rbx"
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
30 # define REG_c "rcx"
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
31 # define REG_d "rdx"
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
32 # define REG_D "rdi"
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
33 # define REG_S "rsi"
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
34 # define PTR_SIZE "8"
506
1b2d09914b4e Do not misuse long as the size of a register in x86.
ramiro
parents: 475
diff changeset
35 typedef int64_t x86_reg;
52
7df307dfe85c Move REG_* macros from libavcodec/i386/mmx.h to libavutil/x86_cpu.h
lucabe
parents:
diff changeset
36
452
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
37 # define REG_SP "rsp"
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
38 # define REG_BP "rbp"
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
39 # define REGBP rbp
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
40 # define REGa rax
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
41 # define REGb rbx
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
42 # define REGc rcx
475
3213123cd4e7 add REGd definition
mru
parents: 469
diff changeset
43 # define REGd rdx
452
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
44 # define REGSP rsp
52
7df307dfe85c Move REG_* macros from libavcodec/i386/mmx.h to libavutil/x86_cpu.h
lucabe
parents:
diff changeset
45
570
152ab60d2d53 Only define x86 register names on x86.
diego
parents: 567
diff changeset
46 #elif ARCH_X86_32
52
7df307dfe85c Move REG_* macros from libavcodec/i386/mmx.h to libavutil/x86_cpu.h
lucabe
parents:
diff changeset
47
452
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
48 # define REG_a "eax"
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
49 # define REG_b "ebx"
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
50 # define REG_c "ecx"
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
51 # define REG_d "edx"
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
52 # define REG_D "edi"
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
53 # define REG_S "esi"
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
54 # define PTR_SIZE "4"
506
1b2d09914b4e Do not misuse long as the size of a register in x86.
ramiro
parents: 475
diff changeset
55 typedef int32_t x86_reg;
52
7df307dfe85c Move REG_* macros from libavcodec/i386/mmx.h to libavutil/x86_cpu.h
lucabe
parents:
diff changeset
56
452
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
57 # define REG_SP "esp"
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
58 # define REG_BP "ebp"
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
59 # define REGBP ebp
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
60 # define REGa eax
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
61 # define REGb ebx
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
62 # define REGc ecx
475
3213123cd4e7 add REGd definition
mru
parents: 469
diff changeset
63 # define REGd edx
452
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
64 # define REGSP esp
697
1ca023f2f39d typedef int x86_reg on non x86
michael
parents: 603
diff changeset
65 #else
1ca023f2f39d typedef int x86_reg on non x86
michael
parents: 603
diff changeset
66 typedef int x86_reg;
52
7df307dfe85c Move REG_* macros from libavcodec/i386/mmx.h to libavutil/x86_cpu.h
lucabe
parents:
diff changeset
67 #endif
7df307dfe85c Move REG_* macros from libavcodec/i386/mmx.h to libavutil/x86_cpu.h
lucabe
parents:
diff changeset
68
603
880c6441f56a Change semantic of CONFIG_*, HAVE_* and ARCH_*.
aurel
parents: 570
diff changeset
69 #define HAVE_7REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE && HAVE_EBP_AVAILABLE))
880c6441f56a Change semantic of CONFIG_*, HAVE_* and ARCH_*.
aurel
parents: 570
diff changeset
70 #define HAVE_6REGS (ARCH_X86_64 || (HAVE_EBX_AVAILABLE || HAVE_EBP_AVAILABLE))
322
f16d448df06e Fix compilation when using the --disable-opts parameter. This to help those
takis
parents: 116
diff changeset
71
603
880c6441f56a Change semantic of CONFIG_*, HAVE_* and ARCH_*.
aurel
parents: 570
diff changeset
72 #if ARCH_X86_64 && defined(PIC)
452
4b2cd7e98d58 prettyprinting cosmetics
diego
parents: 392
diff changeset
73 # define BROKEN_RELOCATIONS 1
331
67b9676e4b69 Mark code parts that cannot work on AMD64 due to broken relocations as such.
diego
parents: 325
diff changeset
74 #endif
67b9676e4b69 Mark code parts that cannot work on AMD64 due to broken relocations as such.
diego
parents: 325
diff changeset
75
567
bd4052d9050c Globally rename the header inclusion guard names.
stefano
parents: 518
diff changeset
76 #endif /* AVUTIL_X86_CPU_H */