Commit b036ef20 authored by Damien Fouilleul's avatar Damien Fouilleul

video_chroma: re-enable FPU registers after using MMX instructions

parent 46b85406
...@@ -412,6 +412,15 @@ void E_(I420_RGB16)( vout_thread_t *p_vout, picture_t *p_src, ...@@ -412,6 +412,15 @@ void E_(I420_RGB16)( vout_thread_t *p_vout, picture_t *p_src,
p_v += i_source_margin_c; p_v += i_source_margin_c;
} }
} }
#if defined (MODULE_NAME_IS_i420_rgb_mmx)
/* re-enable FPU registers */
# if defined (HAVE_MMX_INTRINSICS)
_mm_empty();
# else
__asm__ __volatile__ ("emms" ::: "mm0", "mm1", "mm2", "mm3",
"mm4", "mm5", "mm6", "mm7" );
# endif
#endif
} }
/***************************************************************************** /*****************************************************************************
...@@ -575,6 +584,15 @@ void E_(I420_RGB32)( vout_thread_t *p_vout, picture_t *p_src, ...@@ -575,6 +584,15 @@ void E_(I420_RGB32)( vout_thread_t *p_vout, picture_t *p_src,
p_v += i_source_margin_c; p_v += i_source_margin_c;
} }
} }
#if defined (MODULE_NAME_IS_i420_rgb_mmx)
/* re-enable FPU registers */
# if defined (HAVE_MMX_INTRINSICS)
_mm_empty();
# else
__asm__ __volatile__ ("emms" ::: "mm0", "mm1", "mm2", "mm3",
"mm4", "mm5", "mm6", "mm7" );
# endif
#endif
} }
/* Following functions are local */ /* Following functions are local */
......
...@@ -287,6 +287,11 @@ static void I420_YUY2( vout_thread_t *p_vout, picture_t *p_source, ...@@ -287,6 +287,11 @@ static void I420_YUY2( vout_thread_t *p_vout, picture_t *p_source,
p_line1 += i_dest_margin; p_line1 += i_dest_margin;
p_line2 += i_dest_margin; p_line2 += i_dest_margin;
} }
#if defined (MODULE_NAME_IS_i420_yuy2_mmx)
/* re-enable FPU registers */
__asm__ __volatile__ ("emms" ::: "mm0", "mm1", "mm2", "mm3",
"mm4", "mm5", "mm6", "mm7" );
#endif
#if defined (MODULE_NAME_IS_i420_yuy2_altivec) #if defined (MODULE_NAME_IS_i420_yuy2_altivec)
} }
...@@ -341,6 +346,11 @@ static void I420_YVYU( vout_thread_t *p_vout, picture_t *p_source, ...@@ -341,6 +346,11 @@ static void I420_YVYU( vout_thread_t *p_vout, picture_t *p_source,
p_line1 += i_dest_margin; p_line1 += i_dest_margin;
p_line2 += i_dest_margin; p_line2 += i_dest_margin;
} }
#if defined (MODULE_NAME_IS_i420_yuy2_mmx)
/* re-enable FPU registers */
__asm__ __volatile__ ("emms" ::: "mm0", "mm1", "mm2", "mm3",
"mm4", "mm5", "mm6", "mm7" );
#endif
} }
/***************************************************************************** /*****************************************************************************
...@@ -394,9 +404,10 @@ static void I420_UYVY( vout_thread_t *p_vout, picture_t *p_source, ...@@ -394,9 +404,10 @@ static void I420_UYVY( vout_thread_t *p_vout, picture_t *p_source,
p_line1 += i_dest_margin; p_line1 += i_dest_margin;
p_line2 += i_dest_margin; p_line2 += i_dest_margin;
} }
#if defined (MODULE_NAME_IS_i420_yuy2_mmx) #if defined (MODULE_NAME_IS_i420_yuy2_mmx)
__asm__ __volatile__("emms" :: ); /* re-enable FPU registers */
__asm__ __volatile__ ("emms" ::: "mm0", "mm1", "mm2", "mm3",
"mm4", "mm5", "mm6", "mm7" );
#endif #endif
} }
...@@ -461,6 +472,11 @@ static void I420_cyuv( vout_thread_t *p_vout, picture_t *p_source, ...@@ -461,6 +472,11 @@ static void I420_cyuv( vout_thread_t *p_vout, picture_t *p_source,
p_line1 += i_dest_margin; p_line1 += i_dest_margin;
p_line2 += i_dest_margin; p_line2 += i_dest_margin;
} }
#if defined (MODULE_NAME_IS_i420_yuy2_mmx)
/* re-enable FPU registers */
__asm__ __volatile__ ("emms" ::: "mm0", "mm1", "mm2", "mm3",
"mm4", "mm5", "mm6", "mm7" );
#endif
} }
#endif // !defined (MODULE_NAME_IS_i420_yuy2_altivec) #endif // !defined (MODULE_NAME_IS_i420_yuy2_altivec)
......
...@@ -169,6 +169,11 @@ static void I422_YUY2( vout_thread_t *p_vout, picture_t *p_source, ...@@ -169,6 +169,11 @@ static void I422_YUY2( vout_thread_t *p_vout, picture_t *p_source,
} }
p_pixels += i_pitch; p_pixels += i_pitch;
} }
#if defined (MODULE_NAME_IS_i422_yuy2_mmx)
/* re-enable FPU registers */
__asm__ __volatile__ ("emms" ::: "mm0", "mm1", "mm2", "mm3",
"mm4", "mm5", "mm6", "mm7" );
#endif
} }
/***************************************************************************** /*****************************************************************************
...@@ -204,6 +209,11 @@ static void I422_YVYU( vout_thread_t *p_vout, picture_t *p_source, ...@@ -204,6 +209,11 @@ static void I422_YVYU( vout_thread_t *p_vout, picture_t *p_source,
} }
p_pixels += i_pitch; p_pixels += i_pitch;
} }
#if defined (MODULE_NAME_IS_i422_yuy2_mmx)
/* re-enable FPU registers */
__asm__ __volatile__ ("emms" ::: "mm0", "mm1", "mm2", "mm3",
"mm4", "mm5", "mm6", "mm7" );
#endif
} }
/***************************************************************************** /*****************************************************************************
...@@ -239,6 +249,11 @@ static void I422_UYVY( vout_thread_t *p_vout, picture_t *p_source, ...@@ -239,6 +249,11 @@ static void I422_UYVY( vout_thread_t *p_vout, picture_t *p_source,
} }
p_pixels += i_pitch; p_pixels += i_pitch;
} }
#if defined (MODULE_NAME_IS_i422_yuy2_mmx)
/* re-enable FPU registers */
__asm__ __volatile__ ("emms" ::: "mm0", "mm1", "mm2", "mm3",
"mm4", "mm5", "mm6", "mm7" );
#endif
} }
/***************************************************************************** /*****************************************************************************
...@@ -283,6 +298,11 @@ static void I422_cyuv( vout_thread_t *p_vout, picture_t *p_source, ...@@ -283,6 +298,11 @@ static void I422_cyuv( vout_thread_t *p_vout, picture_t *p_source,
#endif #endif
} }
} }
#if defined (MODULE_NAME_IS_i422_yuy2_mmx)
/* re-enable FPU registers */
__asm__ __volatile__ ("emms" ::: "mm0", "mm1", "mm2", "mm3",
"mm4", "mm5", "mm6", "mm7" );
#endif
} }
/***************************************************************************** /*****************************************************************************
......
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