[vlc-commits] [Git][videolan/vlc][master] deinterlace: remove EndMerge/EndSSE finalization routine
Felix Paul Kühne (@fkuehne)
gitlab at videolan.org
Mon Jul 13 11:44:50 UTC 2026
Felix Paul Kühne pushed to branch master at VideoLAN / VLC
Commits:
c9628afc by Mazen Hassan at 2026-07-13T13:30:20+02:00
deinterlace: remove EndMerge/EndSSE finalization routine
- - - - -
6 changed files:
- modules/video_filter/deinterlace/algo_basic.c
- modules/video_filter/deinterlace/deinterlace.c
- modules/video_filter/deinterlace/deinterlace.h
- modules/video_filter/deinterlace/helpers.c
- modules/video_filter/deinterlace/merge.c
- modules/video_filter/deinterlace/merge.h
Changes:
=====================================
modules/video_filter/deinterlace/algo_basic.c
=====================================
@@ -180,7 +180,6 @@ int RenderLinear( filter_t *p_filter,
memcpy( p_out, p_in, p_pic->p[i_plane].i_pitch );
}
}
- EndMerge();
return VLC_SUCCESS;
}
@@ -215,7 +214,6 @@ int RenderMean( filter_t *p_filter, picture_t *p_outpic, picture_t *p_pic )
p_in += 2 * p_pic->p[i_plane].i_pitch;
}
}
- EndMerge();
return VLC_SUCCESS;
}
@@ -254,6 +252,5 @@ int RenderBlend( filter_t *p_filter, picture_t *p_outpic, picture_t *p_pic )
p_in += p_pic->p[i_plane].i_pitch;
}
}
- EndMerge();
return VLC_SUCCESS;
}
=====================================
modules/video_filter/deinterlace/deinterlace.c
=====================================
@@ -562,11 +562,6 @@ notsupp:
{
vlc_CPU_functions_init_once("deinterlace functions", &funcs);
p_sys->pf_merge = funcs.merges[stdc_trailing_zeros(pixel_size)];
-#if defined(CAN_COMPILE_SSE2) && (defined(__i386__) || defined(__x86_64__))
- p_sys->pf_end_merge = vlc_CPU_SSE2() ? EndSSE : NULL;
-#elif defined(__i386__) || defined(__x86_64__)
- p_sys->pf_end_merge = NULL;
-#endif
}
/* */
=====================================
modules/video_filter/deinterlace/deinterlace.h
=====================================
@@ -70,10 +70,6 @@ typedef struct
/** Merge routine: C, SSE, ALTIVEC, NEON, ... */
void (*pf_merge) ( void *, const void *, const void *, size_t );
-#if defined (__i386__) || defined (__x86_64__)
- /** Merge finalization routine for SSE */
- void (*pf_end_merge) ( void );
-#endif
struct deinterlace_ctx context;
=====================================
modules/video_filter/deinterlace/helpers.c
=====================================
@@ -293,7 +293,6 @@ void ComposeFrame( filter_t *p_filter,
p_in_top += p_inpic_top->p[i_plane].i_pitch;
p_in_bottom += p_inpic_bottom->p[i_plane].i_pitch;
}
- EndMerge();
}
}
}
=====================================
modules/video_filter/deinterlace/merge.c
=====================================
@@ -131,14 +131,3 @@ void MergeAltivec( void *_p_dest, const void *_p_s1,
*p_dest++ = ( *p_s1++ + *p_s2++ + 1) >> 1;
}
#endif
-
-/*****************************************************************************
- * EndMerge routines
- *****************************************************************************/
-
-#if defined(CAN_COMPILE_SSE2)
-void EndSSE( void )
-{
- __asm__ __volatile__( "sfence" ::: "memory" );
-}
-#endif
=====================================
modules/video_filter/deinterlace/merge.h
=====================================
@@ -64,13 +64,7 @@ struct deinterlace_functions {
* Macros
*****************************************************************************/
-/* Convenient Merge() and EndMerge() macros to pick the most appropriate
- merge implementation automatically.
-
- Note that you'll need to include vlc_filter.h and deinterlace.h
- to use these.
-
- * Note that the Open() call of the deinterlace filter automatically selects
+/* Note that the Open() call of the deinterlace filter automatically selects
* the most appropriate merge routine based on the CPU capabilities.
* You can call the most appropriate version automatically, from a function
* in the deinterlace filter, by using the Merge() macro.
@@ -88,17 +82,6 @@ struct deinterlace_functions {
*/
#define Merge p_sys->pf_merge
-/*
- * EndMerge() macro, which must be called after the merge is
- * finished, if the Merge() macro was used to perform the merge.
- */
-#if defined(__i386__) || defined(__x86_64__)
-# define EndMerge() \
- if(p_sys->pf_end_merge) (p_sys->pf_end_merge)()
-#else
-# define EndMerge() (void)0
-#endif
-
/*****************************************************************************
* Merge routines
*****************************************************************************/
@@ -141,21 +124,4 @@ void Merge16BitGeneric( void *_p_dest, const void *_p_s1, const void *_p_s2,
void MergeAltivec ( void *, const void *, const void *, size_t );
#endif
-/*****************************************************************************
- * EndMerge routines
- *****************************************************************************/
-
-#if defined(CAN_COMPILE_SSE2)
-/**
- * SSE merge finalization routine.
- *
- * Should be called after an SSE merge is finished.
- * This exits SSE mode (by executing the "sfence" instruction).
- *
- * The EndMerge() macro detects whether this is needed, and calls if it is,
- * so just use that.
- */
-void EndSSE( void );
-#endif
-
#endif
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/c9628afc4b221b171ec2d9e028782b9eb1247426
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/c9628afc4b221b171ec2d9e028782b9eb1247426
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list