Commit Graph

461 Commits

Author SHA1 Message Date
Martin Storsjö
d93488448e Remove some commented out lines 2014-06-10 10:52:26 +03:00
Martin Storsjö
968d87045d Remove an unnecessary local function 2014-06-10 10:52:26 +03:00
Martin Storsjö
40af75c19d Remove the unnecessary WelsSet/GetLogLevel functions
Nothing actually used the variable that these functions
handled.
2014-06-10 10:52:06 +03:00
Martin Storsjö
ba1de16ac2 Make internal logging variables static
This avoids polluting the global namespace.
2014-06-10 09:28:45 +03:00
Martin Storsjö
ab4fe3fdf4 Remove an unused variable 2014-06-10 09:27:54 +03:00
dongzhang
0e0c8b5569 add arm 64 deblock code and Unit Test code 2014-06-10 11:23:51 +08:00
ruil2
4c12f8970c cleanup trace module 2014-06-10 10:24:45 +08:00
Martin Storsjö
7bc3e944ad Get rid of uneven spacing after WELS_EXTERN 2014-06-09 11:03:25 +03:00
Martin Storsjö
57f6bcc4b0 Convert all tabs to spaces in assembly sources, unify indentation
Previously the assembly sources had mixed indentation consisting
of both spaces and tabs, making it quite hard to read unless
the right tab size was used in the editor.

Tabs have been interpreted as 4 spaces in most cases, matching
the surrounding code.
2014-06-01 01:35:43 +03:00
Martin Storsjö
faaf62afad Get rid of double spaces in macro declarations 2014-06-01 01:13:01 +03:00
Martin Storsjö
ac03b8b503 Avoid unnecessary tabs in macro declarations 2014-06-01 01:13:01 +03:00
Martin Storsjö
932a38abc0 Reformat the copyright header of deblocking_neon.S
This makes it identical to the ones in the other files.
2014-05-31 13:44:21 +03:00
ruil2
14e5d740cd clean up expand picture. 2014-05-30 11:05:31 +08:00
dongzha
80fdf09b26 Merge pull request #903 from zhilwang/arm64-sad
Add Arm64 sad code
2014-05-30 09:26:04 +08:00
Sijia Chen
7413032185 using WelsRound for all the double-int32_t conversion 2014-05-20 14:06:31 +08:00
zhiliang wang
e6c9eb9824 Add Sad arm64 code 2014-05-14 17:06:48 +08:00
Martin Storsjö
3cc01c6239 Use CCASFLAGS when assembling .S sources
This allows overriding whether all of CFLAGS should be passed
when assembling.
2014-05-13 19:39:26 +03:00
sijchen
31a4d2aa3e Merge pull request #829 from dongzha/FixBugforDeblocking
Fix a bug in deblocking for neon 32 bit arm implementation for master
2014-05-13 17:21:48 +08:00
Martin Storsjö
6b9167199f Use the built-in define __linux__ instead of the manually set LINUX 2014-05-12 12:14:33 +03:00
dongzhang
218adc7e29 Fix a bug in deblocking for neon 32 bit arm implementation 2014-05-09 14:06:16 +08:00
Martin Storsjö
6e715ddc10 Make an endif comment match the actual condition 2014-05-08 11:14:24 +03:00
huili2
5ed24f216b astyle all files 2014-05-05 19:30:21 -07:00
Martin Storsjö
b8eeda1740 Properly back up and restore XMM registers on win64 in WelsSampleSadFour4x4_sse2 2014-05-04 15:47:56 +03:00
Licai Guo
fe5b8d1a69 refine format 2014-05-04 14:51:05 +08:00
Licai Guo
485b2b5b43 Add IntraSad asm code.
Enable intraSad ASM code

Refine format

Add X86_ASM pretect for intraSad ASM code UT

remove duplicated code.
2014-05-04 12:12:38 +08:00
Martin Storsjö
23f57adaea Do full register loads instead of single-lane loads in DeblockLumaEq4H_neon
Instead of loading the registers one lane at a time, load full
registers and then transpose them.

This is faster, reducing the runtime for the function from about
506 cycles to 434 cycles (tested on a Cortex A8).

This also avoids an issue which seems like a cpu bug, present
on Sony Xperia T (cpu implementer 0x51 architecture 7 variant 0x1
part 0x04d). On such a device, it seemed like the "vswp q9, q10"
could start executing before the previous
vld4.u8 {d20[x],d21[x],d22[x],d23[x]}, [r3], r1
had finished and written back their result. Changing the
"vswp q9, q10" into "vswp q10, q9", or into separate
"vswp d18, d20; vswp d19, d21" (or the other way around) seemed to
avoid the issue. This happened occasionally (a couple times per
100000 invocations or so).
2014-04-28 10:12:16 +03:00
volvet
c65e286036 Merge pull request #738 from mstorsjo/gnu-aarch64
Fix building the aarch64 assembly using gnu binutils
2014-04-25 09:07:43 +08:00
Martin Storsjö
66f58e8357 Add macros for the non-standard mov.16b/mov.8b/ext.16b/ext.8b
This fixes building with gnu binutils, which don't support this
nonstandard form of the instructions.

Once Apple's tools support the proper standard form of the
instructions, the code should be updated to use that everywhere
instead, and these macros should be removed.
2014-04-23 11:47:12 +03:00
Martin Storsjö
7cd175d097 Use the correct ext syntax in the gnu version of macros 2014-04-23 11:47:12 +03:00
Martin Storsjö
b13a399ab5 Use a plain "ret" instead of "ret lr"
This fixes an issue with assembling with gnu binutils.
2014-04-23 11:47:12 +03:00
Martin Storsjö
f2642b308a Add correct arguments to the gnu version of UNPACK_FILTER_SINGLE_TAG_16BITS 2014-04-23 11:47:12 +03:00
Martin Storsjö
90fad9fd98 Add \() to macro arguments to separate the argument from the following .8h or similar 2014-04-23 11:47:12 +03:00
Martin Storsjö
80bd541cbe Remove .syntax unified from the aarch64 common header
This directive isn't available in aarch64 code, only in arm code.
2014-04-23 11:47:12 +03:00
Martin Storsjö
3c2e9cd7bf Regenerate makefiles to include the new arm64 assembly files 2014-04-23 11:44:47 +03:00
Martin Storsjö
764f787dcb Rename the makefile variable for arm assembly sources
This is in preparation for adding support for the aarc64 assembly
files as well.
2014-04-23 10:55:30 +03:00
Martin Storsjö
a842f14a3c Remove .orig files left over from running astyle 2014-04-23 09:24:23 +03:00
Martin Storsjö
45aef90d26 Remove the executable bit from source files 2014-04-23 09:23:56 +03:00
dongzhang
ad9e2dab4f Add Motion Compehension ARM64 Neon Code 2014-04-23 13:26:28 +08:00
Licai Guo
b47606a4ff Merge pull request #733 from dongzha/ExpandPic_ARM64
Add expand picture support for ARM64 NEON
2014-04-23 09:57:39 +08:00
dongzhang
2444327a6c Add expand picture support for ARM64 NEON
Remove duplicate MACROS
2014-04-23 09:14:32 +08:00
Martin Storsjö
564d16c2ef Make Wels*Snprintf return values be non-negative
This makes sure the windows version of these functions behave
more like the posix version. The posix *snprintf returns how
much would have been written if the buffer had been large
enough, which we don't know easily in the windows versions.

