summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonty <xiphmont@xiph.org>2003-04-09 08:31:42 +0000
committerMonty <xiphmont@xiph.org>2003-04-09 08:31:42 +0000
commitd47ef6dc0a1bb4baabc80c99beaa5ff97458e34f (patch)
treed777e749b6718114d0a3495dda3c93837b24be79
parent1bf0be5f83a9447b46d4724f59fbd99ba26a2f03 (diff)
downloadtremor-d47ef6dc0a1bb4baabc80c99beaa5ff97458e34f.tar.gz
VFLOAT hacks no longer needed
git-svn-id: https://svn.xiph.org/branches/lowmem-branch/Tremor@4596 0101bb08-14d6-0310-b084-bc0e0c8e3800
-rw-r--r--misc.h65
1 files changed, 0 insertions, 65 deletions
diff --git a/misc.h b/misc.h
index 470efac..715894e 100644
--- a/misc.h
+++ b/misc.h
@@ -185,71 +185,6 @@ static inline ogg_int32_t CLIP_TO_15(ogg_int32_t x) {
#endif
-static inline ogg_int32_t VFLOAT_MULT(ogg_int32_t a,ogg_int32_t ap,
- ogg_int32_t b,ogg_int32_t bp,
- ogg_int32_t *p){
- if(a && b){
-#ifndef _LOW_ACCURACY_
- *p=ap+bp+32;
- return MULT32(a,b);
-#else
- *p=ap+bp+31;
- return (a>>15)*(b>>16);
-#endif
- }else
- return 0;
-}
-
-static inline ogg_int32_t VFLOAT_MULTI(ogg_int32_t a,ogg_int32_t ap,
- ogg_int32_t i,
- ogg_int32_t *p){
-
- int ip=_ilog(abs(i))-31;
- return VFLOAT_MULT(a,ap,i<<-ip,ip,p);
-}
-
-static inline ogg_int32_t VFLOAT_ADD(ogg_int32_t a,ogg_int32_t ap,
- ogg_int32_t b,ogg_int32_t bp,
- ogg_int32_t *p){
-
- if(!a){
- *p=bp;
- return b;
- }else if(!b){
- *p=ap;
- return a;
- }
-
- /* yes, this can leak a bit. */
- if(ap>bp){
- int shift=ap-bp+1;
- *p=ap+1;
- a>>=1;
- if(shift<32){
- b=(b+(1<<(shift-1)))>>shift;
- }else{
- b=0;
- }
- }else{
- int shift=bp-ap+1;
- *p=bp+1;
- b>>=1;
- if(shift<32){
- a=(a+(1<<(shift-1)))>>shift;
- }else{
- a=0;
- }
- }
-
- a+=b;
- if((a&0xc0000000)==0xc0000000 ||
- (a&0xc0000000)==0){
- a<<=1;
- (*p)--;
- }
- return(a);
-}
-
#endif