Martin Storsjö
98bad4f2b3
Don't manually null terminate after calling SNPRINTF
...
The following pattern is unsafe on all platforms:
n = SNPRINTF(buf, ...);
buf[n] = '\0';
On windows, the _snprintf variants return a negative number
if the buffer was too small, thus buf[n] would be outside
of (before the start of) the buffer.
On other platforms, the C99 snprintf function returns the
total number of characters which would have been written if
the buffer had been large enough, which can be larger than
the buffer size itself, and thus buf[n] would be beyond the
end of the buffer.
The C99 snprintf function always null terminate the buffer.
These invocations of SNPRINTF are within !WIN32, so we can
be sure that the SNPRINTF call itself already null terminated
the buffer.
2014-01-27 08:03:56 +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
Ethan Hugg
55336dee64
Merge pull request #221 from mstorsjo/freebsd
...
Update building on FreeBSD
2014-01-26 20:41:11 -08:00
Ethan Hugg
b401098a67
Merge pull request #216 from varunbpatil/processing_cleanup
...
Removed unused header files in processing src
2014-01-26 20:35:32 -08:00
Ethan Hugg
627c1558ae
Merge pull request #215 from varunbpatil/dec_core_cleanup
...
Removed unused headers in decoder core
2014-01-26 20:09:19 -08:00
Ethan Hugg
36054ac2a2
Merge pull request #212 from varunbpatil/enc_core_cleanup
...
Removed unused header files in encoder core
2014-01-26 19:24:35 -08:00
kali2
fa91f77b1b
Merge pull request #214 from licaiguo/fix-rpl
...
fix reference picture modification bug -- review #67
2014-01-26 19:24:25 -08:00
volvet
488cc4ec8e
Merge pull request #228 from mstorsjo/remove-hardcoded-path
...
Remove a hardcoded debug path specific to somebody's environment
2014-01-26 18:17:31 -08:00
volvet
5ac52e31e9
Merge pull request #224 from mstorsjo/msvc2005
...
Fix building on MSVC 2005
2014-01-26 17:51:44 -08:00
Martin Storsjö
7394254fb5
Remove the legacy makefile based build system
...
The new one is much more flexible. The old one is unmaintained.
2014-01-26 16:28:58 +02:00
Martin Storsjö
2963f4ab6e
Remove a hardcoded debug path specific to somebody's environment
...
Instead of using platform specific paths, just use the local
directory instead, reducing the amounts of ifdefs.
2014-01-26 15:22:41 +02:00
Martin Storsjö
e1d96aeaf3
Fix the old MSVC version of WelsGetTimeOfDay
...
The _ftime function returns void.
This fixes building on MSVC 2005.
2014-01-26 10:52:08 +02:00
volvet
d67fbe74ce
Merge pull request #213 from licaiguo/update-resolution
...
change resolution update logic -- review #66
2014-01-26 00:51:35 -08: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
Varun B Patil
e459b91412
Removed unused headers in decoder core
2014-01-26 12:00:57 +05:30
Varun B Patil
d809b7e9ee
Removed unused headers in encoder core
2014-01-26 11:28:17 +05:30
Varun B Patil
7dbdfbcef8
Use correct format specifier to avoid compiler warnings
2014-01-26 00:47:50 +05:30
Varun B Patil
77f47edf3b
include ifdef guard
2014-01-25 18:08:15 +05:30
Varun B Patil
7c6445418b
Removed unused header files in processing src
2014-01-25 15:39:05 +05:30
volvet
8420fd3454
Merge pull request #210 from mstorsjo/cleanup-macros
...
Cleanup the common/macros.h header
2014-01-25 01:05:27 -08:00
licaiguo
058ceb369f
fix reference picture modification bug
2014-01-25 16:37:22 +08:00
licaiguo
1a2dd0c1f1
change resolution update logic
2014-01-25 16:12:52 +08:00
volvet
a1c491499f
Merge pull request #204 from mstorsjo/remove-dynamic-load-trace
...
Remove code for dynamically loading a trace library
2014-01-24 22:32:58 -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
Ethan Hugg
c335d1f1be
Merge pull request #206 from mstorsjo/function-pointer-cleanup
...
Avoid mismatches in function pointer assignments
2014-01-24 10:42:01 -08:00
Ethan Hugg
d821fbfd1c
Merge pull request #202 from mstorsjo/remove-extra-msvc-projects
...
Remove unused/superfluous MSVC project files
2014-01-24 09:48:00 -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ö
44dfad2217
Make the function signatures actually match when used as function pointer
...
Hiding the function signature mismatch with a cast can lead to
more concrete breakage being missed.
2014-01-24 14:51:44 +02:00
Martin Storsjö
d1341554dd
Remove an unnecessary cast when setting function pointers
...
By removing the casts we make sure that the function signature
actually matches and isn't silenced by the cast.
2014-01-24 14:50:39 +02:00
Martin Storsjö
325dd1ce32
Make a function typedef actually use the right type
...
All functions that are assigned to function pointers with this
typedef (WelsHadamardQuant2x2Skip_c and WelsHadamardQuant2x2Skip_mmx)
use int32_t instead of BOOL_T for the return value.
2014-01-24 14:50:31 +02:00
Martin Storsjö
1f5d786d6a
Remove the unused dllname parameter to the trace function
2014-01-24 12:04:29 +02:00
Martin Storsjö
dd7911bfe7
Remove code for dynamically loading a trace library
...
No code exists within the project for building such a trace library.
This also fixes building on OS X with -Wno-deprecated-declarations
removed, since this code contained calls to deprecated functions
within #ifdef MACOS, which now are enabled when building on OS X.
2014-01-24 11:44:19 +02:00
Martin Storsjö
0d99d8102e
Remove the MSVC solution for WelsVP
...
This isn't necessary, it can be built via the encoder solution.
2014-01-24 09:32:54 +02:00
Martin Storsjö
bdf3465a7e
Remove the unused solution and project files for WelsVideoProcessor
...
These are for building source files that aren't present in the
project any longer.
2014-01-24 09:32:54 +02:00
Martin Storsjö
aa0b2896e1
Remove the 2010 and 2012 MSVC project files from WelsVP as well
...
The corresponding files for the decoder and encoder were
removed in ccca04453a
. The 2008 version can be imported into
MSVC 2010 and 2012 just fine, reducing the amount of project files
to keep in sync.
2014-01-24 09:32:22 +02:00
Martin Storsjö
20478d4733
Remove MSVC solution user state files that shouldn't be version controlled
2014-01-24 09:31:45 +02:00
Martin Storsjö
e0d45682d3
Add the include dirs for cpu.h to the 32 bit build targets as well
2014-01-23 23:47:12 +02:00
Martin Storsjö
42623deafb
Update the project file after removing util.cpp
2014-01-23 23:47:08 +02:00
Martin Storsjö
1a51a1042f
Fix 32 bit assembly build with the MSVC project files
2014-01-23 23:47:03 +02:00
Martin Storsjö
c61b040c11
Remove an MSVC resource editor state file
...
This file contains the local UI state of the resource editor,
and should not be committed to version control.
2014-01-23 22:55:36 +02:00
Martin Storsjö
eaf95566ea
Remove an unused function wrapping a standard function
...
This allows removing a whole file.
2014-01-23 22:55:36 +02:00
Martin Storsjö
aec2ed30cd
Simplify an ifdef
...
We don't need to check both platform and compiler at the same time,
checking the compiler is enough here.
2014-01-23 22:55:36 +02:00
Ethan Hugg
e55d777d17
Merge pull request #191 from zhilwang/fix-decoder-win64-asm-issues
...
Fix decoder win64 asm issues
2014-01-23 10:47:13 -08:00
Ethan Hugg
63c03b10b4
Merge pull request #194 from volvet/remove_MEMORY_REQUEST_ALIGN_BYTES
...
remove MEMORY_REQUEST_ALIGN_BYTES
2014-01-23 10:25:27 -08:00
Ethan Hugg
9b0fb562cd
Merge pull request #195 from mstorsjo/disable-cpufeature-logging
...
Only print detected cpu info when in debug mode
2014-01-23 10:13:53 -08:00
Martin Storsjö
3cacaf85f1
Include the executable suffix within make
...
This makes sure that e.g. "make clean" actually removes
the built exe files, and avoids relinking the exe files each
time make is run when cross compiling from linux to windows.
(Make on windows seems to have an exception that knows to skip
rebuilding the 'h264enc' target if 'h264enc' doesn't exist but
'h264enc.exe' does, but this exception doesn't work on normal
unix make.)
2014-01-23 16:15:22 +02:00
Martin Storsjö
edc6aa8fa2
Only print detected cpu info when in debug mode
...
The ifdef guards from this block were (accidentally?) commented
out in ec84f4bc
.
2014-01-23 14:47:37 +02:00
volvet
277242b3a0
remove MEMORY_REQUEST_ALIGN_BYTES
2014-01-23 17:21:13 +08:00
Licai Guo
fc56c7d007
1. use WELS_CLIP1 to replace table look-up;
...
2. fix bugs about buffer overflow
3. add more boundary checks
2014-01-23 00:07:21 -08:00
ruil2
99412b0fc2
Merge pull request #167 from licaiguo/fix-961370
...
fix 961370 -- review request #50
2014-01-22 23:52:30 -08:00
Licai Guo
493c31f6a6
Merge pull request #174 from volvet/coverity_issue_fix
...
fix coverity issues 26973, 26974, 26975, 26976, 26972, 26980.
2014-01-22 23:50:47 -08:00
Martin Storsjö
8583e13e34
Clear the executable bit on source files
2014-01-23 09:30:50 +02:00
huili2
f149843f7a
Merge pull request #190 from licaiguo/add-level-limits
...
Add level limits for decoder
2014-01-22 22:56:39 -08:00
kali2
c0e72338c1
Merge pull request #188 from ruil2/MaxGOPSize_update
...
update Max GOP size and minor fixes for early return-- review request#59
2014-01-22 22:48:41 -08:00
Licai Guo
fe2fa96bcb
update vs project files
2014-01-22 22:14:31 -08:00
Licai Guo
def55c141e
fix decoder win64 asm float issues
2014-01-22 19:01:51 -08:00
ruil2
ca6c00ba18
Merge pull request #168 from licaiguo/fix-960932
...
fix 960932 by add boundary checks on run_before -- review request #51
2014-01-22 18:59:40 -08:00
Licai Guo
8e201827f4
remove blank lines
2014-01-22 18:48:19 -08:00
Licai Guo
34300be44f
add change from master
2014-01-22 18:41:27 -08:00
Licai Guo
9a875532fd
add level limits
2014-01-22 18:35:50 -08:00
Licai Guo
e8fc798d02
add parentheses
2014-01-22 18:27:46 -08:00
ruil2
9efbef67b9
Merge pull request #153 from licaiguo/fix-empty-packets
...
fix crash caused by empty packets and add more checks -- review request #44
2014-01-22 17:44:05 -08: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
Ethan Hugg
691e8379b5
Merge pull request #184 from mstorsjo/c-interface-vtbl
...
Add a public C API to the library by mimicking the C++ ABI with a C struct
2014-01-22 08:11:40 -08:00
Ethan Hugg
99565beb81
Merge pull request #181 from mstorsjo/threadlib-update-macos-linux
...
Update the cpu core count detection functions for linux and mac os
2014-01-22 08:09:39 -08:00
ruil2
0a5f4354e9
minor fixes for writting format
2014-01-22 16:09:20 +08:00
volvet
c4f0159620
Merge pull request #187 from licaiguo/fix-coverage-scan
...
fix issues found by coverage scan -- review request #58
2014-01-22 00:07:02 -08:00
Licai Guo
ff5e6dde2a
remove unnecessary return
2014-01-21 23:56:39 -08:00
Licai Guo
048dea434d
remove unnecessary check, confirmed safe usage
2014-01-21 23:54:21 -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
ruil2
4fd3bafa65
update Max GOP size and minor fixes for early return
2014-01-22 15:22:58 +08:00
Ethan Hugg
ae73411f9a
Merge pull request #176 from mstorsjo/remove-msvc-2010-2012-files
...
Remove the MSVC 2010 and 2012 project files
2014-01-21 19:29:49 -08:00
Licai Guo
a53377314a
fix issues found by coverage scan
2014-01-21 19:13:46 -08:00
Martin Storsjö
36f96cb766
Don't include the headers for dynamically loading the VP library if NO_DYNAMIC_VP is defined
...
bundleloader.h, which is included if MACOS is defined, defines
inline functions that reference bundle loading system functions,
which requires linking to the core foundation framework.
Avoid requiring linking to extra libraries/frameworks if
NO_DYNAMIC_VP is defined.
2014-01-21 21:15:32 +02:00
Martin Storsjö
043575ffb0
Add a public C API to the library
...
Add a struct that matches the C++ interface vtable.
This requires that the C++ interface methods are declared to use
the same calling convention as normal C functions, and that the
C struct exactly matches the layout and ordering of the C++
virtual table - MSVC seemed to reorder methods if there were
overloaded methods.
2014-01-21 20:54:32 +02:00
Martin Storsjö
dd0db820fc
Rename public interface methods to avoid two overloaded methods with the same name
...
This is required to make the order in the C++ virtual table
consistent in MSVC - previously the overloaded methods were
ordered differently in the vtable compared to the interface
declaration.
2014-01-21 20:54:32 +02:00
Ethan Hugg
efaa153bb1
Merge pull request #183 from mstorsjo/remove-unused-typedef
...
Remove unused typedefs
2014-01-21 10:34:14 -08:00
Ethan Hugg
ae0bd3ee02
Merge pull request #182 from mstorsjo/move-threadlib
...
Move the WelsThreadLib files to the common directory/library
2014-01-21 10:33:50 -08:00
Ethan Hugg
b6dcd94cb0
Merge pull request #180 from mstorsjo/remove-disabled-bundle-loading
...
Remove disabled/broken/unused code for bundle loading in the console tools
2014-01-21 10:30:28 -08:00
Ethan Hugg
57a292b106
Merge pull request #179 from mstorsjo/fix-bundleloader-64bit
...
Fix building of macos bundle loading code on 64 bit
2014-01-21 09:46:40 -08:00
Ethan Hugg
c4609af29c
Merge pull request #178 from mstorsjo/remove-system-header-hackery
...
Remove system header/define hackery in welsenc.cpp
2014-01-21 09:45:38 -08:00
Ethan Hugg
47db901f29
Merge pull request #177 from mstorsjo/remove-unused-function
...
Remove an unused function
2014-01-21 09:44:08 -08:00
Martin Storsjö
c196fd1ef0
Remove unused typedefs
2014-01-21 15:44:05 +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
Martin Storsjö
249b4e3d1f
Only build the thread code if multithreading is enabled
...
This allows including the source file in the build even if
multithreading isn't desired.
2014-01-21 15:11:07 +02:00
Martin Storsjö
867d39e01b
Remove system header/define hackery in welsenc.cpp
...
There doesn't seem to be any actual need for this, building
on linux still works just fine.
2014-01-21 15:02:51 +02:00
Martin Storsjö
67405177d9
Remove an unused function
...
This function contains a lot of platform specific constants
whose use is unknown.
2014-01-21 15:01:52 +02:00
Martin Storsjö
d1a6929516
Fix building of macos bundle loading code on 64 bit
2014-01-21 15:00:56 +02:00
Martin Storsjö
41928236e4
Remove unused files about macos bundle loading from the console tools
2014-01-21 14:59:41 +02:00
Martin Storsjö
b903aa8273
Remove/disable broken code for loading the encoder library from a macos bundle
...
This refers to a file "bundlewelsenc.h" which doesn't even
exist in the project at the moment.
The corresponding bundle loading code is not called at all
in the decoder console tool.
2014-01-21 14:59:41 +02:00