This basically means that we can assume that the return value is
>= 0 now, which can simplify the calling code.
2014-04-21 22:03:20 +03:00
Licai Guo
3f2ea77908 Merge pull request #719 from dongzha/MC
Modify ARM32 Neon code for Expand Chroma Picture, when UVWidth%16==8.
2014-04-21 14:38:51 +08:00
Licai Guo
039a547804 give accurate align information for mc copy functions
this can improve the performance for target like javascript
2014-04-19 00:33:23 -07:00
Licai Guo
2f8c539e60 Merge pull request #707 from dongzha/FixIssueMcNEON
Fix potential issue for neon implement on encoder mode decision.
2014-04-17 17:26:25 +08:00
dongzhang
a4f59bc0d7 Modify ARM32 Neon code for Expand Chroma Picture, when UVWidth%16==8. 2014-04-17 15:58:30 +08:00
Licai Guo
4062fa9d34 Merge pull request #703 from zhilwang/pf-test
Move copy_mb neon code to common folder
2014-04-17 11:08:56 +08:00
Licai Guo
3d9d00b27c Update targets.mk 2014-04-17 10:43:10 +08:00
Licai Guo
c8e1a41c29 Move copy_mb neon code to common folder 2014-04-17 10:06:48 +08:00
ruil2
b553468ad3 keep the declaration and definition in the same namespace 2014-04-17 09:45:26 +08:00
huili2
4ab8c88e98 divide copy_mb functions into new file for decoder use from encoder and add files for EC in decoder only. 2014-04-14 20:17:41 -07:00
Dong Zhang
8a4300be50 Fix potential issue for neon implement on encoder mode decision.
Error happens when ME_REFINE_BUF_STRIDE is not equal to 32.
2014-04-13 19:41:29 -07:00
Martin Storsjö
b35c21201b Use the Windows Runtime ThreadPool API for creating threads on Windows Phone
Windows Phone lacks the old CreateThread/beginthreadex APIs for
creating threads. (Technically, the functions still do exist,
but they aren't officially supported and aren't visible in the
headers when targeting Windows Phone.)

Building code that uses the Windows Runtime language extensions
requires building with the -ZW option.
2014-04-01 11:18:49 +03:00
Martin Storsjö
f293d26a62 Use more modern versions of functions that don't exist on Windows Phone 2014-04-01 11:18:48 +03:00
Martin Storsjö
4bcb03c5a0 Remove the unused function WelsSleep
Windows Phone 8 doesn't have Sleep(), but there's no need to
use the function at all.
2014-04-01 11:18:48 +03:00
volvet
9f50e0c91e clean multi-threading macro 2014-03-31 18:24:10 -07:00
ruil2
6b3f89d582 move some common functions to common.cpp and add some functions in common 2014-03-25 15:35:55 +08:00
Licai Guo
e39de8d404 reoranize common to inc/src/x86/arm 2014-03-18 19:41:32 -07:00
volvet
7313ecdbd0 Merge pull request #538 from mstorsjo/use-apple-builtin-define
Use __APPLE__ instead of APPLE_IOS for apple/arm specific features
2014-03-19 09:45:56 +08:00
Licai Guo
d897d362ab Merge pull request #532 from huili2/WELS_CLIP1
Modify MACRO WELS_CLIP1 as inline functions
2014-03-19 08:50:04 +08:00
Martin Storsjö
9586c59b9e Use __APPLE__ instead of APPLE_IOS in the arm assembly sources 2014-03-18 23:15:49 +02:00
Martin Storsjö
73ed237d73 Use __APPLE__ instead of APPLE_IOS for using the apple cpu feature detection 2014-03-18 23:15:49 +02:00
Ethan Hugg
197423f271 Merge pull request #520 from ylatuya/master
Fix compiler warnings and remove dead code
2014-03-18 13:28:02 -07:00
Andoni Morales Alastruey
703c69de81 codec: add a new macro for unused functions
Variables used only for tracing logs can trigger
-Werror=unusef-variable when tracing is disabled.
This macro helps to silent gcc in those casesWIP
2014-03-18 19:15:25 +01:00
Martin Storsjö
e1b5e038d2 Use .obj as suffix for object files on MSVC
This avoids warnings when linking about "unrecognized source file
type, object file assumed".
2014-03-18 19:41:06 +02:00
huili2
090e8cc1ed modify WELS_CLIP1 to be inline functions 2014-03-18 01:54:25 -07:00
volvet
b21411ad7c Merge pull request #511 from mstorsjo/remove-unused-define
Remove the unused FORMAT_COFF define
2014-03-18 16:11:22 +08:00
volvet
fb1958ad13 Merge pull request #519 from mstorsjo/push-xmm-registers
Backup/restore the xmm6-xmm15 SSE registers within asm functions on win64

Reviewed by zhiliang
2014-03-18 15:04:54 +08:00
volvet
b5353c8455 Merge pull request #516 from mstorsjo/fix-yasm-64bit
Fix building with yasm in 64 bit mode
2014-03-18 09:29:42 +08:00
volvet
e75cd2298b Merge pull request #517 from mstorsjo/simplify-x86-asm-func-macro
Fold ALIGN 16 and the function label into WELS_EXTERN
2014-03-18 09:29:17 +08:00
Martin Storsjö
4633626d69 Remove XMMREG_PROTECT
This isn't necessary any longer, when all the assembly routines
take care of restoring registers as necessary.
2014-03-17 13:47:01 +02:00
Martin Storsjö
3cf52554f7 Backup/restore the xmm6-xmm15 SSE registers within asm functions on win64
According to the Win64 ABI, these registers need to be preserved,
and compilers are allowed to rely on their content to stay
available - not only for float usage but for any usage, anywhere,
in the calling C++ code.

This adds a macro which pushes the clobbered registers onto the
stack if targeting win64 (and a matching one which restores them).
The parameter to the macro is the number of xmm registers used
(e.g. if using xmm0 - xmm7, the parameter is 8), or in other
words, the number of the highest xmm register used plus one.

