Commit f7228aee authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

deinterlace: make pf_end_merge an x86-only thing

parent be3f3666
......@@ -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
}
/* */
......
......@@ -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.
......
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment