[xiph-commits] r14579 - in branches/theora-thusnelda: examples lib lib/dec lib/enc lib/enc/x86_32 lib/enc/x86_32_vs lib/enc/x86_64

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Tue Mar 11 23:42:41 PDT 2008


Author: xiphmont
Date: 2008-03-11 23:42:40 -0700 (Tue, 11 Mar 2008)
New Revision: 14579

Modified:
   branches/theora-thusnelda/examples/encoder_example.c
   branches/theora-thusnelda/examples/player_example.c
   branches/theora-thusnelda/lib/dec/decapiwrapper.c
   branches/theora-thusnelda/lib/dec/decint.h
   branches/theora-thusnelda/lib/dec/decode.c
   branches/theora-thusnelda/lib/dec/dequant.c
   branches/theora-thusnelda/lib/dec/quant.c
   branches/theora-thusnelda/lib/dec/state.c
   branches/theora-thusnelda/lib/enc/dsp.c
   branches/theora-thusnelda/lib/enc/encoder_quant.c
   branches/theora-thusnelda/lib/enc/mode.c
   branches/theora-thusnelda/lib/enc/x86_32/dct_decode_mmx.c
   branches/theora-thusnelda/lib/enc/x86_32/dsp_mmx.c
   branches/theora-thusnelda/lib/enc/x86_32/dsp_mmxext.c
   branches/theora-thusnelda/lib/enc/x86_32/fdct_mmx.c
   branches/theora-thusnelda/lib/enc/x86_32/idct_mmx.c
   branches/theora-thusnelda/lib/enc/x86_32/recon_mmx.c
   branches/theora-thusnelda/lib/enc/x86_32_vs/dsp_mmx.c
   branches/theora-thusnelda/lib/enc/x86_32_vs/fdct_mmx.c
   branches/theora-thusnelda/lib/enc/x86_32_vs/recon_mmx.c
   branches/theora-thusnelda/lib/enc/x86_64/dsp_mmx.c
   branches/theora-thusnelda/lib/enc/x86_64/dsp_mmxext.c
   branches/theora-thusnelda/lib/enc/x86_64/fdct_mmx.c
   branches/theora-thusnelda/lib/enc/x86_64/recon_mmx.c
   branches/theora-thusnelda/lib/internal.h
Log:
mb mode and mv visualization code added to decode output.  Access via
TH_DECCTL_SET_TELEMETRY_MBMODE and TH_DECCTL_SET_TELEMETRY_MV.
Argument is a bigflag, one for each mode type to display (0=INTER,
1=INTRA, 2=INTER_MV, etc)

Oops, also kill off all the silly ascii debug output Derf was pointing
and laughing at.



Modified: branches/theora-thusnelda/examples/encoder_example.c
===================================================================
--- branches/theora-thusnelda/examples/encoder_example.c	2008-03-12 01:14:29 UTC (rev 14578)
+++ branches/theora-thusnelda/examples/encoder_example.c	2008-03-12 06:42:40 UTC (rev 14579)
@@ -704,7 +704,7 @@
       break;
 
     case 'v':