This is similar to how the same issue is handled for the NEON
registers q4-q7 with the vpush instruction, except that they needed
to be preserved on all platforms, not only on one particular platform.

This allows removing the XMMREG_PROTECT_* hacks, which can
easily fail if the compiler chooses to use the callee saved
xmm registers in an unexpected spot.
2014-03-17 13:44:33 +02:00
Martin Storsjö
9293f2f947 Remove commented out rodata sections and tables in assembly files 2014-03-17 13:42:18 +02:00
Martin Storsjö
eec968234d Fold ALIGN 16 and the function label into WELS_EXTERN
This simplifies the structure for all x86 assembly functions,
reducing the amount of duplicated code structure.
2014-03-17 13:35:00 +02:00
Martin Storsjö
04f5bcd68d Use movsxd in SIGN_EXTENSION
This is what nasm ended up assembling movsx with 32 bit input to
anyway.

Keep using plain movsx for 16 bit input.

This fixes building with yasm in 64 bit mode.
2014-03-17 13:26:46 +02:00
Martin Storsjö
f96918283f Remove commented out code for old, 32-bit only x86 assembly function prologues/epilogues 2014-03-17 11:20:11 +02:00
Licai Guo
b5a4d706b9 Merge pull request #496 from mstorsjo/use-sign-extend-macro
Use the SIGN_EXTENSION macro where possible
2014-03-17 16:31:03 +08:00
Licai Guo
1c0ba88b0e Merge pull request #501 from mstorsjo/neon-register-backup
Avoid clobbering the registers q4-q7 in DeblockingBSCalcEnc_neon
2014-03-17 14:05:23 +08:00
Martin Storsjö
fc260b39e0 Remove the unused FORMAT_COFF define
Nothing in the project currently sets FORMAT_COFF - the other generic
branch works just fine on windows.
2014-03-16 17:54:55 +02:00
Martin Storsjö
eb238e6549 Use the SIGN_EXTENSION macro where possible
This shortens the x86 assembly by 134 lines in total.
2014-03-16 17:54:24 +02:00
Martin Storsjö
91e5838621 Indent all WELS_ASM_FUNC_BEGIN properly
By having all of them start at the start of the line, the code
is more consistent and readable.
2014-03-16 12:01:54 +02:00
Martin Storsjö
c82f548e6f Add defines of arg11 and arg12 in asm_inc.asm 2014-03-15 14:42:07 +02:00
Martin Storsjö
cde30c155b Avoid clobbering the registers q4-q7 in DeblockingBSCalcEnc_neon
Remap q5 to q8, q6 to q9, q7 to q10 and q8 to q11, and push
q4 to the stack.

This was missed previously since the codec unittest doesn't
test encoding with loop filter enabled yet.
2014-03-14 22:22:28 +02:00
Martin Storsjö
9199798f22 Fix a typo in a macro name, EXTENTION -> EXTENSION 2014-03-14 10:13:18 +02:00
volvet
6714b8ae99 Merge pull request #463 from mstorsjo/dont-clobber-neon-registers
Avoid clobbering the neon registers q4-q7

Review and verified by zhilwang
2014-03-14 10:28:55 +08:00
Martin Storsjö
efe32b7900 Make arm assembly labels always start from the beginning of the line
A few labels were misformatted.
2014-03-12 12:01:01 +02:00
Martin Storsjö
52e8973869 Mark the stack as non-executable in the arm assembly
Otherwise the linker is forced to enable an executable stack for
executables that the code is linked into.
2014-03-11 14:24:16 +02:00
Martin Storsjö
c011890764 Push clobbered neon registers on the stack
According to the calling convention, the registers q4-q7 should be
preserved by functions. The caller (generated by the compiler) could
be using those registers anywhere for any intermediate data.

Functions that use more than 12 of the qX registers must push
the clobbered registers on the stack in order to be able to restore them
afterwards.

In functions that don't use all 16 registers, but clobber some of
the callee saved registers q4-q7, one or more of them are remapped
to reduce the number of registers that have to be saved/restored.

This incurs a very small (around 0.5%) slowdown in the decoder and
encoder.
2014-03-10 22:07:36 +02:00
Martin Storsjö
811c647c0e Remap registers to avoid clobbering the neon registers q4-q7
According to the calling convention, the registers q4-q7 should be
preserved by functions. The caller (generated by the compiler) could
be using those registers anywhere for any intermediate data.

Functions that use 12 or less of the qX registers can avoid
violating the calling convention by simply using other registers instead
of the callee saved registers q4-q7.

This change only remaps the registers used within functions - therefore
this does not affect performance at all. E.g. in functions using
registers q0-q7, we now use q0-q3 and q8-q11 instead.
2014-03-10 22:07:25 +02:00
Ethan Hugg
3627875986 Merge pull request #456 from mstorsjo/use-common-threadlib
Make the processing lib use mutexes from WelsThreadLib from the common library
2014-03-10 09:45:51 -07:00
ruil2
44a49b1fef Merge pull request #458 from mstorsjo/android-threading
Don't try to set thread scope and scheduling policy on android
2014-03-10 17:26:00 +08:00
ruil2
2539d6e447 Merge pull request #462 from mstorsjo/fix-typos
Fix two typos in variable and macro names
2014-03-10 15:25:20 +08:00
Martin Storsjö
cc7b81f3c3 Fix a typo in arm assembly, LORD -> LOAD 2014-03-09 19:19:38 +02:00
Martin Storsjö
8d6b368a1c Remove unnecessary stray __cdecl annotations in function signature comments in x86 assembly 2014-03-09 19:18:02 +02:00
Martin Storsjö
1c6a910c11 Don't try to set thread scope and scheduling policy on android
These APIs aren't implemented on android.
2014-03-08 20:37:42 +02:00
Martin Storsjö
c5390521ec Make the processing lib use mutexes from WelsThreadLib from the common library
This requires always building the WelsMutex* functions,
even if MT_ENABLED isn't set.
2014-03-08 12:46:25 +02:00
volvet
355bbacc2d Merge pull request #443 from mstorsjo/rerun-mktargets
Rerun mktargets.sh
2014-03-07 18:25:20 +08:00
Martin Storsjö
64b4556d13 Rerun mktargets.sh
This fixes inconsistent indentation of one line, caused by
manually editing one of the targets.mk files.
2014-03-07 11:30:19 +02:00
Martin Storsjö
5b8ee37162 Merge WelsThreadDestroy into WelsThreadJoin
Now calling WelsThreadJoin is enough to finish and clean up
the thread on all platforms.

