changeset 33602:042b10b477fa

Change memcpy_pic to force it to never write to image parts between width and stride if creating a row-interleaved format, otherwise the second memcpy_pic might overwrite what the first wrote. Changing the first should not be necessary but might result in better performance. Patch by Steaphan Greene [sgreene cs.binghamton.edu]
author reimar
date Tue, 21 Jun 2011 17:53:24 +0000
parents 0be318645ab3
children 356ade78c7b1
files libmpcodecs/vf_stereo3d.c
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/libmpcodecs/vf_stereo3d.c	Tue Jun 21 17:49:21 2011 +0000
+++ b/libmpcodecs/vf_stereo3d.c	Tue Jun 21 17:53:24 2011 +0000
@@ -280,18 +280,20 @@
         case ABOVE_BELOW_2_RL:
         case INTERLEAVE_ROWS_LR:
         case INTERLEAVE_ROWS_RL:
-            memcpy_pic(dmpi->planes[0] + out_off_left,
+            memcpy_pic2(dmpi->planes[0] + out_off_left,
                        mpi->planes[0] + in_off_left,
                        3 * vf->priv->width,
                        vf->priv->height,
                        dmpi->stride[0] * vf->priv->row_step,
-                       mpi->stride[0] * vf->priv->row_step);
-            memcpy_pic(dmpi->planes[0] + out_off_right,
+                       mpi->stride[0] * vf->priv->row_step,
+                       vf->priv->row_step != 1);
+            memcpy_pic2(dmpi->planes[0] + out_off_right,
                        mpi->planes[0] + in_off_right,
                        3 * vf->priv->width,
                        vf->priv->height,
                        dmpi->stride[0] * vf->priv->row_step,
-                       mpi->stride[0] * vf->priv->row_step);
+                       mpi->stride[0] * vf->priv->row_step,
+                       vf->priv->row_step != 1);
             break;
         case MONO_L:
         case MONO_R: