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 f07bc6f..6c2b6ff 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 bd4c1cd..6fcdaff 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 710452c..2ee627a 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 c619b7f..c1c9e58 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 0450f9e..a350349 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 0c85468..7c1cc11 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 9e1791b..52de127 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 b1f3c9d..1647deb 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 1c3d5bb..b83fa13 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 a6a253b..276a999 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 dbb5dbe..3894d9d 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 804b6ff..e95f1d4 100644 (file)
@@ -513,7 +513,6 @@ __vout_AllocatePicture
 vout_ChromaCmp
 vout_Close
 vout_ControlWindow
-__vout_CopyPicture
 __vout_Create
 vout_CreatePicture
 vout_DatePicture
index 826bcc8..811a09c 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 223d85a..4373579 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 );
-}
-
 /*****************************************************************************
  *
  *****************************************************************************/