[FFmpeg-cvslog] swr: use int16_t instead of short for resampling.
Clément Bœsch
git at videolan.org
Thu Nov 17 10:21:49 CET 2011
ffmpeg | branch: master | Clément Bœsch <ubitux at gmail.com> | Wed Nov 16 21:31:44 2011 +0100| [af1eb298c11a934dc42d29c69906df47e8cba500] | committer: Clément Bœsch
swr: use int16_t instead of short for resampling.
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=af1eb298c11a934dc42d29c69906df47e8cba500
---
libswresample/resample.c | 4 ++--
libswresample/swresample_internal.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/libswresample/resample.c b/libswresample/resample.c
index 475fae8..9b582ea 100644
--- a/libswresample/resample.c
+++ b/libswresample/resample.c
@@ -252,7 +252,7 @@ void swr_compensate(struct SwrContext *s, int sample_delta, int compensation_dis
c->dst_incr = c->ideal_dst_incr - c->ideal_dst_incr * (int64_t)sample_delta / compensation_distance;
}
-int swri_resample(ResampleContext *c, short *dst, const short *src, int *consumed, int src_size, int dst_size, int update_ctx){
+int swri_resample(ResampleContext *c, int16_t *dst, const int16_t *src, int *consumed, int src_size, int dst_size, int update_ctx){
int dst_index, i;
int index= c->index;
int frac= c->frac;
@@ -345,7 +345,7 @@ int swri_multiple_resample(ResampleContext *c, AudioData *dst, int dst_size, Aud
int i, ret= -1;
for(i=0; i<dst->ch_count; i++){
- ret= swri_resample(c, (short*)dst->ch[i], (const short*)src->ch[i], consumed, src_size, dst_size, i+1==dst->ch_count);
+ ret= swri_resample(c, (int16_t*)dst->ch[i], (const int16_t*)src->ch[i], consumed, src_size, dst_size, i+1==dst->ch_count);
}
return ret;
diff --git a/libswresample/swresample_internal.h b/libswresample/swresample_internal.h
index 4ee7034..0d5b00e 100644
--- a/libswresample/swresample_internal.h
+++ b/libswresample/swresample_internal.h
@@ -80,7 +80,7 @@ struct ResampleContext *swri_resample_init(struct ResampleContext *, int out_rat
void swri_resample_free(struct ResampleContext **c);
int swri_multiple_resample(struct ResampleContext *c, AudioData *dst, int dst_size, AudioData *src, int src_size, int *consumed);
void swri_resample_compensate(struct ResampleContext *c, int sample_delta, int compensation_distance);
-int swri_resample(struct ResampleContext *c, short *dst, const short *src, int *consumed, int src_size, int dst_size, int update_ctx);
+int swri_resample(struct ResampleContext *c, int16_t *dst, const int16_t *src, int *consumed, int src_size, int dst_size, int update_ctx);
int swri_rematrix_init(SwrContext *s);
int swri_rematrix(SwrContext *s, AudioData *out, AudioData *in, int len, int mustcopy);
More information about the ffmpeg-cvslog
mailing list