X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=modules%2Fvideo_filter%2Fpanoramix.c;h=1d4a8ba70aa53f0a111ec677d7e487638940d751;hb=62dd14548820fb0966e6b90d586183f74a427e4b;hp=6d0b98c63ee0e727714f576b314f4cfe4ae3a85a;hpb=806cf5165824be921bf2402ecf11fd3ee6501f9c;p=vlc diff --git a/modules/video_filter/panoramix.c b/modules/video_filter/panoramix.c index 6d0b98c63e..1d4a8ba70a 100644 --- a/modules/video_filter/panoramix.c +++ b/modules/video_filter/panoramix.c @@ -2,7 +2,7 @@ * panoramix.c : Wall panoramic video with edge blending plugin for vlc ***************************************************************************** * Copyright (C) 2000, 2001, 2002, 2003 VideoLAN - * $Id: panoramix.c 2006-08-29 16:20:15Z ced $ + * $Id$ * * Authors: Cedric Cocquebert * based on Samuel Hocevar @@ -26,7 +26,12 @@ * Preamble *****************************************************************************/ -#include +#ifdef HAVE_CONFIG_H +# include "config.h" +#endif + +#include +#include #include #include "filter_common.h" @@ -35,7 +40,7 @@ #define OVERLAP 2350 #ifdef OVERLAP #include - // OS CODE DEPENDANT to get display dimensions + // OS CODE DEPENDENT to get display dimensions #ifdef SYS_MINGW32 #include #else @@ -89,73 +94,60 @@ static int SendEvents( vlc_object_t *, char const *, vlc_module_begin(); set_description( N_("Panoramix: wall with overlap video filter") ); - set_shortname( _("Panoramix" )); + set_shortname( N_("Panoramix" )); set_capability( "video filter", 0 ); set_category( CAT_VIDEO ); set_subcategory( SUBCAT_VIDEO_VFILTER ); add_integer( CFG_PREFIX "cols", -1, NULL, - COLS_TEXT, COLS_LONGTEXT, VLC_TRUE ); - change_safe(); + COLS_TEXT, COLS_LONGTEXT, true ); add_integer( CFG_PREFIX "rows", -1, NULL, - ROWS_TEXT, ROWS_LONGTEXT, VLC_TRUE ); - change_safe(); + ROWS_TEXT, ROWS_LONGTEXT, true ); #ifdef OVERLAP #define OFFSET_X_TEXT N_("Offset X offset (automatic compensation)") #define OFFSET_X_LONGTEXT N_("Select if you want an automatic offset in horizontal (in case of misalignment due to autoratio control)") - add_bool( CFG_PREFIX "offset-x", 1, NULL, OFFSET_X_TEXT, OFFSET_X_LONGTEXT, VLC_TRUE ); - change_safe(); + add_bool( CFG_PREFIX "offset-x", 1, NULL, OFFSET_X_TEXT, OFFSET_X_LONGTEXT, true ); #define LENGTH_TEXT N_("length of the overlapping area (in %)") #define LENGTH_LONGTEXT N_("Select in percent the length of the blended zone") - add_integer_with_range( CFG_PREFIX "bz-length", 100, 0, 100, NULL, LENGTH_TEXT, LENGTH_LONGTEXT, VLC_TRUE ); - change_safe(); + add_integer_with_range( CFG_PREFIX "bz-length", 100, 0, 100, NULL, LENGTH_TEXT, LENGTH_LONGTEXT, true ); #define HEIGHT_TEXT N_("height of the overlapping area (in %)") #define HEIGHT_LONGTEXT N_("Select in percent the height of the blended zone (case of 2x2 wall)") - add_integer_with_range( CFG_PREFIX "bz-height", 100, 0, 100, NULL, HEIGHT_TEXT, HEIGHT_LONGTEXT, VLC_TRUE ); - change_safe(); + add_integer_with_range( CFG_PREFIX "bz-height", 100, 0, 100, NULL, HEIGHT_TEXT, HEIGHT_LONGTEXT, true ); #define ATTENUATION_TEXT N_("Attenuation") #define ATTENUATION_LONGTEXT N_("Check this option if you want attenuate blended zone by this plug-in (if option is unchecked, attenuate is made by opengl)") - add_bool( CFG_PREFIX "attenuate", 1, NULL, ATTENUATION_TEXT, ATTENUATION_LONGTEXT, VLC_FALSE ); - change_safe(); + add_bool( CFG_PREFIX "attenuate", 1, NULL, ATTENUATION_TEXT, ATTENUATION_LONGTEXT, false ); #define BEGIN_TEXT N_("Attenuation, begin (in %)") #define BEGIN_LONGTEXT N_("Select in percent the Lagrange coeff of the beginning blended zone") - add_integer_with_range( CFG_PREFIX "bz-begin", 0, 0, 100, NULL, BEGIN_TEXT, BEGIN_LONGTEXT, VLC_TRUE ); - change_safe(); + add_integer_with_range( CFG_PREFIX "bz-begin", 0, 0, 100, NULL, BEGIN_TEXT, BEGIN_LONGTEXT, true ); #define MIDDLE_TEXT N_("Attenuation, middle (in %)") #define MIDDLE_LONGTEXT N_("Select in percent the Lagrange coeff of the middle of blended zone") - add_integer_with_range( CFG_PREFIX "bz-middle", 50, 0, 100, NULL, MIDDLE_TEXT, MIDDLE_LONGTEXT, VLC_FALSE ); - change_safe(); + add_integer_with_range( CFG_PREFIX "bz-middle", 50, 0, 100, NULL, MIDDLE_TEXT, MIDDLE_LONGTEXT, false ); #define END_TEXT N_("Attenuation, end (in %)") #define END_LONGTEXT N_("Select in percent the Lagrange coeff of the end of blended zone") - add_integer_with_range( CFG_PREFIX "bz-end", 100, 0, 100, NULL, END_TEXT, END_LONGTEXT, VLC_TRUE ); - change_safe(); + add_integer_with_range( CFG_PREFIX "bz-end", 100, 0, 100, NULL, END_TEXT, END_LONGTEXT, true ); #define MIDDLE_POS_TEXT N_("middle position (in %)") #define MIDDLE_POS_LONGTEXT N_("Select in percent (50 is center) the position of the middle point (Lagrange) of blended zone") - add_integer_with_range( CFG_PREFIX "bz-middle-pos", 50, 1, 99, NULL, MIDDLE_POS_TEXT, MIDDLE_POS_LONGTEXT, VLC_FALSE ); - change_safe(); + add_integer_with_range( CFG_PREFIX "bz-middle-pos", 50, 1, 99, NULL, MIDDLE_POS_TEXT, MIDDLE_POS_LONGTEXT, false ); #ifdef GAMMA #define RGAMMA_TEXT N_("Gamma (Red) correction") #define RGAMMA_LONGTEXT N_("Select the gamma for the correction of blended zone (Red or Y component)") - add_float_with_range( CFG_PREFIX "bz-gamma-red", 1, 0, 5, NULL, RGAMMA_TEXT, RGAMMA_LONGTEXT, VLC_TRUE ); - change_safe(); + add_float_with_range( CFG_PREFIX "bz-gamma-red", 1, 0, 5, NULL, RGAMMA_TEXT, RGAMMA_LONGTEXT, true ); #define GGAMMA_TEXT N_("Gamma (Green) correction") #define GGAMMA_LONGTEXT N_("Select the gamma for the correction of blended zone (Green or U component)") - add_float_with_range( CFG_PREFIX "bz-gamma-green", 1, 0, 5, NULL, GGAMMA_TEXT, GGAMMA_LONGTEXT, VLC_TRUE ); - change_safe(); + add_float_with_range( CFG_PREFIX "bz-gamma-green", 1, 0, 5, NULL, GGAMMA_TEXT, GGAMMA_LONGTEXT, true ); #define BGAMMA_TEXT N_("Gamma (Blue) correction") #define BGAMMA_LONGTEXT N_("Select the gamma for the correction of blended zone (Blue or V component)") - add_float_with_range( CFG_PREFIX "bz-gamma-blue", 1, 0, 5, NULL, BGAMMA_TEXT, BGAMMA_LONGTEXT, VLC_TRUE ); - change_safe(); + add_float_with_range( CFG_PREFIX "bz-gamma-blue", 1, 0, 5, NULL, BGAMMA_TEXT, BGAMMA_LONGTEXT, true ); #endif #define RGAMMA_BC_TEXT N_("Black Crush for Red") #define RGAMMA_BC_LONGTEXT N_("Select the Black Crush of blended zone (Red or Y component)") @@ -184,46 +176,32 @@ vlc_module_begin(); #define GGAMMA_WL_LONGTEXT N_("Select the White Level of blended zone (Green or U component)") #define BGAMMA_WL_TEXT N_("White Level for Blue") #define BGAMMA_WL_LONGTEXT N_("Select the White Level of blended zone (Blue or V component)") - add_integer_with_range( CFG_PREFIX "bz-blackcrush-red", 140, 0, 255, NULL, RGAMMA_BC_TEXT, RGAMMA_BC_LONGTEXT, VLC_TRUE ); - change_safe(); - add_integer_with_range( CFG_PREFIX "bz-blackcrush-green", 140, 0, 255, NULL, GGAMMA_BC_TEXT, GGAMMA_BC_LONGTEXT, VLC_TRUE ); - change_safe(); - add_integer_with_range( CFG_PREFIX "bz-blackcrush-blue", 140, 0, 255, NULL, BGAMMA_BC_TEXT, BGAMMA_BC_LONGTEXT, VLC_TRUE ); - change_safe(); - add_integer_with_range( CFG_PREFIX "bz-whitecrush-red", 200, 0, 255, NULL, RGAMMA_WC_TEXT, RGAMMA_WC_LONGTEXT, VLC_TRUE ); - change_safe(); - add_integer_with_range( CFG_PREFIX "bz-whitecrush-green", 200, 0, 255, NULL, GGAMMA_WC_TEXT, GGAMMA_WC_LONGTEXT, VLC_TRUE ); - change_safe(); - add_integer_with_range( CFG_PREFIX "bz-whitecrush-blue", 200, 0, 255, NULL, BGAMMA_WC_TEXT, BGAMMA_WC_LONGTEXT, VLC_TRUE ); - change_safe(); - add_integer_with_range( CFG_PREFIX "bz-blacklevel-red", 150, 0, 255, NULL, RGAMMA_BL_TEXT, RGAMMA_BL_LONGTEXT, VLC_TRUE ); - change_safe(); - add_integer_with_range( CFG_PREFIX "bz-blacklevel-green", 150, 0, 255, NULL, GGAMMA_BL_TEXT, GGAMMA_BL_LONGTEXT, VLC_TRUE ); - change_safe(); - add_integer_with_range( CFG_PREFIX "bz-blacklevel-blue", 150, 0, 255, NULL, BGAMMA_BL_TEXT, BGAMMA_BL_LONGTEXT, VLC_TRUE ); - change_safe(); - add_integer_with_range( CFG_PREFIX "bz-whitelevel-red", 0, 0, 255, NULL, RGAMMA_WL_TEXT, RGAMMA_WL_LONGTEXT, VLC_TRUE ); - change_safe(); - add_integer_with_range( CFG_PREFIX "bz-whitelevel-green", 0, 0, 255, NULL, GGAMMA_WL_TEXT, GGAMMA_WL_LONGTEXT, VLC_TRUE ); - change_safe(); - add_integer_with_range( CFG_PREFIX "bz-whitelevel-blue", 0, 0, 255, NULL, BGAMMA_WL_TEXT, BGAMMA_WL_LONGTEXT, VLC_TRUE ); - change_safe(); + add_integer_with_range( CFG_PREFIX "bz-blackcrush-red", 140, 0, 255, NULL, RGAMMA_BC_TEXT, RGAMMA_BC_LONGTEXT, true ); + add_integer_with_range( CFG_PREFIX "bz-blackcrush-green", 140, 0, 255, NULL, GGAMMA_BC_TEXT, GGAMMA_BC_LONGTEXT, true ); + add_integer_with_range( CFG_PREFIX "bz-blackcrush-blue", 140, 0, 255, NULL, BGAMMA_BC_TEXT, BGAMMA_BC_LONGTEXT, true ); + add_integer_with_range( CFG_PREFIX "bz-whitecrush-red", 200, 0, 255, NULL, RGAMMA_WC_TEXT, RGAMMA_WC_LONGTEXT, true ); + add_integer_with_range( CFG_PREFIX "bz-whitecrush-green", 200, 0, 255, NULL, GGAMMA_WC_TEXT, GGAMMA_WC_LONGTEXT, true ); + add_integer_with_range( CFG_PREFIX "bz-whitecrush-blue", 200, 0, 255, NULL, BGAMMA_WC_TEXT, BGAMMA_WC_LONGTEXT, true ); + add_integer_with_range( CFG_PREFIX "bz-blacklevel-red", 150, 0, 255, NULL, RGAMMA_BL_TEXT, RGAMMA_BL_LONGTEXT, true ); + add_integer_with_range( CFG_PREFIX "bz-blacklevel-green", 150, 0, 255, NULL, GGAMMA_BL_TEXT, GGAMMA_BL_LONGTEXT, true ); + add_integer_with_range( CFG_PREFIX "bz-blacklevel-blue", 150, 0, 255, NULL, BGAMMA_BL_TEXT, BGAMMA_BL_LONGTEXT, true ); + add_integer_with_range( CFG_PREFIX "bz-whitelevel-red", 0, 0, 255, NULL, RGAMMA_WL_TEXT, RGAMMA_WL_LONGTEXT, true ); + add_integer_with_range( CFG_PREFIX "bz-whitelevel-green", 0, 0, 255, NULL, GGAMMA_WL_TEXT, GGAMMA_WL_LONGTEXT, true ); + add_integer_with_range( CFG_PREFIX "bz-whitelevel-blue", 0, 0, 255, NULL, BGAMMA_WL_TEXT, BGAMMA_WL_LONGTEXT, true ); #ifndef SYS_MINGW32 #define XINERAMA_TEXT N_("Xinerama option") #define XINERAMA_LONGTEXT N_("Uncheck if you have not used xinerama") - add_bool( CFG_PREFIX "xinerama", 1, NULL, XINERAMA_TEXT, XINERAMA_LONGTEXT, VLC_TRUE ); - change_safe(); + add_bool( CFG_PREFIX "xinerama", 1, NULL, XINERAMA_TEXT, XINERAMA_LONGTEXT, true ); #endif #endif - add_string( CFG_PREFIX "active", NULL, NULL, ACTIVE_TEXT, ACTIVE_LONGTEXT, VLC_TRUE ); - change_safe(); + add_string( CFG_PREFIX "active", NULL, NULL, ACTIVE_TEXT, ACTIVE_LONGTEXT, true ); add_shortcut( "panoramix" ); set_callbacks( Create, Destroy ); vlc_module_end(); -static const char *ppsz_filter_options[] = { +static const char *const ppsz_filter_options[] = { "cols", "rows", "offset-x", "bz-length", "bz-height", "attenuate", "bz-begin", "bz-middle", "bz-end", "bz-middle-pos", "bz-gamma-red", "bz-gamma-green", "bz-gamma-blue", "bz-blackcrush-red", @@ -243,13 +221,13 @@ static const char *ppsz_filter_options[] = { struct vout_sys_t { #ifdef OVERLAP - vlc_bool_t b_autocrop; - vlc_bool_t b_attenuate; + bool b_autocrop; + bool b_attenuate; unsigned int bz_length, bz_height, bz_begin, bz_middle, bz_end, bz_middle_pos; unsigned int i_ratio_max; unsigned int i_ratio; unsigned int a_0, a_1, a_2; - vlc_bool_t b_has_changed; + bool b_has_changed; int lambda[2][VOUT_MAX_PLANES][500]; int cstYUV[2][VOUT_MAX_PLANES][500]; int lambda2[2][VOUT_MAX_PLANES][500]; @@ -267,7 +245,7 @@ struct vout_sys_t #endif #endif #ifndef SYS_MINGW32 - vlc_bool_t b_xinerama; + bool b_xinerama; #endif #endif int i_col; @@ -275,7 +253,7 @@ struct vout_sys_t int i_vout; struct vout_list_t { - vlc_bool_t b_active; + bool b_active; int i_width; int i_height; vout_thread_t *p_vout; @@ -317,10 +295,7 @@ static int Create( vlc_object_t *p_this ) /* Allocate structure */ p_vout->p_sys = malloc( sizeof( vout_sys_t ) ); if( p_vout->p_sys == NULL ) - { - msg_Err( p_vout, "out of memory" ); return VLC_ENOMEM; - } p_vout->pf_init = Init; p_vout->pf_end = End; @@ -382,7 +357,7 @@ case VLC_FOURCC('c','y','u','v'): // packed by 2 p_vout->p_sys->i_col = var_CreateGetInteger( p_vout, CFG_PREFIX "cols" ); p_vout->p_sys->i_row = var_CreateGetInteger( p_vout, CFG_PREFIX "rows" ); -// OS dependant code : Autodetect number of displays in wall +// OS dependent code : Autodetect number of displays in wall #ifdef SYS_MINGW32 if ((p_vout->p_sys->i_col < 0) || (p_vout->p_sys->i_row < 0) ) { @@ -452,7 +427,6 @@ case VLC_FOURCC('c','y','u','v'): // packed by 2 sizeof(struct vout_list_t) ); if( p_vout->p_sys->pp_vout == NULL ) { - msg_Err( p_vout, "out of memory" ); free( p_vout->p_sys ); return VLC_ENOMEM; } @@ -566,7 +540,7 @@ static uint8_t F(uint8_t i, float gamma) *****************************************************************************/ static int AdjustHeight( vout_thread_t *p_vout ) { - vlc_bool_t b_fullscreen = var_CreateGetInteger( p_vout, "fullscreen" ); + bool b_fullscreen = var_CreateGetInteger( p_vout, "fullscreen" ); int i_window_width = p_vout->i_window_width; int i_window_height = p_vout->i_window_height; double d_halfLength = 0; @@ -574,7 +548,7 @@ static int AdjustHeight( vout_thread_t *p_vout ) double d_halfLength_calculated; int i_offset = 0; -// OS DEPENDANT CODE to get display dimensions +// OS DEPENDENT CODE to get display dimensions if (b_fullscreen) { #ifdef SYS_MINGW32 @@ -899,15 +873,20 @@ static void End( vout_thread_t *p_vout ) { int i_index; -#ifdef OVERLAP - var_SetInteger( p_vout, "bz-length", p_vout->p_sys->bz_length); -#endif + DEL_PARENT_CALLBACKS( SendEventsToChild ); + /* Free the fake output buffers we allocated */ for( i_index = I_OUTPUTPICTURES ; i_index ; ) { i_index--; free( PP_OUTPUTPICTURE[ i_index ]->p_data_orig ); } + + RemoveAllVout( p_vout ); + +#ifdef OVERLAP + var_SetInteger( p_vout, "bz-length", p_vout->p_sys->bz_length); +#endif } /***************************************************************************** @@ -919,16 +898,6 @@ static void Destroy( vlc_object_t *p_this ) { vout_thread_t *p_vout = (vout_thread_t *)p_this; -#ifdef GLOBAL_OUTPUT - DEL_CALLBACKS( p_vout->p_sys->p_vout, SendEvents); - vlc_object_detach( p_vout->p_sys->p_vout ); - vout_Destroy( p_vout->p_sys->p_vout ); - DEL_PARENT_CALLBACKS( SendEventsToChild); -#endif - - RemoveAllVout( p_vout ); - DEL_PARENT_CALLBACKS( SendEventsToChild ); - free( p_vout->p_sys->pp_vout ); free( p_vout->p_sys ); @@ -990,7 +959,7 @@ static void RenderPlanarYUV( vout_thread_t *p_vout, picture_t *p_pic ) 0, 0, 0 ) ) == NULL ) { - if( p_vout->b_die || p_vout->b_error ) + if( !vlc_object_alive (p_vout) || p_vout->b_error ) { vout_DestroyPicture( p_vout->p_sys->pp_vout[ i_vout ].p_vout, p_outpic ); @@ -1070,17 +1039,17 @@ static void RenderPlanarYUV( vout_thread_t *p_vout, picture_t *p_pic ) while( p_in < p_in_end ) { #ifndef OVERLAP - p_vout->p_libvlc->pf_memcpy( p_out , p_in, i_copy_pitch); + vlc_memcpy( p_out, p_in, i_copy_pitch); #else if (p_vout->p_sys->i_col > 2) { length /= 2; if (i_col == 0) - p_vout->p_libvlc->pf_memcpy( p_out + length , p_in, i_copy_pitch - length); + vlc_memcpy( p_out + length , p_in, i_copy_pitch - length); else if (i_col + 1 == p_vout->p_sys->i_col) - p_vout->p_libvlc->pf_memcpy( p_out, p_in - length, i_copy_pitch - length); - else - p_vout->p_libvlc->pf_memcpy( p_out, p_in - length, i_copy_pitch); + vlc_memcpy( p_out, p_in - length, i_copy_pitch - length); + else + vlc_memcpy( p_out, p_in - length, i_copy_pitch); if ((i_col == 0)) // black bar @@ -1101,7 +1070,7 @@ static void RenderPlanarYUV( vout_thread_t *p_vout, picture_t *p_pic ) length *= 2; } else - p_vout->p_libvlc->pf_memcpy( p_out , p_in, i_copy_pitch); + vlc_memcpy( p_out , p_in, i_copy_pitch); if (p_vout->p_sys->b_attenuate) { @@ -1276,7 +1245,7 @@ static void RenderPlanarYUV( vout_thread_t *p_vout, picture_t *p_pic ) } #ifdef OVERLAP - if (p_vout->p_sys->b_has_changed) p_vout->p_sys->b_has_changed = VLC_FALSE; + if (p_vout->p_sys->b_has_changed) p_vout->p_sys->b_has_changed = false; #endif } @@ -1334,7 +1303,7 @@ static void RenderPackedRGB( vout_thread_t *p_vout, picture_t *p_pic ) 0, 0, 0 ) ) == NULL ) { - if( p_vout->b_die || p_vout->b_error ) + if( !vlc_object_alive (p_vout) || p_vout->b_error ) { vout_DestroyPicture( p_vout->p_sys->pp_vout[ i_vout ].p_vout, p_outpic ); @@ -1413,18 +1382,18 @@ static void RenderPackedRGB( vout_thread_t *p_vout, picture_t *p_pic ) while( p_in < p_in_end ) { #ifndef OVERLAP - p_vout->p_libvlc->pf_memcpy( p_out, p_in, i_copy_pitch); + vlc_memcpy( p_out, p_in, i_copy_pitch ); #else if (p_vout->p_sys->i_col > 2) { // vertical blend length /= 2; if (i_col == 0) - p_vout->p_libvlc->pf_memcpy( p_out + length, p_in, i_copy_pitch - length); + vlc_memcpy( p_out + length, p_in, i_copy_pitch - length); else if (i_col + 1 == p_vout->p_sys->i_col) - p_vout->p_libvlc->pf_memcpy( p_out, p_in - length, i_copy_pitch - length); - else - p_vout->p_libvlc->pf_memcpy( p_out, p_in - length, i_copy_pitch); + vlc_memcpy( p_out, p_in - length, i_copy_pitch - length); + else + vlc_memcpy( p_out, p_in - length, i_copy_pitch); if ((i_col == 0)) // black bar @@ -1451,7 +1420,7 @@ static void RenderPackedRGB( vout_thread_t *p_vout, picture_t *p_pic ) length *= 2; } else - p_vout->p_libvlc->pf_memcpy( p_out, p_in, i_copy_pitch); + vlc_memcpy( p_out, p_in, i_copy_pitch); // vertical blend // first blended zone @@ -1609,7 +1578,7 @@ static void RenderPackedRGB( vout_thread_t *p_vout, picture_t *p_pic ) } } #ifdef OVERLAP - if (p_vout->p_sys->b_has_changed) p_vout->p_sys->b_has_changed = VLC_FALSE; + if (p_vout->p_sys->b_has_changed) p_vout->p_sys->b_has_changed = false; #endif } @@ -1672,7 +1641,7 @@ static void RenderPackedYUV( vout_thread_t *p_vout, picture_t *p_pic ) 0, 0, 0 ) ) == NULL ) { - if( p_vout->b_die || p_vout->b_error ) + if( !vlc_object_alive (p_vout) || p_vout->b_error ) { vout_DestroyPicture( p_vout->p_sys->pp_vout[ i_vout ].p_vout, p_outpic ); @@ -1791,9 +1760,9 @@ static void RenderPackedYUV( vout_thread_t *p_vout, picture_t *p_pic ) while( p_in < p_in_end ) { #ifndef OVERLAP - p_vout->p_libvlc->pf_memcpy( p_out, p_in, i_copy_pitch); + vlc_memcpy( p_out, p_in, i_copy_pitch); #else - p_vout->p_libvlc->pf_memcpy( p_out + i_col * length, p_in + i_col * length, i_copy_pitch - length); + vlc_memcpy( p_out + i_col * length, p_in + i_col * length, i_copy_pitch - length); p_out += LeftOffset; p_in += LeftOffset; #ifndef GAMMA @@ -1915,7 +1884,7 @@ static void RenderPackedYUV( vout_thread_t *p_vout, picture_t *p_pic ) } } #ifdef OVERLAP - if (p_vout->p_sys->b_has_changed) p_vout->p_sys->b_has_changed = VLC_FALSE; + if (p_vout->p_sys->b_has_changed) p_vout->p_sys->b_has_changed = false; #endif } #endif @@ -1934,10 +1903,7 @@ static void RemoveAllVout( vout_thread_t *p_vout ) DEL_CALLBACKS( p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout, SendEvents ); - vlc_object_detach( - p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout ); - vout_Destroy( - p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout ); + vout_CloseAndRelease( p_vout->p_sys->pp_vout[ p_vout->p_sys->i_vout ].p_vout ); } } } @@ -1948,6 +1914,7 @@ static void RemoveAllVout( vout_thread_t *p_vout ) static int SendEvents( vlc_object_t *p_this, char const *psz_var, vlc_value_t oldval, vlc_value_t newval, void *_p_vout ) { + VLC_UNUSED(oldval); vout_thread_t *p_vout = (vout_thread_t *)_p_vout; int i_vout; vlc_value_t sentval = newval; @@ -2003,7 +1970,7 @@ static int SendEvents( vlc_object_t *p_this, char const *psz_var, static int SendEventsToChild( vlc_object_t *p_this, char const *psz_var, vlc_value_t oldval, vlc_value_t newval, void *p_data ) { - + VLC_UNUSED(oldval); VLC_UNUSED(p_data); vout_thread_t *p_vout = (vout_thread_t *)p_this; int i_row, i_col, i_vout = 0;