This unifies the thread cleanup code between windows and unix.

Now all of the threading code should use the exact same codepaths
between windows and unix.
2014-03-07 10:51:28 +02:00
Martin Storsjö
474deacd7a Remove the now unused thread cancellation support
This makes the thread library build on android - android does
not have pthread_cancel.
2014-03-07 10:51:14 +02:00
volvet
38a3fada24 Merge pull request #435 from mstorsjo/threadlib-wait-single-unix
Make WelsMultipleEventsWaitSingleBlocking usable on unix as well
2014-03-07 16:47:38 +08:00
Licai Guo
e5f36822a9 Update targets.mk files 2014-03-07 16:22:59 +08:00
Licai Guo
71467f948a mv mc_neon.S to common,add MC arm code to encoder 2014-03-07 12:18:58 +08:00
volvet
14f5518e6a Merge pull request #437 from mstorsjo/fix-arm-encoder-android
Fix building arm encoder assembly for android
2014-03-07 10:41:34 +08:00
volvet
b3fa8dd334 Merge pull request #418 from mstorsjo/ios-neon-detection
Use the __ARM_NEON__ built-in compiler define for identifying neon capability on iOS
2014-03-07 09:15:17 +08:00
Martin Storsjö
11bdebb12c Explicitly enable the UAL syntax when using gnu tools
Arm assembly has got two variants of the syntax, the old legacy
syntax, and the new modern UAL (unified assembly language) syntax.

Most arm assembly is the same in the both syntaxes, but some
uncommon cases change the order of suffixes - the "subscs"
instruction would be written "subcss" in the old syntax.

The apple tools default to UAL, while the GNU tools (e.g. in
android) require you to specify ".syntax unified" to enable the
new syntax. When enabling the new syntax with the GNU tools, some
cases of "sub r0, r1, lsl #1" needs to be written explicitly as
"sub r0, r0, r1, lsl #1", handled in the previous commit.

This allows using the same, modern syntax for things like subscs,
without needing to have two alternate forms of writing it.
2014-03-06 16:21:54 +02:00
Martin Storsjö
c0043f7053 Use the three-operand form of add/sub with shift
When using unified syntax, the two operand form with a shift
isn't allowed.
2014-03-06 16:21:54 +02:00
Martin Storsjö
4e4bfcc1bc Regenerate makefiles to include the encoder arm assembly 2014-03-06 16:11:54 +02:00
Martin Storsjö
45e059ec5f Rename expand_picture.S to expand_picture_neon.S
This avoids ambiguity in the make based build system about
whether expand_picture.o should be built from expand_picture.S
or expand_picture.asm.
2014-03-06 16:11:40 +02:00
Martin Storsjö
276b585f03 Use the cpu-features NDK library for detecting the number of cores in WelsThreadLib
On arm, the exact same detection is done in WelsCPUFeatureDetect,
but in the x86 version of that function we use x86 cpuid for getting
the core count, and this is not available on all processors. For the
case when cpuid can't tell the core count, use the NDK function as
higher level API.

The thread lib itself doesn't build properly on android yet, but will
do so soon.
2014-03-06 15:28:59 +02:00
Martin Storsjö
d0a81355b0 Add support for using a separate "master event" in WelsMultipleEventsWait*Blocking
This allows making the WelsMultipleEventsWaitSingleBlocking
function work properly in unix, without polling. If a master
event is provided, the function first waits for a signal on
that event - once such a signal is received, it is assumed that
one of the individual events in the list have been signalled as
well. Then the function can proceed to check each of the semaphores
in the list using sem_trywait to find the first one of them that
has been signalled. Assuming that the master event is signalled
in pair with the other events, one of the sem_trywait calls
should succeed.

The same master event is also used in
WelsMultipleEventsWaitAllBlocking, to keep the semaphore values
in sync across calls to the both functions.
2014-03-06 15:03:59 +02:00
Martin Storsjö
de32455d87 Remove the timeout parameter from WelsMultipleEventsWaitSingleBlocking
All users of the function passed the value corresponding to
"infinite", and the (currently unused) unix implementation of it
only supported infinite wait as well.
2014-03-06 15:03:59 +02:00
volvet
8cc332dea1 Merge pull request #432 from zhilwang/arm-asm
Arm asm
2014-03-06 16:50:56 +08:00
volvet
8beb3c8c09 Merge pull request #417 from mstorsjo/unify-event-init
Unify the interface for creating/deleting event objects
2014-03-06 09:13:13 +08:00
volvet
97376c6339 Merge pull request #413 from mstorsjo/remove-commented-code
Remove commented out, unused code
2014-03-05 22:13:35 +08:00
volvet
7ea70491c8 Merge pull request #411 from mstorsjo/arm-add-func-markers
Add .func/.endfunc markers in the arm assembly
2014-03-05 17:40:18 +08:00
Martin Storsjö
f384dde881 Add .func/.endfunc markers in the arm assembly
This adds information to debug builds.

This requires adding a separate definition of WELS_ASM_FUNC_END
for apple tools.
2014-03-05 11:25:51 +02:00
Licai Guo
e7cc8c2780 Add arm asm code for processing. 2014-03-05 16:54:05 +08:00
Martin Storsjö
ef7e05d47d Use the __ARM_NEON__ built-in compiler define for identifying neon capability on iOS
This avoids having to hardcode the names of devices that don't
support neon.

The devices that don't support neon don't run the armv7 variants
of iOS binaries at all - they would need to be built for the armv6
architecture. (Building for armv6 isn't supported at all in
modern iOS SDKs.)

Therefore we can simply use the __ARM_NEON__ built-in compiler
define to check if NEON code is allowed in the current build,
and have the WelsCPUFeatureDetect function return flags accordingly.

The only thing this disallows is doing an armv6 build which would
optionally enable neon code at runtime if run on an armv7 capable
device, but since Apple allows you to build the same binary for
armv7 separately in the same app bundle, and since armv6 building
isn't even possible in the current iOS SDKs, this isn't really a loss.

This is in contrast to the android builds where the armv7 baseline
does not include NEON.
2014-03-05 09:47:05 +02:00
Martin Storsjö
4814d5828d Use unnamed semaphores on linux
This avoids the risk of namespace collisions for named semaphores
(where the names are global for the whole machine), on platforms
where we strictly don't need to use the named semaphores.
2014-03-05 09:36:46 +02:00
Martin Storsjö
5480ffafdf Use the WelsEventOpen interface with an event name on windows as well
This unifies the event creation interface, even if the event
name itself is unused on windows, allowing use the exact same
code to initialize events regardless of the actual platform.

