diff options
author | Vladimir Voroshilov <voroshil@gmail.com> | 2009-06-14 02:29:39 +0000 |
---|---|---|
committer | Vladimir Voroshilov <voroshil@gmail.com> | 2009-06-14 02:29:39 +0000 |
commit | 730c1e4a0660f0c72950bbb61c17fd79453de786 (patch) | |
tree | 3ca5450235d068a9c1caac3028916c2c82f3f79e /libavcodec | |
parent | d7bb185f993fe10bf7feec80e262d2e39147c31b (diff) | |
download | ffmpeg-730c1e4a0660f0c72950bbb61c17fd79453de786.tar.gz |
Replace MAX_SUBFRAME_SIZE and ctx->subframe_size with SUBFRAME_SIZE,
since subframe length is the same in all G.729 modes.
Originally committed as revision 19187 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/g729.h | 4 | ||||
-rw-r--r-- | libavcodec/g729dec.c | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/libavcodec/g729.h b/libavcodec/g729.h index 3fdf1ee650..462cf8f1ac 100644 --- a/libavcodec/g729.h +++ b/libavcodec/g729.h @@ -22,8 +22,8 @@ #define AVCODEC_G729_H /** - * maximum possible subframe size + * subframe size */ -#define MAX_SUBFRAME_SIZE 44 +#define SUBFRAME_SIZE 40 #endif // AVCODEC_G729_H diff --git a/libavcodec/g729dec.c b/libavcodec/g729dec.c index 4988297b23..ab39a92cda 100644 --- a/libavcodec/g729dec.c +++ b/libavcodec/g729dec.c @@ -107,7 +107,7 @@ static inline int get_parity(uint8_t value) fc, 1 << 14, av_clip(ctx->gain_pitch, SHARP_MIN, SHARP_MAX), 0, 14, - ctx->subframe_size - pitch_delay_int[i]); + SUBFRAME_SIZE - pitch_delay_int[i]); if (ctx->frame_erasure) { ctx->gain_pitch = (29491 * ctx->gain_pitch) >> 15; // 0.90 (0.15) @@ -120,11 +120,11 @@ static inline int get_parity(uint8_t value) gain_corr_factor = cb_gain_1st_8k[parm->gc_1st_index[i]][1] + cb_gain_2nd_8k[parm->gc_2nd_index[i]][1]; - ff_acelp_weighted_vector_sum(ctx->exc + i * ctx->subframe_size, - ctx->exc + i * ctx->subframe_size, fc, + ff_acelp_weighted_vector_sum(ctx->exc + i * SUBFRAME_SIZE, + ctx->exc + i * SUBFRAME_SIZE, fc, (!voicing && ctx->frame_erasure) ? 0 : ctx->gain_pitch, ( voicing && ctx->frame_erasure) ? 0 : ctx->gain_code, - 1<<13, 14, ctx->subframe_size); + 1 << 13, 14, SUBFRAME_SIZE); if (buf_size < packed_frame_size) { av_log(avctx, AV_LOG_ERROR, "Error processing packet: packet size too small\n"); |