[xiph-commits] r8391 - experimental/dholth/oggpy

j at motherfish-iii.xiph.org j at motherfish-iii.xiph.org
Tue Dec 14 09:54:38 PST 2004


Author: j
Date: 2004-12-14 09:54:37 -0800 (Tue, 14 Dec 2004)
New Revision: 8391

Modified:
   experimental/dholth/oggpy/theora_wrappers.cc
   experimental/dholth/oggpy/theora_wrappers.h
Log:
enable croping in tostrings again

Modified: experimental/dholth/oggpy/theora_wrappers.cc
===================================================================
--- experimental/dholth/oggpy/theora_wrappers.cc	2004-12-14 16:34:52 UTC (rev 8390)
+++ experimental/dholth/oggpy/theora_wrappers.cc	2004-12-14 17:54:37 UTC (rev 8391)
@@ -29,7 +29,7 @@
 */
 
 
-PyObject* tostrings (ogg::theora::yuv_image *yuv)
+PyObject* tostrings (ogg::theora::yuv_image *yuv, ogg::theora::info *theora_info)
 { 
     int crop_offset=0;
     int i;
@@ -50,7 +50,7 @@
     u = PyString_AS_STRING(ustring);
     v = PyString_AS_STRING(vstring);
 
-    //crop_offset=theora_info::offset_x+yuv->y_stride*theora_info::offset_y;
+    crop_offset=theora_info->offset_x + yuv->y_stride * theora_info->offset_y;
     for(i=0; i < yuv->y_height; i++)
     {
         std::memcpy(y+i*yuv->y_width,
@@ -58,7 +58,7 @@
                     yuv->y_width);
     }
 
-    //crop_offset=theora_info::offset_x/2+yuv->y_stride*theora_info::offset_y/2;
+    crop_offset=theora_info->offset_x/2 + yuv->uv_stride * theora_info->offset_y/2;
     for(i=0; i < yuv->uv_height; i++)
     {        
         std::memcpy(u+i*yuv->uv_width, 

Modified: experimental/dholth/oggpy/theora_wrappers.h
===================================================================
--- experimental/dholth/oggpy/theora_wrappers.h	2004-12-14 16:34:52 UTC (rev 8390)
+++ experimental/dholth/oggpy/theora_wrappers.h	2004-12-14 17:54:37 UTC (rev 8391)
@@ -13,6 +13,6 @@
 #include "theoracc.h"
 #include <boost/python.hpp>
 
-PyObject* tostrings(ogg::theora::yuv_image *yuv);
+PyObject* tostrings(ogg::theora::yuv_image *yuv, ogg::theora::info *theora_info);
 
 #endif



More information about the commits mailing list