Some ifdefs still remain in the event initialization code, since
some events are only used on windows.
2014-03-05 09:36:04 +02:00
Martin Storsjö
04917cd13f Remove commented out, unused code
Some few lines of commented out code is left, that might be useful
for debugging.
2014-03-05 08:50:59 +02:00
volvet
adb27ff0b1 Merge pull request #405 from mstorsjo/simplify-threads
Adjust WELS_EVENT definitions to allow sharing more code between unix and win32 codepaths
2014-03-05 12:31:15 +08:00
Licai Guo
bb244d736b Partly add arm asm code to encoder. 2014-03-05 10:24:05 +08:00
Martin Storsjö
dae8f4b737 Exclude the arm assembly header as well
This avoids warnings about object files not containing any symbols.
2014-03-04 23:23:19 +02:00
Ethan Hugg
975a3e41bc Merge pull request #404 from mstorsjo/arm-asm-type-func
Mark the arm asm labels as functions
2014-03-04 10:17:07 -08:00
Ethan Hugg
01a2f582c3 Merge pull request #401 from mstorsjo/android-arm-assembly
Enable the arm assembly in android builds
2014-03-04 09:50:07 -08:00
volvet
e61bd1b504 Merge pull request #408 from mstorsjo/exclude-asm-headers
Exclude assembly files that are used as headers
2014-03-04 21:07:42 +08:00
volvet
bc9ee5b145 Merge pull request #406 from mstorsjo/use-proper-define
Use the windows INFINITE define instead of manually casting -1 to uint32_t
2014-03-04 20:57:57 +08:00
Martin Storsjö
773cc4a797 Exclude assembly files that are used as headers
This avoids some warnings about object files not containing any
symbols.
2014-03-04 14:57:36 +02:00
Martin Storsjö
42592217c2 Use the windows INFINITE define instead of manually casting -1 to uint32_t 2014-03-04 14:47:25 +02:00
Martin Storsjö
71bc52d103 Change the unix version of WELS_EVENT to sem_t*
Typedeffing WELS_EVENT as sem_t* makes the typedef behave similarly
to the windows version (typedeffed as HANDLE), unifying the code
that allocates and uses these event objects (getting rid of
most of the need for separate codepaths and ifdefs).
2014-03-04 12:17:32 +02:00
Martin Storsjö
e20930ef73 Mark the arm asm labels as functions
This fixes calling them from thumb code, on linux.
2014-03-04 11:23:04 +02:00
Martin Storsjö
d411d768b6 Add cpu feature detection for generic arm/linux
For platforms without runtime detection, assume whoever built it
with HAVE_NEON actually wanted it.
2014-03-04 10:18:30 +02:00
Martin Storsjö
9cf34e7615 Unify the interface for the different variants of WelsCPUFeatureDetect
The caller of the function should not need to know exactly which
implementation of it is being used.

For the variants that don't support detecting the number of cores,
the pNumberOfLogicProcessors parameter can be left untouched
and the caller will use a higher level API for finding it out.

This simplifies all the calling code, and simplifies adding
more implementations of cpu feature detection.
2014-03-04 10:18:30 +02:00
volvet
4d729c9418 get cpu cores for android 2014-03-04 15:50:41 +08:00
Martin Storsjö
1118dd4f71 Update the makefile generator to support .S arm assembly files
These are built if ASM_ARCH is set to arm.
2014-03-04 08:56:42 +02:00
Martin Storsjö
03e0dcd814 Convert the arm assembly sources to unix newlines 2014-03-04 08:42:28 +02:00
volvet
d9a02d27f2 remove execute attribute of the arm asm files 2014-03-04 11:45:10 +08:00
volvet
f8b0cec68d Merge pull request #387 from zhilwang/arm-asm
Arm asm
2014-03-04 11:08:17 +08:00
volvet
901b89f7ad Merge pull request #376 from mstorsjo/simplify-x86-asm-makefiles
Simplify makefiles with respect to x86 assembly
2014-03-04 10:16:01 +08:00
Ethan Hugg
1eb688264b Merge pull request #395 from mstorsjo/printf-64bit-macro
Use a standard macro for 64 bit printf conversion specifiers
2014-03-03 09:11:51 -08:00
Martin Storsjö
e0951599ea Unify ifdef conditions related to threading code
The two different variants of the threadlib basically are
win32 and unix - use _WIN32 to check for this consistently,
instead of occasionally using __GNUC__ to enable the unix
codepath. (__GNUC__ is also defined on mingw, which still is
a windows platform and should use the _WIN32 code.)
2014-03-03 14:55:53 +02:00
Martin Storsjö
3c7dde97ee Use a standard macro for 64 bit printf conversion specifiers
This avoids duplicating the printf line with an ifdef every
time a 64 bit number needs to be printed.
2014-03-03 12:33:34 +02:00
Licai Guo
21d6b3481f Remove trailing space. 2014-03-03 16:05:07 +08:00
Licai Guo
7768cd0a98 Modify code style, remove trailing space. 2014-03-03 15:42:01 +08:00
volvet
a3f129d8cd Merge pull request #382 from mstorsjo/avoid-overflow-in-timespec
Avoid overflow when populating a struct timespec
2014-03-03 09:05:27 +08:00
volvet
3a602a382b Merge pull request #379 from mstorsjo/simplify-emms-calling
Provide a no-op WelsEmms macro if X86_ASM is disabled
2014-03-03 09:03:41 +08:00
volvet
6c41cccb81 Merge pull request #377 from mstorsjo/threadlib-const-str
Add const to string parameters in WelsThreadLib
2014-03-03 08:53:00 +08:00
volvet
8c7e0a6ac6 Merge pull request #381 from mstorsjo/clarify-threading-comment
Clarify a comment in the threading code
2014-03-03 08:52:10 +08:00
Martin Storsjö
a96d83e762 Remove the broken WelsEventReset function
This function didn't work properly with named semaphores,
which are used in the unix codepaths.

