Skip to content

Commit

Permalink
Merge commit 'cae8df78759c2e69257f7fe58842f34c0d98a7ec'
Browse files Browse the repository at this point in the history
* commit 'cae8df78759c2e69257f7fe58842f34c0d98a7ec':
  lavr: define ResampleContext in resample.h

Merged-by: Michael Niedermayer <[email protected]>
  • Loading branch information
michaelni committed Apr 24, 2014
2 parents 06e6643 + cae8df7 commit 26953ed
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 29 deletions.
29 changes: 0 additions & 29 deletions libavresample/resample.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,35 +26,6 @@
#include "resample.h"
#include "audio_data.h"

struct ResampleContext {
AVAudioResampleContext *avr;
AudioData *buffer;
uint8_t *filter_bank;
int filter_length;
int ideal_dst_incr;
int dst_incr;
unsigned int index;
int frac;
int src_incr;
int compensation_distance;
int phase_shift;
int phase_mask;
int linear;
enum AVResampleFilterType filter_type;
int kaiser_beta;
void (*set_filter)(void *filter, double *tab, int phase, int tap_count);
void (*resample_one)(struct ResampleContext *c, void *dst0,
int dst_index, const void *src0,
unsigned int index, int frac);
void (*resample_nearest)(void *dst0, int dst_index,
const void *src0, unsigned int index);
int padding_size;
int initial_padding_filled;
int initial_padding_samples;
int final_padding_filled;
int final_padding_samples;
};


/* double template */
#define CONFIG_RESAMPLE_DBL
Expand Down
29 changes: 29 additions & 0 deletions libavresample/resample.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,35 @@
#include "internal.h"
#include "audio_data.h"

struct ResampleContext {
AVAudioResampleContext *avr;
AudioData *buffer;
uint8_t *filter_bank;
int filter_length;
int ideal_dst_incr;
int dst_incr;
unsigned int index;
int frac;
int src_incr;
int compensation_distance;
int phase_shift;
int phase_mask;
int linear;
enum AVResampleFilterType filter_type;
int kaiser_beta;
void (*set_filter)(void *filter, double *tab, int phase, int tap_count);
void (*resample_one)(struct ResampleContext *c, void *dst0,
int dst_index, const void *src0,
unsigned int index, int frac);
void (*resample_nearest)(void *dst0, int dst_index,
const void *src0, unsigned int index);
int padding_size;
int initial_padding_filled;
int initial_padding_samples;
int final_padding_filled;
int final_padding_samples;
};

/**
* Allocate and initialize a ResampleContext.
*
Expand Down

0 comments on commit 26953ed

Please sign in to comment.