]> git.sesse.net Git - vlc/commitdiff
Removed vout_CopyPicture in favor of picture_Copy.
authorLaurent Aimar <fenrir@videolan.org>
Sat, 20 Sep 2008 15:41:33 +0000 (17:41 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Sat, 20 Sep 2008 22:21:39 +0000 (00:21 +0200)
14 files changed:
include/vlc_vout.h
modules/codec/fake.c
modules/gui/fbosd.c
modules/stream_out/mosaic_bridge.c
modules/stream_out/transcode.c
modules/video_filter/dynamicoverlay/dynamicoverlay.c
modules/video_filter/logo.c
modules/video_filter/opencv_wrapper.c
modules/video_filter/osdmenu.c
modules/video_filter/remoteosd.c
modules/video_filter/rss.c
src/libvlccore.sym
src/misc/image.c
src/video_output/vout_pictures.c

index f07bc6f9dc1f4da9f4c62163907c4fa1fc66f449..6c2b6ffef402c8166a7e7a9204fcf209613ef194 100644 (file)
@@ -199,6 +199,9 @@ VLC_EXPORT( void, plane_CopyPixels, ( plane_t *p_dst, const plane_t *p_src ) );
  * You have to notice that sometime a simple picture_Hold may do what
  * you want without the copy overhead.
  * Provided for convenience.
+ *
+ * \param p_dst pointer to the destination picture.
+ * \param p_src pointer to the source picture.
  */
 static inline void picture_Copy( picture_t *p_dst, const picture_t *p_src )
 {
@@ -412,15 +415,6 @@ struct subpicture_t
  * Prototypes
  *****************************************************************************/
 
-/**
- * Copy the source picture onto the destination picture.
- * \param p_this a vlc object
- * \param p_dst pointer to the destination picture.
- * \param p_src pointer to the source picture.
- */
-#define vout_CopyPicture(a,b,c) __vout_CopyPicture(VLC_OBJECT(a),b,c)
-VLC_EXPORT( void, __vout_CopyPicture, ( vlc_object_t *p_this, picture_t *p_dst, picture_t *p_src ) );
-
 /**
  * Initialise different fields of a picture_t (but does not allocate memory).
  * \param p_this a vlc object
index bd4c1cddc8a9575299cd985dd4c3a6ae4dc0d68e..6fcdaffaef65540d67457134a1f048740ea70e03 100644 (file)
@@ -358,7 +358,7 @@ static picture_t *DecodeBlock( decoder_t *p_dec, block_t **pp_block )
         p_sys->i_next = (mtime_t)(p_sys->i_reload + mdate());
     }
     vlc_mutex_lock( &p_dec->p_sys->lock );
-    vout_CopyPicture( p_dec, p_pic, p_dec->p_sys->p_image );
+    picture_Copy( p_pic, p_dec->p_sys->p_image );
     vlc_mutex_unlock( &p_dec->p_sys->lock );
 
     p_pic->date = (*pp_block)->i_pts;
index 710452ce9d1454a96127f173fa3552e63a7336f4..2ee627a95b3541e346544421244ee204cacfc9c6 100644 (file)
@@ -892,7 +892,7 @@ static picture_t *RenderText( intf_thread_t *p_intf, const char *psz_string,
                 free( p_region );
                 return NULL;
             }
-            vout_CopyPicture( VLC_OBJECT(p_intf), p_dest, p_region->p_picture );
+            picture_Copy( p_dest, p_region->p_picture );
 #else
             fmt_out.i_chroma = p_fmt->i_chroma;
             p_dest = ConvertImage( p_intf, &p_region->p_picture,
index c619b7fd1615ae43695a5a3cf9de01c17cffd9ff..c1c9e58a3f0cd4a7b18c937e682550bd24e1f337 100644 (file)
@@ -639,7 +639,7 @@ static int Send( sout_stream_t *p_stream, sout_stream_id_t *id,
                 continue;
             }
 
-            vout_CopyPicture( p_stream, p_new_pic, p_pic );
+            picture_Copy( p_new_pic, p_pic );
         }
 
         p_new_pic->i_refcount = 1;
index 0450f9e18290b44b12df7ec654de9daa03173336..a35034961b05c9954c105d5b596e6cfc956360ac 100644 (file)
@@ -1996,7 +1996,7 @@ static int transcode_video_process( sout_stream_t *p_stream,
                 picture_t *p_tmp = video_new_buffer_decoder( id->p_decoder );
                 if( p_tmp )
                 {
-                    vout_CopyPicture( p_stream, p_tmp, p_pic );
+                    picture_Copy( p_tmp, p_pic );
                     p_pic->pf_release( p_pic );
                     p_pic = p_tmp;
                 }
@@ -2061,7 +2061,7 @@ static int transcode_video_process( sout_stream_t *p_stream,
                 p_pic2 = video_new_buffer_decoder( id->p_decoder );
                 if( p_pic2 != NULL )
                 {
-                    vout_CopyPicture( p_stream, p_pic2, p_pic );
+                    picture_Copy( p_pic2, p_pic );
                     p_pic2->date = i_pts;
                 }
             }
index 0c85468ce790aa348acd439a4c75dc049bbe40f1..7c1cc11b8eedd2142b028bca6a242367bcba391d 100644 (file)
@@ -366,7 +366,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
         else
         {
             /* FIXME the copy is probably not needed anymore */
-            vout_CopyPicture( p_filter, p_region->p_picture, p_overlay->data.p_pic );
+            picture_Copy( p_region->p_picture, p_overlay->data.p_pic );
         }
         p_region->i_x = p_overlay->i_x;
         p_region->i_y = p_overlay->i_y;
index 9e1791b4629fa0df4e5c1576e792c511f15bbdf3..52de12782095362bf5eeaef9f6bd66b08130de34 100644 (file)
@@ -583,7 +583,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_inpic )
         msleep( VOUT_OUTMEM_SLEEP );
     }
 