Since it's unused, just remove it instead.
2014-03-03 00:00:17 +02:00
Martin Storsjö
b7db015a8c Avoid overflow when populating a struct timespec
When adding the (dwMilliseconds % 1000) * 1000000 part
to ts.tv_nsec, the ts.tv_nsec field can grow larger than one
whole second. Therefore first add all of dwMilliseconds to
the tv_nsec field and add all whole seconds to the tv_sec
field instead - this way we make sure that the tv_nsec field
actually is less than a second.
2014-03-02 23:53:51 +02:00
Martin Storsjö
d2fc2e47f2 Clarify a comment in the threading code
Named semaphores are used instead of unnamed semaphores
in the unix codepaths, since unnamed semaphores aren't available
on OS X.
2014-03-02 23:51:59 +02:00
Martin Storsjö
dd47d4805f Provide a no-op WelsEmms macro if X86_ASM is disabled
This allows always calling this function, reducing the number
of ifdefs in the calling code.
2014-03-02 23:46:20 +02:00
Martin Storsjö
8db97925a5 Add const to string parameters in WelsThreadLib 2014-03-02 23:43:45 +02:00
Martin Storsjö
3ccd2ae4cf Remove a redundant makefile ifdef
ASM_ARCH=x86 is only set if USE_ASM is enabled.
2014-03-01 23:56:14 +02:00
Licai Guo
b7a25df13f Remove deblocking arm asm code to common folder, add cpu detect for arm, clean some code. 2014-02-28 17:08:24 +08:00
Martin Storsjö
7d2c761604 Allow using the USE_ASM makefile variable for architectures other than x86
Add an ASM_ARCH variable which specifies which kind of assembly
is supposed to be built.
2014-02-28 10:19:53 +02:00
Licai Guo
0fd9db2878 Add ARM 32bit asm code for decoder. 2014-02-28 13:36:34 +08:00
Martin Storsjö
bb5b3978bf Use higher level APIs for getting the number of cores if WelsCPUFeatureDetect didn't report anything
On processors without HTT, WelsCPUFeatureDetect can't return
a number of cores but might still return a nonzero set of
CPU feature flags. Previously the nonzero cpu feature flag
indicated that cpuid worked and the encoder wouldn't use the
higher level API for getting the number of cores, even though the
number of cores was left at 1.
2014-02-26 21:43:46 +02:00
sijchen
e45e859473 Squashed merge from writenal_refactor2 2014-02-20 14:50:04 +08:00
Martin Storsjö
3532781556 Mark source parameters to MC functions as const 2014-02-19 10:19:56 +02:00
Martin Storsjö
ce22f84a2b Regenerate target makefiles after the latest mktargets.py changes 2014-02-12 22:11:05 +02:00
Ethan Hugg
8b8e0d4b3e Merge pull request #274 from mstorsjo/typedef-cleanup
Remove typedefs for standard C++ types
2014-02-10 10:46:12 -08:00
Ethan Hugg
1e549e6f9a Merge pull request #271 from mstorsjo/merge-asm-headers
Merge declarations of shared asm functions into the comon library
2014-02-10 10:40:34 -08:00
Ethan Hugg
007f5ba773 Merge pull request #258 from mstorsjo/endian-cleanup
Avoid endian-specific code
2014-02-10 10:36:05 -08:00
Martin Storsjö
80862eec77 Use the C++ constants true/false instead of defining our own
TRUE/FALSE has intentionally been left in use for the few
platform specific APIs that define these constants themselves
and expect them to be used, for consistency.
2014-02-10 08:06:37 +02:00
Martin Storsjö
f2bd22acd5 Use char instead of str_t 2014-02-10 08:06:37 +02:00
Martin Storsjö
7b96c6756e Use void instead of void_t
There's really no reason for adding a typedef for void.
2014-02-10 08:06:33 +02:00
Martin Storsjö
2b77fe7f49 Use bool instead of bool_t
bool is one of the built in, standard types in C++, there's no need
for a typedef for it.
2014-02-10 08:05:09 +02:00
Martin Storsjö
17d7b5d72e Use bool_t instead of BOOL_T
One bool typedef is already more than enough, two is too many.
2014-02-10 08:05:09 +02:00
Martin Storsjö
0f7a958ce3 Move declarations of functions in mc_chroma/luma.asm into a header in common 2014-02-10 08:05:02 +02:00
Martin Storsjö
ad209c2d14 Move declarations of functions in expand_picture.asm into a header in common 2014-02-10 08:05:02 +02:00
Martin Storsjö
47934b3042 Fix building for win64 with assembly disabled 2014-02-09 02:19:48 +02:00
Martin Storsjö
d0185ab253 Remove redundant /./ parts from pathnames in makefiles
This is mostly a cosmetic improvement for the quiet make output.
2014-02-08 18:46:52 +02:00
Martin Storsjö
e66ad9ab86 Remove the real32_t typedef
The float type is defined in standards and is portably available
on all supported compilers and platforms.
2014-02-08 14:12:03 +02:00
Martin Storsjö
f252acf8a5 Remove fallback defines for NULL
No actual (supported) compiler lacks a definition for NULL, and it
is mandated to be present in stddef.h according to the C89 standard.
2014-02-06 10:38:15 +02:00
orbitcowboy
21197abe96 cleanup unused variable in codec/common/deblocking_common.cpp. 2014-01-31 23:00:30 +01:00
Martin Storsjö
8ecdcc7172 Add a make option for silencing the commands run
Add "V=No" to the make command to silence the make output.

This makes it easier to spot warnings or other unexpected messages
in the build output.
2014-01-30 13:56:19 +02:00
Martin Storsjö
0a14d4c79b Make the deblocking handling endian independent
This avoids having to set a define indicating the endianness.

This doesn't incur any significant measurable slowdown.
2014-01-30 10:33:21 +02:00
Martin Storsjö
21687726d0 Avoid requiring byteswapping functions
Instead of byteswapping a 32 bit word and writing it out as a
whole (which could even possibly lead to crashes due to
incorrect alignment on some platforms), write it out explicitly
in the intended byte order.

This avoids having to set a define indicating the endianness.
2014-01-30 10:16:25 +02:00
Ethan Hugg
fbcd962169 Merge pull request #256 from mstorsjo/bigendian
Make the library work on big endian
2014-01-29 15:24:32 -08:00
Martin Storsjö
cadbec75d8 Fix shifting tricks in deblocking for big endian
The code interprets an array of 4 uint8_t values as one uint32_t
and does shifts on the value. The same optimization can be
kept in big endian as well, but the shift has to be done in the
other direction.

This code could be made truly independent of endianness, but
that could cause some minimal performance degradaion, at least
in theory.

This makes "make test" pass on big endian, assuming that
WORDS_BIGENDIAN is defined while building.
2014-01-29 22:30:33 +02:00
Martin Storsjö
66c39a4fd4 Remove the array_stack_align.h header from the encoder lib
All of these macros are already available in the common
macros.h header. Unify all the macros to be named ENFORCE_*
instead of mixed FORCE/ENFORCE.
2014-01-29 22:07:52 +02:00
Ethan Hugg
08638a9396 Merge pull request #252 from mstorsjo/share-processing-asm
Merge identical assembly code between the processing and encoder libs
2014-01-28 11:04:12 -08:00
Martin Storsjö
3761901ed4 Remove sad.asm from the processing lib, move satd_sad from the encoder to the common lib
sad.asm as used in processing is an exact subset of the
code in satd_sad.asm in the encoder.
2014-01-28 13:54:57 +02:00
Martin Storsjö
e0da5a1686 Remove the now unused STRCAT macro 2014-01-28 12:43:22 +02:00
Martin Storsjö
fa93c88fa2 Implement WelsStrcat based on WelsStrncpy
This is a more convenient behaviour (truncating on overflow and
always null terminating the buffer) compared to the MSVC
safe strcat_s which aborts the process if the string doesn't fit
into the target buffer.

