Changeset 9c08885d924c68f7cd8a84d9cd5ef32f25ba7de1
- Timestamp:
- 02/03/04 13:49:53
(5 years ago)
- Author:
- Sigmund Augdal Helberg <sigmunau@videolan.org>
- git-committer:
- Sigmund Augdal Helberg <sigmunau@videolan.org> 1075812593 +0000
- git-parent:
[a1fc3b9fcf187db72eb1c43dd418e2b0abe18d2e]
- git-author:
- Sigmund Augdal Helberg <sigmunau@videolan.org> 1075812593 +0000
- Message:
configure.ac:
- define CAN_COMPILE_MMX and CAN_COMPILE_MMXEXT if availabe
modules/video_filter/deinterlace/deinterlace.c:
- changed how accelerated code is handled.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| re4ee1c1 |
r9c08885 |
|
| 1 | 1 | dnl Autoconf settings for vlc |
|---|
| 2 | | dnl $Id: configure.ac,v 1.168 2004/01/31 16:44:58 rocky Exp $ |
|---|
| | 2 | dnl $Id: configure.ac,v 1.169 2004/02/03 12:49:53 sigmunau Exp $ |
|---|
| 3 | 3 | |
|---|
| 4 | 4 | AC_INIT(vlc,0.7.1-cvs) |
|---|
| … | … | |
| 932 | 932 | ac_cv_mmx_inline=yes, ac_cv_mmx_inline=no)]) |
|---|
| 933 | 933 | if test "${ac_cv_mmx_inline}" != "no"; then |
|---|
| | 934 | AC_DEFINE(CAN_COMPILE_MMX, 1, Define if \$CC groks MMX inline assembly.) |
|---|
| 934 | 935 | ACCEL_MODULES="${ACCEL_MODULES} ${MMX_MODULES}" |
|---|
| 935 | 936 | fi |
|---|
| … | … | |
| 941 | 942 | ac_cv_mmxext_inline=yes, ac_cv_mmxext_inline=no)]) |
|---|
| 942 | 943 | if test "${ac_cv_mmxext_inline}" != "no"; then |
|---|
| | 944 | AC_DEFINE(CAN_COMPILE_MMXEXT, 1, Define if \$CC groks MMX EXT inline assembly.) |
|---|
| 943 | 945 | ACCEL_MODULES="${ACCEL_MODULES} ${MMXEXT_MODULES}" |
|---|
| 944 | 946 | fi |
|---|
| rd1cf41c |
r9c08885 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2000, 2001, 2002, 2003 VideoLAN |
|---|
| 5 | | * $Id: deinterlace.c,v 1.21 2004/02/01 16:53:11 sigmunau Exp $ |
|---|
| | 5 | * $Id: deinterlace.c,v 1.22 2004/02/03 12:49:53 sigmunau Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Author: Sam Hocevar <sam@zoy.org> |
|---|
| … | … | |
| 57 | 57 | |
|---|
| 58 | 58 | static void MergeGeneric ( void *, const void *, const void *, size_t ); |
|---|
| | 59 | #if defined(CAN_COMPILE_C_ALTIVEC) |
|---|
| 59 | 60 | static void MergeAltivec ( void *, const void *, const void *, size_t ); |
|---|
| | 61 | #endif |
|---|
| | 62 | #if defined(CAN_COMPILE_MMX) |
|---|
| 60 | 63 | static void MergeMMX ( void *, const void *, const void *, size_t ); |
|---|
| | 64 | #endif |
|---|
| | 65 | #if defined(CAN_COMPILE_SSE) |
|---|
| 61 | 66 | static void MergeSSE2 ( void *, const void *, const void *, size_t ); |
|---|
| | 67 | #endif |
|---|
| | 68 | #if defined(CAN_COMPILE_MMX) || defined(CAN_COMPILE_SSE) |
|---|
| 62 | 69 | static void EndMMX ( void ); |
|---|
| | 70 | #endif |
|---|
| 63 | 71 | |
|---|
| 64 | 72 | static int SendEvents ( vlc_object_t *, char const *, |
|---|
| … | … | |
| 147 | 155 | vlc_mutex_init( p_vout, &p_vout->p_sys->filter_lock ); |
|---|
| 148 | 156 | |
|---|
| | 157 | #if defined(CAN_COMPILE_C_ALTIVEC) |
|---|
| 149 | 158 | if( p_vout->p_libvlc->i_cpu & CPU_CAPABILITY_ALTIVEC ) |
|---|
| 150 | 159 | { |
|---|
| … | … | |
| 152 | 161 | p_vout->p_sys->pf_end_merge = NULL; |
|---|
| 153 | 162 | } |
|---|
| | 163 | #endif |
|---|
| | 164 | #if defined(CAN_COMPILE_SSE) |
|---|
| | 165 | if( p_vout->p_libvlc->i_cpu & CPU_CAPABILITY_SSE2 ) |
|---|
| | 166 | { |
|---|
| | 167 | p_vout->p_sys->pf_merge = MergeSSE2; |
|---|
| | 168 | p_vout->p_sys->pf_end_merge = EndMMX; |
|---|
| | 169 | } |
|---|
| | 170 | else |
|---|
| | 171 | #endif |
|---|
| | 172 | #if defined(CAN_COMPILE_MMX) |
|---|
| 154 | 173 | if( p_vout->p_libvlc->i_cpu & CPU_CAPABILITY_MMX ) |
|---|
| 155 | 174 | { |
|---|
| … | … | |
| 157 | 176 | p_vout->p_sys->pf_end_merge = EndMMX; |
|---|
| 158 | 177 | } |
|---|
| 159 | | if( p_vout->p_libvlc->i_cpu & CPU_CAPABILITY_SSE2 ) |
|---|
| 160 | | { |
|---|
| 161 | | p_vout->p_sys->pf_merge = MergeSSE2; |
|---|
| 162 | | p_vout->p_sys->pf_end_merge = EndMMX; |
|---|
| 163 | | } |
|---|
| | 178 | #endif |
|---|
| 164 | 179 | else |
|---|
| 165 | 180 | { |
|---|
| … | … | |
| 840 | 855 | } |
|---|
| 841 | 856 | |
|---|
| | 857 | #if defined(CAN_COMPILE_MMX) |
|---|
| 842 | 858 | static void MergeMMX( void *_p_dest, const void *_p_s1, const void *_p_s2, |
|---|
| 843 | 859 | size_t i_bytes ) |
|---|
| … | … | |
| 866 | 882 | } |
|---|
| 867 | 883 | } |
|---|
| 868 | | |
|---|
| | 884 | #endif |
|---|
| | 885 | |
|---|
| | 886 | #if defined(CAN_COMPILE_SSE) |
|---|
| 869 | 887 | static void MergeSSE2( void *_p_dest, const void *_p_s1, const void *_p_s2, |
|---|
| 870 | 888 | size_t i_bytes ) |
|---|
| … | … | |
| 893 | 911 | } |
|---|
| 894 | 912 | } |
|---|
| 895 | | |
|---|
| | 913 | #endif |
|---|
| | 914 | |
|---|
| | 915 | #if defined(CAN_COMPILE_MMX) || defined(CAN_COMPILE_SSE) |
|---|
| 896 | 916 | static void EndMMX( void ) |
|---|
| 897 | 917 | { |
|---|
| 898 | 918 | __asm__ __volatile__( "emms" :: ); |
|---|
| 899 | 919 | } |
|---|
| 900 | | |
|---|
| | 920 | #endif |
|---|
| | 921 | |
|---|
| | 922 | #ifdef CAN_COMPILE_C_ALTIVEC |
|---|
| 901 | 923 | static void MergeAltivec( void *_p_dest, const void *_p_s1, |
|---|
| 902 | 924 | const void *_p_s2, size_t i_bytes ) |
|---|
| 903 | 925 | { |
|---|
| 904 | | #ifdef CAN_COMPILE_C_ALTIVEC |
|---|
| 905 | 926 | uint8_t *p_dest = (uint8_t*)_p_dest; |
|---|
| 906 | 927 | const uint8_t *p_s1 = (const uint8_t *)_p_s1; |
|---|
| … | … | |
| 931 | 952 | *p_dest++ = ( (uint16_t)(*p_s1++) + (uint16_t)(*p_s2++) ) >> 1; |
|---|
| 932 | 953 | } |
|---|
| | 954 | } |
|---|
| 933 | 955 | #endif |
|---|
| 934 | | } |
|---|
| 935 | 956 | |
|---|
| 936 | 957 | /***************************************************************************** |
|---|