[xiph-commits] r14698 - branches/theora-thusnelda/lib/enc

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Thu Apr 10 19:27:52 PDT 2008


Author: xiphmont
Date: 2008-04-10 19:27:50 -0700 (Thu, 10 Apr 2008)
New Revision: 14698

Modified:
   branches/theora-thusnelda/lib/enc/dct_decode.c
Log:
Clear out some useless complexity in reconstruction.



Modified: branches/theora-thusnelda/lib/enc/dct_decode.c
===================================================================
--- branches/theora-thusnelda/lib/enc/dct_decode.c	2008-04-10 20:16:41 UTC (rev 14697)
+++ branches/theora-thusnelda/lib/enc/dct_decode.c	2008-04-11 02:27:50 UTC (rev 14698)
@@ -164,27 +164,6 @@
   UpdateUMV_HBorders( cpi, DestReconPtr, 2);
 }
 
-static void CopyRecon( CP_INSTANCE *cpi, unsigned char * DestReconPtr,
-		       unsigned char * SrcReconPtr ) {
-  ogg_uint32_t  i,plane;
-  unsigned char *cp = cpi->frag_coded;
-  ogg_uint32_t *bi = cpi->frag_buffer_index;
-  int j = 0;
-
-  /* Copy over only updated blocks.*/
-  for(plane=0;plane<3;plane++){  
-    int PlaneLineStep = cpi->stride[plane];
-    for ( i = 0; i < cpi->frag_n[plane]; i++, j++ ) {
-      if ( cp[j] ) {
-	int pi= bi[j];
-	unsigned char *src = &SrcReconPtr[ pi ];
-	unsigned char *dst = &DestReconPtr[ pi ];
-	dsp_copy8x8 (cpi->dsp, src, dst, PlaneLineStep);
-      }
-    }
-  }
-}
-
 static void FilterHoriz__c(unsigned char * PixelPtr,
 			   ogg_int32_t LineLength,
 			   ogg_int16_t *BoundingValuePtr){
@@ -478,13 +457,9 @@
   /* We may need to update the UMV border */
   UpdateUMVBorder(cpi, cpi->lastrecon);
   
-  /* Reconstruct the golden frame if necessary.
-     For VFW codec only on key frames */
-  if ( cpi->FrameType == KEY_FRAME ){
-    CopyRecon( cpi, cpi->golden, cpi->lastrecon );
-    /* We may need to update the UMV border */
-    UpdateUMVBorder(cpi, cpi->golden);
-  }
+  if ( cpi->FrameType == KEY_FRAME )
+    memcpy(cpi->golden,cpi->lastrecon,sizeof(*cpi->lastrecon)*cpi->frame_size);
+
 }
 
 void dsp_dct_decode_init (DspFunctions *funcs, ogg_uint32_t cpu_flags)



More information about the commits mailing list