-      video_q=rint(atof(optarg)*6.3);
+      video_q=rint(atof(optarg));
       if(video_q<0 || video_q>63){
         fprintf(stderr,"Illegal video quality (choose 0 through 10)\n");
         exit(1);

Modified: branches/theora-thusnelda/examples/player_example.c
===================================================================
--- branches/theora-thusnelda/examples/player_example.c	2008-03-12 01:14:29 UTC (rev 14578)
+++ branches/theora-thusnelda/examples/player_example.c	2008-03-12 06:42:40 UTC (rev 14579)
@@ -591,8 +591,11 @@
     theora_control(&td,TH_DECCTL_SET_PPLEVEL,&pp_level,sizeof(pp_level));
     pp_inc=0;
 
-    theora_control(&td,TH_DECCTL_SET_TELEMETRY_MBMODE,NULL,0);
-    theora_control(&td,TH_DECCTL_SET_TELEMETRY_MV,NULL,0);
+    {
+      int arg = 0xffff;
+      theora_control(&td,TH_DECCTL_SET_TELEMETRY_MBMODE,&arg,sizeof(arg));
+      theora_control(&td,TH_DECCTL_SET_TELEMETRY_MV,&arg,sizeof(arg));
+    }
   }else{
     /* tear down the partial theora setup */
     theora_info_clear(&ti);

Modified: branches/theora-thusnelda/lib/dec/decapiwrapper.c
===================================================================
--- branches/theora-thusnelda/lib/dec/decapiwrapper.c	2008-03-12 01:14:29 UTC (rev 14578)
+++ branches/theora-thusnelda/lib/dec/decapiwrapper.c	2008-03-12 06:42:40 UTC (rev 14579)
@@ -233,10 +233,232 @@
 
     {
       cairo_t *c = cairo_create(cs);
-      cairo_set_source_rgba(c,1.,0,0,.5);
-      cairo_rectangle(c,100,100,100,100);
-      cairo_fill(c);
-      cairo_surface_flush(cs);
+
+      /* draw coded identifier for each macroblock */
+      /* macroblocks stored in Hilbert order */
+      oc_mb *mb=decode->state.mbs;
+      oc_mb *mb_end=mb+decode->state.nmbs;
+      int row2 = 0;
+      int col2 = 0;
+
+      for(;mb<mb_end;mb++){
+	int bi;
+	float y = h - (row2 + (((col2+1)>>1)&1))*16 -16;
+	float x = (col2>>1) * 16;
+	    
+	cairo_set_line_width(c,1.);
+	if(decode->state.frame_type==OC_INTRA_FRAME){
+	  if(decode->telemetry_mbmode&0x02){
+	    cairo_set_source_rgba(c,1.,0,0,.5);
+	    cairo_rectangle(c,x+2.5,y+2.5,11,11);
+	    cairo_stroke_preserve(c);
+	    cairo_set_source_rgba(c,1.,0,0,.25);
+	    cairo_fill(c);
+	  }
+	}else{
+	  oc_fragment *coded = NULL;
+	  for(bi=0;bi<4;bi++){
+	    int fragi=mb->map[0][bi];
+	    if(fragi>=0 && decode->state.frags[fragi].coded){
+	      coded = &decode->state.frags[fragi];
+	      break;
+	    }
+	  }
+	  if(bi<4){
+	    switch(mb->mode){
+	    case OC_MODE_INTRA:
+	      if(decode->telemetry_mbmode&0x02){
+		cairo_set_source_rgba(c,1.,0,0,.5);
+		cairo_rectangle(c,x+2.5,y+2.5,11,11);
+		cairo_stroke_preserve(c);
+		cairo_set_source_rgba(c,1.,0,0,.25);
+		cairo_fill(c);
+	      }
+	      break;
+	    case OC_MODE_INTER_NOMV:
+	      if(decode->telemetry_mbmode&0x01){
+		cairo_set_source_rgba(c,0,0,1.,.5);
+		cairo_rectangle(c,x+2.5,y+2.5,11,11);
+		cairo_stroke_preserve(c);
+		cairo_set_source_rgba(c,0,0,1.,.25);
+		cairo_fill(c);
+	      }
+	      break;
+	    case OC_MODE_INTER_MV:
+	      if(decode->telemetry_mbmode&0x04){
+		cairo_rectangle(c,x+2.5,y+2.5,11,11);
+		cairo_set_source_rgba(c,0,1.,0,.5);
+		cairo_stroke(c);
+	      }
+	      if(decode->telemetry_mv&0x04){
+		cairo_move_to(c,x+8+coded->mv[0],y+8-coded->mv[1]);
+		cairo_set_source_rgba(c,1.,1.,1.,.9);
+		cairo_set_line_width(c,3.);
+		cairo_line_to(c,x+8+coded->mv[0]*.66,y+8-coded->mv[1]*.66);
+		cairo_stroke_preserve(c);
+		cairo_set_line_width(c,2.);
+		cairo_line_to(c,x+8+coded->mv[0]*.33,y+8-coded->mv[1]*.33);
+		cairo_stroke_preserve(c);
+		cairo_set_line_width(c,1.);
+		cairo_line_to(c,x+8,y+8);
+		cairo_stroke(c);
+ 	      }
+	      break;
+	    case OC_MODE_INTER_MV_LAST:
+	      if(decode->telemetry_mbmode&0x08){
+		cairo_rectangle(c,x+2.5,y+2.5,11,11);
+		cairo_set_source_rgba(c,0,1.,0,.5);
+		cairo_move_to(c,x+13.5,y+2.5);
+		cairo_line_to(c,x+2.5,y+8);
+		cairo_line_to(c,x+13.5,y+13.5);
+		cairo_stroke(c);
+	      }
+	      if(decode->telemetry_mv&0x08){
+		cairo_move_to(c,x+8+coded->mv[0],y+8-coded->mv[1]);
+		cairo_set_source_rgba(c,1.,1.,1.,.9);
+		cairo_set_line_width(c,3.);
+		cairo_line_to(c,x+8+coded->mv[0]*.66,y+8-coded->mv[1]*.66);
+		cairo_stroke_preserve(c);
+		cairo_set_line_width(c,2.);
+		cairo_line_to(c,x+8+coded->mv[0]*.33,y+8-coded->mv[1]*.33);
+		cairo_stroke_preserve(c);
+		cairo_set_line_width(c,1.);
+		cairo_line_to(c,x+8,y+8);
+		cairo_stroke(c);
+ 	      }
+	      break;
+	    case OC_MODE_INTER_MV_LAST2:
+	      if(decode->telemetry_mbmode&0x10){
+		cairo_rectangle(c,x+2.5,y+2.5,11,11);
+		cairo_set_source_rgba(c,0,1.,0,.5);
+		cairo_move_to(c,x+8,y+2.5);
+		cairo_line_to(c,x+2.5,y+8);
+		cairo_line_to(c,x+8,y+13.5);
+		cairo_move_to(c,x+13.5,y+2.5);
+		cairo_line_to(c,x+8,y+8);
+		cairo_line_to(c,x+13.5,y+13.5);
+		cairo_stroke(c);
+	      }
+	      if(decode->telemetry_mv&0x10){
+		cairo_move_to(c,x+8+coded->mv[0],y+8-coded->mv[1]);
+		cairo_set_source_rgba(c,1.,1.,1.,.9);
+		cairo_set_line_width(c,3.);
+		cairo_line_to(c,x+8+coded->mv[0]*.66,y+8-coded->mv[1]*.66);
+		cairo_stroke_preserve(c);
+		cairo_set_line_width(c,2.);
+		cairo_line_to(c,x+8+coded->mv[0]*.33,y+8-coded->mv[1]*.33);
+		cairo_stroke_preserve(c);
+		cairo_set_line_width(c,1.);
+		cairo_line_to(c,x+8,y+8);
+		cairo_stroke(c);
+ 	      }
+	      break;
+	    case OC_MODE_GOLDEN_NOMV:
+	      if(decode->telemetry_mbmode&0x20){
+		cairo_set_source_rgba(c,1.,1.,0,.5);
+		cairo_rectangle(c,x+2.5,y+2.5,11,11);
+		cairo_stroke_preserve(c);
+		cairo_set_source_rgba(c,1.,1.,0,.25);
+		cairo_fill(c);
+	      }
+	      break;
+	    case OC_MODE_GOLDEN_MV:
+	      if(decode->telemetry_mbmode&0x40){
+		cairo_rectangle(c,x+2.5,y+2.5,11,11);
+		cairo_set_source_rgba(c,1.,1.,0,.5);
+		cairo_stroke(c);
+	      }
+	      if(decode->telemetry_mv&0x40){
+		cairo_move_to(c,x+8+coded->mv[0],y+8-coded->mv[1]);
+		cairo_set_source_rgba(c,1.,1.,1.,.9);
+		cairo_set_line_width(c,3.);
+		cairo_line_to(c,x+8+coded->mv[0]*.66,y+8-coded->mv[1]*.66);
+		cairo_stroke_preserve(c);
+		cairo_set_line_width(c,2.);
+		cairo_line_to(c,x+8+coded->mv[0]*.33,y+8-coded->mv[1]*.33);
+		cairo_stroke_preserve(c);
+		cairo_set_line_width(c,1.);
+		cairo_line_to(c,x+8,y+8);
+		cairo_stroke(c);
+ 	      }
+	      break;
+	    case OC_MODE_INTER_MV_FOUR:
+	      if(decode->telemetry_mbmode&0x80){
+		cairo_rectangle(c,x+2.5,y+2.5,4,4);
+		cairo_rectangle(c,x+9.5,y+2.5,4,4);
+		cairo_rectangle(c,x+2.5,y+9.5,4,4);
+		cairo_rectangle(c,x+9.5,y+9.5,4,4);
+		cairo_set_source_rgba(c,0,1.,0,.5);
+		cairo_stroke(c);
+	      }
+	      /* 4mv is odd, coded in raster order */
+	      coded=&decode->state.frags[mb->map[0][bi]];
+	      if(coded->coded && decode->telemetry_mv&0x80){
+		cairo_move_to(c,x+4+coded->mv[0],y+12-coded->mv[1]);
+		cairo_set_source_rgba(c,1.,1.,1.,.9);
+		cairo_set_line_width(c,3.);
+		cairo_line_to(c,x+4+coded->mv[0]*.66,y+12-coded->mv[1]*.66);
+		cairo_stroke_preserve(c);
+		cairo_set_line_width(c,2.);
+		cairo_line_to(c,x+4+coded->mv[0]*.33,y+12-coded->mv[1]*.33);
+		cairo_stroke_preserve(c);
+		cairo_set_line_width(c,1.);
+		cairo_line_to(c,x+4,y+12);
+		cairo_stroke(c);
+ 	      }
+	      coded=&decode->state.frags[mb->map[1][bi]];
+	      if(coded->coded && decode->telemetry_mv&0x80){
+		cairo_move_to(c,x+12+coded->mv[0],y+12-coded->mv[1]);
+		cairo_set_source_rgba(c,1.,1.,1.,.9);
+		cairo_set_line_width(c,3.);
+		cairo_line_to(c,x+12+coded->mv[0]*.66,y+12-coded->mv[1]*.66);
+		cairo_stroke_preserve(c);
+		cairo_set_line_width(c,2.);
+		cairo_line_to(c,x+12+coded->mv[0]*.33,y+12-coded->mv[1]*.33);
+		cairo_stroke_preserve(c);
+		cairo_set_line_width(c,1.);
+		cairo_line_to(c,x+12,y+12);
+		cairo_stroke(c);
+ 	      }
+	      coded=&decode->state.frags[mb->map[2][bi]];
+	      if(coded->coded && decode->telemetry_mv&0x80){
+		cairo_move_to(c,x+4+coded->mv[0],y+4-coded->mv[1]);
+		cairo_set_source_rgba(c,1.,1.,1.,.9);
+		cairo_set_line_width(c,3.);
+		cairo_line_to(c,x+4+coded->mv[0]*.66,y+4-coded->mv[1]*.66);
+		cairo_stroke_preserve(c);
+		cairo_set_line_width(c,2.);
+		cairo_line_to(c,x+4+coded->mv[0]*.33,y+4-coded->mv[1]*.33);
+		cairo_stroke_preserve(c);
+		cairo_set_line_width(c,1.);
+		cairo_line_to(c,x+4,y+4);
+		cairo_stroke(c);
+ 	      }
+	      coded=&decode->state.frags[mb->map[1][bi]];
+	      if(coded->coded && decode->telemetry_mv&0x80){
+		cairo_move_to(c,x+12+coded->mv[0],y+4-coded->mv[1]);
+		cairo_set_source_rgba(c,1.,1.,1.,.9);
+		cairo_set_line_width(c,3.);
+		cairo_line_to(c,x+12+coded->mv[0]*.66,y+4-coded->mv[1]*.66);
+		cairo_stroke_preserve(c);
+		cairo_set_line_width(c,2.);
+		cairo_line_to(c,x+12+coded->mv[0]*.33,y+4-coded->mv[1]*.33);
+		cairo_stroke_preserve(c);
+		cairo_set_line_width(c,1.);
+		cairo_line_to(c,x+12,y+4);
+		cairo_stroke(c);
+ 	      }
+	      break;
+	    }
+	  }
+	}
+	col2++;
+	if((col2>>1)>=decode->state.nhmbs){
+	  col2=0;
+	  row2+=2;
+	}
+      }
+
       cairo_destroy(c);
     }
 

Modified: branches/theora-thusnelda/lib/dec/decint.h
===================================================================
--- branches/theora-thusnelda/lib/dec/decint.h	2008-03-12 01:14:29 UTC (rev 14578)
+++ branches/theora-thusnelda/lib/dec/decint.h	2008-03-12 06:42:40 UTC (rev 14579)
@@ -90,13 +90,12 @@
   /*The striped decode callback function.*/
   th_stripe_callback       stripe_cb;
 
-#ifdef HAVE_CAIRO
   /* output metrics for debugging */
   int                      telemetry;
   int                      telemetry_mbmode;
   int                      telemetry_mv;
   unsigned char           *telemetry_frame_data;
-#endif
+
 };
 
 /*Fix-ups for the libogg1 API, which returns -1 when there are insufficient

Modified: branches/theora-thusnelda/lib/dec/decode.c
===================================================================
--- branches/theora-thusnelda/lib/dec/decode.c	2008-03-12 01:14:29 UTC (rev 14578)
+++ branches/theora-thusnelda/lib/dec/decode.c	2008-03-12 06:42:40 UTC (rev 14579)
@@ -277,36 +277,28 @@
 static int oc_dec_frame_header_unpack(oc_dec_ctx *_dec){
   long val;
 
-  TH_DEBUG("\n>>>> beginning frame %ld\n\n",dframe);
-
   /*Check to make sure this is a data packet.*/
   theora_read1(&_dec->opb,&val);
