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