[MPlayer-dev-eng] [PATCH] Remove duplicated CPU detection in libmpeg2
Michael Niedermayer
michaelni at gmx.at
Thu Jun 15 11:29:40 CEST 2006
Hi
On Thu, Jun 15, 2006 at 02:35:32PM +0800, jserv at linux2.cc.ntu.edu.tw wrote:
[...]
> +#if defined(HAVE_SSE2)
> + if (gCpuCaps.hasSSE2) {
> + return MPEG2_ACCEL_X86_MMX | MPEG2_ACCEL_X86_MMXEXT | MPEG2_ACCEL_X86_SSE2;
> + }
> +#endif
> +#if defined(HAVE_MMX2) || defined(HAVE_SSE)
> + if (gCpuCaps.hasSSE || gCpuCaps.hasMMX2)
> + return MPEG2_ACCEL_X86_MMX | MPEG2_ACCEL_X86_MMXEXT;
> + }
> +#endif
> +#if defined(HAVE_MMX)
> + if (gCpuCaps.hasMMX || gCpuCaps.has3DNow || gCpuCaps.has3DNowExt)
> + return MPEG2_ACCEL_X86_MMX;
> + }
> +#endif
> + /* No acceleration instructions */
> + return 0;
> +
> +#endif /* End of cpu detection */
> }
> #endif /* ARCH_X86 || ARCH_X86_64 */
>
> Index: libmpeg2/mpeg2.h
> ===================================================================
> --- libmpeg2/mpeg2.h (revision 18717)
> +++ libmpeg2/mpeg2.h (working copy)
> @@ -159,6 +159,7 @@ void mpeg2_custom_fbuf (mpeg2dec_t * mpe
> #define MPEG2_ACCEL_X86_MMX 1
> #define MPEG2_ACCEL_X86_3DNOW 2
3DNOW is ignored by this patch
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is
More information about the MPlayer-dev-eng
mailing list