[FFmpeg-soc] [soc]: r1331 - dirac/libavcodec/dirac.c

marco subversion at mplayerhq.hu
Mon Sep 10 14:00:38 CEST 2007


Author: marco
Date: Mon Sep 10 14:00:38 2007
New Revision: 1331

Log:
use edge extension after motion compensation

Modified:
   dirac/libavcodec/dirac.c

Modified: dirac/libavcodec/dirac.c
==============================================================================
--- dirac/libavcodec/dirac.c	(original)
+++ dirac/libavcodec/dirac.c	Mon Sep 10 14:00:38 2007
@@ -3273,15 +3273,6 @@ static int dirac_encode_component(DiracC
             coeffs[y * s->padded_width + x] =
                 s->picture.data[comp][y * s->picture.linesize[comp] + x];
         }
-        for (x = s->width; x < s->padded_width; x++)
-            coeffs[y * s->padded_width + x] =
-                s->picture.data[comp][y * s->picture.linesize[comp]
-                                      + s->width];
-    }
-    for (y = s->height; y < s->padded_height; y++) {
-        for (x = 0; x < s->padded_width; x++)
-            coeffs[y * s->padded_width + x] =
-                s->picture.data[comp][s->height * s->picture.linesize[comp] + x];
     }
 
     /* Subtract motion compensated data to calculate the residue.  */
@@ -3314,6 +3305,17 @@ static int dirac_encode_component(DiracC
         av_freep(&s->mcpic);
     }
 
+
+    for (y = 0; y < s->height; y++) {
+        for (x = s->width; x < s->padded_width; x++)
+            coeffs[y * s->padded_width + x] = coeffs[y * s->padded_width + x + s->padded_width - 1];
+    }
+
+    for (y = s->height; y < s->padded_height; y++) {
+        for (x = 0; x < s->padded_width; x++)
+            coeffs[y * s->padded_width + x] = coeffs[(s->height - 1) * s->padded_width + x];
+    }
+
     dirac_dwt(s, coeffs);
 
     encode_subband(s, 0, subband_ll, coeffs);



More information about the FFmpeg-soc mailing list