aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec
diff options
context:
space:
mode:
authorLoren Merritt <lorenm@u.washington.edu>2006-08-03 02:18:07 +0000
committerLoren Merritt <lorenm@u.washington.edu>2006-08-03 02:18:07 +0000
commit7bf0049623652b92a566999d37f0b481c2056d6e (patch)
tree38b27e698a68389f7d84b5cdf93cc457c62d3347 /libavcodec
parent27dc20a0711c30eda026a56b4915ea1a6ed70b68 (diff)
downloadffmpeg-7bf0049623652b92a566999d37f0b481c2056d6e.tar.gz
int16_t is faster than int_fast16_t for division.
2% faster vorbis (on a K8). Originally committed as revision 5897 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/vorbis.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/vorbis.c b/libavcodec/vorbis.c
index de3688c913..9adec4bed7 100644
--- a/libavcodec/vorbis.c
+++ b/libavcodec/vorbis.c
@@ -1192,7 +1192,7 @@ static uint_fast8_t vorbis_floor1_decode(vorbis_context *vc, vorbis_floor_data *
adx=vf->x_list[high_neigh_offs]-vf->x_list[low_neigh_offs];
ady= ABS(dy);
err=ady*(vf->x_list[i]-vf->x_list[low_neigh_offs]);
- off=err/adx;
+ off=(int16_t)err/(int16_t)adx;
if (dy<0) {
predicted=floor1_Y_final[low_neigh_offs]-off;
} else {
@@ -1252,7 +1252,7 @@ static uint_fast8_t vorbis_floor1_decode(vorbis_context *vc, vorbis_floor_data *
dy=hy-ly;
adx=hx-lx;
ady= (dy<0) ? -dy:dy;//ABS(dy);
- base=dy/adx;
+ base=(int16_t)dy/(int16_t)adx;
AV_DEBUG(" dy %d adx %d base %d = %d \n", dy, adx, base, dy/adx);