-  TH_DEBUG("frame type = %s, ",val==0?"video":"unknown");
   if(val!=0)return TH_EBADPACKET;
   /*Read in the frame type (I or P).*/
   theora_read1(&_dec->opb,&val);
   _dec->state.frame_type=(int)val;
-  TH_DEBUG("%s\n",val?"predicted":"key");
   /*Read in the current qi.*/
   theora_read(&_dec->opb,6,&val);
   _dec->state.qis[0]=(int)val;
-  TH_DEBUG("frame quality = { %ld ",val);
   theora_read1(&_dec->opb,&val);
   if(!val)_dec->state.nqis=1;
   else{
     theora_read(&_dec->opb,6,&val);
     _dec->state.qis[1]=(int)val;
-    TH_DEBUG("%ld ",val);
     theora_read1(&_dec->opb,&val);
     if(!val)_dec->state.nqis=2;
     else{
       theora_read(&_dec->opb,6,&val);
-      TH_DEBUG("%ld ",val);
       _dec->state.qis[2]=(int)val;
       _dec->state.nqis=3;
     }
   }
-  TH_DEBUG("}\n");
 
   if(_dec->state.frame_type==OC_INTRA_FRAME){
     /*Keyframes have 3 unused configuration bits, holdovers from VP3 days.
@@ -494,71 +486,6 @@
   }
   /*TODO: run_count should be 0 here.
     If it's not, we should issue a warning of some kind.*/
-
-
-#ifdef _TH_DEBUG_
-  // assuming 4:2:0 right now; THIS IS WRONG but only an issue if dumping debug info
-  TH_DEBUG("predicted (partially coded frame)\n");
-  TH_DEBUG("superblock coded flags = {");
-  int x,y,i;
-  int w = _dec->state.info.frame_width;
-  int h = _dec->state.info.frame_height;
-
-  i=0;
-  for(y=0;y< (h+31)/32;y++){
-    TH_DEBUG("\n   ");
-    for(x=0;x< (w+31)/32;x++,i++)
-      TH_DEBUG("%x", (_dec->state.sbs[i].coded_partially!=0)|
-	       (_dec->state.sbs[i].coded_fully));
-  }
-
-  TH_DEBUG("\n   ");
-  for(y=0;y< (h+63)/64;y++){
-    TH_DEBUG("\n   ");
-    for(x=0;x< (w+63)/64;x++,i++)
-      TH_DEBUG("%x", (_dec->state.sbs[i].coded_partially!=0)|
-	       (_dec->state.sbs[i].coded_fully));
-  }
-  TH_DEBUG("\n   ");
-  for(y=0;y< (h+63)/64;y++){
-    TH_DEBUG("\n   ");
-    for(x=0;x< (w+63)/64;x++,i++)
-      TH_DEBUG("%x", (_dec->state.sbs[i].coded_partially!=0)|
-	       (_dec->state.sbs[i].coded_fully));
-  }
-  TH_DEBUG("\n}\n");
-
-  if(i!=_dec->state.nsbs)
-    TH_DEBUG("WARNING!  superblock count, raster %d != flat %d\n",
-	     i,_dec->state.nsbs);
-  
-  TH_DEBUG("block coded flags = {");
-
-  i=0;
-  for(y=0;y< (h+7)/8;y++){
-    TH_DEBUG("\n   ");
-    for(x=0;x< (w+7)/8;x++,i++)
-      TH_DEBUG("%x", (_dec->state.frags[i].coded!=0));
-  }
-  TH_DEBUG("\n   ");
-  for(y=0;y< (h+15)/16;y++){
-    TH_DEBUG("\n   ");
-    for(x=0;x< (w+15)/16;x++,i++)
-      TH_DEBUG("%x", (_dec->state.frags[i].coded!=0));
-  }
-  TH_DEBUG("\n   ");
-  for(y=0;y< (h+15)/16;y++){
-    TH_DEBUG("\n   ");
-    for(x=0;x< (w+15)/16;x++,i++)
-      TH_DEBUG("%x", (_dec->state.frags[i].coded!=0));
-  }
-  TH_DEBUG("\n}\n");
-  
-  if(i!=_dec->state.nfrags)
-    TH_DEBUG("WARNING!  block count, raster %d != flat %d\n",
-	     i,_dec->state.nfrags);
-#endif	      
-
 }
 
 
