Mercurial > mplayer.hg
comparison libaf/af.h @ 29263:0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
author | diego |
---|---|
date | Wed, 13 May 2009 02:58:57 +0000 |
parents | 048aea3d4c2c |
children | 4eae69f3f4f4 |
comparison
equal
deleted
inserted
replaced
29262:7d545a6b8aff | 29263:0f1b5b68af32 |
---|---|
31 /* Set the initialization type from mplayers cpudetect */ | 31 /* Set the initialization type from mplayers cpudetect */ |
32 #ifdef AF_INIT_TYPE | 32 #ifdef AF_INIT_TYPE |
33 #undef AF_INIT_TYPE | 33 #undef AF_INIT_TYPE |
34 #define AF_INIT_TYPE \ | 34 #define AF_INIT_TYPE \ |
35 ((gCpuCaps.has3DNow || gCpuCaps.hasSSE)?AF_INIT_FAST:AF_INIT_SLOW) | 35 ((gCpuCaps.has3DNow || gCpuCaps.hasSSE)?AF_INIT_FAST:AF_INIT_SLOW) |
36 #endif | 36 #endif |
37 | 37 |
38 struct af_instance_s; | 38 struct af_instance_s; |
39 | 39 |
40 // Number of channels | 40 // Number of channels |
41 #ifndef AF_NCH | 41 #ifndef AF_NCH |
57 // Flags used for defining the behavior of an audio filter | 57 // Flags used for defining the behavior of an audio filter |
58 #define AF_FLAGS_REENTRANT 0x00000000 | 58 #define AF_FLAGS_REENTRANT 0x00000000 |
59 #define AF_FLAGS_NOT_REENTRANT 0x00000001 | 59 #define AF_FLAGS_NOT_REENTRANT 0x00000001 |
60 | 60 |
61 /* Audio filter information not specific for current instance, but for | 61 /* Audio filter information not specific for current instance, but for |
62 a specific filter */ | 62 a specific filter */ |
63 typedef struct af_info_s | 63 typedef struct af_info_s |
64 { | 64 { |
65 const char *info; | 65 const char *info; |
66 const char *name; | 66 const char *name; |
67 const char *author; | 67 const char *author; |
68 const char *comment; | 68 const char *comment; |
78 void (*uninit)(struct af_instance_s* af); | 78 void (*uninit)(struct af_instance_s* af); |
79 af_data_t* (*play)(struct af_instance_s* af, af_data_t* data); | 79 af_data_t* (*play)(struct af_instance_s* af, af_data_t* data); |
80 void* setup; // setup data for this specific instance and filter | 80 void* setup; // setup data for this specific instance and filter |
81 af_data_t* data; // configuration for outgoing data stream | 81 af_data_t* data; // configuration for outgoing data stream |
82 struct af_instance_s* next; | 82 struct af_instance_s* next; |
83 struct af_instance_s* prev; | 83 struct af_instance_s* prev; |
84 double delay; /* Delay caused by the filter, in units of bytes read without | 84 double delay; /* Delay caused by the filter, in units of bytes read without |
85 * corresponding output */ | 85 * corresponding output */ |
86 double mul; /* length multiplier: how much does this instance change | 86 double mul; /* length multiplier: how much does this instance change |
87 the length of the buffer. */ | 87 the length of the buffer. */ |
88 }af_instance_t; | 88 }af_instance_t; |
98 | 98 |
99 #define AF_INIT_INT 0x00000000 | 99 #define AF_INIT_INT 0x00000000 |
100 #define AF_INIT_FLOAT 0x00000004 | 100 #define AF_INIT_FLOAT 0x00000004 |
101 #define AF_INIT_FORMAT_MASK 0x00000004 | 101 #define AF_INIT_FORMAT_MASK 0x00000004 |
102 | 102 |
103 // Default init type | 103 // Default init type |
104 #ifndef AF_INIT_TYPE | 104 #ifndef AF_INIT_TYPE |
105 #if HAVE_SSE || HAVE_AMD3DNOW | 105 #if HAVE_SSE || HAVE_AMD3DNOW |
106 #define AF_INIT_TYPE (af_cpu_speed?*af_cpu_speed:AF_INIT_FAST) | 106 #define AF_INIT_TYPE (af_cpu_speed?*af_cpu_speed:AF_INIT_FAST) |
107 #else | 107 #else |
108 #define AF_INIT_TYPE (af_cpu_speed?*af_cpu_speed:AF_INIT_SLOW) | 108 #define AF_INIT_TYPE (af_cpu_speed?*af_cpu_speed:AF_INIT_SLOW) |
192 | 192 |
193 /** | 193 /** |
194 * \brief find filter in chain by name | 194 * \brief find filter in chain by name |
195 * \param name name of the filter to find | 195 * \param name name of the filter to find |
196 * \return first filter with right name or NULL if not found | 196 * \return first filter with right name or NULL if not found |
197 * | 197 * |
198 * This function is used for finding already initialized filters | 198 * This function is used for finding already initialized filters |
199 */ | 199 */ |
200 af_instance_t* af_get(af_stream_t* s, char* name); | 200 af_instance_t* af_get(af_stream_t* s, char* name); |
201 | 201 |
202 /** | 202 /** |
286 * \param in [in] sample time values | 286 * \param in [in] sample time values |
287 * \param out [out] values in milliseconds | 287 * \param out [out] values in milliseconds |
288 * \param rate sample rate | 288 * \param rate sample rate |
289 * \return AF_ERROR on error, AF_OK otherwise | 289 * \return AF_ERROR on error, AF_OK otherwise |
290 */ | 290 */ |
291 int af_to_ms(int n, int* in, float* out, int rate); | 291 int af_to_ms(int n, int* in, float* out, int rate); |
292 | 292 |
293 /** | 293 /** |
294 * \brief test if output format matches | 294 * \brief test if output format matches |
295 * \param af audio filter | 295 * \param af audio filter |
296 * \param out needed format, will be overwritten by available | 296 * \param out needed format, will be overwritten by available |
315 | 315 |
316 /** | 316 /** |
317 * \brief fill the missing parameters in the af_data_t structure | 317 * \brief fill the missing parameters in the af_data_t structure |
318 * \param data structure to fill | 318 * \param data structure to fill |
319 * \ingroup af_filter | 319 * \ingroup af_filter |
320 * | 320 * |
321 * Currently only sets bps based on format | 321 * Currently only sets bps based on format |
322 */ | 322 */ |
323 void af_fix_parameters(af_data_t *data); | 323 void af_fix_parameters(af_data_t *data); |
324 | 324 |
325 /** Memory reallocation macro: if a local buffer is used (i.e. if the | 325 /** Memory reallocation macro: if a local buffer is used (i.e. if the |
342 #ifndef clamp | 342 #ifndef clamp |
343 #define clamp(a,min,max) (((a)>(max))?(max):(((a)<(min))?(min):(a))) | 343 #define clamp(a,min,max) (((a)>(max))?(max):(((a)<(min))?(min):(a))) |
344 #endif | 344 #endif |
345 | 345 |
346 #ifndef sign | 346 #ifndef sign |
347 #define sign(a) (((a)>0)?(1):(-1)) | 347 #define sign(a) (((a)>0)?(1):(-1)) |
348 #endif | 348 #endif |
349 | 349 |
350 #ifndef lrnd | 350 #ifndef lrnd |
351 #define lrnd(a,b) ((b)((a)>=0.0?(a)+0.5:(a)-0.5)) | 351 #define lrnd(a,b) ((b)((a)>=0.0?(a)+0.5:(a)-0.5)) |
352 #endif | 352 #endif |