Also mark the source buffer as const in the function prototype.
2014-01-28 12:27:22 +02:00
Martin Storsjö
9840f11784 Remove the now unused count parameter to WelsStrncpy
Also remove manual null termination as WelsStrncpy now always
takes care of it.
2014-01-28 12:13:11 +02:00
Martin Storsjö
a16ccc0b4d Fix the implementations of WelsStrncpy
Make the MSVC "safe" version truncate instead of aborting the
process if the buffer is too small.

Update all the other functions to use the right parameter
(iSizeInBytes, not iCount) as 'n' parameter to strncpy.
(By passing iCount as parameter to the normal strncpy functions,
it meant that the resulting buffer actually never was null
terminated.)

Additionally make sure that the other implementations of WelsStrncpy
always null terminate the resulting buffer, just as the MSVC safe
version does when passed the _TRUNCATE parameter.
2014-01-28 12:08:35 +02:00
Martin Storsjö
74e7c9b6d8 Remove the now unused STRNCPY macro 2014-01-28 12:06:07 +02:00
Martin Storsjö
9b59153263 Remove the STRNLEN/WelsStrnlen compatibility functions
These were essentially useless - if strlen() ever was used as
fallback, it either indicated that those ports of the library
were insecure, or that strnlen never was required at all.
In this case it turned out to be the latter (at least after
the preceding cleanups) - all uses of it were with known null
terminated strings.
2014-01-28 12:00:04 +02:00
Ethan Hugg
4334812eee Merge pull request #235 from mstorsjo/merge-ls-defines
Merge the ls_defines.h headers into the common sub-library
2014-01-27 14:10:00 -08:00
Ethan Hugg
00a76419b4 Merge pull request #237 from mstorsjo/simplify-make-lib-rules
Simplify the make rules for creating libraries
2014-01-27 14:09:20 -08:00
Martin Storsjö
3559f425b4 Consistently use the compat wrappers for file IO
As long as WelsFileHandle* is equal to FILE* this doesn't matter,
but for consistency use the WelsF* functions for all handles
opened by WelsFopen, and use WelsFileHandle* as type for it
instead of FILE*.
2014-01-27 22:49:41 +02:00
Ethan Hugg
e05b607daa Merge pull request #223 from mstorsjo/typedef-cleanup
Clean up typedefs within the libraries
2014-01-27 11:46:44 -08:00
Martin Storsjö
2bcadff204 Use WelsGetTimeOfDay and WelsStrftime instead of LOCALTIME/FTIME/strftime 2014-01-27 19:20:45 +02:00
Martin Storsjö
0439392a79 Fix a typo Millsecond -> Millisecond 2014-01-27 19:20:27 +02:00
Martin Storsjö
3a5ff9b6c8 Use WelsVsnprintf instead of VSPRINTF 2014-01-27 19:18:36 +02:00
Martin Storsjö
f6fe4ddeaa Use WelsSnprintf instead of SNPRINTF 2014-01-27 19:18:36 +02:00
Ethan Hugg
6fea084a42 Merge pull request #234 from mstorsjo/merge-measure-time
Move the measure_time.h header to the common library
2014-01-27 08:57:16 -08:00
Ethan Hugg
2a55578a98 Merge pull request #208 from mstorsjo/remove-unused-mk-field
Remove an unnecessary field from generated makefiles
2014-01-27 08:55:23 -08:00
Ethan Hugg
d5affbaa3c Merge pull request #232 from mstorsjo/merge-fopen-wrappers
Remove the FOPEN macro, use WelsFopen instead
2014-01-27 08:54:20 -08:00
Martin Storsjö
ea8a00278f Simplify the make rules for creating libraries 2014-01-27 14:45:18 +02:00
Martin Storsjö
a44808e276 Merge the ls_defines.h headers into the common sub-library 2014-01-27 14:14:41 +02:00
Martin Storsjö
11bdd8adad Move the measure_time.h header to the common library
Both encoder and decoder versions were functionally equivalent,
but I picked the decoder version (but added the static inline
keywords to it) since the encoder one was quite messy with a lot
of commented out code.
2014-01-27 12:58:23 +02:00
Martin Storsjö
c7b74b2b12 Make sure the buffer is null terminated after strftime
If the buffer is too small, there's no guarantee that it is
null terminated. The docs (on both unix and MSVC) say explicitly
that the function returns 0 and the buffer contents are
indeterminate in this case.
2014-01-27 12:07:00 +02:00
Martin Storsjö
7884e77b2d Make sure the buffer always is null terminated in the *snprintf calls for old MSVC
These functions leave the buffer unterminated in case it was too
small.
2014-01-27 12:06:24 +02:00
Martin Storsjö
4a8f54d767 Use vsnprintf in the old MSVC version of WelsSnprintf as well 2014-01-27 12:06:08 +02:00
Martin Storsjö
0ce42ffb89 Rename WelsVsprintf to WelsVsnprintf, to indicate that it actually checks the length 2014-01-27 12:05:53 +02:00
Martin Storsjö
e42e82aa1f Make WelsVsprintf use vsnprintf, to check the buffer size
Otherwise builds on platforms other than MSVC might be
insecure.

Use vsnprintf_s with the _TRUNCATE flag instead of vsprintf_s
when using MSVC - this truncates the buffer instead of aborting
the whole process in case it's too small.
2014-01-27 12:05:39 +02:00
Martin Storsjö
c174dcd652 Remove the FOPEN macro, use WelsFopen instead
This avoids ifdefs at each place the macro is used.
2014-01-27 10:29:05 +02:00
Martin Storsjö
109fecc547 Consistently use inline instead of __inline 2014-01-27 08:44:48 +02:00
Martin Storsjö
2f5f25b7e3 Merge the encoder/decoder crt_util_safe_x.h into the common lib 2014-01-27 08:03:03 +02:00
Martin Storsjö
8062596d23 Fix building threading for freebsd
FreeBSD (and at least NetBSD as well) still use hw.ncpu without
deprecating it, contrary to apple.
2014-01-26 10:40:24 +02:00
volvet
8420fd3454 Merge pull request #210 from mstorsjo/cleanup-macros
Cleanup the common/macros.h header
2014-01-25 01:05:27 -08:00
Ethan Hugg
58c33b8ee8 Merge pull request #205 from mstorsjo/cleanup-trace
Remove the unused dllname parameter to the trace function
2014-01-24 10:46:51 -08:00
Martin Storsjö
89f2c8bf7c Remove a duplicate median function
The decoder used WelsMedian while the encoder used WELS_MEDIAN.
The former has two different implementations, WELS_MEDIAN was
identical to the disabled version of WelsMedian.