@@ -592,7 +519,6 @@
   int                  mode_scheme;
   theora_read(&_dec->opb,3,&val);
   mode_scheme=(int)val;
-  TH_DEBUG("mode encode scheme = %d\n",(int)val);
 
   if(mode_scheme==0){
     int mi;
@@ -600,14 +526,11 @@
       If the bitstream doesn't contain each index exactly once, it's likely
        corrupt and the rest of the packet is garbage anyway, but this way we
        won't crash, and we'll decode SOMETHING.*/
-    TH_DEBUG("mode scheme list = { ");
     for(mi=0;mi<OC_NMODES;mi++)scheme0_alphabet[mi]=OC_MODE_INTER_NOMV;
     for(mi=0;mi<OC_NMODES;mi++){
       theora_read(&_dec->opb,3,&val);
       scheme0_alphabet[val]=OC_MODE_ALPHABETS[6][mi];
-      TH_DEBUG("%d ",(int)val);
     }
-    TH_DEBUG("}\n");
     alphabet=scheme0_alphabet;
   }else 
     alphabet=OC_MODE_ALPHABETS[mode_scheme-1];
@@ -618,7 +541,6 @@
   mb=_dec->state.mbs;
   mb_end=mb+_dec->state.nmbs;
 
-  TH_DEBUG("mode list = { ");
   for(j=0;mb<mb_end;mb++){
     if(mb->mode!=OC_MODE_INVALID){
       int bi;
@@ -630,18 +552,10 @@
       if(bi<4){
 	mb->mode=alphabet[(*mode_unpack)(&_dec->opb)];
 	
-#ifdef _TH_DEBUG_
-	if((j&0x1f)==0)
-	  TH_DEBUG("\n   ");
-	TH_DEBUG("%d ",mb->mode);
-	j++;
-#endif
-
       }else 
 	mb->mode=OC_MODE_INTER_NOMV;
     }
   }
-  TH_DEBUG("\n}\n");
 }
 
 
@@ -703,14 +617,10 @@
   const int              *map_idxs;
   long                    val;
   int                     map_nidxs;
-#ifdef _TH_DEBUG_
-  int                     j=0;
-#endif
   oc_mv                   last_mv[2];
   oc_mv                   cbmvs[4];
   set_chroma_mvs=OC_SET_CHROMA_MVS_TABLE[_dec->state.info.pixel_fmt];
   theora_read1(&_dec->opb,&val);
-  TH_DEBUG("motion vector table = %d\n",(int)val);
   mv_comp_unpack=val?oc_clc_mv_comp_unpack:oc_vlc_mv_comp_unpack;
   map_idxs=OC_MB_MAP_IDXS[_dec->state.info.pixel_fmt];
   map_nidxs=OC_MB_MAP_NIDXS[_dec->state.info.pixel_fmt];
@@ -718,8 +628,6 @@
   mb=_dec->state.mbs;
   mb_end=mb+_dec->state.nmbs;
 
-  TH_DEBUG("motion vectors = {");
-
   for(;mb<mb_end;mb++)if(mb->mode!=OC_MODE_INVALID){
     oc_fragment *frag;
     oc_mv        mbmv;
@@ -754,14 +662,6 @@
 	    frag->mbmode=mb_mode;
 	    frag->mv[0]=lbmvs[bi][0]=(signed char)(*mv_comp_unpack)(&_dec->opb);
 	    frag->mv[1]=lbmvs[bi][1]=(signed char)(*mv_comp_unpack)(&_dec->opb);
-
-#ifdef _TH_DEBUG_
-	    if((j&0x7)==0)
-	      TH_DEBUG("\n   ");
-	    TH_DEBUG("%+03d,%+03d ",frag->mv[0],frag->mv[1]);
-	    j++;
-#endif
-
 	  }
 	  else lbmvs[bi][0]=lbmvs[bi][1]=0;
 	}
@@ -790,14 +690,6 @@
 	last_mv[1][1]=last_mv[0][1];
 	mbmv[0]=last_mv[0][0]=(signed char)(*mv_comp_unpack)(&_dec->opb);
 	mbmv[1]=last_mv[0][1]=(signed char)(*mv_comp_unpack)(&_dec->opb);
-
-#ifdef _TH_DEBUG_
-	if((j&0x7)==0)
-	  TH_DEBUG("\n   ");
-	TH_DEBUG("%+03d,%+03d ",mbmv[0],mbmv[1]);
-	j++;
-#endif
-
       }
       break;
     case OC_MODE_INTER_MV_LAST:
@@ -820,14 +712,6 @@
       {
         mbmv[0]=(signed char)(*mv_comp_unpack)(&_dec->opb);
         mbmv[1]=(signed char)(*mv_comp_unpack)(&_dec->opb);
-
-#ifdef _TH_DEBUG_
-	if((j&0x7)==0)
-	  TH_DEBUG("\n   ");
-	TH_DEBUG("%+03d,%+03d ",mbmv[0],mbmv[1]);
-	j++;
-#endif
-
       }
       break;
     default:
@@ -847,9 +731,6 @@
       }
     }
   }
