[xiph-commits] r6959 - branches/monty-vorbis-aotuv-branch/lib

xiphmont at dactyl.lonelymoon.com xiphmont
Fri Jul 2 20:35:19 PDT 2004


Author: xiphmont
Date: Fri Jul  2 20:35:19 2004
New Revision: 6959

Modified:
branches/monty-vorbis-aotuv-branch/lib/mapping0.c
branches/monty-vorbis-aotuv-branch/lib/psy.c
branches/monty-vorbis-aotuv-branch/lib/psy.h
Log:
hf_reduction looks good now too, only one... weird... line.

Code merged; final listening verification and book generation are
next, followed by bringing the bitrate management back into line.

Then re-tuning



Modified: branches/monty-vorbis-aotuv-branch/lib/mapping0.c
===================================================================
--- branches/monty-vorbis-aotuv-branch/lib/mapping0.c	2004-07-03 02:39:38 UTC (rev 6958)
+++ branches/monty-vorbis-aotuv-branch/lib/mapping0.c	2004-07-03 03:35:17 UTC (rev 6959)
@@ -157,7 +157,7 @@
#include "psy.h"
#include "scales.h"

-//#if 0
+#if 0
static long seq=0;
static ogg_int64_t total=0;
static float FLOOR1_fromdB_LOOKUP[256]={
@@ -227,7 +227,7 @@
0.82788260F, 0.88168307F, 0.9389798F, 1.F,
};

-//#endif
+#endif

extern int *floor1_fit(vorbis_block *vb,vorbis_look_floor *look,
const float *logmdct,   /* in */
@@ -349,7 +349,7 @@
for(j=0;j<n/2;j++)
logmdct[j]=todB(mdct+j);

-      //#if 0
+#if 0
if(vi->channels==2){
if(i==0)
_analysis_output("mdctL",seq,logmdct,n/2,1,0,0);
@@ -358,7 +358,7 @@
}else{
_analysis_output("mdct",seq,logmdct,n/2,1,0,0);
}
-      //#endif
+#endif

/* first step; noise masking.  Not only does 'noise masking'
give us curves from which we can decide how much resolution
@@ -370,14 +370,14 @@
logmdct,
noise); /* noise does not have by-frequency offset
bias applied yet */
-      //#if 0
+#if 0
if(vi->channels==2){
if(i==0)
_analysis_output("noiseL",seq,noise,n/2,1,0,0);
else
_analysis_output("noiseR",seq,noise,n/2,1,0,0);
}
-      //#endif
+#endif

/* second step: 'all the other crap'; all the stuff that isn't
computed/fit for bitrate management goes in the second psy
@@ -389,51 +389,36 @@
global_ampmax,
local_ampmax[i]);

-      //#if 0
+#if 0
if(vi->channels==2){
if(i==0)
_analysis_output("toneL",seq,tone,n/2,1,0,0);
else
_analysis_output("toneR",seq,tone,n/2,1,0,0);
}
-      //#endif
+#endif

/* third step; we offset the noise vectors, overlay tone
masking.  We then do a floor1-specific line fit.  If we're
performing bitrate management, the line fit is performed
multiple times for up/down tweakage on demand. */
-      {
-	float aotuvadj[psy_look->n];

-	_vp_offset_and_mix(psy_look,
-			   noise,
-			   tone,
-			   1,
-			   logmask,
-			   mdct,
-			   logmdct,
-			   aotuvadj);
-
-	if(vi->channels==2){
-	  if(i==0){
-	    _analysis_output("adjL",seq,aotuvadj,psy_look->n,1,1,0);
-	    _analysis_output("adjmdctL",seq,mdct,n/2,1,1,0);
-	  }else{
-	    _analysis_output("adjR",seq,aotuvadj,psy_look->n,1,1,0);
-	    _analysis_output("adjmdctR",seq,mdct,n/2,1,1,0);
-	  }
-	}
-      }
-
-
-      //#if 0
+      _vp_offset_and_mix(psy_look,
+			 noise,
+			 tone,
+			 1,
+			 logmask,
+			 mdct,
+			 logmdct);
+
+#if 0
if(vi->channels==2){
if(i==0)
_analysis_output("mask1L",seq,logmask,n/2,1,0,0);
else
_analysis_output("mask1R",seq,logmask,n/2,1,0,0);
}
-      //#endif
+#endif

/* this algorithm is hardwired to floor 1 for now; abort out if
we're *not* floor1.  This won't happen unless someone has
@@ -456,7 +441,7 @@
2,
logmask,
mdct,
-			   logmdct,NULL);
+			   logmdct);

#if 0
if(vi->channels==2){
@@ -479,7 +464,7 @@
0,
logmask,
mdct,
-			   logmdct,NULL);
+			   logmdct);

#if 0
if(vi->channels==2)
@@ -668,10 +653,10 @@

}

-  //#if 0
+#if 0
seq++;
total+=ci->blocksizes[vb->W]/4+ci->blocksizes[vb->nW]/4;
-  //#endif
+#endif
return(0);
}


Modified: branches/monty-vorbis-aotuv-branch/lib/psy.c
===================================================================
--- branches/monty-vorbis-aotuv-branch/lib/psy.c	2004-07-03 02:39:38 UTC (rev 6958)
+++ branches/monty-vorbis-aotuv-branch/lib/psy.c	2004-07-03 03:35:17 UTC (rev 6959)
@@ -854,14 +854,12 @@
int offset_select,
float *logmask,
float *mdct,
-			float *logmdct,
-			float *adj){
+			float *logmdct){
int i,n=p->n;
-  float de, coeffi, cx=1.0, cy=1.0; /* AoTuV */
+  float de, coeffi, cx;/* AoTuV */
float toneatt=p->vi->tone_masteratt[offset_select];

cx = p->m_val;
-  if(offset_select != 1) cx = 0;   // XXX

for(i=0;i<n;i++){
float val= noise[i]+p->noiseoffset[offset_select][i];
@@ -878,8 +876,8 @@
by Aoyumi @ 2004/04/18
*/

-    {
-      coeffi = -17.2*cy;       /* coeffi is a -17.2dB threshold */
+    if(offset_select == 1) {
+      coeffi = -17.2;       /* coeffi is a -17.2dB threshold */
val = val - logmdct[i];  /* val == mdct line value relative to floor in dB */

if(val > coeffi){
@@ -903,7 +901,6 @@
etc... */

mdct[i] *= de;
-      if(adj)adj[i]=de;
}
}
}
@@ -1219,8 +1216,8 @@
int start=p->vi->normal_start;

for(i=0; i<vi->coupling_steps; i++){
-    for(j=start; j<limit; j++){} // ???
-    for(; j<n; j++)
+    /* for(j=start; j<limit; j++){} // ???*/
+    for(j=limit; j<n; j++)
mdct[i][j] *= (1.0 - de*((float)(j-limit) / (float)(n-limit)));
}
}

Modified: branches/monty-vorbis-aotuv-branch/lib/psy.h
===================================================================
--- branches/monty-vorbis-aotuv-branch/lib/psy.h	2004-07-03 02:39:38 UTC (rev 6958)
+++ branches/monty-vorbis-aotuv-branch/lib/psy.h	2004-07-03 03:35:17 UTC (rev 6959)
@@ -144,8 +144,7 @@
int offset_select,
float *logmask,
float *mdct,
-			       float *logmdct,
-			       float *diag);
+			       float *logmdct);

extern float _vp_ampmax_decay(float amp,vorbis_dsp_state *vd);




More information about the commits mailing list