-    vout_CopyPicture( p_vout, p_outpic, p_inpic );
+    picture_Copy( p_outpic, p_inpic );
     vout_DatePicture( p_sys->p_vout, p_outpic, p_inpic->date );
 
     if( p_pic )
@@ -874,7 +874,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
     }
 
     /* FIXME the copy is probably not needed anymore */
-    vout_CopyPicture( p_filter, &p_region->p_picture, p_pic );
+    picture_Copy( p_region->p_picture, p_pic );
     vlc_mutex_unlock( &p_logo_list->lock );
 
     /*  where to locate the logo: */
index b1f3c9d9f2f5e7f1253b8f08f25e8faf16217f92..1647deb8e1153ec6a63b76143c59fabcae5c6e49 100644 (file)
@@ -565,7 +565,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
         //This copy is a bit unfortunate but image_Convert can't write into an existing image so it is better to copy the
         //(say) 16bit YUV image here than a 32bit RGB image somehwere else.
         //It is also not that expensive in time.
-        vout_CopyPicture( p_vout, p_outpic, p_pic );
+        picture_Copy( p_outpic, p_pic );
         VlcPictureToIplImage( p_vout, p_pic);
         //pass the image to the internal opencv filter for processing
         if ((p_vout->p_sys->p_opencv) && (p_vout->p_sys->p_opencv->p_module))
@@ -579,7 +579,7 @@ static void Render( vout_thread_t *p_vout, picture_t *p_pic )
             p_vout->p_sys->p_opencv->pf_video_filter( p_vout->p_sys->p_opencv, &(p_vout->p_sys->hacked_pic));
         //copy the processed image into the output image
         if ((p_vout->p_sys->p_proc_image) && (p_vout->p_sys->p_proc_image->p_data))
-            vout_CopyPicture( p_vout, p_outpic, p_vout->p_sys->p_proc_image );
+            picture_Copy( p_outpic, p_vout->p_sys->p_proc_image );
     }
 
     //calculate duration
index 1c3d5bbca6a034de7107e8d5191b5442a8152fb0..b83fa136507a1d55a10b5e69243cb63209f515df 100644 (file)
@@ -428,7 +428,7 @@ static subpicture_region_t *create_picture_region( filter_t *p_filter, subpictur
     }
     /* FIXME the copy is probably not needed anymore */
     if( p_pic )
-        vout_CopyPicture( p_filter, p_region->p_picture, p_pic );
+        picture_Copy( p_region->p_picture, p_pic );
 
     p_region->i_x = 0;
     p_region->i_y = 0;
index a6a253bfa457e43c458109caf8bacc809f72eb06..276a999ba70b6872e4ca3d11b7509b7c9daa1475 100644 (file)
@@ -1172,7 +1172,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
     }
 
     /* FIXME the copy is probably not needed anymore */
-    vout_CopyPicture( p_filter, p_region->p_picture, p_pic );
+    picture_Copy( p_region->p_picture, p_pic );
 
     p_sys->b_need_update = false;
 