-
-  TH_DEBUG("\n}\n");
-
 }
 
 static void oc_dec_block_qis_unpack(oc_dec_ctx *_dec){
@@ -1575,9 +1456,6 @@
   for(fragy=fragy0;fragy<fragy_end;fragy++){
     for(fragx=0;fragx<fplane->nhfrags;fragx++,frag++){
       if(!frag->coded)continue;
-#ifdef _TH_DEBUG_
-      frag->quant[0] = frag->dc; /* stash un-predicted dc for debug output */
-#endif
       pred_last[OC_FRAME_FOR_MODE[frag->mbmode]]=frag->dc+=
        oc_frag_pred_dc(frag,fplane,fragx,fragy,pred_last);
       ncoded_fragis++;
@@ -1669,40 +1547,6 @@
   _pipe->uncoded_fragis[_pli]-=_pipe->nuncoded_fragis[_pli];
   oc_state_frag_copy(&_dec->state,_pipe->uncoded_fragis[_pli],
    _pipe->nuncoded_fragis[_pli],OC_FRAME_SELF,OC_FRAME_PREV,_pli);
-
-#ifdef _TH_DEBUG_
-  {
-    int i,j,k;
-    int framei=_dec->state.ref_frame_idx[OC_FRAME_SELF];
-    int ystride=_dec->state.ref_frame_bufs[framei][_pli].ystride;
-    int *fragi_end = _pipe->coded_fragis[_pli];
-    int *fragi = fragi_end-_pipe->ncoded_fragis[_pli];
-
-    for(;fragi<fragi_end;fragi++){
-      oc_fragment   *frag=_dec->state.frags+*fragi;
-      unsigned char *src=frag->buffer[framei];
-      for(i=0,j=0;j<8;j++){
-	for(k=0;k<8;k++,i++)
-	  frag->recon[i] = src[k];
-	src+=ystride;
-      }
-    }
-
-    fragi = _pipe->uncoded_fragis[_pli];
-    fragi_end = fragi+_pipe->nuncoded_fragis[_pli];
-
-    for(;fragi<fragi_end;fragi++){
-      oc_fragment   *frag=_dec->state.frags+*fragi;
-      unsigned char *src=frag->buffer[framei];
-      for(i=0,j=0;j<8;j++){
-	for(k=0;k<8;k++,i++)
-	  frag->recon[i] = src[k];
-	src+=ystride;
-      }
-    }
-  }
-#endif
-    
 }
 
 /*Filter a horizontal block edge.*/
@@ -2119,13 +1963,17 @@
   }break;
 #ifdef HAVE_CAIRO
   case TH_DECCTL_SET_TELEMETRY_MBMODE:{
+    if(_dec==NULL||_buf==NULL)return TH_EFAULT;
+    if(_buf_sz!=sizeof(int))return TH_EINVAL;
     _dec->telemetry = 1;
-    _dec->telemetry_mbmode = 1;
+    _dec->telemetry_mbmode = *(int *)_buf;
     return 0;
   }break;
   case TH_DECCTL_SET_TELEMETRY_MV:{
+    if(_dec==NULL||_buf==NULL)return TH_EFAULT;
+    if(_buf_sz!=sizeof(int))return TH_EINVAL;
     _dec->telemetry = 1;
-    _dec->telemetry_mv = 1;
+    _dec->telemetry_mv = *(int *)_buf;
     return 0;
   }break;
 #endif
@@ -2305,90 +2153,6 @@
       notstart=1;
     }
 
-#ifdef _TH_DEBUG_
-    {
-      int x,y,i,j,k,xn,yn;
-      int plane;
-      int buf;
-
-      /* dump fragment DCT components */
-      for(plane=0;plane<3;plane++){
-	char *plstr;
-	int offset;
-	switch(plane){
-	case 0:
-	  plstr="Y";
-	  xn = _dec->state.info.frame_width>>3;
-	  yn = _dec->state.info.frame_height>>3;
-	  offset = 0; 
-	  break;
-	case 1:
-	  plstr="U";
-	  xn = _dec->state.info.frame_width>>4;
-	  yn = _dec->state.info.frame_height>>4;
-	  offset = xn*yn*4;
-	  break;
-	case 2:
-	  plstr="V";
-	  xn = _dec->state.info.frame_width>>4;
-	  yn = _dec->state.info.frame_height>>4;
-	  offset = xn*yn*5;
-	  break;
-	}
-	for(y=0;y<yn;y++){
-	  for(x=0;x<xn;x++,i++){
-	    
-	    for(buf=0;buf<4;buf++){
-	      int *ptr;
-	      char *bufn;
-	      int codecheck=0;
-
-	      i = offset + y*xn + x;
-
-	      switch(buf){
-	      case 0:
-		codecheck=1;
-		bufn = "coded";
-		ptr = _dec->state.frags[i].quant;
-		break;
-	      case 1:
-		codecheck=1;
-		bufn = "coeff";
-		ptr = _dec->state.frags[i].freq;
-		break;
-	      case 2:
-		codecheck=1;
-		bufn = "idct";
-		ptr = _dec->state.frags[i].time;
-		break;
-	      case 3:
-		bufn = "recon";
-		ptr = _dec->state.frags[i].loop;
-		break;
-	      }
-	      
-	      
-	      TH_DEBUG("%s %s [%d][%d] = {",bufn,plstr,x,y);
-	      if(codecheck && !_dec->state.frags[i].coded)
-		TH_DEBUG(" not coded }\n");
-	      else{
-		int l=0;
-		for(j=0;j<8;j++){
-		  TH_DEBUG("\n   ");
-		  for(k=0;k<8;k++,l++){
-		    TH_DEBUG("%d ",ptr[l]);
-		  }
-		}
-		TH_DEBUG(" }\n");
-	      }
-	    }
-	    TH_DEBUG("\n");
-	  }
-	}
-      }
-    }
-#endif
-
     /*Finish filling in the reference frame borders.*/
     for(pli=0;pli<3;pli++)oc_state_borders_fill_caps(&_dec->state,refi,pli);
     /*Update the reference frame indices.*/

Modified: branches/theora-thusnelda/lib/dec/dequant.c
===================================================================
--- branches/theora-thusnelda/lib/dec/dequant.c	2008-03-12 01:14:29 UTC (rev 14578)
+++ branches/theora-thusnelda/lib/dec/dequant.c	2008-03-12 06:42:40 UTC (rev 14579)
@@ -128,64 +128,6 @@
     while(qri-->0);
   }
 
-#ifdef _TH_DEBUG_
-  /* dump the tables */
-  {
-    int i, j, k, l, m;
-    TH_DEBUG("loop filter limits = {");
-    for(i=0;i<64;){
-      TH_DEBUG("\n        ");
-      for(j=0;j<16;i++,j++)
-	TH_DEBUG("%3d ",_qinfo->loop_filter_limits[i]);
-    }
-    TH_DEBUG("\n}\n\n");
-
-    TH_DEBUG("ac scale = {");
-    for(i=0;i<64;){
-      TH_DEBUG("\n        ");
-      for(j=0;j<16;i++,j++)
-	TH_DEBUG("%3d ",_qinfo->ac_scale[i]);
-    }
-    TH_DEBUG("\n}\n\n");
-
-    TH_DEBUG("dc scale = {");
-    for(i=0;i<64;){
-      TH_DEBUG("\n        ");
-      for(j=0;j<16;i++,j++)
-	TH_DEBUG("%3d ",_qinfo->dc_scale[i]);
-    }
-    TH_DEBUG("\n}\n\n");
-
-    for(k=0;k<2;k++)
-      for(l=0;l<3;l++){
-	char *name[2][3]={
-	  {"intra Y bases","intra U bases", "intra V bases"},
-	  {"inter Y bases","inter U bases", "inter V bases"}
-	};
-
-	th_quant_ranges *r = &_qinfo->qi_ranges[k][l];
-	TH_DEBUG("%s = {\n",name[k][l]);
-	TH_DEBUG("        ranges = %d\n",r->nranges);
-	TH_DEBUG("        intervals = { ");
-	for(i=0;i<r->nranges;i++)
-	  TH_DEBUG("%3d ",r->sizes[i]);
-	TH_DEBUG("}\n");
-	TH_DEBUG("\n        matricies = { ");
-	for(m=0;m<r->nranges+1;m++){
-	  TH_DEBUG("\n          { ");
-	  for(i=0;i<64;){
-	    TH_DEBUG("\n            ");
-	    for(j=0;j<8;i++,j++)
-	      TH_DEBUG("%3d ",r->base_matrices[m][i]);
-	  }
-	  TH_DEBUG("\n          }");
-	}
-	TH_DEBUG("\n        }\n");
-      }
-  }
-    
-#endif
-
   _ogg_free(base_mats);
   return 0;
 }

