[xiph-cvs] cvs commit: Tremor backends.h block.c codebook.c floor0.c floor1.c mapping0.c misc.h

Monty xiphmont at xiph.org
Thu Apr 10 05:03:13 PDT 2003



xiphmont    03/04/10 08:03:13

  Modified:    .        Tag: lowmem-branch backends.h block.c codebook.c
                        floor0.c floor1.c mapping0.c misc.h
  Log:
  Correct a scaling bug in floor 1

Revision  Changes    Path
No                   revision

<p>No                   revision

<p>1.2.6.2   +2 -2      Tremor/backends.h

Index: backends.h
===================================================================
RCS file: /usr/local/cvsroot/Tremor/backends.h,v
retrieving revision 1.2.6.1
retrieving revision 1.2.6.2
diff -u -r1.2.6.1 -r1.2.6.2
--- backends.h	10 Apr 2003 11:33:59 -0000	1.2.6.1
+++ backends.h	10 Apr 2003 12:03:13 -0000	1.2.6.2
@@ -6,7 +6,7 @@
  * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
  *                                                                  *
- * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002    *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003    *
  * BY THE Xiph.Org FOUNDATION http://www.xiph.org/                  *
  *                                                                  *
  ********************************************************************
@@ -48,7 +48,7 @@
   int   ampdB;
 
   int   numbooks; /* <= 16 */
-  int   books[16];
+  char  books[16];
 
 } vorbis_info_floor0;
 

<p><p>1.4.2.2   +1 -1      Tremor/block.c

Index: block.c
===================================================================
RCS file: /usr/local/cvsroot/Tremor/block.c,v
retrieving revision 1.4.2.1
retrieving revision 1.4.2.2
diff -u -r1.4.2.1 -r1.4.2.2
--- block.c	5 Apr 2003 01:45:15 -0000	1.4.2.1
+++ block.c	10 Apr 2003 12:03:13 -0000	1.4.2.2
@@ -6,7 +6,7 @@
  * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
  *                                                                  *
- * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002    *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003    *
  * BY THE Xiph.Org FOUNDATION http://www.xiph.org/                  *
  *                                                                  *
  ********************************************************************

<p><p>1.2.6.5   +7 -1      Tremor/codebook.c

Index: codebook.c
===================================================================
RCS file: /usr/local/cvsroot/Tremor/codebook.c,v
retrieving revision 1.2.6.4
retrieving revision 1.2.6.5
diff -u -r1.2.6.4 -r1.2.6.5
--- codebook.c	9 Apr 2003 08:43:26 -0000	1.2.6.4
+++ codebook.c	10 Apr 2003 12:03:13 -0000	1.2.6.5
@@ -15,6 +15,7 @@
 
  ********************************************************************/
 
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <math.h>
@@ -418,7 +419,7 @@
     s->dec_nodeb=_determine_node_bytes(s->used_entries,_ilog(s->entries)/8+1); 
     s->dec_leafw=_determine_leaf_words(s->dec_nodeb,_ilog(s->entries)/8+1); 
     s->dec_type=0;
-    
+
     if(_make_decode_table(s,lengthlist,quantvals,opb,maptype)) goto _errout;
     break;
 
@@ -529,6 +530,11 @@
 
   if(oggpack_eop(opb))goto _eofout;
   
+  fprintf(stderr,"%d/%d x%d b%d dec_type%d (%d/%d)\n",
+	  s->used_entries,s->entries,s->dim,s->q_bits,s->dec_type,
+	  s->dec_nodeb*8,s->dec_nodeb*s->dec_leafw*8);
+  
+
   return 0;
  _errout:
  _eofout:

<p><p>1.4.6.3   +3 -13     Tremor/floor0.c

Index: floor0.c
===================================================================
RCS file: /usr/local/cvsroot/Tremor/floor0.c,v
retrieving revision 1.4.6.2
retrieving revision 1.4.6.3
diff -u -r1.4.6.2 -r1.4.6.3
--- floor0.c	10 Apr 2003 11:33:59 -0000	1.4.6.2
+++ floor0.c	10 Apr 2003 12:03:13 -0000	1.4.6.3
@@ -6,7 +6,7 @@
  * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
  *                                                                  *
- * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002    *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003    *
  * BY THE Xiph.Org FOUNDATION http://www.xiph.org/                  *
  *                                                                  *
  ********************************************************************
@@ -83,17 +83,6 @@
   15624,20397,27087,36554
 };
 