index dbb5dbe748974ba1953d55ea48d947f59edbe8e3..3894d9dac8c637f367bd1087ef5ec5aac66a0722 100644 (file)
@@ -558,7 +558,7 @@ static subpicture_t *Filter( filter_t *p_filter, mtime_t date )
             p_region->i_x = p_sys->i_xoff;
             p_region->i_y = p_sys->i_yoff;
             /* FIXME the copy is probably not needed anymore */
-            vout_CopyPicture( p_filter, p_region->p_picture, p_pic );
+            picture_Copy( p_region->p_picture, p_pic );
             p_spu->p_region->p_next = p_region;
         }
 
index 804b6ff6194daa270340d4683b7e665bed1ac770..e95f1d4830e4dd10126cfb2bd22412ecfbd0e1bc 100644 (file)
@@ -513,7 +513,6 @@ __vout_AllocatePicture
 vout_ChromaCmp
 vout_Close
 vout_ControlWindow
-__vout_CopyPicture
 __vout_Create
 vout_CreatePicture
 vout_DatePicture
index 826bcc81c85ab84d9a321404ac8cc6461369e749..811a09c81f62bb9d7e58601a8aaa3bcc22373d56 100644 (file)
@@ -457,7 +457,8 @@ static picture_t *ImageConvert( image_handler_t *p_image, picture_t *p_pic,
         /* Duplicate image */
         picture_Release( p_pif ); /* XXX: Better fix must be possible */
         p_pif = p_image->p_filter->pf_vout_buffer_new( p_image->p_filter );
-        if( p_pif ) vout_CopyPicture( p_image->p_parent, p_pif, p_pic );
+        if( p_pif )
+            picture_Copy( p_pif, p_pic );
     }
 
     return p_pif;
index 223d85a611a1acf2eda742afe7c863b851de9e76..4373579a40a3bd39d9669f6677f157550736f061 100644 (file)
@@ -338,7 +338,7 @@ picture_t *vout_RenderPicture( vout_thread_t *p_vout, picture_t *p_pic,
             if( vout_LockPicture( p_vout, PP_OUTPUTPICTURE[0] ) )
                 return NULL;
 
-            vout_CopyPicture( p_vout, PP_OUTPUTPICTURE[0], p_pic );
+            picture_Copy( PP_OUTPUTPICTURE[0], p_pic );
 
             spu_RenderSubpictures( p_vout->p_spu,
                                    PP_OUTPUTPICTURE[0], &p_vout->fmt_out,
@@ -366,7 +366,7 @@ picture_t *vout_RenderPicture( vout_thread_t *p_vout, picture_t *p_pic,
         if( vout_LockPicture( p_vout, PP_OUTPUTPICTURE[0] ) )
             return NULL;
 
-        vout_CopyPicture( p_vout, PP_OUTPUTPICTURE[0], p_pic );
+        picture_Copy( PP_OUTPUTPICTURE[0], p_pic );
         spu_RenderSubpictures( p_vout->p_spu,
                                PP_OUTPUTPICTURE[0], &p_vout->fmt_out,
                                p_subpic, &p_vout->fmt_in );
@@ -412,7 +412,7 @@ picture_t *vout_RenderPicture( vout_thread_t *p_vout, picture_t *p_pic,
         if( vout_LockPicture( p_vout, &p_vout->p_picture[0] ) )
             return NULL;
 
-        vout_CopyPicture( p_vout, &p_vout->p_picture[0], p_tmp_pic );
+        picture_Copy( &p_vout->p_picture[0], p_tmp_pic );
     }
     else
     {
@@ -984,20 +984,6 @@ int vout_ChromaCmp( vlc_fourcc_t i_chroma, vlc_fourcc_t i_amorhc )
     }
 }
 
-/*****************************************************************************
- * vout_CopyPicture: copy a picture to another one
- *****************************************************************************
- * This function takes advantage of the image format, and reduces the
- * number of calls to memcpy() to the minimum. Source and destination
- * images must have same width (hence i_visible_pitch), height, and chroma.
- *****************************************************************************/
-void __vout_CopyPicture( vlc_object_t *p_this,
-                         picture_t *p_dest, picture_t *p_src )
-{
-    VLC_UNUSED(p_this);
-    picture_Copy( p_dest, p_src );
-}
-
 /*****************************************************************************
  *
  *****************************************************************************/