Modified: branches/theora-thusnelda/lib/dec/quant.c
===================================================================
--- branches/theora-thusnelda/lib/dec/quant.c	2008-03-12 01:14:29 UTC (rev 14578)
+++ branches/theora-thusnelda/lib/dec/quant.c	2008-03-12 06:42:40 UTC (rev 14579)
@@ -130,24 +130,4 @@
       }
     }
   }
-
-#ifdef _TH_DEBUG_
-  int i, j, k, l;
-  /* dump the calculated quantizer tables */
-  for(i=0;i<2;i++){
-    for(j=0;j<3;j++){
-      for(k=0;k<64;k++){
-	TH_DEBUG("quantizer table [%s][%s][Q%d] = {",
-		 (i==0?"intra":"inter"),(j==0?"Y":(j==1?"U":"V")),k);
-	for(l=0;l<64;l++){
-	  if((l&7)==0)
-	    TH_DEBUG("\n   ");
-	  TH_DEBUG("%4d ",_dequant[i][j][k][l]);
-	}
-	TH_DEBUG("}\n");
-      }
-    }
-  }
-#endif
-
 }

Modified: branches/theora-thusnelda/lib/dec/state.c
===================================================================
--- branches/theora-thusnelda/lib/dec/state.c	2008-03-12 01:14:29 UTC (rev 14578)
+++ branches/theora-thusnelda/lib/dec/state.c	2008-03-12 06:42:40 UTC (rev 14579)
@@ -848,33 +848,8 @@
 
     p=(ogg_int16_t)((ogg_int32_t)_frag->dc*_dc_iquant+15>>5);
     for(ci=0;ci<64;ci++)res_buf[ci]=p;
-
-#ifdef _TH_DEBUG_
-    {
-      int i;
-      _frag->freq[0] = _frag->dc*_dc_iquant;
-      _frag->time[0] = p;
-      for(i=1;i<64;i++){
-	_frag->quant[i] = 0;
-	_frag->freq[i] = 0;
-	_frag->time[i] = p;
-      }
-    }
-#endif
-
   }
   else{
-
-#ifdef _TH_DEBUG_
-    {
-      int i;
-      for(i=1;i<_ncoefs;i++)
-	_frag->quant[i] = _dct_coeffs[i];
-      for(;i<64;i++)
-	_frag->quant[i] = 0;
-    }
-#endif
-
     /*First, dequantize the coefficients.*/
     dct_buf[0]=(ogg_int16_t)((ogg_int32_t)_frag->dc*_dc_iquant);
     for(zzi=1;zzi<_ncoefs;zzi++){
@@ -883,20 +858,6 @@
       dct_buf[ci]=(ogg_int16_t)((ogg_int32_t)_dct_coeffs[zzi]*_ac_iquant[ci]);
     }
 
-#ifdef _TH_DEBUG_
-    for(;zzi<64;zzi++){
-      int ci;
-      ci=OC_FZIG_ZAG[zzi];
-      dct_buf[ci]=0;
-    }
-
-    {
-      int i;
-      for(i=0;i<64;i++)
-	_frag->freq[i] = dct_buf[i];
-    }
-#endif
-
     /*Then, fill in the remainder of the coefficients with 0's, and perform
        the iDCT.*/
     if(_last_zzi<10){
@@ -908,14 +869,6 @@
       oc_idct8x8_c(res_buf,dct_buf);
     }
 
-#ifdef _TH_DEBUG_
-    {
-      int i;
-      for(i=0;i<64;i++)
-	_frag->time[i] = res_buf[i];
-    }
-#endif
-
   }
   /*Fill in the target buffer.*/
   dst_framei=_state->ref_frame_idx[OC_FRAME_SELF];
@@ -1088,45 +1041,6 @@
         }
       }
 
-
-#ifdef _TH_DEBUG_
-      {
-	int i,j,k,l;
-	unsigned char *src;
-	
-	for(l=0;l<5;l++){
-	  oc_fragment *f;
-	  switch(l){
-	  case 0: 
-	    f = frag;
-	    break;
-	  case 1: /* left */
-	    if(frag == frag0)continue;
-	    f = frag-1;
-	    break;
-	  case 2: /* bottom (top once flipped) */
-	    if(frag0 == frag_top)continue;
-	    f = frag - fplane->nhfrags;
-	    break;
-	  case 3: /* right */
-	    if(frag+1 >= frag_end) continue;
-	    f = frag + 1;
-	    break;
-	  case 4: /* top (bottom once flipped) */
-	    if(frag+fplane->nhfrags >= frag_bot)continue;
-	    f = frag + fplane->nhfrags;
-	    break;
-	  }
-	  
-	  src = f->buffer[_refi];
-	  for(i=0,j=0;j<8;j++){
-	    for(k=0;k<8;k++,i++)
-	      f->loop[i] = src[k];
-	    src+=iplane->ystride;
-	  }
-	}
-      }
-#endif
       frag++;
     }
     frag0+=fplane->nhfrags;

Modified: branches/theora-thusnelda/lib/enc/dsp.c
===================================================================
--- branches/theora-thusnelda/lib/enc/dsp.c	2008-03-12 01:14:29 UTC (rev 14578)
+++ branches/theora-thusnelda/lib/enc/dsp.c	2008-03-12 06:42:40 UTC (rev 14579)
@@ -406,7 +406,6 @@
 
 void dsp_init(DspFunctions *funcs)
 {
-  /* TH_DEBUG("setting dsp functions to C defaults.\n"); */
   funcs->save_fpu = nop;
   funcs->restore_fpu = nop;
   funcs->set8x8 = set8x8__c;

Modified: branches/theora-thusnelda/lib/enc/encoder_quant.c
===================================================================
--- branches/theora-thusnelda/lib/enc/encoder_quant.c	2008-03-12 01:14:29 UTC (rev 14578)
+++ branches/theora-thusnelda/lib/enc/encoder_quant.c	2008-03-12 06:42:40 UTC (rev 14579)
@@ -20,12 +20,6 @@
 #include "codec_internal.h"
 #include "quant_lookup.h"
 
-#ifdef _TH_DEBUG_
-#include <stdio.h>
-extern FILE *debugout;
-extern long dframe;
-#endif
-
 #define OC_QUANT_MAX        (1024<<2)
 //unsigned OC_DC_QUANT_MIN[2]={4<<2,8<<2};
 //unsigned OC_AC_QUANT_MIN[2]={2<<2,4<<2};
@@ -194,82 +188,6 @@
       }
     }
   }
-
-#ifdef _TH_DEBUG_
-  int i, j, k, l;
-
-  /* dump the static tables */
-  {
-    int i, j, k, l, m;
-    TH_DEBUG("loop filter limits = {");
-    for(i=0;i<64;){
-      TH_DEBUG("\n        ");
-      for(j=0;j<16;i++,j++)
-	TH_DEBUG("%3d ",qinfo->loop_filter_limits[i]);
-    }
-    TH_DEBUG("\n}\n\n");
-
-    TH_DEBUG("ac scale = {");
-    for(i=0;i<64;){
-      TH_DEBUG("\n        ");
-      for(j=0;j<16;i++,j++)
-	TH_DEBUG("%3d ",qinfo->ac_scale[i]);
-    }
-    TH_DEBUG("\n}\n\n");
-
-    TH_DEBUG("dc scale = {");
-    for(i=0;i<64;){
-      TH_DEBUG("\n        ");
-      for(j=0;j<16;i++,j++)
-	TH_DEBUG("%3d ",qinfo->dc_scale[i]);
-    }
-    TH_DEBUG("\n}\n\n");
-
-    for(k=0;k<2;k++)
-      for(l=0;l<3;l++){
-	char *name[2][3]={
-	  {"intra Y bases","intra U bases", "intra V bases"},
-	  {"inter Y bases","inter U bases", "inter V bases"}
-	};
-
-	th_quant_ranges *r = &qinfo->qi_ranges[k][l];
-	TH_DEBUG("%s = {\n",name[k][l]);
-	TH_DEBUG("        ranges = %d\n",r->nranges);
-	TH_DEBUG("        intervals = { ");
-	for(i=0;i<r->nranges;i++)
-	  TH_DEBUG("%3d ",r->sizes[i]);
-	TH_DEBUG("}\n");
-	TH_DEBUG("\n        matricies = { ");
-	for(m=0;m<r->nranges+1;m++){
-	  TH_DEBUG("\n          { ");
-	  for(i=0;i<64;){
-	    TH_DEBUG("\n            ");
-	    for(j=0;j<8;i++,j++)
-	      TH_DEBUG("%3d ",r->base_matrices[m][i]);
-	  }
-	  TH_DEBUG("\n          }");
-	}
-	TH_DEBUG("\n        }\n");
-      }
-  }
-
-  /* dump the calculated quantizer tables */
-  for(i=0;i<2;i++){
-    for(j=0;j<3;j++){
-      for(k=0;k<64;k++){
-	TH_DEBUG("quantizer table [%s][%s][Q%d] = {",
-		 (i==0?"intra":"inter"),(j==0?"Y":(j==1?"U":"V")),k);
-	for(l=0;l<64;l++){
-	  if((l&7)==0)
-	    TH_DEBUG("\n   ");
-	  TH_DEBUG("%4d ",pbi->quant_tables[i][j][k][l]);
-	}
-	TH_DEBUG("}\n");
-      }
-    }
-  }
-#endif
-
 }
 
 void quantize( CP_INSTANCE *cpi,

Modified: branches/theora-thusnelda/lib/enc/mode.c
===================================================================
--- branches/theora-thusnelda/lib/enc/mode.c	2008-03-12 01:14:29 UTC (rev 14578)
+++ branches/theora-thusnelda/lib/enc/mode.c	2008-03-12 06:42:40 UTC (rev 14579)
@@ -492,8 +492,8 @@
 	cost[CODE_INTER_FOURMV] = MBInter4Cost420(cpi,qi,mbi,mb->mv,0);
 	
 	/* add estimated labelling cost for each mode */
-	for(i = 0; i < 8; i++)
-	  cost[i] += oc_mode_cost(cpi,i) << OC_BIT_SCALE;
+	//for(i = 0; i < 8; i++)
+	//cost[i] += oc_mode_cost(cpi,i) << OC_BIT_SCALE;
 	
 	/* Add the motion vector bits for each mode that requires them.*/
 	mb_mv_bits_0  = MvBits[mb->analysis_mv[0][0].x + MAX_MV_EXTENT] + 

Modified: branches/theora-thusnelda/lib/enc/x86_32/dct_decode_mmx.c
===================================================================
--- branches/theora-thusnelda/lib/enc/x86_32/dct_decode_mmx.c	2008-03-12 01:14:29 UTC (rev 14578)
+++ branches/theora-thusnelda/lib/enc/x86_32/dct_decode_mmx.c	2008-03-12 06:42:40 UTC (rev 14579)
@@ -176,7 +176,6 @@
 /* install our implementation in the function table */
 void dsp_mmx_dct_decode_init(DspFunctions *funcs)
 {
-  TH_DEBUG("enabling accelerated x86_32 mmx dct decode functions.\n");
   funcs->FilterVert = FilterVert__mmx;
   funcs->FilterHoriz = FilterHoriz__mmx;
 }

Modified: branches/theora-thusnelda/lib/enc/x86_32/dsp_mmx.c
===================================================================
--- branches/theora-thusnelda/lib/enc/x86_32/dsp_mmx.c	2008-03-12 01:14:29 UTC (rev 14578)
+++ branches/theora-thusnelda/lib/enc/x86_32/dsp_mmx.c	2008-03-12 06:42:40 UTC (rev 14579)
@@ -638,7 +638,6 @@
 
 void dsp_mmx_init(DspFunctions *funcs)
 {
-  TH_DEBUG("enabling accelerated x86_32 mmx dsp functions.\n");
   funcs->restore_fpu = restore_fpu;
   funcs->sub8x8 = sub8x8__mmx;
   funcs->sub8x8_128 = sub8x8_128__mmx;

Modified: branches/theora-thusnelda/lib/enc/x86_32/dsp_mmxext.c
===================================================================
--- branches/theora-thusnelda/lib/enc/x86_32/dsp_mmxext.c	2008-03-12 01:14:29 UTC (rev 14578)
+++ branches/theora-thusnelda/lib/enc/x86_32/dsp_mmxext.c	2008-03-12 06:42:40 UTC (rev 14579)
@@ -329,7 +329,6 @@
 
 void dsp_mmxext_init(DspFunctions *funcs)
 {
-  TH_DEBUG("enabling accelerated x86_32 mmxext dsp functions.\n");
   funcs->row_sad8 = row_sad8__mmxext;
   funcs->col_sad8x8 = col_sad8x8__mmxext;
   funcs->sad8x8 = sad8x8__mmxext;

Modified: branches/theora-thusnelda/lib/enc/x86_32/fdct_mmx.c
===================================================================
--- branches/theora-thusnelda/lib/enc/x86_32/fdct_mmx.c	2008-03-12 01:14:29 UTC (rev 14578)
+++ branches/theora-thusnelda/lib/enc/x86_32/fdct_mmx.c	2008-03-12 06:42:40 UTC (rev 14579)
@@ -333,7 +333,6 @@
 /* install our implementation in the function table */
 void dsp_mmx_fdct_init(DspFunctions *funcs)
 {
-  TH_DEBUG("enabling accelerated x86_32 mmx fdct function.\n");
   funcs->fdct_short = fdct_short__mmx;
 }
 

Modified: branches/theora-thusnelda/lib/enc/x86_32/idct_mmx.c
===================================================================
--- branches/theora-thusnelda/lib/enc/x86_32/idct_mmx.c	2008-03-12 01:14:29 UTC (rev 14578)
+++ branches/theora-thusnelda/lib/enc/x86_32/idct_mmx.c	2008-03-12 06:42:40 UTC (rev 14579)
@@ -1444,7 +1444,6 @@
 /* install our implementation in the function table */
 void dsp_mmx_idct_init(DspFunctions *funcs)
 {
-  TH_DEBUG("enabling accelerated x86_32 mmx idct functions.\n");
   funcs->IDctSlow = IDctSlow__mmx;
   funcs->IDct10 = IDct10__mmx;
   funcs->IDct3 = IDct3__mmx;

Modified: branches/theora-thusnelda/lib/enc/x86_32/recon_mmx.c
===================================================================
--- branches/theora-thusnelda/lib/enc/x86_32/recon_mmx.c	2008-03-12 01:14:29 UTC (rev 14578)
+++ branches/theora-thusnelda/lib/enc/x86_32/recon_mmx.c	2008-03-12 06:42:40 UTC (rev 14579)
@@ -97,7 +97,6 @@
 
 void dsp_mmx_recon_init(DspFunctions *funcs)
 {
-  TH_DEBUG("enabling accelerated x86_32 mmx recon functions.\n");
   funcs->copy8x8 = copy8x8__mmx;
   funcs->recon8x8 = recon8x8__mmx;
 }

Modified: branches/theora-thusnelda/lib/enc/x86_32_vs/dsp_mmx.c
===================================================================
--- branches/theora-thusnelda/lib/enc/x86_32_vs/dsp_mmx.c	2008-03-12 01:14:29 UTC (rev 14578)
+++ branches/theora-thusnelda/lib/enc/x86_32_vs/dsp_mmx.c	2008-03-12 06:42:40 UTC (rev 14579)
@@ -1587,7 +1587,6 @@
 
 void dsp_mmx_init(DspFunctions *funcs)
 {
-  TH_DEBUG("enabling accelerated x86_32 mmx dsp functions.\n");
   funcs->restore_fpu = restore_fpu;
   funcs->sub8x8 = sub8x8__mmx;
   funcs->sub8x8_128 = sub8x8_128__mmx;

Modified: branches/theora-thusnelda/lib/enc/x86_32_vs/fdct_mmx.c
===================================================================
--- branches/theora-thusnelda/lib/enc/x86_32_vs/fdct_mmx.c	2008-03-12 01:14:29 UTC (rev 14578)
+++ branches/theora-thusnelda/lib/enc/x86_32_vs/fdct_mmx.c	2008-03-12 06:42:40 UTC (rev 14579)
@@ -329,6 +329,5 @@
 
 void dsp_mmx_fdct_init(DspFunctions *funcs)
 {
-  TH_DEBUG("enabling accelerated x86_32 mmx fdct function.\n");
   funcs->fdct_short = fdct_short__mmx;
 }

Modified: branches/theora-thusnelda/lib/enc/x86_32_vs/recon_mmx.c
===================================================================
--- branches/theora-thusnelda/lib/enc/x86_32_vs/recon_mmx.c	2008-03-12 01:14:29 UTC (rev 14578)
+++ branches/theora-thusnelda/lib/enc/x86_32_vs/recon_mmx.c	2008-03-12 06:42:40 UTC (rev 14579)
@@ -97,7 +97,6 @@
 
 void dsp_mmx_recon_init(DspFunctions *funcs)
 {
-  TH_DEBUG("enabling accelerated x86_32 mmx recon functions.\n");
   funcs->copy8x8 = copy8x8__mmx;
   funcs->recon8x8 = recon8x8__mmx;
 }

Modified: branches/theora-thusnelda/lib/enc/x86_64/dsp_mmx.c
===================================================================
--- branches/theora-thusnelda/lib/enc/x86_64/dsp_mmx.c	2008-03-12 01:14:29 UTC (rev 14578)
+++ branches/theora-thusnelda/lib/enc/x86_64/dsp_mmx.c	2008-03-12 06:42:40 UTC (rev 14579)
@@ -287,7 +287,6 @@
 
 void dsp_mmx_init(DspFunctions *funcs)
 {
-  TH_DEBUG("setting accelerated x86_64 mmx dsp functions.\n");
   funcs->restore_fpu = restore_fpu;
   funcs->sub8x8 = sub8x8__mmx;
   funcs->sub8x8_128 = sub8x8_128__mmx;

Modified: branches/theora-thusnelda/lib/enc/x86_64/dsp_mmxext.c
===================================================================
--- branches/theora-thusnelda/lib/enc/x86_64/dsp_mmxext.c	2008-03-12 01:14:29 UTC (rev 14578)
+++ branches/theora-thusnelda/lib/enc/x86_64/dsp_mmxext.c	2008-03-12 06:42:40 UTC (rev 14579)
@@ -305,7 +305,6 @@
 
 void dsp_mmxext_init(DspFunctions *funcs)
 {
-  TH_DEBUG("enabling accerated x86_64 mmxext dsp functions.\n");
   funcs->row_sad8 = row_sad8__mmxext;
   funcs->col_sad8x8 = col_sad8x8__mmxext;
   funcs->sad8x8 = sad8x8__mmxext;

Modified: branches/theora-thusnelda/lib/enc/x86_64/fdct_mmx.c
===================================================================
--- branches/theora-thusnelda/lib/enc/x86_64/fdct_mmx.c	2008-03-12 01:14:29 UTC (rev 14578)
+++ branches/theora-thusnelda/lib/enc/x86_64/fdct_mmx.c	2008-03-12 06:42:40 UTC (rev 14579)
@@ -336,7 +336,6 @@
 /* install our implementation in the function table */
 void dsp_mmx_fdct_init(DspFunctions *funcs)
 {
-  TH_DEBUG("enabling accelerated x86_64 mmx fdct function.\n");
   funcs->fdct_short = fdct_short__mmx;
 }
 

Modified: branches/theora-thusnelda/lib/enc/x86_64/recon_mmx.c
===================================================================
--- branches/theora-thusnelda/lib/enc/x86_64/recon_mmx.c	2008-03-12 01:14:29 UTC (rev 14578)
+++ branches/theora-thusnelda/lib/enc/x86_64/recon_mmx.c	2008-03-12 06:42:40 UTC (rev 14579)
@@ -100,7 +100,6 @@
 
 void dsp_mmx_recon_init(DspFunctions *funcs)
 {
-  TH_DEBUG("enabling accelerated x86_64 mmx recon functions.\n");
   funcs->copy8x8 = copy8x8__mmx;
   funcs->recon8x8 = recon8x8__mmx;
 }

Modified: branches/theora-thusnelda/lib/internal.h
===================================================================
--- branches/theora-thusnelda/lib/internal.h	2008-03-12 01:14:29 UTC (rev 14578)
+++ branches/theora-thusnelda/lib/internal.h	2008-03-12 06:42:40 UTC (rev 14579)
@@ -27,16 +27,6 @@
 # include "dec/huffman.h"
 # include "dec/quant.h"
 
-/* debug macros */
-#ifdef _TH_DEBUG_
-#include <stdio.h>
-extern long dframe;
-extern FILE *debugout;
-#define TH_DEBUG(...) fprintf(debugout, __VA_ARGS__)
-#else
-#define TH_DEBUG(...)
-#endif
-
 /*Thank you Microsoft, I know the order of operations.*/
 # if defined(_MSC_VER)
 #  pragma warning(disable:4554)
@@ -234,13 +224,6 @@
   /*The motion vector used for this fragment.*/
   oc_mv           mv;
 
-#ifdef _TH_DEBUG_
-  int quant[64];
-  int freq[64];
-  int time[64];
-  int recon[64];
-  int loop[64];
-#endif
 }oc_fragment;
 
 



More information about the commits mailing list