[xiph-commits] r9824 - branches/theora-oil/lib

j at svn.xiph.org j at svn.xiph.org
Sun Aug 21 12:42:26 PDT 2005


Author: j
Date: 2005-08-21 12:42:23 -0700 (Sun, 21 Aug 2005)
New Revision: 9824

Modified:
   branches/theora-oil/lib/dct_decode.c
Log:
remove some variables in relation to CopyBlock

Modified: branches/theora-oil/lib/dct_decode.c
===================================================================
--- branches/theora-oil/lib/dct_decode.c	2005-08-21 14:50:47 UTC (rev 9823)
+++ branches/theora-oil/lib/dct_decode.c	2005-08-21 19:42:23 UTC (rev 9824)
@@ -134,16 +134,12 @@
 void CopyBlock(unsigned char *src,
                unsigned char *dest,
                unsigned int srcstride){
-  unsigned char *s = src;
-  unsigned char *d = dest;
-  unsigned int stride = srcstride;
-
   int j;
   for ( j = 0; j < 8; j++ ){
-    ((ogg_uint32_t*)d)[0] = ((ogg_uint32_t*)s)[0];
-    ((ogg_uint32_t*)d)[1] = ((ogg_uint32_t*)s)[1];
-    s+=stride;
-    d+=stride;
+    ((ogg_uint32_t*)dest)[0] = ((ogg_uint32_t*)src)[0];
+    ((ogg_uint32_t*)dest)[1] = ((ogg_uint32_t*)src)[1];
+    src+=srcstride;
+    dest+=srcstride;
   }
 }
 #endif
@@ -480,9 +476,6 @@
   ogg_uint32_t  PlaneLineStep; /* Pixels per line */
   ogg_uint32_t  PixelIndex;
 
-  unsigned char  *SrcPtr;      /* Pointer to line of source image data */
-  unsigned char  *DestPtr;     /* Pointer to line of destination image data */
-
   /* Copy over only updated blocks.*/
 
   /* First Y plane */
@@ -490,10 +483,7 @@
   for ( i = 0; i < pbi->YPlaneFragments; i++ ) {
     if ( pbi->display_fragments[i] ) {
       PixelIndex = pbi->recon_pixel_index_table[i];
-      SrcPtr = &SrcReconPtr[ PixelIndex ];
-      DestPtr = &DestReconPtr[ PixelIndex ];
-
-      CopyBlock(SrcPtr, DestPtr, PlaneLineStep);
+      CopyBlock(&SrcReconPtr[ PixelIndex ], &DestReconPtr[ PixelIndex ], PlaneLineStep);
     }
   }
 
@@ -502,11 +492,7 @@
   for ( i = pbi->YPlaneFragments; i < pbi->UnitFragments; i++ ) {
     if ( pbi->display_fragments[i] ) {
       PixelIndex = pbi->recon_pixel_index_table[i];
-      SrcPtr = &SrcReconPtr[ PixelIndex ];
-      DestPtr = &DestReconPtr[ PixelIndex ];
-
-      CopyBlock(SrcPtr, DestPtr, PlaneLineStep);
-
+      CopyBlock(&SrcReconPtr[ PixelIndex ], &DestReconPtr[ PixelIndex ], PlaneLineStep);
     }
   }
 }
@@ -517,9 +503,6 @@
   ogg_uint32_t  PlaneLineStep; /* Pixels per line */
   ogg_uint32_t  PixelIndex;
 
-  unsigned char  *SrcPtr;      /* Pointer to line of source image data */
-  unsigned char  *DestPtr;     /* Pointer to line of destination image data*/
-
   /* Copy over only updated blocks. */
 
   /* First Y plane */
@@ -527,10 +510,7 @@
   for ( i = 0; i < pbi->YPlaneFragments; i++ ) {
     if ( !pbi->display_fragments[i] ) {
       PixelIndex = pbi->recon_pixel_index_table[i];
-      SrcPtr = &SrcReconPtr[ PixelIndex ];
-      DestPtr = &DestReconPtr[ PixelIndex ];
-
-      CopyBlock(SrcPtr, DestPtr, PlaneLineStep);
+      CopyBlock(&SrcReconPtr[ PixelIndex ], &DestReconPtr[ PixelIndex ], PlaneLineStep);
     }
   }
 
@@ -539,11 +519,7 @@
   for ( i = pbi->YPlaneFragments; i < pbi->UnitFragments; i++ ) {
     if ( !pbi->display_fragments[i] ) {
       PixelIndex = pbi->recon_pixel_index_table[i];
-      SrcPtr = &SrcReconPtr[ PixelIndex ];
-      DestPtr = &DestReconPtr[ PixelIndex ];
-
-      CopyBlock(SrcPtr, DestPtr, PlaneLineStep);
-
+      CopyBlock(&SrcReconPtr[ PixelIndex ], &DestReconPtr[ PixelIndex ], PlaneLineStep);
     }
   }
 }



More information about the commits mailing list