-static const ogg_uint32_t barklook_igap[27]={
-  21474836, 21474836, 21262214, 20648881,
-  19346700, 18046081, 16393005, 14708792,
-  13015052, 11545611, 10082083, 8801162,
-  7588281,  6507526,  5534752,  4638194,
-  3848537,  3130443,  2505815,  1968363,
-  1517656,  1147773,  852514,   623725,
-  449923,   320999,   226839
-};
-
-
 /* used in init only; interpolate the long way */
 static inline ogg_int32_t toBARK(int n){
   int i;
@@ -103,7 +92,8 @@
   if(i==27){
     return 27<<15;
   }else{
-    return (i<<15)+(((n-barklook[i])*barklook_igap[i])>>16);
+    return (i<<15)+(((n-barklook[i])*  
+		     ((1<<31)/(barklook[i+1]-barklook[i])))>>16);
   }
 }
 

<p><p>1.6.6.3   +3 -3      Tremor/floor1.c

Index: floor1.c
===================================================================
RCS file: /usr/local/cvsroot/Tremor/floor1.c,v
retrieving revision 1.6.6.2
retrieving revision 1.6.6.3
diff -u -r1.6.6.2 -r1.6.6.3
--- floor1.c	10 Apr 2003 11:33:59 -0000	1.6.6.2
+++ floor1.c	10 Apr 2003 12:03:13 -0000	1.6.6.3
@@ -6,7 +6,7 @@
  * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
  *                                                                  *
- * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002    *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003    *
  * BY THE Xiph.Org FOUNDATION http://www.xiph.org/                  *
  *                                                                  *
  ********************************************************************
@@ -80,7 +80,7 @@
   }
 
   /* read the post list */
-  info->mult=oggpack_read(opb,2);     /* only 0,1,2,3 legal now */ 
+  info->mult=oggpack_read(opb,2)+1;     /* only 1,2,3,4 legal now */ 
   rangebits=oggpack_read(opb,4);
 
   for(j=0,k=0;j<info->partitions;j++){
@@ -256,7 +256,7 @@
   
   int i,j,k;
   codebook *books=ci->book_param;   
-  int quant_q=quant_look[info->mult];
+  int quant_q=quant_look[info->mult-1];
 
   /* unpack wrapped/predicted values from stream */
   if(oggpack_read(&vb->opb,1)==1){

<p><p>1.3.6.3   +1 -1      Tremor/mapping0.c

Index: mapping0.c
===================================================================
RCS file: /usr/local/cvsroot/Tremor/mapping0.c,v
retrieving revision 1.3.6.2
retrieving revision 1.3.6.3
diff -u -r1.3.6.2 -r1.3.6.3
--- mapping0.c	10 Apr 2003 11:33:59 -0000	1.3.6.2
+++ mapping0.c	10 Apr 2003 12:03:13 -0000	1.3.6.3
@@ -6,7 +6,7 @@
  * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
  *                                                                  *
- * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002    *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003    *
  * BY THE Xiph.Org FOUNDATION http://www.xiph.org/                  *
  *                                                                  *
  ********************************************************************

<p><p>1.8.2.5   +2 -2      Tremor/misc.h

Index: misc.h
===================================================================
RCS file: /usr/local/cvsroot/Tremor/misc.h,v
retrieving revision 1.8.2.4
retrieving revision 1.8.2.5
diff -u -r1.8.2.4 -r1.8.2.5
--- misc.h	9 Apr 2003 09:43:49 -0000	1.8.2.4
+++ misc.h	10 Apr 2003 12:03:13 -0000	1.8.2.5
@@ -6,7 +6,7 @@
  * GOVERNED BY A BSD-STYLE SOURCE LICENSE INCLUDED WITH THIS SOURCE *
  * IN 'COPYING'. PLEASE READ THESE TERMS BEFORE DISTRIBUTING.       *
  *                                                                  *
- * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2002    *
+ * THE OggVorbis 'TREMOR' SOURCE CODE IS (C) COPYRIGHT 1994-2003    *
  * BY THE Xiph.Org FOUNDATION http://www.xiph.org/                  *
  *                                                                  *
  ********************************************************************
@@ -20,7 +20,7 @@
 #include "ivorbiscodec.h"
 #include "os_types.h"
 
-//#define _VDBG_GRAPHFILE "_0.m"
+#define _VDBG_GRAPHFILE "_0.m"
 
 
 #ifdef _VDBG_GRAPHFILE

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list