Martin Storsjö
5df2e2a996
Use SliceModeEnum as data type for the slice mode fields
...
This makes the use of the field clearer and safer by allowing
the compiler check that users actually assign proper enum
values.
2014-03-08 00:23:58 +02:00
Martin Storsjö
ce7b00ea72
Get rid of an unnecessary cast by declaring the right pointer type
2014-03-08 00:17:30 +02:00
Ethan Hugg
09b45e3ef9
Merge pull request #440 from licaiguo/refine-pps-sps
...
Refine pps sps
2014-03-07 11:02:02 -08:00
Ethan Hugg
fb4f677f77
Merge pull request #446 from mstorsjo/remove-unnecessary-public-param
...
Move the iCountThreadsNum field to SWelsSvcCodingParam
2014-03-07 09:18:52 -08:00
Ethan Hugg
7632510209
Merge pull request #450 from mstorsjo/publish-slice-mode-enum
...
Move the slice mode enum to the public API
2014-03-07 09:17:03 -08:00
volvet
f62492716f
Merge pull request #449 from mstorsjo/avoid-opaque-pointer
...
Make ParamValidationExt use the actual type instead of a void pointer
2014-03-08 00:27:47 +08:00
Martin Storsjö
014f4d8250
Merge the slice mode comments with the enum
2014-03-07 14:53:29 +02:00
Martin Storsjö
5f1c207845
Move the slice mode enum to the public header
...
This simplifies setting the slice mode in the public API.
2014-03-07 14:53:29 +02:00
Martin Storsjö
495a4a392e
Make ParamValidationExt use the actual type instead of a void pointer
2014-03-07 14:51:34 +02:00
Martin Storsjö
555bf6340f
Remove a misleading cast
...
uiSliceSizeConstraint is not of the SliceMode type, but is a normal
int.
2014-03-07 14:49:33 +02:00
Martin Storsjö
656e4c5c35
Move the iCountThreadsNum field to SWelsSvcCodingParam
...
There is no point in the user setting this field, it's only used
as an internal field within the encoder.
2014-03-07 14:48:38 +02:00
Martin Storsjö
dbc324d5bb
Use the iMultipleThreadIdc field from SEncParamExt
2014-03-07 14:47:43 +02:00
volvet
355bbacc2d
Merge pull request #443 from mstorsjo/rerun-mktargets
...
Rerun mktargets.sh
2014-03-07 18:25:20 +08:00
volvet
3382e8f8c4
Merge pull request #441 from mstorsjo/remove-stray-macro-parameters
...
Remove unused/undeclared arm assembly macro parameters
2014-03-07 18:24:33 +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ö
b4aa9be7de
Use WelsThreadJoin on windows as well
...
This avoids using a separate event just for signalling that
a thread has finished running.
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
Martin Storsjö
baaa38737e
Use pExitEncodeEvent instead of thread cancellation on unix as well
...
This works now that we've got a suitably working implementation
of WelsMultipleEventsWaitSingleBlocking.
2014-03-07 10:49:39 +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
1b9aae8434
Merge pull request #439 from zhilwang/mc-arm-asm
...
mv mc_neon.S to common,add MC arm code to encoder
2014-03-07 16:36:48 +08:00
ruil2
b3c45946ff
modify typing format
2014-03-07 16:29:12 +08:00
Martin Storsjö
c87bb2b449
Remove unused/undeclared arm assembly macro parameters
...
The SAD_VAR_16_END macro only takes 3 parameters, never 4,
and SAD_SSD_16_END never is called with more than 3 parameters
either.
2014-03-07 10:26:54 +02:00
Licai Guo
e5f36822a9
Update targets.mk files
2014-03-07 16:22:59 +08:00
Licai Guo
d986c27b9d
remove mc_neon.S from encoder
2014-03-07 16:11:36 +08:00
ruil2
f0c6c2b318
Merge branch 'master' of https://github.com/cisco/openh264 into encoder_update
2014-03-07 15:59:23 +08:00
Licai Guo
8ad9e0b60d
use temp buffer to store new arrived PPS/SPS
2014-03-06 22:05:12 -08:00
Licai Guo
8a3518f7be
set bAuReadyFlag to true when we meet a PPS
2014-03-06 21:50:31 -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
Licai Guo
a4cecd8004
Merge pull request #426 from volvet/simplify-layer-process
...
simplify-layer-process
2014-03-07 10:58:28 +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
ruil2
594fc4fe7b
dump file refactor
2014-03-07 10:23:25 +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
Ethan Hugg
2f2801dc78
Merge pull request #434 from mstorsjo/threadlib-core-count-android
...
Use the cpu-features NDK library for detecting the number of cores in WelsThreadLib
2014-03-06 08:02:28 -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ö
f1502c26e3
Don't use WELS_ASM_FUNC_END in the middle of a function
...
WELS_ASM_FUNC_END declares the end of the function, and needs
to be paired with WELS_ASM_FUNC_BEGIN.
2014-03-06 16:21:54 +02:00
Martin Storsjö
8ba79262bf
Rename a function to avoid conflicts between almost duplicate neon functions
...
There's a different version of the same function in the encoder,
but they're not identical - the encoder version has got stricter
alignment requirements.
If someone can confirm that it is ok to use the function from the
encoder, pixel_sad_neon.S in processing could be deleted, and the
encoder version moved to codec/common instead.
2014-03-06 16:19:48 +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ö
ce4fa9e272
Correct the endif comment
...
The code block is about HAVE_NEON, not X86_ASM.
2014-03-06 15:43:04 +02:00
Martin Storsjö
636df2bebb
Use WelsMultipleEventsWaitSingleBlocking within the worker thread on unix as well
...
This avoids using a separate thread for handling pUpdateMbListEvent
events, and later allowing using the encode exit event on unix instead
of pthread cancellation.
2014-03-06 15:34:35 +02:00
Martin Storsjö
801da26d1d
Use WelsMultipleEventsWaitSingleBlocking with a master event for waiting on finished threads
...
This allows using the same codepath for both unix and windows
for distributing new slices to code to threads.
This also improves the performance on unix - instead of waiting
for all the current threads to finish their current slice
before handing out a new slice to each of them (where the threads
that finish first will just wait instead of immediately getting
a new slice to work on), we now use the same logic as on windows.
In one setup, it improves the performance of encoding from ~920 fps
to ~950 fps, and in another setup it goes from ~390 fps to ~660 fps.
(These tests were done with the SM_ROWMB_SLICE mode, which
heavily exercises the code for distributing new slices to the
worker threads.)
The extra WelsEventSignal call on windows where it isn't strictly
necessary doesn't incur any measurable slowdown, so it is kept
without any extra ifdefs to keep the code more readable and unified.
2014-03-06 15:33:37 +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
Licai Guo
201ab42d7e
Merge pull request #431 from huili2/large_to_small_sps_bug
...
Large to small sps bug for issue #373
2014-03-06 16:51:59 +08:00
volvet
8cc332dea1
Merge pull request #432 from zhilwang/arm-asm
...
Arm asm
2014-03-06 16:50:56 +08:00
volvet
73452e0993
Merge pull request #429 from mstorsjo/simplify-ifdef-with-macro
...
Use a macro for conditionally logging based on ENABLE_TRACE_MT
2014-03-06 16:01:41 +08:00
Licai Guo
8a7a9195d9
remove unused function
2014-03-05 23:14:57 -08:00
Licai Guo
4260a9b2ba
remove CS and RS syntaxs for issue 373
2014-03-05 22:59:27 -08:00
Licai Guo
7bfe801874
Remove trailing space
2014-03-06 14:55:36 +08:00
Licai Guo
67534b0fc0
arm asm code refine.
2014-03-06 14:30:16 +08:00
Martin Storsjö
fd6f8a83b3
Use a macro for conditionally logging based on ENABLE_TRACE_MT
...
This avoids having an extra ifdef around every single WelsLog
call.
2014-03-06 08:06:34 +02:00
ruil2
28a56a6752
Merge pull request #415 from volvet/remove-useless-mgs-code
...
remove un-supported mgs code
2014-03-06 14:05:04 +08:00
ruil2
a59c8ea04c
Merge pull request #428 from sijchen/read_para3
...
[Encoder Console] add new para reading to get accord with the new API design
2014-03-06 14:04:33 +08:00
sijchen
a4a8eddb04
add new para reading to get accord with the new API design
2014-03-06 13:48:18 +08:00
volvet
50fe120a3e
simplify-layer-process
2014-03-06 11:19:33 +08:00
ruil2
334c5765c7
remove inter-deblock related parameters
2014-03-06 10:26:53 +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
eb3dd8f0ae
Merge pull request #416 from huili2/move_iTotalNumMbRec_to_pCtx
...
move iTotalNumMbRec from refpic to ctx
2014-03-05 17:12:43 +08: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ö
d4bdef2916
Use an event name that contains the process id
...
This reduces the risk for namespace collisions if two processes
run the encoder simultaneously without address space layout
randomization.
2014-03-05 09:36:46 +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
volvet
e9395bbd35
remove un-supported mgs code
2014-03-05 15:17:07 +08: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
9e4ab64c73
move iTotalNumMbRec from refpic to ctx
2014-03-04 19:23:15 -08:00
Licai Guo
ced9e41b5d
Merge pull request #399 from volvet/refine-multi-layer-process
...
refine-multi-layer-process
2014-03-05 10:45:35 +08:00
Licai Guo
248f324c62
Add intra predictor arm asm code.
2014-03-05 10:25:15 +08:00
Licai Guo
efcee63692
Remove .DS_Store file.
2014-03-05 10:24:05 +08:00
Licai Guo
bb244d736b
Partly add arm asm code to encoder.
2014-03-05 10:24:05 +08:00
volvet
7150adc91b
Merge pull request #407 from mstorsjo/do-blocking-wait
...
Do a blocking wait with WelsMultipleEventsWaitSingleBlocking
2014-03-05 09:18:45 +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ö
cf07d61f06
Do a blocking wait with WelsMultipleEventsWaitSingleBlocking
...
There is no point in doing a timed wait here - there's no work
that we can do if the wait timed out, and sleeping for 1 ms
inbetween doesn't help, it only adds potential extra latency
to reacting to threads that need more work to do.
2014-03-04 14:51:33 +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ö
1eaa38b130
Simplify code by allocating the arrays of events and thread handles statically
...
This avoids having to malloc a whole lot of separate arrays,
all which are all bounded by MAX_THREADS_NUM.
2014-03-04 12:17:32 +02:00
Martin Storsjö
ae63f064a0
Share the declarations for WELS_EVENT arrays between win32 and unix codepaths
2014-03-04 12:17:32 +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ö
e9c3403674
Merge some WIN32 ifdefs that were directly next to each other
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
13d785ec6a
refine-multi-layer-process
2014-03-04 12:04:04 +08:00
volvet
d9a02d27f2
remove execute attribute of the arm asm files
2014-03-04 11:45:10 +08:00
Licai Guo
26218731c6
Merge pull request #386 from volvet/refine_processing
...
refine build spatial list in processing
2014-03-04 11:15:35 +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
Licai Guo
cdeb6449c6
remove unused declarations in as264_common.h
2014-03-03 17:42:47 -08:00
Licai Guo
83d0791163
Modify function name according latest cisco master
2014-03-04 09:18:18 +08:00
volvet
bc1850a54d
remove uiFrameIdxRc
2014-03-04 09:08:54 +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
Ethan Hugg
e9593682eb
Merge pull request #392 from mstorsjo/unify-threading-ifdefs
...
Unify ifdef conditions related to threading code
2014-03-03 08:23:30 -08:00
Ethan Hugg
d940a204eb
Merge pull request #388 from mstorsjo/initialize-default
...
Initialize sSpatialLayers[0] in SEncParamExt for GetDefaultParams
2014-03-03 08:20:36 -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
volvet
c7d98a8fa3
Merge pull request #394 from ruil2/encoder_update
...
add timestamp in encoder interface --- review request#138
2014-03-03 17:31:48 +08:00
unknown
e0e7107ff1
add timestamp in encoder interface
2014-03-03 17:05:06 +08:00
Martin Storsjö
9ccabd1fe3
Fix cropping when using SEncParamBase
...
The iFrameWidth/iFrameHeight fields are already aligned by the
SetActualPicResolution() function. Previously when iFrameWidth was
aligned directly in ParamBaseTranscode, this aligned value was used
to set iActualWidth/iActualHeight - losing the original, cropped
size.
This makes sure the output bitstream from the test of encoding
res/Static_152_100.yuv actually is cropped as it should.
2014-03-03 10:34:37 +02:00
Martin Storsjö
e392932ad2
Initialize sSpatialLayers[0] in SEncParamExt for GetDefaultParams
2014-03-03 10:32:20 +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
775eebaf36
refine build spatial list in processing
2014-03-03 14:04:19 +08:00
ruil2
b552944453
fix sizeof() bug
2014-03-03 10:46:32 +08:00
volvet
e3bf5ced53
Merge pull request #371 from ruil2/encode_ret
...
add verification on return value -- review request #128
2014-03-03 10:27:26 +08:00
volvet
aa043fa4e5
Merge pull request #384 from licaiguo/check-spsid-ppsid
...
add checks for spsid and ppsid
2014-03-03 10:26:00 +08:00
Licai Guo
ba312b0b20
add checks for spsid and ppsid
2014-03-02 17:09:23 -08:00
ruil2
abdeb1951d
format update
2014-03-03 09:07:16 +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
ruil2
23df8a9ff6
add video format support verification
2014-03-03 09:03:59 +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
5be179e0aa
Merge pull request #378 from mstorsjo/fix-building-debug-code
...
Fix building a logging statement in debug code
2014-03-03 09:00:59 +08:00
volvet
e34a08c0da
Merge pull request #380 from mstorsjo/fix-debug-printing
...
Fix printing an event name for debugging
2014-03-03 08:58:30 +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ö
2b82a5743d
Fix printing an event name for debugging
2014-03-02 23:49:50 +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ö
26d66a4e1f
Fix building a logging statement in debug code
2014-03-02 23:45:14 +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
Ethan Hugg
6e9df66272
Merge pull request #369 from sijchen/mt_refactor3
...
[Encoder] remove macros to clear codes
2014-02-28 08:28:18 -08:00
volvet
33017fa722
Merge pull request #368 from huili2/sps_buffer_modif
...
modify SPS, PPS buffer management and remove a build warning
2014-02-28 17:41:46 +08: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
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
Licai Guo
e4b6fc3f9a
modify SPS, PPS buffer management and remove a build warning
2014-02-27 22:28:16 -08:00
Licai Guo
0279cd7597
Merge pull request #367 from volvet/refine-enc-plus
...
refine encode plus code
2014-02-28 14:18:06 +08:00
huili2
2dd41096d5
Merge pull request #366 from licaiguo/refine-rpl-pr
...
refine rpl
2014-02-28 14:08:41 +08:00
Licai Guo
0fd9db2878
Add ARM 32bit asm code for decoder.
2014-02-28 13:36:34 +08:00
volvet
d0d050d8e5
refine encode plus code
2014-02-28 13:06:49 +08:00
Licai Guo
e902f0fea4
refine rpl
2014-02-27 21:04:31 -08:00
Ethan Hugg
3d47b7847d
Merge pull request #358 from volvet/add_ios_encDemo
...
add encode test for iOS
2014-02-27 10:52:14 -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
ruil2
9319f879e4
Merge pull request #362 from mstorsjo/encoder-default-params
...
Add a new public method for initializing SEncParamExt to default values
2014-02-27 17:38:16 +08:00
Licai Guo
573b02797b
Merge pull request #363 from huili2/remove_store_base
...
remove unused codes in reference picture management
2014-02-27 12:39:23 +08:00
Licai Guo
5303eaaeb9
remove store_ref_base_pic_flag related codes in reference picture management
2014-02-26 20:00:32 -08:00
volvet
e8ecee2616
make the makefile is indepent with the pch file
2014-02-27 09:30:35 +08:00
volvet
3544aaaaab
remove boilerplate comments
2014-02-27 09:17:24 +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
ruil2
cb4bc5ee28
add command line example
2014-02-26 16:58:03 +08:00
volvet
6dc1d43a5b
remove precompiled files
2014-02-26 16:26:16 +08:00
volvet
73ce4adc85
add encode test for iOS
2014-02-26 14:53:31 +08:00
ruil2
1edefc4d50
modify output help info and commands line input
2014-02-26 09:21:46 +08:00
huili2
c89a6911a0
Merge pull request #355 from licaiguo/check-sliceheader
...
add a check to parseSliceHeaderSyntaxes
2014-02-25 16:56:33 +08:00
Licai Guo
a9fd78f1e2
add a check to parseSliceHeaderSyntaxes
2014-02-25 00:47:12 -08:00
Licai Guo
fc056c7ef0
Refine structure of iOS project to fix the issue.
2014-02-25 13:46:18 +08:00
Ethan Hugg
72990e1290
Merge pull request #349 from mstorsjo/cleanup-ios-project
...
Remove unnecessary precompiled headers from the xcode projects
2014-02-24 07:44:41 -08:00
Martin Storsjö
38dbd57d36
Remove unnecessary precompiled headers
...
This reduces the huge amount of near-useless small extra files
scattered around for the sake of the platform demo projects.
This requires explicitly listing all the ncessary include paths.
2014-02-24 13:26:37 +02:00
Martin Storsjö
8c9a0bac01
Add the necessary directories to the include path within xcode
...
This is not necessary when using precompiled headers.
2014-02-24 13:24:39 +02:00
Licai Guo
3c29c92133
Merge pull request #347 from huili2/active_sps_ref_size
...
use active SPS parameters instead of other SPS.
2014-02-24 17:03:25 +08:00
huili2
ab6931496b
Merge pull request #345 from licaiguo/fix-int-conversion-warning
...
fix int conversion warning, using LD32/ST32
2014-02-24 17:02:35 +08:00
Licai Guo
2983c92e1c
use active SPS parameters instead of other SPS.
2014-02-24 00:52:17 -08:00
Licai Guo
d78f8c7ed8
fix int conversion warning, using LD32/ST32
2014-02-24 00:27:33 -08:00
Licai Guo
b7bee7af0a
refine level check
2014-02-24 00:09:40 -08:00
Licai Guo
d5e0b99372
cast to uint32_t in GET_WORD to prevent possible left shift error.
2014-02-23 22:22:13 -08: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
470fc4288c
minor update
2014-02-24 10:55:15 +08:00
ruil2
c79e78c4fb
cleanup encoder parameters
2014-02-24 10:40:17 +08:00
huili2
abc2495f2f
Merge pull request #335 from licaiguo/decoder-syntax-checks
...
Decoder syntax checks
2014-02-24 10:35:10 +08:00
Licai Guo
265741e922
update according to review comments
2014-02-23 18:26:28 -08:00
volvet
bf0179310c
Merge pull request #340 from zhilwang/ios-support
...
Ios support
2014-02-24 09:50:10 +08:00
volvet
14acd1e663
Merge pull request #339 from mstorsjo/console-trace-param
...
Handle a -trace parameter for setting the trace level
2014-02-24 09:46:37 +08:00
Martin Storsjö
892d90175c
Handle a -trace parameter for setting the trace level
...
A similar parameter already exists in the other version of
the ParseCommandLine function.
The WelsStderrSetTraceLevel isn't one of the functions that
is exported from wels.dll (nor welsenc.dll) though, so this
doesn't work (not currently either since the function is
currently already referenced) if we would try to link to the
encoder library dynamically.
2014-02-23 00:19:56 +02: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
Licai Guo
fee0f14732
finish syntax checks in ParseSps
2014-02-21 00:16:42 -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
988a192579
Modify copyright for some files
2014-02-21 14:47:01 +08:00
Licai Guo
7e57d5205e
Add decoder ios demo
2014-02-21 14:43:09 +08:00
Licai Guo
68ebf05402
Add ios build for processing
2014-02-21 14:28:22 +08:00
Licai Guo
384ce47fc0
Remove processing ios build
2014-02-21 14:26:08 +08:00
Licai Guo
3a7305c2be
Add .gitignore to iOS folder
2014-02-21 14:23:28 +08:00
Licai Guo
c66b614dd3
Initial Commit
2014-02-21 14:07:52 +08:00
Licai Guo
97947c4d01
Add ios support for common
2014-02-21 14:04:53 +08:00
Licai Guo
672a98347f
Initial Commit
2014-02-21 13:59:43 +08: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
Licai Guo
5c1c1c8347
Initial Commit
2014-02-21 11:29:38 +08:00
Licai Guo
21e1e7c966
Add ios support for dec
2014-02-21 11:26:11 +08:00
Licai Guo
4e0b8d4cbf
refine checks in ParseSps
2014-02-20 19:25:11 -08:00
Licai Guo
3873b6a0f6
Initial Commit
2014-02-21 11:15:04 +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
Ethan Hugg
df6f92096a
Merge pull request #330 from mstorsjo/android-build-fixes
...
Android build fixes/cleanups
2014-02-20 15:39:22 -08:00
Martin Storsjö
8771e08f0f
Ignore files produced by XCode
2014-02-20 12:33:38 +02:00
Martin Storsjö
42e80cec0d
Don't use LOCAL_PATH in LOCAL_SRC_FILES
...
These files are automatically relative to the directory of the
current makefile.
2014-02-20 12:28:00 +02:00
Martin Storsjö
d9441dc793
Ignore project.properties
...
This file is autogenerated when building nowadays.
2014-02-20 09:42:52 +02:00
Licai Guo
d69b2faa9f
fix the crash issues by changing the type iMbWidth & iMbHeight.
2014-02-19 23:06:35 -08:00
sijchen
e45e859473
Squashed merge from writenal_refactor2
2014-02-20 14:50:04 +08:00
Licai Guo
42cc716395
Merge pull request #324 from volvet/add-missed-namespace-for-encoder
...
add missed namespace for encoder, remove un-used file
2014-02-20 14:46:05 +08:00
volvet
ab2e5fe207
Merge pull request #321 from licaiguo/add-android-target-option
...
Add android target option
2014-02-20 14:40:27 +08:00
volvet
e565e50d4d
add missed namespace for encoder, remove un-used file
2014-02-20 14:33:03 +08:00
Licai Guo
46b9d5d0da
Merge pull request #323 from huili2/check_bit_read
...
add safety check for bit-reading for headers
2014-02-20 14:17:07 +08:00
volvet
d6c5c138ee
init the spatial last spatial picture if excption
2014-02-20 12:50:37 +08:00
Licai Guo
538d22560f
refine android build, add TARGET option to specify target in sdk
2014-02-19 20:49:30 -08:00
Licai Guo
a921bc6589
Merge pull request #320 from huili2/mb_residual_size_check
...
remain size to prevent MB residual reading overflow
2014-02-20 11:19:57 +08:00
ruil2
3ba6a5f4da
Simplify encoder interface--remove EncoderFrame2 from interface
...
function
2014-02-20 10:33:07 +08:00
Licai Guo
65c7168d8d
Add iOS support for decoder.
2014-02-20 10:08:37 +08:00
Martin Storsjö
fe17cd5a13
Remove unnecessary commented out code in the android makefiles
...
Comments isn't a place to store code snippets that might (or
might not) be useful later.
2014-02-19 22:16:09 +02:00
Martin Storsjö
0b74eee631
Ignore files generated while building the android projects
2014-02-19 22:16:09 +02:00
Martin Storsjö
72fb054c10
Remove unused proguard config files
2014-02-19 22:16:09 +02:00
Martin Storsjö
810db4e3fd
Add a missing include directory in the android makefiles
2014-02-19 22:16:09 +02:00
Ethan Hugg
0a73155bdd
Merge pull request #306 from licaiguo/add-android-pull-clean
...
Add android Support
2014-02-19 09:59:25 -08:00
Ethan Hugg
f7758a3074
Merge pull request #312 from mstorsjo/cleanup-vp-interface
...
Avoid duplicating the IWelsVP.h header
2014-02-19 09:55:34 -08:00
Ethan Hugg
50e49f3704
Merge pull request #310 from mstorsjo/remove-unused-variables
...
Avoid declaring unused variables
2014-02-19 09:26:00 -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ö
3e4e74a4d8
Remove unused include directories
2014-02-19 14:57:06 +02:00
Martin Storsjö
099595696b
Add the common processing include directories to the include path
...
This avoids using relative paths for including these files.
2014-02-19 14:42:03 +02:00
Martin Storsjö
f6a46960c9
Check a string length before doing a strncpy
2014-02-19 10:42:52 +02:00
Martin Storsjö
fd100598ab
Avoid declaring unused variables
...
Move the variable declarations within the ifdef instead.
2014-02-19 10:39:43 +02:00
Martin Storsjö
3532781556
Mark source parameters to MC functions as const
2014-02-19 10:19:56 +02:00
Martin Storsjö
ebb890e03e
Declare static functions within the file they are used/defined in
...
It does not make sense to declare but not define static functions
in a header.
2014-02-19 09:51:25 +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
Licai Guo
a3c38b5631
add safety check for bit-reading for headers
2014-02-18 22:55:12 -08: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
Licai Guo
fbcf01cbbc
add missing icon files
2014-02-18 18:01:27 -08:00
Licai Guo
d058176c3b
add android support, single commit
2014-02-18 17:54:27 -08:00
ruil2
e79769fb88
Merge pull request #305 from mstorsjo/fix-encoder-param-interface
...
Don't duplicate the SEncParamExt/SEncParamBase structs for C compatibility
2014-02-19 09:12:58 +08:00
huili2
0fcd066cde
Merge pull request #298 from licaiguo/decoder-syntax-element-step1
...
add decoder syntax checks
2014-02-19 08:57:50 +08:00
Martin Storsjö
7d638f8a6b
Remove the now unused INIT_TYPE data type
2014-02-18 22:52:00 +02: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ö
622694935b
Use SEncParamExt in ProcessEncodingSvcWithParam
...
Both FillSpecificParameters and ParseCommandLine use parameters
that don't exist in SEncParamBase.
2014-02-18 22:51:54 +02:00