volvet
4808eca022
update comments on welsEncoderEncodeExt
2014-02-28 15:27:54 +08:00
volvet
4c951aab83
refine welsEncoderEncodeExt
2014-02-28 15:13:38 +08:00
sijchen
10a4fb04c7
remove macros to clear codes
2014-02-28 14:54:11 +08:00
ruil2
823b3b6820
add verification on return value
2014-02-28 14:31:17 +08:00
volvet
d0d050d8e5
refine encode plus code
2014-02-28 13:06:49 +08:00
Ethan Hugg
e5ee43173d
Merge pull request #361 from mstorsjo/get-core-count
...
Use higher level APIs for getting the number of cores if WelsCPUFeatureDetect didn't report anything
2014-02-27 10:51:17 -08:00
Martin Storsjö
c7ff8876bb
Add a new public method for initializing SEncParamExt to default values
...
This simplifies forward source compatibility when new fields are
added to SEncParamExt - when new fields are added to SEncParamExt,
this method makes sure those fields are initialized to the
default value - otherwise all API users would have to manually check
SEncParamExt every time it is updated to make sure there's no new fields
that should be set to a nonzero value by default (e.g. like
bEnableFrameSkip).
2014-02-26 22:12:11 +02:00
Martin Storsjö
6021ff3908
Refactor initializing defaults in a SEncParamExt to a separate function
2014-02-26 22:03:56 +02: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
Martin Storsjö
e239d9fddc
Fix a typo in a function pointer name
2014-02-26 21:26:54 +02:00
Licai Guo
c9a25e9494
Merge pull request #342 from volvet/rm-unsupported-para
...
remove inter spatial layer prediction in parameters
2014-02-24 13:22:16 +08:00
volvet
f4d8882d2e
remove inter spatial layer prediction in parameters
2014-02-24 11:06:09 +08:00
ruil2
c79e78c4fb
cleanup encoder parameters
2014-02-24 10:40:17 +08:00
volvet
bf0179310c
Merge pull request #340 from zhilwang/ios-support
...
Ios support
2014-02-24 09:50:10 +08:00
Martin Storsjö
b31049df89
Respect the iDLayerQp parameter in SEncParamExt
...
Previously the value set in the parameter struct was ignored
completely.
2014-02-23 00:14:39 +02:00
Martin Storsjö
08c07db3c6
Respect the loop filter disabling encoder parameter
...
Previously the loop filter was unconditionally enabled
regardless of what encoder parameter was set. If using
SEncParamBase instead, the loop filter was always disabled.
2014-02-23 00:14:39 +02:00
Martin Storsjö
8b7fb36f39
Set missed fields in ParamBaseTranscode
...
Previously, these fields kept whatever value was set by
FillDefault. The corresponding fields were set properly within
sSpatialLayers, but the fields within the main struct were left
with the default values.
This doesn't change the hashes in the unit test, since these
fields don't seem to be used in the produced bitstream at all.
2014-02-23 00:14:39 +02:00
volvet
75f8b41bcd
Merge pull request #334 from mstorsjo/cleanup-vp-interface
...
Don't use a custom calling convention for the VP library entry points
2014-02-21 17:31:34 +08:00
Licai Guo
e7ed80c428
Merge pull request #322 from volvet/PreProcessExceptionHandle
...
init the spatial last spatial picture if excption
2014-02-21 17:09:17 +08:00
Martin Storsjö
21e9c83746
Remove the local declarations of the VP interface functions
...
There's no need to define them manually here, the normal
declarations in IWelsVP.h work just fine even if not loading
the WelsVP library dynamically.
2014-02-21 09:32:49 +02:00
Martin Storsjö
19efc59fae
Remove the WELSAPI definition
...
There's no need to specify a custom calling convention for
these functions.
2014-02-21 09:32:46 +02:00
Licai Guo
1f7f82bad4
Add ios support for encoder.
2014-02-21 13:49:49 +08:00
volvet
a783fed407
remove cgs/mgs related code, it is not supported
2014-02-21 12:57:06 +08:00
volvet
25efddd745
remove quality layer configuration. It is not supported
2014-02-21 10:51:47 +08:00
volvet
2bdf6d3736
Merge pull request #325 from sijchen/writenal_refactor3
...
add encoder error code and refactor WelsWriteNal
2014-02-21 08:41:02 +08:00
sijchen
e45e859473
Squashed merge from writenal_refactor2
2014-02-20 14:50:04 +08:00
volvet
e565e50d4d
add missed namespace for encoder, remove un-used file
2014-02-20 14:33:03 +08:00
volvet
d6c5c138ee
init the spatial last spatial picture if excption
2014-02-20 12:50:37 +08:00
ruil2
3ba6a5f4da
Simplify encoder interface--remove EncoderFrame2 from interface
...
function
2014-02-20 10:33:07 +08:00
Martin Storsjö
7acb6cd4d0
Remove the duplicated IWelsVP.h file
...
Instead have the encoder include it directly from the processing
library.
Both copies of the files were mostly identical so far.
2014-02-19 15:00:49 +02:00
Martin Storsjö
3532781556
Mark source parameters to MC functions as const
2014-02-19 10:19:56 +02:00
Martin Storsjö
1a1b78e9c5
Remove unnecessary declarations of static functions
...
These functions don't need to be declared in advance at all.
2014-02-19 09:25:27 +02:00
ruil2
dd93aa90b2
Merge pull request #290 from volvet/develop_b
...
Refactor CWelsPreProcess
2014-02-19 10:18:56 +08:00
volvet
bb58c5c720
correct style
2014-02-19 10:04:17 +08:00
Martin Storsjö
49f4dad1b7
Split the encoder Initialize method into two
...
This avoids the struct type casting and having to pass a parameter
that says which kind of struct it actually is.
2014-02-18 22:51:54 +02:00
Martin Storsjö
a899f05f2d
Don't have SEncParamExt inherit SEncParamBase
...
Instead just duplicate the common fields. These fields had to
be duplicated for the C interface compatibility anyway - but
this way there is no risk to accidentally introduce an ABI
break since there is no need for the layout of SEncParamBase to
actually match the start of SEncParamExt.
2014-02-18 22:51:54 +02:00
Martin Storsjö
80f5aa216a
Don't copy out the SEncParamBase, manually read the individual fields instead
2014-02-18 22:51:53 +02:00
Martin Storsjö
b6502a5406
Respect the bEnableRc field in SEncParamExt
2014-02-18 22:51:53 +02:00
Martin Storsjö
f432ddeea8
Remove a field from SWelsSvcCodingParam that already exists in SEncParamExt
2014-02-18 22:51:53 +02:00
Martin Storsjö
6d6a63a703
Mark the Initialize pointer parameter as const
...
This makes it clear to the callers that the struct will
not be modified by this call.
2014-02-18 22:51:53 +02:00
Martin Storsjö
2438b31323
Don't needlessly copy the input parameter struct
2014-02-18 22:51:53 +02:00
Martin Storsjö
bcd57f412a
Make Param*Transcode take a const reference
...
There is no need to modify the caller's struct.
2014-02-18 22:51:53 +02:00
Martin Storsjö
a1f6e158ef
Move REC_FRAME_COUNT logging into the Initialize2 method
2014-02-18 22:51:53 +02:00
Martin Storsjö
fc970418fa
Fix building with REC_FRAME_COUNT defined
2014-02-18 22:51:53 +02:00
Martin Storsjö
525ad9e7c8
Remove unnecessary checks/initialization from the Initialize method
...
Initialize2 does the same checks and initializes the same fields.
2014-02-18 22:51:53 +02:00
Martin Storsjö
1a32ae7120
Simplify the CWelsH264SVCEncoder::Initialize2 method
...
Remove the useless iInitType parameter, make the method
private within CWelsH264SVCEncoder class, give the pointer
parameter the correct type, avoiding needless casting.
2014-02-18 22:51:53 +02:00
Licai Guo
24359dcde1
Merge pull request #301 from ruil2/temporal_num
...
use temporal layer num and remove gop size in external configure-- review request #94
2014-02-18 21:04:21 +08:00
Martin Storsjö
647fff6e2b
Remove useless ifdefs
...
This is in practice always enabled on all currently supported
platforms.
2014-02-18 11:09:28 +02:00
ruil2
f5cd56ea74
use temporal layer num and remove gop size in external configure
2014-02-18 17:06:41 +08:00
Martin Storsjö
61067d488f
Fix building with MT_DEBUG enabled after the encoder interface update
...
There is no struct named SMulSliceOption any longer.
2014-02-18 10:29:48 +02:00
volvet
592665a21d
Merge branch 'master' of https://github.com/cisco/openh264 into develop_b
2014-02-18 15:34:06 +08:00
ruil2
8e8972b6e8
fix build fail on osx
2014-02-18 15:16:10 +08:00
volvet
5fe3b6e362
update to the last commit: interface change
2014-02-18 14:00:42 +08:00
ruil2
35fa429fb0
encoder interface update step1
2014-02-18 09:51:47 +08:00
volvet
bb354d7c13
name pre-process steps
2014-02-17 14:41:37 +08:00
volvet
600a79bea6
correct code style
2014-02-17 11:46:52 +08:00
volvet
475309307c
move spatial picture related variable to CWelsPreProcess
2014-02-17 11:35:52 +08:00
volvet
488482811c
add update spatial pictures method too CWeslPreProcess
2014-02-17 10:53:46 +08:00
volvet
0a5024d176
move alloc spatial picture and free spatial picture to CWelsPreProcess
2014-02-17 10:24:56 +08:00
volvet
7f59e2f8d9
use forward declaration to replace type cast
2014-02-14 16:50:13 +08:00
Ethan Hugg
dbb894442f
Merge pull request #284 from volvet/clean_spatial_picture_code
...
Clean spatial picture alloc code
2014-02-13 15:18:02 -08:00
volvet
6c5b22ceff
remove duplicate function
2014-02-13 17:40:02 +08:00
volvet
b770bb80c0
Clean spatial picture alloc code
2014-02-13 12:00:02 +08:00
Martin Storsjö
ce22f84a2b
Regenerate target makefiles after the latest mktargets.py changes
2014-02-12 22:11:05 +02:00
Ethan Hugg
b51963c009
Merge pull request #219 from volvet/mozilla_bug_963392_fix
...
fix crash bug 963392 and update the print help text.
2014-02-11 09:36:59 -08:00
volvet
d81f3d5037
Merge pull request #279 from sijchen/sad_fix2
...
fix the range of SAD
2014-02-11 10:32:58 +08: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ö
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ö
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ö
ba6bf7da18
Consistently use inline instead of __inline
...
This seemed to have been missed in 109fecc
.
2014-02-08 14:08:46 +02: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ö
47ec78843a
Don't read an uint8_t array as an uint32_t
...
This makes the code work properly on big endian.
The MC case is similar to how it's done in the encoder.
Neither of these should have any significant performance
impact.
2014-01-29 22:27:55 +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
Ethan Hugg
3c40261256
Merge pull request #251 from mstorsjo/crt-string-cleanup
...
Clean up the rest of the usage of crt_safe_util_x
2014-01-28 09:42:56 -08:00
Ethan Hugg
0d7bafcebc
Merge pull request #248 from mstorsjo/msvc-proj-cleanup
...
MSVC project file warning cleanup
2014-01-28 09:40:17 -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ö
208f033bcd
Use WelsStrcat instead of the STRCAT macro
2014-01-28 12:43:22 +02:00
Martin Storsjö
903f265965
Fix a format string to use the correct type
2014-01-28 12:42:01 +02:00
Martin Storsjö
5c5dcfb14c
Remove an unused global variable and commented out code
2014-01-28 12:36:54 +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ö
215eb56453
Use WelsStrncpy instead of STRNCPY
2014-01-28 12:05:28 +02:00
Martin Storsjö
7791a6d28d
Use WelsSnprintf instead of a combination of strlen and STRNCAT
...
This simplifies the code and makes the buffer size checks
more consistent. Additionally, the previous version wrote
the extra space character without checking if it actually fit
into the buffer.
2014-01-28 12:00:04 +02:00
Martin Storsjö
0318922654
Check the right pointer for being non-null in WelsLogDefault
...
In case the log level was invalid, GetLogTag returns null.
Checking pCtx doesn't make sense since nothing within the
if block uses pCtx.
2014-01-28 12:00:04 +02:00
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
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