Martin Storsjö
92fa4eb400
Use strlen instead of WelsStrnlen/STRNLEN for known null terminated strings
...
strlen is not dangerous if the string is known to be null
terminated (and MSVC does not warn about its use either).
For the cases in the decoder welsCodecTrace.cpp, the string
passed to all WriteString instances is produced by WelsVsnprintf
which always null terminates the buffer nowadays.
Additionally, as the string was passed to OutputDebugStringA
without any length specifier before, it was already assumed to
be null terminated.
The file name parameter passed to DumpDependencyRec and
DumpRecFrame in encoder.cpp is always null terminated,
which was already assumed as it is passed to WelsFopen as is.
As for the encoder utils.cpp, the strings returned by GetLogPath
are string constants that are null terminated.
2014-01-28 11:40:54 +02:00
Martin Storsjö
082a986990
Use strlen() instead of WelsStrnlen/STRNLEN for string constants
...
A string constant is guaranteed to be null terminated, and thus
doesn't need to use a version of strlen with a fixed buffer size
limit.
2014-01-28 11:38:26 +02:00
Martin Storsjö
da7d3d9bad
Remove an unused and unnecessary string length calculation
...
This is unused since 771ff739b.
2014-01-28 11:38:22 +02:00
Ethan Hugg
5616ddb3a5
Merge pull request #242 from mstorsjo/simplify-debug-file-locations
...
Simplify debugging code by always writing trace files to the current directory
2014-01-27 13:04:29 -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
Martin Storsjö
98614924e2
Remove the now meaningless field sTracePath
2014-01-27 22:37:11 +02:00
Martin Storsjö
771ff739b6
Simplify debugging code - always write debug trace files to the cur directory
...
This reduces the amount of platform ifdefs.
2014-01-27 22:36:50 +02:00
Martin Storsjö
2bcadff204
Use WelsGetTimeOfDay and WelsStrftime instead of LOCALTIME/FTIME/strftime
2014-01-27 19:20:45 +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
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
Ethan Hugg
f3afcd51ff
Merge pull request #231 from mstorsjo/fix-msvc-build
...
Readd a removed include
2014-01-27 07:54:29 -08:00
lyao2
00948873fb
fix spell error of RcInitGoomParameters
2014-01-27 17:29:24 +08: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ö
febf6bb51e
Readd a removed include
...
This fixes builds without NO_DYNAMIC_VP (such as with the MSVC
project files), the include was removed in d809b7e9.
2014-01-27 10:25:32 +02:00
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
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
Varun B Patil
d809b7e9ee
Removed unused headers in encoder core
2014-01-26 11:28:17 +05:30
volvet
84f6602120
1 fix crash bug 963392, 2 update help print: the max supported gop size should be 8
2014-01-26 13:35:31 +08:00
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
volvet
8420fd3454
Merge pull request #210 from mstorsjo/cleanup-macros
...
Cleanup the common/macros.h header
2014-01-25 01:05:27 -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ö
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
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
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
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
ruil2
0a5f4354e9
minor fixes for writting format
2014-01-22 16:09:20 +08:00
ruil2
4fd3bafa65
update Max GOP size and minor fixes for early return
2014-01-22 15:22:58 +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
volvet
1d86dbdc0f
fix coverity issues
2014-01-21 16:17:56 +08:00
Ethan Hugg
ae027b83d8
Merge pull request #159 from mstorsjo/frameskip-option
...
Add a runtime option for controlling frame skipping
2014-01-20 16:56:32 -08: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ö
cee3329ff0
Add a runtime option for controlling frame skipping
2014-01-17 12:39:33 +02:00
Varun B Patil
98ff18d15d
fix typo
2014-01-17 00:50:03 +05:30
volvet
856f186b8e
fix illegal instruction use
2014-01-16 15:57:22 +08:00
Martin Storsjö
2766215545
Add an encoder method for encoding the SPS/PPS without encoding a frame
...
This is useful if using a muxer that requires the SPS/PPS to be
available before the first frame is encoded.
2014-01-11 13:58:56 +02:00
Martin Storsjö
6412884211
Mark some read-only global tables const
2014-01-10 23:48:53 +02:00
Martin Storsjö
61117c85d8
Mark pointers to quantization functions const where possible
2014-01-10 23:48:35 +02:00
ekr
61f1bac9ff
Merge pull request #119 from sijchen/merge6
...
complete the encoder interface of bit rate and frame rate updating
2014-01-08 17:39:08 -08:00
sijchen
4999b816ab
complete the encoder interface of bit rate and frame rate updating
2014-01-09 09:20:35 +08:00
Licai Guo
f38111d76b
file a new commit
...
Squashed commit of the following:
commit 26be4c66686d2d75ba1eb381ae562d30474429b2
Merge: 91bde82 8df0566
Author: Licai Guo <guolicai@gmail.com>
Date: Wed Jan 8 16:56:49 2014 -0800
Merge remote-tracking branch 'upstream/master' into move_to_common
Conflicts:
codec/common/targets.mk
codec/console/dec/targets.mk
codec/decoder/targets.mk
codec/encoder/targets.mk
codec/processing/targets.mk
commit 91bde8209dad40eaa0b26cc75467e4ce52b4c8ae
Merge: c827054 cc2ffee
Author: Licai Guo <guolicai@gmail.com>
Date: Tue Jan 7 20:16:11 2014 -0800
Merge remote-tracking branch 'upstream/master' into move_to_common
commit c8270543fab8e40cb4aebf62d7646068afe19484
Author: Licai Guo <guolicai@gmail.com>
Date: Mon Jan 6 19:12:39 2014 -0800
enable WelsScan4x4DcAc_ssse3
commit c8d2823d54e54cab146098302441ef44a4638382
Author: Licai Guo <guolicai@gmail.com>
Date: Mon Jan 6 18:46:06 2014 -0800
remove trailing white spaces
commit 39866a9cf54db6120aabd6a01afd4aedbead8af0
Author: Licai Guo <guolicai@gmail.com>
Date: Mon Jan 6 18:06:10 2014 -0800
move common code(deblocking and cpu) to common, rename decoder's
Intra-prediction functions prefix.
2014-01-08 17:03:00 -08:00
Ethan Hugg
057d3e507b
Merge pull request #100 from mstorsjo/trailing-whitespace-cpp-comments
...
Remove trailing whitespace in comments
2014-01-06 09:33:52 -08:00
Martin Storsjö
55b82b3cd7
Rerun astyle on the C++ source files
...
astyle was only run on .cpp files this time - already in
ff6b66917 where the style cleanup was done initially, not all
.h files seem to have gotten the same styling (rerunning astyle
on .h files at that commit produces a huge diff).
2014-01-05 14:59:18 +02:00
Martin Storsjö
d3ee1de5ac
Remove trailing whitespace in comments
...
The astyle cleanup keeps trailing whitespace within comments,
but the whitespace here is not significant nor intentional
and thus should be removed.
2014-01-05 14:53:21 +02:00
volvet
ec84f4bcc9
resolve conflict
2014-01-03 14:49:45 +08:00
V
7fa09903cf
Add MinGW platform makefile and related source changes
2013-12-23 21:42:31 +01:00
ekr
c01ffd25c8
Merge pull request #58 from ethanhugg/othercontribs
...
Rollup of minor fixes found by Martin Ettl
2013-12-23 03:53:59 -08:00