Mercurial > libavcodec.hg
changeset 3535:a14c98a0ca3d libavcodec
int16_t is faster than int_fast16_t for division.
2% faster vorbis (on a K8).
author | lorenm |
---|---|
date | Thu, 03 Aug 2006 02:18:07 +0000 |
parents | f76861f4d5ca |
children | 545a15c19c91 |
files | vorbis.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/vorbis.c Wed Aug 02 22:48:50 2006 +0000 +++ b/vorbis.c Thu Aug 03 02:18:07 2006 +0000 @@ -1192,7 +1192,7 @@ 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 @@ 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);