]> granicus.if.org Git - libx264/commitdiff
update
authorMin Chen <chenm001@163.com>
Thu, 17 Jun 2004 09:01:19 +0000 (09:01 +0000)
committerMin Chen <chenm001@163.com>
Thu, 17 Jun 2004 09:01:19 +0000 (09:01 +0000)
git-svn-id: svn://svn.videolan.org/x264/trunk@9 df754926-b1dd-0310-bc7b-ec298dee348c

build/win32/libx264.dsp
core/i386/mc-c.c
core/i386/mc.asm

index 63a4d6a05c03c05520d3ca3eaa23f3dd64a220af..68b217a20ff585cdcaa001b9c6f7f1f3831ea7f7 100644 (file)
@@ -302,7 +302,7 @@ SOURCE=..\..\core\i386\cpu.asm
 
 !IF  "$(CFG)" == "libx264 - Win32 Release"
 
-# Begin Custom Build
+# Begin Custom Build - Assembly $(InputPath)
 IntDir=.\Release
 InputPath=..\..\core\i386\cpu.asm
 InputName=cpu
@@ -314,7 +314,7 @@ InputName=cpu
 
 !ELSEIF  "$(CFG)" == "libx264 - Win32 Debug"
 
-# Begin Custom Build
+# Begin Custom Build - Assembly $(InputPath)
 IntDir=.\Debug
 InputPath=..\..\core\i386\cpu.asm
 InputName=cpu
@@ -337,7 +337,7 @@ SOURCE=..\..\core\i386\dct.asm
 
 !IF  "$(CFG)" == "libx264 - Win32 Release"
 
-# Begin Custom Build
+# Begin Custom Build - Assembly $(InputPath)
 IntDir=.\Release
 InputPath=..\..\core\i386\dct.asm
 InputName=dct
@@ -349,7 +349,7 @@ InputName=dct
 
 !ELSEIF  "$(CFG)" == "libx264 - Win32 Debug"
 
-# Begin Custom Build
+# Begin Custom Build - Assembly $(InputPath)
 IntDir=.\Debug
 InputPath=..\..\core\i386\dct.asm
 InputName=dct
@@ -368,11 +368,55 @@ SOURCE=..\..\core\i386\dct.h
 # 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
@@ -384,7 +428,7 @@ InputName=pixel
 
 !ELSEIF  "$(CFG)" == "libx264 - Win32 Debug"
 
-# Begin Custom Build
+# Begin Custom Build - Assembly $(InputPath)
 IntDir=.\Debug
 InputPath=..\..\core\i386\pixel.asm
 InputName=pixel
@@ -450,13 +494,6 @@ SOURCE=..\..\core\cpu.c
 # Begin Source File
 
 SOURCE=..\..\core\csp.c
-
-!IF  "$(CFG)" == "libx264 - Win32 Release"
-
-!ELSEIF  "$(CFG)" == "libx264 - Win32 Debug"
-
-!ENDIF 
-
 # End Source File
 # Begin Source File
 
index aa3fd7d46f54d83b7520a2b99fd9d450219d92e9..e409b520d2373a46c7fcd9271d70d4b4d70aba98 100644 (file)
@@ -2,7 +2,7 @@
  * 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>
  *
@@ -180,6 +180,7 @@ static inline int x264_tapfilter1( uint8_t *pix )
     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,
@@ -197,6 +198,13 @@ static inline void pixel_avg_w4( uint8_t *dst,  int i_dst_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,
index 0210a6b3c7c8a8d6f9238a554cf0b405e100b23e..0f18c04d24439a9f8b2a285f976524b6b71df567 100644 (file)
@@ -2,7 +2,7 @@
 ;* 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)
@@ -67,6 +67,50 @@ ALIGN 16
 
 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