shithub: openh264

Download patch

ref: 67534b0fc05c307363d833518d1b119acf558cb0
parent: e7cc8c2780e6ab2c409dc11b73cc204999fb7e7a
author: Licai Guo <[email protected]>
date: Thu Mar 6 09:30:16 EST 2014

arm asm code refine.

--- a/codec/build/iOS/enc/welsenc/welsenc.xcodeproj/project.pbxproj
+++ b/codec/build/iOS/enc/welsenc/welsenc.xcodeproj/project.pbxproj
@@ -638,8 +638,8 @@
 				GCC_PREPROCESSOR_DEFINITIONS = "";
 				"GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*]" = (
 					APPLE_IOS,
-					HAVE_NEON,
 					NO_DYNAMIC_VP,
+					HAVE_NEON,
 				);
 				"GCC_PREPROCESSOR_DEFINITIONS[sdk=iphonesimulator*]" = APPLE_IOS;
 				HEADER_SEARCH_PATHS = (
@@ -668,8 +668,8 @@
 				GCC_PREPROCESSOR_DEFINITIONS = "";
 				"GCC_PREPROCESSOR_DEFINITIONS[sdk=iphoneos*]" = (
 					APPLE_IOS,
-					HAVE_NEON,
 					NO_DYNAMIC_VP,
+					HAVE_NEON,
 				);
 				"GCC_PREPROCESSOR_DEFINITIONS[sdk=iphonesimulator*]" = APPLE_IOS;
 				HEADER_SEARCH_PATHS = (
--- a/codec/encoder/core/arm/pixel_neon.S
+++ b/codec/encoder/core/arm/pixel_neon.S
@@ -463,8 +463,6 @@
 	vpaddl.u32 q0, q0
 	vpaddl.u32 q1, q1
 
-	vshl.u32   q0, #4
-	vshl.u32   q1, #4
 	vst4.32    {d0[0],d1[0],d2[0],d3[0]}, [r0]
 
 	ldmia sp!, {r4-r5, lr}
@@ -540,8 +538,6 @@
 	vpaddl.u32 q0, q0
 	vpaddl.u32 q1, q1
 
-	vshl.u32   q0, #4
-	vshl.u32   q1, #4
 	vst4.32    {d0[0],d1[0],d2[0],d3[0]}, [r0]
 
 	ldmia sp!, {r4-r5, lr}
@@ -606,8 +602,6 @@
 	vpaddl.u32 q0, q0
 	vpaddl.u32 q1, q1
 
-	vshl.u32   q0, #4
-	vshl.u32   q1, #4
 	vst4.32    {d0[0],d1[0],d2[0],d3[0]}, [r0]
 
 	ldmia sp!, {r4-r5, lr}
@@ -671,8 +665,6 @@
 	vpaddl.u32 q0, q0
 	vpaddl.u32 q1, q1
 
-	vshl.u32   q0, #4
-	vshl.u32   q1, #4
 	vst4.32    {d0[0],d1[0],d2[0],d3[0]}, [r0]
 
 	ldmia sp!, {r4-r5, lr}
@@ -737,8 +729,6 @@
 	vpaddl.u32 q0, q0
 	vpaddl.u32 q1, q1
 
-	vshl.u32   q0, #4
-	vshl.u32   q1, #4
 	vst4.32    {d0[0],d1[0],d2[0],d3[0]}, [r0]
 
 WELS_ASM_FUNC_END
--- a/codec/encoder/core/src/expand_pic.cpp
+++ b/codec/encoder/core/src/expand_pic.cpp
@@ -129,7 +129,7 @@
     pFuncList->pfExpandChromaPicture[1] = ExpandPictureChromaAlign_sse2;
   }
 #endif//X86_ASM
-#if defined(X86_ASM)
+#if defined(HAVE_NEON)
   if (kuiCPUFlag & WELS_CPU_NEON) {
     pFuncList->pfExpandLumaPicture	= ExpandPictureLuma_neon;
     pFuncList->pfExpandChromaPicture[0] = ExpandPictureChroma_c;