aboutsummaryrefslogtreecommitdiffstats
path: root/libswresample/swresample_internal.h
diff options
context:
space:
mode:
authorReimar Döffinger <Reimar.Doeffinger@gmx.de>2015-01-18 23:29:13 +0100
committerReimar Döffinger <Reimar.Doeffinger@gmx.de>2015-01-27 21:29:51 +0100
commit6efd0ba977aee08a2cec10dca1584a8959e19fc7 (patch)
tree811bb02cc33de28d52a12fb3db409ed7a9a3811f /libswresample/swresample_internal.h
parentd96090e7b633e16ca7e3c355c63f42e7d924fc6a (diff)
downloadffmpeg-6efd0ba977aee08a2cec10dca1584a8959e19fc7.tar.gz
swresample_internal.h: Move struct declaration before first use.
It seems more logical and works with more restricted C compilers like tinycc. Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
Diffstat (limited to 'libswresample/swresample_internal.h')
-rw-r--r--libswresample/swresample_internal.h42
1 files changed, 21 insertions, 21 deletions
diff --git a/libswresample/swresample_internal.h b/libswresample/swresample_internal.h
index 3761843e3b..6250921b8c 100644
--- a/libswresample/swresample_internal.h
+++ b/libswresample/swresample_internal.h
@@ -68,6 +68,27 @@ struct DitherContext {
int output_sample_bits; ///< the number of used output bits, needed to scale dither correctly
};
+typedef struct ResampleContext * (* resample_init_func)(struct ResampleContext *c, int out_rate, int in_rate, int filter_size, int phase_shift, int linear,
+ double cutoff, enum AVSampleFormat format, enum SwrFilterType filter_type, int kaiser_beta, double precision, int cheby);
+typedef void (* resample_free_func)(struct ResampleContext **c);
+typedef int (* multiple_resample_func)(struct ResampleContext *c, AudioData *dst, int dst_size, AudioData *src, int src_size, int *consumed);
+typedef int (* resample_flush_func)(struct SwrContext *c);
+typedef int (* set_compensation_func)(struct ResampleContext *c, int sample_delta, int compensation_distance);
+typedef int64_t (* get_delay_func)(struct SwrContext *s, int64_t base);
+typedef int (* invert_initial_buffer_func)(struct ResampleContext *c, AudioData *dst, const AudioData *src, int src_size, int *dst_idx, int *dst_count);
+
+struct Resampler {
+ resample_init_func init;
+ resample_free_func free;
+ multiple_resample_func multiple_resample;
+ resample_flush_func flush;
+ set_compensation_func set_compensation;
+ get_delay_func get_delay;
+ invert_initial_buffer_func invert_initial_buffer;
+};
+
+extern struct Resampler const swri_resampler;
+
struct SwrContext {
const AVClass *av_class; ///< AVClass used for AVOption and av_log()
int log_level_offset; ///< logging level offset
@@ -152,27 +173,6 @@ struct SwrContext {
/* TODO: callbacks for ASM optimizations */
};
-typedef struct ResampleContext * (* resample_init_func)(struct ResampleContext *c, int out_rate, int in_rate, int filter_size, int phase_shift, int linear,
- double cutoff, enum AVSampleFormat format, enum SwrFilterType filter_type, int kaiser_beta, double precision, int cheby);
-typedef void (* resample_free_func)(struct ResampleContext **c);
-typedef int (* multiple_resample_func)(struct ResampleContext *c, AudioData *dst, int dst_size, AudioData *src, int src_size, int *consumed);
-typedef int (* resample_flush_func)(struct SwrContext *c);
-typedef int (* set_compensation_func)(struct ResampleContext *c, int sample_delta, int compensation_distance);
-typedef int64_t (* get_delay_func)(struct SwrContext *s, int64_t base);
-typedef int (* invert_initial_buffer_func)(struct ResampleContext *c, AudioData *dst, const AudioData *src, int src_size, int *dst_idx, int *dst_count);
-
-struct Resampler {
- resample_init_func init;
- resample_free_func free;
- multiple_resample_func multiple_resample;
- resample_flush_func flush;
- set_compensation_func set_compensation;
- get_delay_func get_delay;
- invert_initial_buffer_func invert_initial_buffer;
-};
-
-extern struct Resampler const swri_resampler;
-
int swri_realloc_audio(AudioData *a, int count);
void swri_noise_shaping_int16 (SwrContext *s, AudioData *dsts, const AudioData *srcs, const AudioData *noises, int count);