[vlc-commits] deinterlace: make pf_end_merge an x86-only thing
Rémi Denis-Courmont
git at videolan.org
Thu Aug 2 23:41:17 CEST 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Fri Aug 3 00:15:46 2012 +0300| [f7228aeeb5f7f1f8886b027a5ba1d61c912d273e] | committer: Rémi Denis-Courmont
deinterlace: make pf_end_merge an x86-only thing
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=f7228aeeb5f7f1f8886b027a5ba1d61c912d273e
---
modules/video_filter/deinterlace/deinterlace.c | 8 ++------
modules/video_filter/deinterlace/deinterlace.h | 6 ++++--
modules/video_filter/deinterlace/merge.h | 7 ++++++-
3 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/modules/video_filter/deinterlace/deinterlace.c b/modules/video_filter/deinterlace/deinterlace.c
index b03987a..3c6691e 100644
--- a/modules/video_filter/deinterlace/deinterlace.c
+++ b/modules/video_filter/deinterlace/deinterlace.c
@@ -629,10 +629,7 @@ int Open( vlc_object_t *p_this )
#if defined(CAN_COMPILE_C_ALTIVEC)
if( chroma->pixel_size == 1 && vlc_CPU_ALTIVEC() )
- {
p_sys->pf_merge = MergeAltivec;
- p_sys->pf_end_merge = NULL;
- }
else
#endif
#if defined(CAN_COMPILE_SSE)
@@ -661,15 +658,14 @@ int Open( vlc_object_t *p_this )
#endif
#if defined __ARM_NEON__ // FIXME: runtime detect support
if( chroma->pixel_size == 1 && vlc_CPU_ARM_NEON() )
- {
p_sys->pf_merge = MergeNEON;
- p_sys->pf_end_merge = NULL;
- }
else
#endif
{
p_sys->pf_merge = chroma->pixel_size == 1 ? Merge8BitGeneric : Merge16BitGeneric;
+#if defined(__i386__) || defined(__x86_64__)
p_sys->pf_end_merge = NULL;
+#endif
}
/* */
diff --git a/modules/video_filter/deinterlace/deinterlace.h b/modules/video_filter/deinterlace/deinterlace.h
index bb632f8..7c99f74 100644
--- a/modules/video_filter/deinterlace/deinterlace.h
+++ b/modules/video_filter/deinterlace/deinterlace.h
@@ -91,7 +91,7 @@ struct filter_sys_t
{
const vlc_chroma_description_t *chroma;
- int i_mode; /**< Deinterlace mode */
+ uint8_t i_mode; /**< Deinterlace mode */
/* Algorithm behaviour flags */
bool b_double_rate; /**< Shall we double the framerate? */
@@ -100,8 +100,10 @@ struct filter_sys_t
/** Merge routine: C, MMX, SSE, ALTIVEC, NEON, ... */
void (*pf_merge) ( void *, const void *, const void *, size_t );
- /** Merge finalization routine: C, MMX, SSE, ALTIVEC, NEON, ... */
+#if defined (__i386__) || defined (__x86_64__)
+ /** Merge finalization routine for SSE */
void (*pf_end_merge) ( void );
+#endif
/**
* Metadata history (PTS, nb_fields, TFF). Used for framerate doublers.
diff --git a/modules/video_filter/deinterlace/merge.h b/modules/video_filter/deinterlace/merge.h
index 1117b37..285c1a3 100644
--- a/modules/video_filter/deinterlace/merge.h
+++ b/modules/video_filter/deinterlace/merge.h
@@ -64,7 +64,12 @@
* EndMerge() macro, which must be called after the merge is
* finished, if the Merge() macro was used to perform the merge.
*/
-#define EndMerge if(p_filter->p_sys->pf_end_merge) p_filter->p_sys->pf_end_merge
+#if defined(__i386__) || defined(__x86_64__)
+# define EndMerge() \
+ if(p_filter->p_sys->pf_end_merge) (p_filter->p_sys->pf_end_merge)()
+#else
+# define EndMerge() (void)0
+#endif
/*****************************************************************************
* Merge routines
More information about the vlc-commits
mailing list