summaryrefslogtreecommitdiff
path: root/apps/codecs/libmad/timer.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libmad/timer.h')
-rw-r--r--apps/codecs/libmad/timer.h64
1 files changed, 32 insertions, 32 deletions
diff --git a/apps/codecs/libmad/timer.h b/apps/codecs/libmad/timer.h
index 4f2be57b46..23fdccf929 100644
--- a/apps/codecs/libmad/timer.h
+++ b/apps/codecs/libmad/timer.h
@@ -23,67 +23,67 @@
23# define LIBMAD_TIMER_H 23# define LIBMAD_TIMER_H
24 24
25typedef struct { 25typedef struct {
26 signed long seconds; /* whole seconds */ 26 signed long seconds; /* whole seconds */
27 unsigned long fraction; /* 1/MAD_TIMER_RESOLUTION seconds */ 27 unsigned long fraction; /* 1/MAD_TIMER_RESOLUTION seconds */
28} mad_timer_t; 28} mad_timer_t;
29 29
30extern mad_timer_t const mad_timer_zero; 30extern mad_timer_t const mad_timer_zero;
31 31
32# define MAD_TIMER_RESOLUTION 352800000UL 32# define MAD_TIMER_RESOLUTION 352800000UL
33 33
34enum mad_units { 34enum mad_units {
35 MAD_UNITS_HOURS = -2, 35 MAD_UNITS_HOURS = -2,
36 MAD_UNITS_MINUTES = -1, 36 MAD_UNITS_MINUTES = -1,
37 MAD_UNITS_SECONDS = 0, 37 MAD_UNITS_SECONDS = 0,
38 38
39 /* metric units */ 39 /* metric units */
40 40
41 MAD_UNITS_DECISECONDS = 10, 41 MAD_UNITS_DECISECONDS = 10,
42 MAD_UNITS_CENTISECONDS = 100, 42 MAD_UNITS_CENTISECONDS = 100,
43 MAD_UNITS_MILLISECONDS = 1000, 43 MAD_UNITS_MILLISECONDS = 1000,
44 44
45 /* audio sample units */ 45 /* audio sample units */
46 46
47 MAD_UNITS_8000_HZ = 8000, 47 MAD_UNITS_8000_HZ = 8000,
48 MAD_UNITS_11025_HZ = 11025, 48 MAD_UNITS_11025_HZ = 11025,
49 MAD_UNITS_12000_HZ = 12000, 49 MAD_UNITS_12000_HZ = 12000,
50 50
51 MAD_UNITS_16000_HZ = 16000, 51 MAD_UNITS_16000_HZ = 16000,
52 MAD_UNITS_22050_HZ = 22050, 52 MAD_UNITS_22050_HZ = 22050,
53 MAD_UNITS_24000_HZ = 24000, 53 MAD_UNITS_24000_HZ = 24000,
54 54
55 MAD_UNITS_32000_HZ = 32000, 55 MAD_UNITS_32000_HZ = 32000,
56 MAD_UNITS_44100_HZ = 44100, 56 MAD_UNITS_44100_HZ = 44100,
57 MAD_UNITS_48000_HZ = 48000, 57 MAD_UNITS_48000_HZ = 48000,
58 58
59 /* video frame/field units */ 59 /* video frame/field units */
60 60
61 MAD_UNITS_24_FPS = 24, 61 MAD_UNITS_24_FPS = 24,
62 MAD_UNITS_25_FPS = 25, 62 MAD_UNITS_25_FPS = 25,
63 MAD_UNITS_30_FPS = 30, 63 MAD_UNITS_30_FPS = 30,
64 MAD_UNITS_48_FPS = 48, 64 MAD_UNITS_48_FPS = 48,
65 MAD_UNITS_50_FPS = 50, 65 MAD_UNITS_50_FPS = 50,
66 MAD_UNITS_60_FPS = 60, 66 MAD_UNITS_60_FPS = 60,
67 67
68 /* CD audio frames */ 68 /* CD audio frames */
69 69
70 MAD_UNITS_75_FPS = 75, 70 MAD_UNITS_75_FPS = 75,
71 71
72 /* video drop-frame units */ 72 /* video drop-frame units */
73 73
74 MAD_UNITS_23_976_FPS = -24, 74 MAD_UNITS_23_976_FPS = -24,
75 MAD_UNITS_24_975_FPS = -25, 75 MAD_UNITS_24_975_FPS = -25,
76 MAD_UNITS_29_97_FPS = -30, 76 MAD_UNITS_29_97_FPS = -30,
77 MAD_UNITS_47_952_FPS = -48, 77 MAD_UNITS_47_952_FPS = -48,
78 MAD_UNITS_49_95_FPS = -50, 78 MAD_UNITS_49_95_FPS = -50,
79 MAD_UNITS_59_94_FPS = -60 79 MAD_UNITS_59_94_FPS = -60
80}; 80};
81 81
82# define mad_timer_reset(timer) ((void) (*(timer) = mad_timer_zero)) 82# define mad_timer_reset(timer) ((void) (*(timer) = mad_timer_zero))
83 83
84int mad_timer_compare(mad_timer_t, mad_timer_t); 84int mad_timer_compare(mad_timer_t, mad_timer_t);
85 85
86# define mad_timer_sign(timer) mad_timer_compare((timer), mad_timer_zero) 86# define mad_timer_sign(timer) mad_timer_compare((timer), mad_timer_zero)
87 87
88void mad_timer_negate(mad_timer_t *); 88void mad_timer_negate(mad_timer_t *);
89mad_timer_t mad_timer_abs(mad_timer_t); 89mad_timer_t mad_timer_abs(mad_timer_t);
@@ -95,6 +95,6 @@ void mad_timer_multiply(mad_timer_t *, signed long);
95signed long mad_timer_count(mad_timer_t, enum mad_units); 95signed long mad_timer_count(mad_timer_t, enum mad_units);
96unsigned long mad_timer_fraction(mad_timer_t, unsigned long); 96unsigned long mad_timer_fraction(mad_timer_t, unsigned long);
97void mad_timer_string(mad_timer_t, char *, char const *, 97void mad_timer_string(mad_timer_t, char *, char const *,
98 enum mad_units, enum mad_units, unsigned long); 98 enum mad_units, enum mad_units, unsigned long);
99 99
100# endif 100# endif