[xiph-commits] r16744 - trunk/theora/lib

tterribe at svn.xiph.org tterribe at svn.xiph.org
Sun Nov 29 23:57:28 PST 2009


Author: tterribe
Date: 2009-11-29 23:57:27 -0800 (Sun, 29 Nov 2009)
New Revision: 16744

Modified:
   trunk/theora/lib/encode.c
Log:
Fix image padding offsets for 64-bit platforms (broken in r16714).


Modified: trunk/theora/lib/encode.c
===================================================================
--- trunk/theora/lib/encode.c	2009-11-29 05:28:32 UTC (rev 16743)
+++ trunk/theora/lib/encode.c	2009-11-30 07:57:27 UTC (rev 16744)
@@ -1519,9 +1519,10 @@
     }
     /*Adjust the pointers to address a full frame.
       We still only use the picture region, however.*/
-    img[0].data-=_enc->state.info.pic_y*img[0].stride+_enc->state.info.pic_x;
-    img[1].data-=cpic_y*img[1].stride+cpic_x;
-    img[2].data-=cpic_y*img[2].stride+cpic_x;
+    img[0].data-=_enc->state.info.pic_y*(ptrdiff_t)img[0].stride
+     +_enc->state.info.pic_x;
+    img[1].data-=cpic_y*(ptrdiff_t)img[1].stride+cpic_x;
+    img[2].data-=cpic_y*(ptrdiff_t)img[2].stride+cpic_x;
   }
   /*Step 2: Copy the input to our internal buffer.
     This lets us add padding, if necessary, so we don't have to worry about



More information about the commits mailing list