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

xiphmont at svn.xiph.org xiphmont at svn.xiph.org
Thu Nov 15 03:36:07 PST 2007


Author: xiphmont
Date: 2007-11-15 03:36:07 -0800 (Thu, 15 Nov 2007)
New Revision: 14149

Modified:
   branches/theora-thusnelda/lib/enc/codec_internal.h
   branches/theora-thusnelda/lib/enc/dct_encode.c
   branches/theora-thusnelda/lib/enc/encode.c
   branches/theora-thusnelda/lib/enc/encoder_toplevel.c
   branches/theora-thusnelda/lib/enc/mcomp.c
   branches/theora-thusnelda/lib/enc/misc_common.c
   branches/theora-thusnelda/lib/enc/scan.c
Log:
Remove more code and minor metrics that appear to either be useless or have no function whatsoever.



Modified: branches/theora-thusnelda/lib/enc/codec_internal.h
===================================================================
--- branches/theora-thusnelda/lib/enc/codec_internal.h	2007-11-15 08:45:38 UTC (rev 14148)
+++ branches/theora-thusnelda/lib/enc/codec_internal.h	2007-11-15 11:36:07 UTC (rev 14149)
@@ -104,7 +104,6 @@
 typedef struct{
   unsigned char * Yuv0ptr;
   unsigned char * Yuv1ptr;
-  unsigned char * SrfWorkSpcPtr;
   unsigned char * disp_fragments;
 
   ogg_uint32_t  * RegionIndex; /* Gives pixel index for top left of
@@ -611,7 +610,6 @@
 
   /*********************************************************************/
   /* Frames  Used in the selecetive convolution filtering of the Y plane. */
-  unsigned char    *ConvDestBuffer;
   YUV_BUFFER_ENTRY *yuv0ptr;
   YUV_BUFFER_ENTRY *yuv1ptr;
   /*********************************************************************/
@@ -644,8 +642,6 @@
   unsigned char    *PartiallyCodedMbPatterns;
   unsigned char    *UncodedMbFlags;
 
-  unsigned char    *extra_fragments;   /* extra updates not
-                                          recommended by pre-processor */
   ogg_int16_t      *PredictedDC;
 
   ogg_uint32_t     *FragmentLastQ;     /* Array used to keep track of
@@ -656,7 +652,6 @@
   ogg_uint32_t     *FragTokenCounts;   /* Number of tokens per fragment */
 
   ogg_uint32_t     *RunHuffIndices;
-  ogg_uint32_t     *LastCodedErrorScore;
   ogg_uint32_t     *ModeList;
   MOTION_VECTOR    *MVList;
 
@@ -841,7 +836,6 @@
 extern void UpRegulateDataStream (CP_INSTANCE *cpi, ogg_uint32_t RegulationQ,
                                   ogg_int32_t RecoveryBlocks ) ;
 extern void RegulateQ( CP_INSTANCE *cpi, ogg_int32_t UpdateScore );
-extern void CopyBackExtraFrags(CP_INSTANCE *cpi);
 
 extern void UpdateUMVBorder( PB_INSTANCE *pbi,
                              unsigned char * DestReconPtr );

Modified: branches/theora-thusnelda/lib/enc/dct_encode.c
===================================================================
--- branches/theora-thusnelda/lib/enc/dct_encode.c	2007-11-15 08:45:38 UTC (rev 14148)
+++ branches/theora-thusnelda/lib/enc/dct_encode.c	2007-11-15 11:36:07 UTC (rev 14149)
@@ -418,7 +418,7 @@
   }
 
   /* adjusted / filtered pointers */
-  FiltPtr = &cpi->ConvDestBuffer[cpi->pb.pixel_index_table[FragIndex]];
+  FiltPtr = &cpi->yuv1ptr[cpi->pb.pixel_index_table[FragIndex]];
 
   if ( cpi->pb.FrameType == KEY_FRAME ) {
     /* Key frame so code block in INTRA mode. */

Modified: branches/theora-thusnelda/lib/enc/encode.c
===================================================================
--- branches/theora-thusnelda/lib/enc/encode.c	2007-11-15 08:45:38 UTC (rev 14148)
+++ branches/theora-thusnelda/lib/enc/encode.c	2007-11-15 11:36:07 UTC (rev 14149)
@@ -596,31 +596,6 @@
   }
 }
 
-static ogg_uint32_t GetBlockReconErrorSlow( CP_INSTANCE *cpi,
-                                     ogg_int32_t BlockIndex ) {
-  ogg_uint32_t  ErrorVal;
-
-  unsigned char * SrcDataPtr =
-    &cpi->ConvDestBuffer[cpi->pb.pixel_index_table[BlockIndex]];
-  unsigned char * RecDataPtr =
-    &cpi->pb.LastFrameRecon[cpi->pb.recon_pixel_index_table[BlockIndex]];
-  ogg_int32_t   SrcStride;
-  ogg_int32_t   RecStride;
-
-  /* Is the block a Y block or a UV block. */
-  if ( BlockIndex < (ogg_int32_t)cpi->pb.YPlaneFragments ) {
-    SrcStride = cpi->pb.info.width;
-    RecStride = cpi->pb.YStride;
-  }else{
-    SrcStride = cpi->pb.info.width >> 1;
-    RecStride = cpi->pb.UVStride;
-  }
-
-  ErrorVal = dsp_sad8x8 (cpi->dsp, SrcDataPtr, SrcStride, RecDataPtr, RecStride);
-
-  return ErrorVal;
-}
-
 static void PackCodedVideo (CP_INSTANCE *cpi) {
   ogg_int32_t i;
   ogg_int32_t EncodedCoeffs = 1;
@@ -961,15 +936,6 @@
 
   UpdateFragQIndex(&cpi->pb);
 
-  /* Measure the inter reconstruction error for all the blocks that
-     were coded */
-  /* for use as part of the recovery monitoring process in subsequent frames. */
-  for ( i = 0; i < cpi->pb.CodedBlockIndex; i++ ) {
-    cpi->LastCodedErrorScore[ cpi->pb.CodedBlockList[i] ] =
-      GetBlockReconErrorSlow( cpi, cpi->pb.CodedBlockList[i] );
-
-  }
-
   /* Return total number of coded pixels */
   return coded_pixels;
 }
@@ -1242,19 +1208,19 @@
         BestError = (BestError > MBIntraError) ? MBIntraError : BestError;
 
         /* Get the golden frame error */
-        MBGFError = GetMBInterError( cpi, cpi->ConvDestBuffer,
+        MBGFError = GetMBInterError( cpi, cpi->yuv1ptr,
                                      cpi->pb.GoldenFrame, YFragIndex,
                                      0, 0, PixelsPerLine );
         BestError = (BestError > MBGFError) ? MBGFError : BestError;
 
         /* Calculate the 0,0 case. */
-        MBInterError = GetMBInterError( cpi, cpi->ConvDestBuffer,
+        MBInterError = GetMBInterError( cpi, cpi->yuv1ptr,
                                         cpi->pb.LastFrameRecon,
                                         YFragIndex, 0, 0, PixelsPerLine );
         BestError = (BestError > MBInterError) ? MBInterError : BestError;
 
         /* Measure error for last MV */
-        MBLastInterError =  GetMBInterError( cpi, cpi->ConvDestBuffer,
+        MBLastInterError =  GetMBInterError( cpi, cpi->yuv1ptr,
                                              cpi->pb.LastFrameRecon,
                                              YFragIndex, LastInterMVect.x,
                                              LastInterMVect.y, PixelsPerLine );
@@ -1262,7 +1228,7 @@
           MBLastInterError : BestError;
 
         /* Measure error for prior last MV */
-        MBPriorLastInterError =  GetMBInterError( cpi, cpi->ConvDestBuffer,
+        MBPriorLastInterError =  GetMBInterError( cpi, cpi->yuv1ptr,
                                                   cpi->pb.LastFrameRecon,
                                                   YFragIndex,
                                                   PriorLastInterMVect.x,
@@ -1334,7 +1300,7 @@
                                             cpi->MVPixelOffsetY, &GFMVect );
 
           /* Measure error for last GFMV */
-          LastMBGF_MVError =  GetMBInterError( cpi, cpi->ConvDestBuffer,
+          LastMBGF_MVError =  GetMBInterError( cpi, cpi->yuv1ptr,
                                                cpi->pb.GoldenFrame,
                                                YFragIndex, LastGFMVect.x,
                                                LastGFMVect.y, PixelsPerLine );

Modified: branches/theora-thusnelda/lib/enc/encoder_toplevel.c
===================================================================
--- branches/theora-thusnelda/lib/enc/encoder_toplevel.c	2007-11-15 08:45:38 UTC (rev 14148)
+++ branches/theora-thusnelda/lib/enc/encoder_toplevel.c	2007-11-15 11:36:07 UTC (rev 14149)
@@ -154,8 +154,6 @@
 
 
 static void EClearFragmentInfo(CP_INSTANCE * cpi){
-  if(cpi->extra_fragments)
-    _ogg_free(cpi->extra_fragments);
   if(cpi->FragmentLastQ)
     _ogg_free(cpi->FragmentLastQ);
   if(cpi->FragTokens)
@@ -164,8 +162,6 @@
     _ogg_free(cpi->FragTokenCounts);
   if(cpi->RunHuffIndices)
     _ogg_free(cpi->RunHuffIndices);
-  if(cpi->LastCodedErrorScore)
-    _ogg_free(cpi->LastCodedErrorScore);
   if(cpi->ModeList)
     _ogg_free(cpi->ModeList);
   if(cpi->MVList)
@@ -188,12 +184,10 @@
   if(cpi->BlockCodedFlags)
     _ogg_free(cpi->BlockCodedFlags);
 
-  cpi->extra_fragments = 0;
   cpi->FragmentLastQ = 0;
   cpi->FragTokens = 0;
   cpi->FragTokenCounts = 0;
   cpi->RunHuffIndices = 0;
-  cpi->LastCodedErrorScore = 0;
   cpi->ModeList = 0;
   cpi->MVList = 0;
   cpi->DCT_codes = 0;
@@ -208,10 +202,6 @@
   /* clear any existing info */
   EClearFragmentInfo(cpi);
 
-  /* Perform Fragment Allocations */
-  cpi->extra_fragments =
-    _ogg_malloc(cpi->pb.UnitFragments*sizeof(unsigned char));
-
   /* A note to people reading and wondering why malloc returns aren't
      checked:
 
@@ -248,9 +238,6 @@
   cpi->RunHuffIndices =
     _ogg_malloc(cpi->pb.UnitFragments*
                 sizeof(*cpi->RunHuffIndices));
-  cpi->LastCodedErrorScore =
-    _ogg_malloc(cpi->pb.UnitFragments*
-                sizeof(*cpi->LastCodedErrorScore));
   cpi->BlockCodedFlags =
     _ogg_malloc(cpi->pb.UnitFragments*
                 sizeof(*cpi->BlockCodedFlags));
@@ -282,9 +269,6 @@
 }
 
 static void EClearFrameInfo(CP_INSTANCE * cpi) {
-  if(cpi->ConvDestBuffer )
-    _ogg_free(cpi->ConvDestBuffer );
-  cpi->ConvDestBuffer = 0;
 
   if(cpi->yuv0ptr)
     _ogg_free(cpi->yuv0ptr);
@@ -319,9 +303,6 @@
   EClearFrameInfo(cpi);
 
   /* allocate frames */
-  cpi->ConvDestBuffer =
-    _ogg_malloc(FrameSize*
-                sizeof(*cpi->ConvDestBuffer));
   cpi->yuv0ptr =
     _ogg_malloc(FrameSize*
                 sizeof(*cpi->yuv0ptr));
@@ -351,7 +332,6 @@
   /* Initialise the cpi->pb.display_fragments and other fragment
      structures for the first frame. */
   memset( cpi->pb.display_fragments, 1, cpi->pb.UnitFragments );
-  memset( cpi->extra_fragments, 1, cpi->pb.UnitFragments );
 
   /* Set up for a KEY FRAME */
   cpi->pb.FrameType = KEY_FRAME;
@@ -445,7 +425,7 @@
 
   /* Copy back any extra frags that are to be updated by the codec
      as part of the background cleanup task */
-  CopyBackExtraFrags(cpi);
+  //CopyBackExtraFrags(cpi);
 
   /* Encode the data.  */
   EncodeData(cpi);
@@ -654,7 +634,6 @@
   ogg_int32_t min_blocks_per_frame;
   ogg_uint32_t  i;
   int DropFrame = 0;
-  ogg_uint32_t  ResidueBlocksAdded=0;
   ogg_uint32_t  KFIndicator = 0;
 
   double QModStep;
@@ -672,7 +651,6 @@
 
   /* Clear down the difference arrays for the current frame. */
   memset( cpi->pb.display_fragments, 0, cpi->pb.UnitFragments );
-  memset( cpi->extra_fragments, 0, cpi->pb.UnitFragments );
 
   /* Calculate the target bytes for this frame. */
   cpi->ThisFrameTargetBytes = cpi->frame_target_rate;
@@ -778,26 +756,6 @@
     /* Get the baseline Q value */
     RegulateQ( cpi, cpi->MotionScore );
 
-    /* Recode blocks if the error score in last frame was high. */
-    ResidueBlocksAdded  = 0;
-    for ( i = 0; i < cpi->pb.UnitFragments; i++ ){
-      if ( !cpi->pb.display_fragments[i] ){
-        if ( cpi->LastCodedErrorScore[i] >=
-             ResidueErrorThresh[cpi->pb.FrameQIndex] ) {
-          cpi->pb.display_fragments[i] = 1; /* Force block update */
-          cpi->extra_fragments[i] = 1;      /* Insures up to date
-                                               pixel data is used. */
-          ResidueBlocksAdded ++;
-        }
-      }
-    }
-
-    /* Adjust the motion score to allow for residue blocks
-       added. These are assumed to have below average impact on
-       bitrate (Hence ResidueBlockFactor). */
-    cpi->MotionScore = cpi->MotionScore +
-      (ResidueBlocksAdded / ResidueBlockFactor[cpi->pb.FrameQIndex]);
-
     /* Estimate the min number of blocks at best Q */
     min_blocks_per_frame =
       (ogg_int32_t)(cpi->ThisFrameTargetBytes /
@@ -853,7 +811,7 @@
           && ( cpi->LastKeyFrame > cpi->pb.info.keyframe_mindistance)
           ){
         CompressKeyFrame(cpi);  /* Code a key frame */
-        return;
+        return 0;
       }
 
     }
@@ -1018,7 +976,6 @@
   /* Set up pre-processor config pointers. */
   cpi->ScanConfig.Yuv0ptr = cpi->yuv0ptr;
   cpi->ScanConfig.Yuv1ptr = cpi->yuv1ptr;
-  cpi->ScanConfig.SrfWorkSpcPtr = cpi->ConvDestBuffer;
   cpi->ScanConfig.disp_fragments = cpi->pb.display_fragments;
   cpi->ScanConfig.RegionIndex = cpi->pb.pixel_index_table;
 

Modified: branches/theora-thusnelda/lib/enc/mcomp.c
===================================================================
--- branches/theora-thusnelda/lib/enc/mcomp.c	2007-11-15 08:45:38 UTC (rev 14148)
+++ branches/theora-thusnelda/lib/enc/mcomp.c	2007-11-15 11:36:07 UTC (rev 14149)
@@ -156,28 +156,28 @@
   if ( cpi->pb.display_fragments[LocalFragIndex] )
     IntraError +=
       dsp_intra8x8_err (cpi->dsp, &cpi->
-                    ConvDestBuffer[cpi->pb.pixel_index_table[LocalFragIndex]],
+                    yuv1ptr[cpi->pb.pixel_index_table[LocalFragIndex]],
                     PixelsPerLine);
 
   LocalFragIndex++;
   if ( cpi->pb.display_fragments[LocalFragIndex] )
     IntraError +=
       dsp_intra8x8_err (cpi->dsp, &cpi->
-                    ConvDestBuffer[cpi->pb.pixel_index_table[LocalFragIndex]],
+                    yuv1ptr[cpi->pb.pixel_index_table[LocalFragIndex]],
                     PixelsPerLine);
 
   LocalFragIndex = FragIndex + cpi->pb.HFragments;
   if ( cpi->pb.display_fragments[LocalFragIndex] )
     IntraError +=
       dsp_intra8x8_err (cpi->dsp, &cpi->
-                     ConvDestBuffer[cpi->pb.pixel_index_table[LocalFragIndex]],
+                     yuv1ptr[cpi->pb.pixel_index_table[LocalFragIndex]],
                     PixelsPerLine);
 
   LocalFragIndex++;
   if ( cpi->pb.display_fragments[LocalFragIndex] )
     IntraError +=
       dsp_intra8x8_err (cpi->dsp, &cpi->
-                    ConvDestBuffer[cpi->pb.pixel_index_table[LocalFragIndex]],
+                    yuv1ptr[cpi->pb.pixel_index_table[LocalFragIndex]],
                     PixelsPerLine);
 
   dsp_restore_fpu (cpi->dsp);
@@ -319,7 +319,7 @@
     cpi->pb.display_fragments[FragIndex + cpi->pb.HFragments + 1];
 
   /* Set up the source pointers for the four source blocks.  */
-  SrcPtr[0] = &cpi->ConvDestBuffer[cpi->pb.pixel_index_table[FragIndex]];
+  SrcPtr[0] = &cpi->yuv1ptr[cpi->pb.pixel_index_table[FragIndex]];
   SrcPtr[1] = SrcPtr[0] + 8;
   SrcPtr[2] = SrcPtr[0] + (PixelsPerLine * 8);
   SrcPtr[3] = SrcPtr[2] + 8;
@@ -459,7 +459,7 @@
   MV->y += cpi->HalfPixelYOffset[BestHalfOffset];
 
   /* Get the error score for the chosen 1/2 pixel offset as a variance. */
-  InterMVError = GetMBInterError( cpi, cpi->ConvDestBuffer, RefFramePtr,
+  InterMVError = GetMBInterError( cpi, cpi->yuv1ptr, RefFramePtr,
                                   FragIndex, MV->x, MV->y, PixelsPerLine );
 
   dsp_restore_fpu (cpi->dsp);
@@ -511,7 +511,7 @@
 
   /* Set up the source pointers for the four source blocks. */
   SrcPtr[0] = &cpi->
-    ConvDestBuffer[cpi->pb.pixel_index_table[FragIndex]];
+    yuv1ptr[cpi->pb.pixel_index_table[FragIndex]];
   SrcPtr[1] = SrcPtr[0] + 8;
   SrcPtr[2] = SrcPtr[0] + (PixelsPerLine * 8);
   SrcPtr[3] = SrcPtr[2] + 8;
@@ -619,7 +619,7 @@
   MV->y += cpi->HalfPixelYOffset[BestHalfOffset];
 
   /* Get the error score for the chosen 1/2 pixel offset as a variance. */
-  InterMVError = GetMBInterError( cpi, cpi->ConvDestBuffer, RefFramePtr,
+  InterMVError = GetMBInterError( cpi, cpi->yuv1ptr, RefFramePtr,
                                   FragIndex, MV->x, MV->y, PixelsPerLine );
 
   dsp_restore_fpu (cpi->dsp);
@@ -653,7 +653,7 @@
 
   /* Set up the source pointer for the block. */
   SrcPtr = &cpi->
-    ConvDestBuffer[cpi->pb.pixel_index_table[FragIndex]];
+    yuv1ptr[cpi->pb.pixel_index_table[FragIndex]];
 
   RefPtr = &RefFramePtr[cpi->pb.recon_pixel_index_table[FragIndex]];
   RefPtr = RefPtr - ((MAX_MV_EXTENT/2) *

Modified: branches/theora-thusnelda/lib/enc/misc_common.c
===================================================================
--- branches/theora-thusnelda/lib/enc/misc_common.c	2007-11-15 08:45:38 UTC (rev 14148)
+++ branches/theora-thusnelda/lib/enc/misc_common.c	2007-11-15 11:36:07 UTC (rev 14149)
@@ -92,7 +92,6 @@
       if ( ( !cpi->pb.display_fragments[FragIndex] ) &&
            ( (NoCheck) || (cpi->FragmentLastQ[FragIndex] > RegulationQ) ) ){
         cpi->pb.display_fragments[FragIndex] = 1;
-        cpi->extra_fragments[FragIndex] = 1;
         cpi->FragmentLastQ[FragIndex] = RegulationQ;
         cpi->MotionScore++;
       }
@@ -109,7 +108,6 @@
     if ( ( !cpi->pb.display_fragments[FragIndex] ) &&
          ( (NoCheck) || (cpi->FragmentLastQ[FragIndex] > RegulationQ) ) ) {
       cpi->pb.display_fragments[FragIndex] = 1;
-      cpi->extra_fragments[FragIndex] = 1;
       cpi->FragmentLastQ[FragIndex] = RegulationQ;
       cpi->MotionScore++;
     }
@@ -118,7 +116,6 @@
     if ( ( !cpi->pb.display_fragments[FragIndex] ) &&
          ( (NoCheck) || (cpi->FragmentLastQ[FragIndex] > RegulationQ) ) ) {
       cpi->pb.display_fragments[FragIndex] = 1;
-      cpi->extra_fragments[FragIndex] = 1;
       cpi->FragmentLastQ[FragIndex] = RegulationQ;
       cpi->MotionScore++;
     }
@@ -289,51 +286,3 @@
   }
 }
 
-void CopyBackExtraFrags(CP_INSTANCE *cpi){
-  ogg_uint32_t  i,j;
-  unsigned char * SrcPtr;
-  unsigned char * DestPtr;
-  ogg_uint32_t  PlaneLineStep;
-  ogg_uint32_t  PixelIndex;
-
-  /*  Copy back for Y plane. */
-  PlaneLineStep = cpi->pb.info.width;
-  for ( i = 0; i < cpi->pb.YPlaneFragments; i++ ) {
-    /* We are only interested in updated fragments. */
-    if ( cpi->extra_fragments[i] ) {
-      /* Get the start index for the fragment. */
-      PixelIndex = cpi->pb.pixel_index_table[i];
-      SrcPtr = &cpi->yuv1ptr[PixelIndex];
-      DestPtr = &cpi->ConvDestBuffer[PixelIndex];
-
-      for ( j = 0; j < VFRAGPIXELS; j++ ) {
-        memcpy( DestPtr, SrcPtr, HFRAGPIXELS);
-
-        SrcPtr += PlaneLineStep;
-        DestPtr += PlaneLineStep;
-      }
-    }
-  }
-
-  /* Now the U and V planes */
-  PlaneLineStep = cpi->pb.info.width / 2;
-  for ( i = cpi->pb.YPlaneFragments;
-        i < (cpi->pb.YPlaneFragments + (2 * cpi->pb.UVPlaneFragments)) ;
-        i++ ) {
-
-    /* We are only interested in updated fragments. */
-    if ( cpi->extra_fragments[i] ) {
-      /* Get the start index for the fragment. */
-      PixelIndex = cpi->pb.pixel_index_table[i];
-      SrcPtr = &cpi->yuv1ptr[PixelIndex];
-      DestPtr = &cpi->ConvDestBuffer[PixelIndex];
-
-      for ( j = 0; j < VFRAGPIXELS; j++ ) {
-        memcpy( DestPtr, SrcPtr, HFRAGPIXELS);
-        SrcPtr += PlaneLineStep;
-        DestPtr += PlaneLineStep;
-      }
-    }
-  }
-}
-

Modified: branches/theora-thusnelda/lib/enc/scan.c
===================================================================
--- branches/theora-thusnelda/lib/enc/scan.c	2007-11-15 08:45:38 UTC (rev 14148)
+++ branches/theora-thusnelda/lib/enc/scan.c	2007-11-15 11:36:07 UTC (rev 14149)
@@ -277,7 +277,6 @@
   /* Set up the various imported data structure pointers. */
   ppi->ScanConfig.Yuv0ptr = ScanConfigPtr->Yuv0ptr;
   ppi->ScanConfig.Yuv1ptr = ScanConfigPtr->Yuv1ptr;
-  ppi->ScanConfig.SrfWorkSpcPtr = ScanConfigPtr->SrfWorkSpcPtr;
   ppi->ScanConfig.disp_fragments = ScanConfigPtr->disp_fragments;
 
   ppi->ScanConfig.RegionIndex = ScanConfigPtr->RegionIndex;
@@ -1696,43 +1695,6 @@
   }
 }
 
-static void RowCopy( PP_INSTANCE *ppi, ogg_uint32_t BlockMapIndex ){
-
-  ogg_uint32_t   i,j;
-
-  ogg_uint32_t   PixelIndex = ppi->ScanPixelIndexTable[BlockMapIndex];
-  signed char   * BlockMapPtr = &ppi->ScanDisplayFragments[BlockMapIndex];
-  signed char   * PrevFragmentsPtr = &ppi->PrevFragments[0][BlockMapIndex];
-
-  unsigned char  * SourcePtr;
-  unsigned char  * DestPtr;
-
-  /* Copy pixels from changed blocks back to reference frame. */
-  for ( i = 0; i < (ogg_uint32_t)ppi->PlaneHFragments; i ++ ){
-    /* If the fragement is marked for update or was recently marked
-       for update (PrevFragmentsPtr[i]) */
-    if ( (BlockMapPtr[i] > BLOCK_NOT_CODED) ||
-         (PrevFragmentsPtr[i] == BLOCK_CODED) ){
-      /* Set up the various pointers required. */
-      SourcePtr = &ppi->ScanConfig.Yuv1ptr[PixelIndex];
-      DestPtr = &ppi->ScanConfig.SrfWorkSpcPtr[PixelIndex];
-
-      /* For each row of the block */
-      for ( j = 0; j < VFRAGPIXELS; j++ ){
-        /* Copy the data unaltered from source to destination */
-        memcpy(DestPtr,SourcePtr,8);
-
-        /* Increment pointers for next line in the block */
-        SourcePtr += ppi->PlaneWidth;
-        DestPtr += ppi->PlaneWidth;
-      }
-    }
-
-    /* Increment pixel index for next block. */
-    PixelIndex += HFRAGPIXELS;
-  }
-}
-
 static void RowBarEnhBlockMap( PP_INSTANCE *ppi,
                                signed char   * UpdatedBlockMapPtr,
                                signed char   * BarBlockMapPtr,
@@ -2225,10 +2187,6 @@
 
       BarCopyBack(ppi, &ppi->ScanDisplayFragments[ScoreFragIndex4],
                   &ppi->BarBlockMap[(RowNumber4 % 3) * ppi->PlaneHFragments]);
-
-      /* Copy over the data from any blocks marked for update into the
-         output buffer. */
-      RowCopy(ppi, ScoreFragIndex4);
     }
   }
 }



More information about the commits mailing list