Settle on using the same implementation for both decoder and
encoder - whichever version of the implementations is faster
should be used for both.
2014-01-24 15:57:11 +02:00
Martin Storsjö
95ed830342 Clarify ifdefs around implementations of ENDIAN_FIX 2014-01-24 15:57:11 +02:00
Martin Storsjö
af76ec0a6b Bundle all MSVC/GCC alignment macros together
This reduces the number of lines spent on having the same
ifdef conditions over and over.
2014-01-24 15:57:11 +02:00
Martin Storsjö
9d16e0f897 Remove an unnecessary define of inline for APPLE_IOS
The standard inline keyword is supported just fine when building
for iOS, there's no need to define it there.
2014-01-24 15:57:11 +02:00
Martin Storsjö
d932509994 Move the definition of WELS_ALIGN out from the #if
Both versions of WELS_ALIGN are identical, so there's no need to
be able to switch between the two.
2014-01-24 15:57:11 +02:00
Martin Storsjö
232ba77a1e Remove some unused macros 2014-01-24 15:57:10 +02:00
Martin Storsjö
cfe4e0e2f8 Remove duplicate defines
These are defined identically just a few lines above.
2014-01-24 15:50:26 +02:00
Martin Storsjö
0f18b31d91 Remove unused defines of __FASTCALL 2014-01-24 15:50:26 +02:00
Martin Storsjö
7df69c1482 Remove an unnecessary field from generated makefiles 2014-01-24 15:02:40 +02:00
Martin Storsjö
fd44db01f6 Fix a typo, "vender" -> "vendor" 2014-01-24 15:01:31 +02:00
Martin Storsjö
1f5d786d6a Remove the unused dllname parameter to the trace function 2014-01-24 12:04:29 +02:00
Ethan Hugg
256cd0f610 Merge pull request #172 from volvet/win64_float_fix_for_enc_b
fix win64 float issue, enable AQ assembly
2014-01-22 17:25:03 -08:00
Martin Storsjö
5e10951c47 Use sysctl instead of the deprecated Gestalt API for getting the number of cores on OS X
Also use the __APPLE__ predefined define instead of MACOS for enabling
these code paths.

This also avoids having to link to the CoreServices framework in
order to get the Gestalt function.
2014-01-22 09:44:49 +02:00
Martin Storsjö
af6feaa45c Use sched_getaffinity to get the number of cores on linux
This gets rid of the code that parses /proc/cpuinfo, and avoids
forking within the library.

The previous code also failed build on modern glibc versions
due to ignoring the return value of the system, read and write
system calls.
2014-01-22 09:44:48 +02:00
Martin Storsjö
68f32c3c29 Move the WelsThreadLib files to the common directory/library
This simplifies building the thread library code via the
makefile based build system.
2014-01-21 15:11:07 +02:00
volvet
5c9f447c0e fix win64 float issue, enable AQ assembly 2014-01-21 11:16:48 +08:00
V
a6463be0cc Allow yasm to be used instead of nasm.
http://www.nasm.us/doc/nasmdoc3.html#section-3.4.1 says a zero should
follow $ in numeric constants, but yasm complains about it when not
followed.
2014-01-18 13:59:24 +01:00
Ethan Hugg
2011a7407e Merge pull request #147 from volvet/illegal_assembly_fix
fix illegal instruction use
2014-01-17 14:13:24 -08:00
Martin Storsjö
b842ff30e5 Make the compiler/ar/linker file output parameters overrideable
This is in preparation for allowing building using MSVC via
makefiles.
2014-01-17 12:06:11 +02:00
Martin Storsjö
d7c907198b Fix building in MSVC 2012 by avoiding redefining the inline keyword
While building succeeds in MSVC 2008, it currently fails in 2012
due to error C1189 "The C++ standard library forbids macroizing
keywords", which is caused by doing "#define inline __inline" in
the macros.h header.

This could have been missed before since it only was triggered
if macros.h was included before some other system header was
included that contained checks against these inline defines.
2014-01-17 12:04:27 +02:00
volvet
856f186b8e fix illegal instruction use 2014-01-16 15:57:22 +08:00
Martin Storsjö
65b339815e Get rid of trailing whitespace in the assembly source files 2014-01-13 20:12:04 +02:00
Martin Storsjö
ddcfc09c49 Convert some assembly files to unix newlines
This makes them consistent with the rest of them.
2014-01-13 20:12:04 +02:00
Martin Storsjö
c5ee5f8f05 Remove an unused variable 2014-01-13 12:11:37 +02:00
volvet
14f6c4fa72 Merge pull request #131 from mstorsjo/win64-asm
win64: Use rsp instead of esp
2014-01-12 00:42:29 -08:00
Ethan Hugg
4a8a9aabc1 Merge pull request #122 from volvet/core_number_detect_fix
Core number detect fix
2014-01-11 11:29:45 -08:00
Martin Storsjö
a78f1b2650 win64: Use rsp instead of esp
Using esp works by coincidence as long as the stack pointer is
within the first 4 GB of the address space - which seems to work
as long as the test binary is built with /dynamicbase:no, but breaks
if this option is removed.
2014-01-11 13:12:35 +02:00
volvet
ccaef9fc6d protect code if cpuid.4 return eax as zero 2014-01-11 18:56:22 +08:00
volvet
f2a14600a5 check cpuid max level before use cpuid.4 2014-01-10 15:32:35 +08:00
ekr
eeb11578ca Merge pull request #123 from licaiguo/update-vs2010-files
Update vs2010 files
2014-01-09 18:07:57 -08:00
volvet
1834cb3aca Merge branch 'master' of https://github.com/cisco/openh264 into core_number_detect_fix 2014-01-10 09:06:27 +08:00
Martin Storsjö
3b0844e400 Regenerate the targets makefiles
Commit f38111d76b updated these files
manually (based on older versions of them) to something not generated
by the current mktargets.py/sh, losing the compact pattern rules.
2014-01-09 11:30:40 +02:00
volvet
0e38e5c4e7 add exception handler, the AMD cpu must be single core if it do not support HTT 2014-01-09 16:59:07 +08:00
Licai Guo
77fd9aa4f0 merge macros.h to common/macros.h 2014-01-09 15:41:24 +08:00