[vlc-commits] commit: OpenCV: do not assume picture is at p_data_orig ( Rémi Denis-Courmont )

git at videolan.org git at videolan.org
Sat Nov 13 23:10:10 CET 2010


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sat Nov 13 23:55:27 2010 +0200| [48cecf7cdc0443255ea15375865faa1c45d4214e] | committer: Rémi Denis-Courmont 

OpenCV: do not assume picture is at p_data_orig

This seems quite wrong to me, but untested.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=48cecf7cdc0443255ea15375865faa1c45d4214e
---

 modules/video_filter/opencv_example.c |   10 +---------
 modules/video_filter/opencv_wrapper.c |    1 -
 2 files changed, 1 insertions(+), 10 deletions(-)

diff --git a/modules/video_filter/opencv_example.c b/modules/video_filter/opencv_example.c
index 5e84b74..b32cdcd 100644
--- a/modules/video_filter/opencv_example.c
+++ b/modules/video_filter/opencv_example.c
@@ -139,9 +139,6 @@ static void CloseFilter( vlc_object_t *p_this )
 
 /****************************************************************************
  * Filter: Check for faces and raises an event when one is found.
- ****************************************************************************
- * p_pic: A picture_t with its p_data_orig member set to an array of
- * IplImages (one image for each picture_t plane).
  ****************************************************************************/
 static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
 {
@@ -156,13 +153,8 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_pic )
         msg_Err( p_filter, "no image array" );
         return NULL;
     }
-    if (!(p_pic->p_data_orig))
-    {
-        msg_Err( p_filter, "no image array" );
-        return NULL;
-    }
     //(hack) cast the picture_t to array of IplImage*
-    p_img = (IplImage**) p_pic->p_data_orig;
+    p_img = (IplImage**) p_pic->p[0].p_pixels;
     i_planes = p_pic->i_planes;
 
     //check the image array for validity
diff --git a/modules/video_filter/opencv_wrapper.c b/modules/video_filter/opencv_wrapper.c
index 721eec3..a2e45ae 100644
--- a/modules/video_filter/opencv_wrapper.c
+++ b/modules/video_filter/opencv_wrapper.c
@@ -509,7 +509,6 @@ static void VlcPictureToIplImage( vout_thread_t *p_vout, picture_t *p_in )
 
     //Hack the above opencv image array into a picture_t so that it can be sent to
     //another video filter
-    p_sys->hacked_pic.p_data_orig = p_sys->p_cv_image;
     p_sys->hacked_pic.i_planes = planes;
     p_sys->hacked_pic.format.i_chroma = fmt_out.i_chroma;
 



More information about the vlc-commits mailing list