!IF "$(CFG)" == "libx264 - Win32 Release"
-# Begin Custom Build
+# Begin Custom Build - Assembly $(InputPath)
IntDir=.\Release
InputPath=..\..\core\i386\cpu.asm
InputName=cpu
!ELSEIF "$(CFG)" == "libx264 - Win32 Debug"
-# Begin Custom Build
+# Begin Custom Build - Assembly $(InputPath)
IntDir=.\Debug
InputPath=..\..\core\i386\cpu.asm
InputName=cpu
!IF "$(CFG)" == "libx264 - Win32 Release"
-# Begin Custom Build
+# Begin Custom Build - Assembly $(InputPath)
IntDir=.\Release
InputPath=..\..\core\i386\dct.asm
InputName=dct
!ELSEIF "$(CFG)" == "libx264 - Win32 Debug"
-# Begin Custom Build
+# Begin Custom Build - Assembly $(InputPath)
IntDir=.\Debug
InputPath=..\..\core\i386\dct.asm
InputName=dct
# End Source File
# Begin Source File
+SOURCE="..\..\core\i386\mc-c.c"
+
+!IF "$(CFG)" == "libx264 - Win32 Release"
+
+!ELSEIF "$(CFG)" == "libx264 - Win32 Debug"
+
+# PROP Exclude_From_Build 1
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\core\i386\mc.asm
+
+!IF "$(CFG)" == "libx264 - Win32 Release"
+
+# Begin Custom Build - Assembly $(InputPath)
+IntDir=.\Release
+InputPath=..\..\core\i386\mc.asm
+InputName=mc
+
+"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ nasm -f win32 -DPREFIX -o $(IntDir)\$(InputName).obj $(InputPath)
+
+# End Custom Build
+
+!ELSEIF "$(CFG)" == "libx264 - Win32 Debug"
+
+# Begin Custom Build - Assembly $(InputPath)
+IntDir=.\Debug
+InputPath=..\..\core\i386\mc.asm
+InputName=mc
+
+"$(IntDir)\$(InputName).obj" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
+ nasm -f win32 -DPREFIX -o $(IntDir)\$(InputName).obj $(InputPath)
+
+# End Custom Build
+
+!ENDIF
+
+# End Source File
+# Begin Source File
+
SOURCE=..\..\core\i386\pixel.asm
!IF "$(CFG)" == "libx264 - Win32 Release"
-# Begin Custom Build
+# Begin Custom Build - Assembly $(InputPath)
IntDir=.\Release
InputPath=..\..\core\i386\pixel.asm
InputName=pixel
!ELSEIF "$(CFG)" == "libx264 - Win32 Debug"
-# Begin Custom Build
+# Begin Custom Build - Assembly $(InputPath)
IntDir=.\Debug
InputPath=..\..\core\i386\pixel.asm
InputName=pixel
# Begin Source File
SOURCE=..\..\core\csp.c
-
-!IF "$(CFG)" == "libx264 - Win32 Release"
-
-!ELSEIF "$(CFG)" == "libx264 - Win32 Debug"
-
-!ENDIF
-
# End Source File
# Begin Source File
* mc.c: h264 encoder library (Motion Compensation)
*****************************************************************************
* Copyright (C) 2003 Laurent Aimar
- * $Id: mc-c.c,v 1.3 2004/06/10 18:13:38 fenrir Exp $
+ * $Id: mc-c.c,v 1.4 2004/06/17 09:01:19 chenm001 Exp $
*
* Authors: Laurent Aimar <fenrir@via.ecp.fr>
*
return pix[-2] - 5*pix[-1] + 20*(pix[0] + pix[1]) - 5*pix[ 2] + pix[ 3];
}
+#if 0
static inline void pixel_avg_w4( uint8_t *dst, int i_dst_stride,
uint8_t *src1, int i_src1_stride,
uint8_t *src2, int i_src2_stride,
src2 += i_src2_stride;
}
}
+#else
+extern void pixel_avg_w4( uint8_t *dst, int i_dst_stride,
+ uint8_t *src1, int i_src1_stride,
+ uint8_t *src2, int i_src2_stride,
+ int i_height );
+#endif
+
static inline void pixel_avg_w8( uint8_t *dst, int i_dst_stride,
uint8_t *src1, int i_src1_stride,
uint8_t *src2, int i_src2_stride,
;* mc.asm: h264 encoder library
;*****************************************************************************
;* Copyright (C) 2003 x264 project
-;* $Id: mc.asm,v 1.1 2004/06/03 19:27:07 fenrir Exp $
+;* $Id: mc.asm,v 1.2 2004/06/17 09:01:19 chenm001 Exp $
;*
;* Authors: Min Chen <chenm001.163.com> (converted to nasm)
;* Laurent Aimar <fenrir@via.ecp.fr> (init algorithm)
SECTION .text
+cglobal pixel_avg_w4
+
+ALIGN 16
+;-----------------------------------------------------------------------------
+; void pixel_avg_w4( uint8_t *dst, int i_dst_stride,
+; uint8_t *src1, int i_src1_stride,
+; uint8_t *src2, int i_src2_stride,
+; int i_height );
+;-----------------------------------------------------------------------------
+pixel_avg_w4:
+ push ebp
+ push ebx
+ push esi
+ push edi
+
+ mov edi, [esp+20] ; dst
+ mov ebx, [esp+28] ; src1
+ mov ecx, [esp+36] ; src2
+ mov esi, [esp+24] ; i_dst_stride
+ mov eax, [esp+32] ; i_src1_stride
+ mov edx, [esp+40] ; i_src2_stride
+ mov ebp, [esp+44] ; i_height
+ALIGN 4
+.height_loop
+ movd mm0, [ebx]
+ pavgb mm0, [ecx]
+ movd mm1, [ebx+eax]
+ pavgb mm1, [ecx+edx]
+ movd [edi], mm0
+ movd [edi+esi], mm1
+ dec ebp
+ dec ebp
+ lea ebx, [ebx+eax*2]
+ lea ecx, [ecx+edx*2]
+ lea edi, [edi+esi*2]
+ jne .height_loop
+
+ pop edi
+ pop esi
+ pop ebx
+ pop ebp
+ ret
+
+
cglobal mc_copy_w4
ALIGN 16