Mercurial > libavutil.hg
annotate common.h @ 93:b47203d3711f libavutil
Add #define REGc
author | gpoirier |
---|---|
date | Sat, 12 Aug 2006 16:29:05 +0000 |
parents | 59433f391f2d |
children | a3d5e8b048e1 |
rev | line source |
---|---|
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
1 /** |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
2 * @file common.h |
80
624fc3ad183a
Split common.h in two parts, purely internal stuff (internal.h) and things
reimar
parents:
75
diff
changeset
|
3 * common internal and external api header. |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
4 */ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
5 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
6 #ifndef COMMON_H |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
7 #define COMMON_H |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
8 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
9 #ifndef M_PI |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
10 #define M_PI 3.14159265358979323846 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
11 #endif |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
12 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
13 #ifdef HAVE_AV_CONFIG_H |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
14 /* only include the following when compiling package */ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
15 # include "config.h" |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
16 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
17 # include <stdlib.h> |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
18 # include <stdio.h> |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
19 # include <string.h> |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
20 # include <ctype.h> |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
21 # include <limits.h> |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
22 # ifndef __BEOS__ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
23 # include <errno.h> |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
24 # else |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
25 # include "berrno.h" |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
26 # endif |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
27 # include <math.h> |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
28 #endif /* HAVE_AV_CONFIG_H */ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
29 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
30 /* Suppress restrict if it was not defined in config.h. */ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
31 #ifndef restrict |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
32 # define restrict |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
33 #endif |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
34 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
35 #ifndef always_inline |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
36 #if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
37 # define always_inline __attribute__((always_inline)) inline |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
38 #else |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
39 # define always_inline inline |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
40 #endif |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
41 #endif |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
42 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
43 #ifndef attribute_used |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
44 #if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
45 # define attribute_used __attribute__((used)) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
46 #else |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
47 # define attribute_used |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
48 #endif |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
49 #endif |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
50 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
51 #ifndef attribute_unused |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
52 #if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
53 # define attribute_unused __attribute__((unused)) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
54 #else |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
55 # define attribute_unused |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
56 #endif |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
57 #endif |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
58 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
59 #ifndef EMULATE_INTTYPES |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
60 # include <inttypes.h> |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
61 #else |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
62 typedef signed char int8_t; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
63 typedef signed short int16_t; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
64 typedef signed int int32_t; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
65 typedef unsigned char uint8_t; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
66 typedef unsigned short uint16_t; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
67 typedef unsigned int uint32_t; |
71 | 68 typedef signed long long int64_t; |
69 typedef unsigned long long uint64_t; | |
3 | 70 #endif /* EMULATE_INTTYPES */ |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
71 |
11
b5bd7d00de0f
Add some more PRIfooNN crap so it builds again here. Why can't ppl add defaults when they use such things ?
mmu_man
parents:
10
diff
changeset
|
72 #ifndef PRId64 |
b5bd7d00de0f
Add some more PRIfooNN crap so it builds again here. Why can't ppl add defaults when they use such things ?
mmu_man
parents:
10
diff
changeset
|
73 #define PRId64 "lld" |
b5bd7d00de0f
Add some more PRIfooNN crap so it builds again here. Why can't ppl add defaults when they use such things ?
mmu_man
parents:
10
diff
changeset
|
74 #endif |
b5bd7d00de0f
Add some more PRIfooNN crap so it builds again here. Why can't ppl add defaults when they use such things ?
mmu_man
parents:
10
diff
changeset
|
75 |
8
2dd915c714fa
fix for systems not defining PRIu64, not everyone knows C99.
mmu_man
parents:
7
diff
changeset
|
76 #ifndef PRIu64 |
11
b5bd7d00de0f
Add some more PRIfooNN crap so it builds again here. Why can't ppl add defaults when they use such things ?
mmu_man
parents:
10
diff
changeset
|
77 #define PRIu64 "llu" |
b5bd7d00de0f
Add some more PRIfooNN crap so it builds again here. Why can't ppl add defaults when they use such things ?
mmu_man
parents:
10
diff
changeset
|
78 #endif |
b5bd7d00de0f
Add some more PRIfooNN crap so it builds again here. Why can't ppl add defaults when they use such things ?
mmu_man
parents:
10
diff
changeset
|
79 |
b5bd7d00de0f
Add some more PRIfooNN crap so it builds again here. Why can't ppl add defaults when they use such things ?
mmu_man
parents:
10
diff
changeset
|
80 #ifndef PRIx64 |
b5bd7d00de0f
Add some more PRIfooNN crap so it builds again here. Why can't ppl add defaults when they use such things ?
mmu_man
parents:
10
diff
changeset
|
81 #define PRIx64 "llx" |
b5bd7d00de0f
Add some more PRIfooNN crap so it builds again here. Why can't ppl add defaults when they use such things ?
mmu_man
parents:
10
diff
changeset
|
82 #endif |
b5bd7d00de0f
Add some more PRIfooNN crap so it builds again here. Why can't ppl add defaults when they use such things ?
mmu_man
parents:
10
diff
changeset
|
83 |
b5bd7d00de0f
Add some more PRIfooNN crap so it builds again here. Why can't ppl add defaults when they use such things ?
mmu_man
parents:
10
diff
changeset
|
84 #ifndef PRId32 |
b5bd7d00de0f
Add some more PRIfooNN crap so it builds again here. Why can't ppl add defaults when they use such things ?
mmu_man
parents:
10
diff
changeset
|
85 #define PRId32 "d" |
b5bd7d00de0f
Add some more PRIfooNN crap so it builds again here. Why can't ppl add defaults when they use such things ?
mmu_man
parents:
10
diff
changeset
|
86 #endif |
b5bd7d00de0f
Add some more PRIfooNN crap so it builds again here. Why can't ppl add defaults when they use such things ?
mmu_man
parents:
10
diff
changeset
|
87 |
b5bd7d00de0f
Add some more PRIfooNN crap so it builds again here. Why can't ppl add defaults when they use such things ?
mmu_man
parents:
10
diff
changeset
|
88 #ifndef PRIdFAST16 |
b5bd7d00de0f
Add some more PRIfooNN crap so it builds again here. Why can't ppl add defaults when they use such things ?
mmu_man
parents:
10
diff
changeset
|
89 #define PRIdFAST16 PRId32 |
b5bd7d00de0f
Add some more PRIfooNN crap so it builds again here. Why can't ppl add defaults when they use such things ?
mmu_man
parents:
10
diff
changeset
|
90 #endif |
b5bd7d00de0f
Add some more PRIfooNN crap so it builds again here. Why can't ppl add defaults when they use such things ?
mmu_man
parents:
10
diff
changeset
|
91 |
b5bd7d00de0f
Add some more PRIfooNN crap so it builds again here. Why can't ppl add defaults when they use such things ?
mmu_man
parents:
10
diff
changeset
|
92 #ifndef PRIdFAST32 |
b5bd7d00de0f
Add some more PRIfooNN crap so it builds again here. Why can't ppl add defaults when they use such things ?
mmu_man
parents:
10
diff
changeset
|
93 #define PRIdFAST32 PRId32 |
8
2dd915c714fa
fix for systems not defining PRIu64, not everyone knows C99.
mmu_man
parents:
7
diff
changeset
|
94 #endif |
2dd915c714fa
fix for systems not defining PRIu64, not everyone knows C99.
mmu_man
parents:
7
diff
changeset
|
95 |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
96 #ifndef INT16_MIN |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
97 #define INT16_MIN (-0x7fff-1) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
98 #endif |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
99 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
100 #ifndef INT16_MAX |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
101 #define INT16_MAX 0x7fff |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
102 #endif |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
103 |
33 | 104 #ifndef INT32_MIN |
105 #define INT32_MIN (-0x7fffffff-1) | |
106 #endif | |
107 | |
108 #ifndef INT32_MAX | |
109 #define INT32_MAX 0x7fffffff | |
110 #endif | |
111 | |
112 #ifndef UINT32_MAX | |
113 #define UINT32_MAX 0xffffffff | |
114 #endif | |
115 | |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
116 #ifndef INT64_MIN |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
117 #define INT64_MIN (-0x7fffffffffffffffLL-1) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
118 #endif |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
119 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
120 #ifndef INT64_MAX |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
121 #define INT64_MAX int64_t_C(9223372036854775807) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
122 #endif |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
123 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
124 #ifndef UINT64_MAX |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
125 #define UINT64_MAX uint64_t_C(0xFFFFFFFFFFFFFFFF) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
126 #endif |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
127 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
128 #ifdef EMULATE_FAST_INT |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
129 typedef signed char int_fast8_t; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
130 typedef signed int int_fast16_t; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
131 typedef signed int int_fast32_t; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
132 typedef unsigned char uint_fast8_t; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
133 typedef unsigned int uint_fast16_t; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
134 typedef unsigned int uint_fast32_t; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
135 typedef uint64_t uint_fast64_t; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
136 #endif |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
137 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
138 #ifndef INT_BIT |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
139 # if INT_MAX != 2147483647 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
140 # define INT_BIT 64 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
141 # else |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
142 # define INT_BIT 32 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
143 # endif |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
144 #endif |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
145 |
74 | 146 #ifndef int64_t_C |
147 #define int64_t_C(c) (c ## LL) | |
148 #define uint64_t_C(c) (c ## ULL) | |
149 #endif | |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
150 |
22
3b56407b3f96
On MinGW it is not possible to build shared and static libraries at once.
diego
parents:
19
diff
changeset
|
151 #if defined(__MINGW32__) && !defined(BUILD_AVUTIL) && defined(BUILD_SHARED_AV) |
3b56407b3f96
On MinGW it is not possible to build shared and static libraries at once.
diego
parents:
19
diff
changeset
|
152 # define FF_IMPORT_ATTR __declspec(dllimport) |
3b56407b3f96
On MinGW it is not possible to build shared and static libraries at once.
diego
parents:
19
diff
changeset
|
153 #else |
3b56407b3f96
On MinGW it is not possible to build shared and static libraries at once.
diego
parents:
19
diff
changeset
|
154 # define FF_IMPORT_ATTR |
3b56407b3f96
On MinGW it is not possible to build shared and static libraries at once.
diego
parents:
19
diff
changeset
|
155 #endif |
3b56407b3f96
On MinGW it is not possible to build shared and static libraries at once.
diego
parents:
19
diff
changeset
|
156 |
3b56407b3f96
On MinGW it is not possible to build shared and static libraries at once.
diego
parents:
19
diff
changeset
|
157 |
80
624fc3ad183a
Split common.h in two parts, purely internal stuff (internal.h) and things
reimar
parents:
75
diff
changeset
|
158 #ifdef HAVE_AV_CONFIG_H |
624fc3ad183a
Split common.h in two parts, purely internal stuff (internal.h) and things
reimar
parents:
75
diff
changeset
|
159 /* only include the following when compiling package */ |
624fc3ad183a
Split common.h in two parts, purely internal stuff (internal.h) and things
reimar
parents:
75
diff
changeset
|
160 # include "internal.h" |
624fc3ad183a
Split common.h in two parts, purely internal stuff (internal.h) and things
reimar
parents:
75
diff
changeset
|
161 #endif |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
162 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
163 //rounded divison & shift |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
164 #define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b)) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
165 /* assume b>0 */ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
166 #define ROUNDED_DIV(a,b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b)) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
167 #define ABS(a) ((a) >= 0 ? (a) : (-(a))) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
168 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
169 #define FFMAX(a,b) ((a) > (b) ? (a) : (b)) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
170 #define FFMIN(a,b) ((a) > (b) ? (b) : (a)) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
171 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
172 /* misc math functions */ |
22
3b56407b3f96
On MinGW it is not possible to build shared and static libraries at once.
diego
parents:
19
diff
changeset
|
173 extern FF_IMPORT_ATTR const uint8_t ff_log2_tab[256]; |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
174 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
175 static inline int av_log2(unsigned int v) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
176 { |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
177 int n; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
178 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
179 n = 0; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
180 if (v & 0xffff0000) { |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
181 v >>= 16; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
182 n += 16; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
183 } |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
184 if (v & 0xff00) { |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
185 v >>= 8; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
186 n += 8; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
187 } |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
188 n += ff_log2_tab[v]; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
189 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
190 return n; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
191 } |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
192 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
193 static inline int av_log2_16bit(unsigned int v) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
194 { |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
195 int n; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
196 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
197 n = 0; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
198 if (v & 0xff00) { |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
199 v >>= 8; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
200 n += 8; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
201 } |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
202 n += ff_log2_tab[v]; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
203 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
204 return n; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
205 } |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
206 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
207 /* median of 3 */ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
208 static inline int mid_pred(int a, int b, int c) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
209 { |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
210 #if 0 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
211 int t= (a-b)&((a-b)>>31); |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
212 a-=t; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
213 b+=t; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
214 b-= (b-c)&((b-c)>>31); |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
215 b+= (a-b)&((a-b)>>31); |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
216 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
217 return b; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
218 #else |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
219 if(a>b){ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
220 if(c>b){ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
221 if(c>a) b=a; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
222 else b=c; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
223 } |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
224 }else{ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
225 if(b>c){ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
226 if(c>a) b=c; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
227 else b=a; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
228 } |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
229 } |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
230 return b; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
231 #endif |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
232 } |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
233 |
39 | 234 /** |
235 * clip a signed integer value into the amin-amax range | |
236 * @param a value to clip | |
237 * @param amin minimum value of the clip range | |
238 * @param amax maximum value of the clip range | |
239 * @return cliped value | |
240 */ | |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
241 static inline int clip(int a, int amin, int amax) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
242 { |
63 | 243 if (a < amin) return amin; |
244 else if (a > amax) return amax; | |
245 else return a; | |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
246 } |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
247 |
39 | 248 /** |
249 * clip a signed integer value into the 0-255 range | |
250 * @param a value to clip | |
251 * @return cliped value | |
252 */ | |
38
e7df68ba31a2
clip_uint8 should return an uint8_t instead of an int (patch by Panagiotis Issaris < takis.issaris _at_ uhasselt.be >)
aurel
parents:
33
diff
changeset
|
253 static inline uint8_t clip_uint8(int a) |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
254 { |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
255 if (a&(~255)) return (-a)>>31; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
256 else return a; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
257 } |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
258 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
259 /* math */ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
260 int64_t ff_gcd(int64_t a, int64_t b); |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
261 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
262 /** |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
263 * converts fourcc string to int |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
264 */ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
265 static inline int ff_get_fourcc(const char *s){ |
80
624fc3ad183a
Split common.h in two parts, purely internal stuff (internal.h) and things
reimar
parents:
75
diff
changeset
|
266 #ifdef HAVE_AV_CONFIG_H |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
267 assert( strlen(s)==4 ); |
80
624fc3ad183a
Split common.h in two parts, purely internal stuff (internal.h) and things
reimar
parents:
75
diff
changeset
|
268 #endif |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
269 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
270 return (s[0]) + (s[1]<<8) + (s[2]<<16) + (s[3]<<24); |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
271 } |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
272 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
273 #define MKTAG(a,b,c,d) (a | (b << 8) | (c << 16) | (d << 24)) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
274 #define MKBETAG(a,b,c,d) (d | (c << 8) | (b << 16) | (a << 24)) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
275 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
276 |
60 | 277 #define GET_UTF8(val, GET_BYTE, ERROR)\ |
278 val= GET_BYTE;\ | |
279 {\ | |
280 int ones= 7 - av_log2(val ^ 255);\ | |
281 if(ones==1)\ | |
282 ERROR\ | |
283 val&= 127>>ones;\ | |
284 while(--ones > 0){\ | |
285 int tmp= GET_BYTE - 128;\ | |
286 if(tmp>>6)\ | |
287 ERROR\ | |
288 val= (val<<6) + tmp;\ | |
289 }\ | |
290 } | |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
291 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
292 #if defined(ARCH_X86) || defined(ARCH_X86_64) || defined(ARCH_POWERPC) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
293 #if defined(ARCH_X86_64) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
294 static inline uint64_t read_time(void) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
295 { |
13 | 296 uint64_t a, d; |
297 asm volatile( "rdtsc\n\t" | |
298 : "=a" (a), "=d" (d) | |
299 ); | |
300 return (d << 32) | (a & 0xffffffff); | |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
301 } |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
302 #elif defined(ARCH_X86) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
303 static inline long long read_time(void) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
304 { |
13 | 305 long long l; |
306 asm volatile( "rdtsc\n\t" | |
307 : "=A" (l) | |
308 ); | |
309 return l; | |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
310 } |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
311 #else //FIXME check ppc64 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
312 static inline uint64_t read_time(void) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
313 { |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
314 uint32_t tbu, tbl, temp; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
315 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
316 /* from section 2.2.1 of the 32-bit PowerPC PEM */ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
317 __asm__ __volatile__( |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
318 "1:\n" |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
319 "mftbu %2\n" |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
320 "mftb %0\n" |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
321 "mftbu %1\n" |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
322 "cmpw %2,%1\n" |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
323 "bne 1b\n" |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
324 : "=r"(tbl), "=r"(tbu), "=r"(temp) |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
325 : |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
326 : "cc"); |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
327 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
328 return (((uint64_t)tbu)<<32) | (uint64_t)tbl; |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
329 } |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
330 #endif |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
331 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
332 #define START_TIMER \ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
333 uint64_t tend;\ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
334 uint64_t tstart= read_time();\ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
335 |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
336 #define STOP_TIMER(id) \ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
337 tend= read_time();\ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
338 {\ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
339 static uint64_t tsum=0;\ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
340 static int tcount=0;\ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
341 static int tskip_count=0;\ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
342 if(tcount<2 || tend - tstart < 8*tsum/tcount){\ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
343 tsum+= tend - tstart;\ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
344 tcount++;\ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
345 }else\ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
346 tskip_count++;\ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
347 if(256*256*256*64%(tcount+tskip_count)==0){\ |
7 | 348 av_log(NULL, AV_LOG_DEBUG, "%"PRIu64" dezicycles in %s, %d runs, %d skips\n", tsum*10/tcount, id, tcount, tskip_count);\ |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
349 }\ |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
350 } |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
351 #else |
12 | 352 #define START_TIMER |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
353 #define STOP_TIMER(id) {} |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
354 #endif |
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
355 |
82
8fb151c4d4c7
Move av_malloc(), av_realloc(), and av_free() from libavcodec to libavutil
lucabe
parents:
80
diff
changeset
|
356 /* memory */ |
8fb151c4d4c7
Move av_malloc(), av_realloc(), and av_free() from libavcodec to libavutil
lucabe
parents:
80
diff
changeset
|
357 void *av_malloc(unsigned int size); |
8fb151c4d4c7
Move av_malloc(), av_realloc(), and av_free() from libavcodec to libavutil
lucabe
parents:
80
diff
changeset
|
358 void *av_realloc(void *ptr, unsigned int size); |
8fb151c4d4c7
Move av_malloc(), av_realloc(), and av_free() from libavcodec to libavutil
lucabe
parents:
80
diff
changeset
|
359 void av_free(void *ptr); |
8fb151c4d4c7
Move av_malloc(), av_realloc(), and av_free() from libavcodec to libavutil
lucabe
parents:
80
diff
changeset
|
360 |
0
ee8f44bb7c4d
libavutil: Utility code from libavcodec moved to a separate library.
al
parents:
diff
changeset
|
361 #endif /* COMMON_H */ |