Compare commits

...

1431 Commits

Author SHA1 Message Date
HaiboZhu
8fcef67c70 Merge pull request #2539 from HaiboZhu/Update_binary_files_location_v1.6.0
Update the binary files location for release v1.6.0
2016-07-22 09:16:23 +08:00
HaiboZhu
241700cb96 Merge pull request #2537 from mstorsjo/msvc-warning-fix
Silence warnings about conversions in MSVC
2016-07-21 16:09:55 +08:00
HaiboZhu
0f21b2b02e Merge pull request #2535 from mstorsjo/silence-warnings
Silence warnings with GCC 5.4
2016-07-21 16:08:38 +08:00
Haibo Zhu
9b6476e98a Update the binary files location for release v1.6.0 2016-07-21 09:11:21 +08:00
Martin Storsjö
350cafd69a Silence warnings about conversions in MSVC
The kind of cast (static_cast vs C style cast) is different to
match the closely surrounding code.
2016-07-20 12:10:34 +03:00
Martin Storsjö
91331e1ba4 Silence warnings with GCC 5.4
This fixes warnings like the following:

codec/decoder/core/src/mv_pred.cpp: In function ‘void WelsDec::PredPSkipMvFromNeighbor(WelsDec::PDqLayer, int16_t*)’:
codec/decoder/core/src/mv_pred.cpp:158:51: warning: ‘iLeftTopXy’ may be used uninitialized in this function [-Wmaybe-uninitialized]

codec/processing/src/backgrounddetection/BackgroundDetection.cpp: In member function ‘void WelsVP::CBackgroundDetection::ForegroundDilation(WelsVP::SBackgroundOU*, WelsVP::SBackgroundOU**, WelsVP::CBackgroundDetection::vBGDParam*, int32_t)’:
codec/processing/src/backgrounddetection/BackgroundDetection.cpp:281:63: warning: suggest parentheses around operand of ‘!’ or change ‘|’ to ‘||’ or ‘!’ to ‘~’ [-Wparentheses]

For the possibly uninitialized variables, this is similar to earlier
commits 8be8fe17 and af2666fd.
2016-07-20 11:53:10 +03:00
HaiboZhu
1f770c488c Merge pull request #2531 from GuangweiWang/enable-disable-AVX2
add option for enable/disable AVX2
2016-07-20 13:49:31 +08:00
HaiboZhu
5a8f5e8cf1 Merge pull request #2520 from ruil2/rc1
change FrameQP control and complexity calculation
2016-07-18 15:37:02 +08:00
Guangwei Wang
7d00e8bc42 add option for enable/disable AVX2 2016-07-15 12:15:57 +08:00
HaiboZhu
8980731be0 Merge pull request #2527 from ruil2/init
init samplebuffer
2016-07-13 14:21:01 +08:00
huili2
a43841d0e9 Merge pull request #2526 from HaiboZhu/Bugfix_CHP_support
Fixes for CHP support
2016-07-13 13:31:17 +08:00
Karina
9d89a6976e init samplebuffer 2016-07-13 11:20:36 +08:00
Haibo Zhu
687f9eff1b (1) remove the weighted prediction sytax limit
(2) fix the 4:0:0 support bug
2016-07-13 09:58:58 +08:00
HaiboZhu
d97f4c5b68 Merge pull request #2524 from HaiboZhu/Change_SharedLibVersion
Update the SharedLibVersion to make the compatibilty
2016-07-12 09:01:28 +08:00
Haibo Zhu
03add69386 Update the SharedLibVersion to make the compatibilty 2016-07-11 15:20:22 +08:00
Karina
ffe11835fc change FrameQP control and complexity calculation 2016-07-11 10:20:17 +08:00
HaiboZhu
44d8560698 Merge pull request #2519 from HaiboZhu/Update_ReadMe_for_master
Update the wrong description in README.md
2016-07-11 08:39:50 +08:00
Haibo Zhu
3a6ed92a35 Update the wrong description in README.md 2016-07-08 17:13:48 +08:00
huili2
842b4f0243 Merge pull request #2516 from HaiboZhu/Add_release_binary_files_v1.6.0
Update the binary files location for openh264 release 1.6.0 in master branch
2016-07-08 09:25:11 +08:00
Haibo Zhu
d5a8c84409 Update the binary files location for openh264 release 1.6.0 2016-07-08 08:58:50 +08:00
HaiboZhu
4e3df2619a Merge pull request #2512 from HaiboZhu/Update_v1.6_information
Update the release note and readme files for version 1.6
2016-07-05 08:41:52 +08:00
Haibo Zhu
af8240a440 Update the release note and readme files for version 1.6 2016-07-04 10:45:23 +08:00
HaiboZhu
ec70649261 Merge pull request #2509 from pengyanhai/master
Make sure the output resolution of encoder doesn't exceed the Openh264 capability
2016-07-01 14:42:13 +08:00
Hank Peng
00e89b89f0 Make sure the output resolution of encoder doesn't exceed the Openh264 capability 2016-06-30 22:32:30 -07:00
HaiboZhu
acab999b45 Merge pull request #2507 from GuangweiWang/master
rename debug symbols file's name
2016-06-29 10:00:30 +08:00
Guangwei Wang
f8516bb8af fix 2016-06-28 15:58:25 +08:00
Guangwei Wang
e77a101885 fix bug 2016-06-28 15:03:00 +08:00
Guangwei Wang
ac65f3adc8 rename debug symbols file's name 2016-06-27 12:41:59 +08:00
HaiboZhu
b2d6902176 Merge pull request #2504 from ruil2/adaptive
fix QP issue when adaptive quant turns on
2016-06-22 14:13:18 +08:00
Karina
35e073714d fix QP issue when adaptive quant turns on 2016-06-22 13:33:50 +08:00
HaiboZhu
60cbb77583 Merge pull request #2500 from ruil2/downsampling
use average downsampling fistly then general downsampling
2016-06-21 10:11:44 +08:00
ruil2
c6356ca8fc Merge pull request #2499 from saamas/encoder-avoid-valgrind-downsampling-false-positives
[Encoder] Avoid valgrind downsampling false positives
2016-06-21 09:17:37 +08:00
Karina
7c0ca2fc14 use average downsampling fistly then general downsampling when dst resolution > 1/4 source resolution and dst resolution <1/2 source resolution 2016-06-17 10:30:47 +08:00
ruil2
6a86e37849 Merge pull request #2495 from saamas/processing-dyadic-bilinear-downsample-optimizations
[UT] Allow for different output depending on downsample average order
2016-06-17 09:18:46 +08:00
Sindre Aamås
f14fb2cfbc [UT] Allow for different output depending on downsample average order
Avoid X86_ASM ifdef.

Ideally, we may want to update all routines to average vertically
first, which would make this unnecessary. In the interim, this
enables the tests to run successfully on x86 without SSSE3 support
again.
2016-06-16 22:07:58 +02:00
Sindre Aamås
0f7b8365b9 [Encoder] Avoid valgrind downsampling false positives
X86 SIMD downsampling routines may, for convenience, read slightly beyond
the input data and into the alignment padding area beyond each line. This
causes valgrind to warn about uninitialized values even if these values
only affect lanes of a SIMD vector that are effectively never used.

Avoid these false positives by zero-initializing the padding area beyond
each line of the source buffer used for downsampling.
2016-06-16 21:19:17 +02:00
HaiboZhu
5637df510e Merge pull request #2498 from mstorsjo/android-avoid-stl-include
Use assert.h instead of cassert
2016-06-16 09:21:03 +08:00
Martin Storsjö
e945654f06 Use assert.h instead of cassert
This fixes building for android differently than in f5e483ce.

On android, <cassert> isn't available in the normal include path,
only when the STL headers are available.

We intentionally avoid using STL within the main libopenh264.so, to
simplify dependency chains for users of the library (which otherwise
could run into conflicts if the surrounding app would want to use
a different STL implementation).

The previous fix only provided headers, not actually linking
against STL, so at this point it's not a real issue yet, but it's
still a very slippery slope towards accidentally starting relying on
STL within the core library.

Instead explicitly avoid using STL within the core library, by not
even providing the include path.
2016-06-15 21:06:11 +03:00
HaiboZhu
8661e358c0 Merge pull request #2497 from GuangweiWang/master
fix android build issue
2016-06-15 14:05:53 +08:00
Guangwei Wang
f5e483ce95 fix android build issue 2016-06-15 13:19:41 +08:00
HaiboZhu
2e6c9f7cd3 Merge pull request #2496 from saamas/processing-relax-downsample-buffer-size-requirement
[Processing] Relax downsample buffer size requirement
2016-06-15 10:31:53 +08:00
HaiboZhu
d35647ec3b Merge pull request #2491 from ruil2/nalsize
add nalsize checking UT and fix nalsize control when cabac on
2016-06-15 10:24:18 +08:00
HaiboZhu
151a7ff643 Merge pull request #2490 from sijchen/refactor_ref4
[Encoder] refactor: to avoid only use idx0 in syntax writing, for now it has no impact on bs
2016-06-15 10:23:38 +08:00
HaiboZhu
84a7669b63 Merge pull request #2464 from bumblebritches57/MVC
MVC aka Stereoscopic 3D support
2016-06-15 10:05:15 +08:00
ruil2
4b6f037020 Merge pull request #2489 from saamas/processing-dyadic-bilinear-downsample-optimizations
[Processing] DyadicBilinearDownsample optimizations
2016-06-12 10:02:55 +08:00
Sindre Aamås
fe4a47a979 [UT] Add comment on X86_ASM checksum ifdef 2016-06-08 21:53:30 +02:00
Karina
b5cef5d49c modify reserved nal header size and change source frame in NalSizeChecking UT 2016-06-08 10:12:27 +08:00
sijchen
94c94ca3b1 Merge pull request #2493 from ruil2/configure
modify  comments in configure file
2016-06-07 14:41:21 -07:00
sijchen
4c8458f7ff Merge pull request #2494 from ruil2/stat
use the correct frametype in statistics info
2016-06-07 14:41:12 -07:00
Karina
40f4fc05bb get each spatial layer qp 2016-06-06 17:13:22 +08:00
Karina
c1255451d7 use the correct frametype in statistics info 2016-06-06 17:06:56 +08:00
Karina
02218e2dbd modify configure file comments 2016-06-06 16:22:09 +08:00
ruil2
106d13d26c Merge pull request #2492 from saamas/processing-x86-downsample-use-lddqu
[Processing/x86] Use lddqu in case we still run on anything that benefits
2016-06-06 12:46:55 +08:00
Sindre Aamås
f183891c5b [Processing/x86] Use lddqu in case we still run on anything that benefits 2016-06-04 00:41:35 +02:00
Sindre Aamås
5a9c6db335 [Processing] Relax downsample buffer size requirement
AFAICT, it is sufficient that the sample buffer has space for half
the source width/height. With the current sample buffer size, this
enables its use for resolutions up to 3840x2176.
2016-06-03 15:14:09 +02:00
Sindre Aamås
68a5910f8f [Processing] Clear LSB before rounding up dyadic downsample width 2016-06-03 12:03:01 +02:00
Karina
2171d84f1e add nalsize checking UT and fix nalsize control when cabac on 2016-06-03 17:36:14 +08:00
ruil2
3eba80765c Merge pull request #2487 from sijchen/refactor_ref31
[Encoder] Preprocess: refactor to improve code readability
2016-06-03 13:39:04 +08:00
sijchen
1fa02f6b07 Merge pull request #2488 from ruil2/codingIdx1
fix codingIdx update issue
2016-06-02 10:00:56 -07:00
Karina
4f41c3a5bf fix codingIdx update issue 2016-06-02 21:17:31 +08:00
Sindre Aamås
8a0af4a3f2 [Processing/x86] DyadicBilinearDownsample optimizations
Average vertically before horizontally; horizontal averaging is more
worksome. Doing the vertical averaging first reduces the number of
horizontal averages by half.

Use pmaddubsw and pavgw to do the horizontal averaging for a slight
performance improvement.

Minor tweaks.

Improve the SSSE3 dyadic downsample routines and drop the SSE4 routines.
The non-temporal loads used in the SSE4 routines do nothing for cache-
backed memory AFAIK.

Adjust tests because averaging vertically first gives slightly different
output.

~2.39x speedup for the widthx32 routine on Haswell when not memory-bound.
~2.20x speedup for the widthx16 routine on Haswell when not memory-bound.

Note that the widthx16 routine can be unrolled for further speedup.
2016-06-02 13:44:28 +02:00
Sindre Aamås
7cbb75eac6 [Processing] Pick dyadic downsample function based on stride
Assume that data can be written into the padding area following each
line. This enables the use of faster routines for more cases.

Align downsample buffer stride to a multiple of 32.

With this all strides used should be a multiple of 16, which means
that use of narrower downsample routines can be dropped altogether.
2016-06-02 13:44:28 +02:00
Sindre Aamås
770e48ac2b [Processing] Remove unused align macros
The WELS_ALIGN macro here aliases the WELS_ALIGN macro in macros.h
which is inconvenient. Just remove these unused macros.
2016-06-02 13:44:28 +02:00
sijchen@cisco.com
a7ae1efc3a add back the missing part after merging and formatting 2016-06-01 21:33:33 -07:00
sijchen@cisco.com
8bacc3d4d0 Preprocess: refactor to improve code readability 2016-06-01 21:26:24 -07:00
sijchen
f6b6a0f6aa Merge pull request #2485 from ruil2/init
remove redundant initialization
2016-06-01 09:28:02 -07:00
sijchen@cisco.com
8537a9274d fix a prob 2016-06-01 09:21:12 -07:00
sijchen@cisco.com
a9601cdc59 refactor to avoid only use idx0 in syntax writing, for now it has no impact on bs, may benefit future usage 2016-06-01 09:21:12 -07:00
Karina
268a0eb6f4 remove redundant initialization 2016-06-01 10:52:51 +08:00
HaiboZhu
515eeb41e4 Merge pull request #2481 from ruil2/maxbitrate1
fix iContinualSkipFrames calculation
2016-06-01 09:03:57 +08:00
HaiboZhu
7ccc377d55 Merge pull request #2480 from ruil2/fix
fix removing parameter setting wrongly
2016-06-01 09:03:49 +08:00
ruil2
2d3fc37a07 Merge pull request #2484 from sijchen/refactor_preprocess13
[Encoder] Refactor: add class for diff preprocess strategy
2016-06-01 08:31:02 +08:00
Karina
87e81a7a40 use the same name to avoid confusing. 2016-06-01 08:21:03 +08:00
sijchen@cisco.com
03863ae4c6 different preprocess actually used diff source picture management 2016-05-31 14:36:21 -07:00
sijchen@cisco.com
a1cae49732 add class for diff preprocess strategy 2016-05-31 13:48:45 -07:00
sijchen
c29da290b9 Merge pull request #2479 from ruil2/refine_rc1
get the correct did for savc case
2016-05-31 10:58:38 -07:00
Karina
dd021b6ca8 fix iContinualSkipFrames calculation 2016-05-31 21:01:11 +08:00
Karina
8effa45edd fix removing parameter setting 2016-05-31 20:46:13 +08:00
Karina
64ad70b0ea get the correct did for savc case 2016-05-31 17:35:20 +08:00
HaiboZhu
df77a5d587 Merge pull request #2478 from ruil2/refine_rc1
refine RC
2016-05-31 17:20:46 +08:00
Karina
4fc2b1f636 refine RC 2016-05-31 16:44:04 +08:00
HaiboZhu
3f199f92a9 Merge pull request #2477 from ruil2/add_param_configure
add savc setting in configure file and command line
2016-05-31 16:33:40 +08:00
Karina
7f2ba4dcb6 add savc setting in configure file and command line 2016-05-31 13:53:31 +08:00
HaiboZhu
1d2b52e4cc Merge pull request #2476 from ruil2/did1
fix dependency ID mapping issue
2016-05-31 11:08:16 +08:00
Karina
e3c306608c fix dependency ID mapping issue 2016-05-30 15:03:39 +08:00
ruil2
39c2fb3d6b Merge pull request #2472 from saamas/processing-x86-general-bilinear-downsample-optimizations
[Processing/x86] GeneralBilinearDownsample optimizations
2016-05-27 15:17:31 +08:00
Sindre Aamås
563376df0c [UT] Test downsampling routines with a wider variety of height ratios 2016-05-25 14:16:29 +02:00
HaiboZhu
c17a58efdf Merge pull request #2473 from ruil2/update_interface
modify the interface that use a independent subseqID for each layer
2016-05-25 10:00:13 +08:00
HaiboZhu
780101fcfd Merge pull request #2474 from ruil2/overflow
avoid overflow
2016-05-25 09:59:36 +08:00
Karina
2ef9613e55 avoid overflow 2016-05-24 13:25:05 +08:00
Sindre Aamås
4fec6d581e [UT] Test generic downsampling routines with a wider variety of width ratios
Get coverage of all code paths for routines that branch to different
paths for different scaling ratios.
2016-05-23 20:23:47 +02:00
Sindre Aamås
e490215990 [Processing/x86] Add an AVX2 implementation of GeneralBilinearAccurateDownsample
Keep track of relative pixel offsets and utilize pshufb to efficiently
extract relevant pixels for horizontal scaling ratios <= 8. Because
pshufb does not cross 128-bit lanes, the overhead of address
calculations and loads is relatively greater as compared with an
SSSE3/SSE4.1 implementation.

Fall back to a generic approach for ratios > 8.

The implementation assumes that data beyond the end of each line,
before the next line begins, can be dirtied; which AFAICT is safe with
the current usage of these routines.

Speedup is ~8.52x/~6.89x (32-bit/64-bit) for horizontal ratios <= 2,
~7.81x/~6.13x for ratios within (2, 4], ~5.81x/~4.52x for ratios
within (4, 8], and ~5.06x/~4.09x for ratios > 8 when not memory-bound
on Haswell as compared with the current SSE2 implementation.
2016-05-23 20:23:47 +02:00
Sindre Aamås
b43e58a366 [Processing/x86] Add an AVX2 implementation of GeneralBilinearFastDownsample
Keep track of relative pixel offsets and utilize pshufb to efficiently
extract relevant pixels for horizontal scaling ratios <= 8. Because
pshufb does not cross 128-bit lanes, the overhead of address
calculations and loads is relatively greater as compared with an
SSSE3 implementation.

Fall back to a generic approach for ratios > 8.

The implementation assumes that data beyond the end of each line,
before the next line begins, can be dirtied; which AFAICT is safe with
the current usage of these routines.

Speedup is ~10.42x/~5.23x (32-bit/64-bit) for horizontal ratios <= 2,
~9.49x/~4.64x for ratios within (2, 4], ~6.43x/~3.18x for ratios
within (4, 8], and ~5.42x/~2.50x for ratios > 8 when not memory-bound
on Haswell as compared with the current SSE2 implementation.
2016-05-23 20:23:47 +02:00
Sindre Aamås
b1013095b1 [Processing/x86] Add an SSE4.1 implementation of GeneralBilinearAccurateDownsample
Keep track of relative pixel offsets and utilize pshufb to efficiently
extract relevant pixels for horizontal scaling ratios <= 4.

Fall back to a generic approach for ratios > 4.

The use of blendps makes this require SSE4.1. The pshufb path can be
backported to SSSE3 and the generic path to SSE2 for a minor reduction
in performance by replacing blendps and preceding instructions with an
equivalent sequence.

The implementation assumes that data beyond the end of each line,
before the next line begins, can be dirtied; which AFAICT is safe with
the current usage of these routines.

Speedup is ~5.32x/~4.25x (32-bit/64-bit) for horizontal ratios <= 2,
~5.06x/~3.97x for ratios within (2, 4], and ~3.93x/~3.13x for ratios
> 4 when not memory-bound on Haswell as compared with the current SSE2
implementation.
2016-05-23 20:23:39 +02:00
Sindre Aamås
1995e03d91 [Processing/x86] Add an SSSE3 implementation of GeneralBilinearFastDownsample
Keep track of relative pixel offsets and utilize pshufb to efficiently
extract relevant pixels for horizontal scaling ratios <= 4.

Fall back to a generic approach for ratios > 4. Note that the generic
approach can be backported to SSE2.

The implementation assumes that data beyond the end of each line,
before the next line begins, can be dirtied; which AFAICT is safe with
the current usage of these routines.

Speedup is ~6.67x/~3.26x (32-bit/64-bit) for horizontal ratios <= 2,
~6.24x/~3.00x for ratios within (2, 4], and ~4.89x/~2.17x for ratios
> 4 when not memory-bound on Haswell as compared with the current SSE2
implementation.
2016-05-23 20:23:31 +02:00
Sindre Aamås
cbaf087583 [Processing] Reduce duplication in downsampling wrappers 2016-05-23 13:19:17 +02:00
ruil2
c96c8b05a8 Merge pull request #2468 from sijchen/refactor_pre
[Encoder] Refactor: create diff func for diff case to make logic clean
2016-05-23 13:21:40 +08:00
HaiboZhu
685b6144a5 Merge pull request #2469 from ruil2/fix_bitrate
add GetBsPostion for cabac and cavlc
2016-05-23 09:49:45 +08:00
Karina
9b2dd55324 add GetBsPostion for cabac and cavlc 2016-05-20 14:29:48 +08:00
sijchen
27e803f6f4 refactor to make logic clean 2016-05-19 09:42:39 -07:00
Karina
ac37666cf1 modify the interface that use a independent subseqID for each layer 2016-05-19 17:17:17 +08:00
sijchen
a5e4cca710 Merge pull request #2467 from ruil2/overflow
fix overflow issue
2016-05-18 21:35:32 -07:00
Karina
8a341070f2 fix overflow issue 2016-05-19 12:00:49 +08:00
sijchen
3fd490dbed Merge pull request #2460 from sijchen/refactor_ref2
[Encoder] move strategy related pointer to class
2016-05-18 11:40:08 -07:00
sijchen
1ac02f3002 fix conflict with master 2016-05-18 10:57:39 -07:00
sijchen
7188e50acf Merge pull request #2465 from ruil2/skip_layers
fix temporal layer skip issue
2016-05-18 09:34:09 -07:00
Karina
c298d66d48 fix temporal layer skip issue 2016-05-18 09:47:49 +08:00
sijchen
6d79601d93 Merge pull request #2463 from HaiboZhu/Fix_build_error_windows_debug
Fix the wrong variable name which casue the build error
2016-05-16 22:57:32 -07:00
Haibo Zhu
85f4beb9a8 Fix the wrong variable name which casue the build error 2016-05-17 13:46:04 +08:00
HaiboZhu
46220cfb3b Merge pull request #2461 from HaiboZhu/Bugfix_remove_undefined_behavior_warning
Remove the undefined behavior waring in parse_cabac
2016-05-17 10:51:18 +08:00
Haibo Zhu
86c1f0d2c6 Remove the undefined behavior waring in parse_cabac 2016-05-17 09:40:03 +08:00
ruil2
0ec686f7ec Merge pull request #2452 from sijchen/refactor_sps2
Refactoring: Wrap all the operations related to eSpsPpsIdStrategy to class
2016-05-17 09:19:14 +08:00
sijchen
1eb735299a Merge pull request #2458 from ruil2/downsampling2
add one new downsampling algorithms
2016-05-16 10:59:35 -07:00
sijchen
00747540fb move strategy related pointer to class 2016-05-16 10:55:13 -07:00
HaiboZhu
f623aa318d Merge pull request #2459 from ruil2/fix_crash
fix crash when temporal layer is skipped, the frame should not be encoded
2016-05-16 15:35:38 +08:00
Karina
3b55d64902 fix crash when temporal layer is skipped, the frame should not be encoded 2016-05-16 14:43:13 +08:00
Karina
96b2a87030 add one new downsampling algorithms 2016-05-16 09:28:19 +08:00
sijchen
3fa9a4840a Merge pull request #2433 from hzwangsiyu/master
Update .gitignore
2016-05-05 16:27:56 -07:00
sijchen
ffb85046b4 Refactoring: Wrap all the operations related to eSpsPpsIdStrategy to class, to improve code readability 2016-05-04 15:06:02 -07:00
HaiboZhu
c30cc41261 Merge pull request #2448 from saamas/encoder-getnonzerocount-sse42
[Encoder] Add an SSE4.2 implementation of WelsGetNonZeroCount
2016-05-04 09:49:47 +08:00
ruil2
e9dc97803d Merge pull request #2447 from saamas/encoder-cavlcparamcal-sse42
[Encoder] Add an SSE4.2 implementation of CavlcParamCal
2016-04-28 09:08:44 +08:00
ruil2
7d65687284 Merge pull request #2441 from saamas/encoder-add-avx2-4x4-quantization-routines
[Encoder] Add AVX2 4x4 quantization routines
2016-04-28 09:08:31 +08:00
ruil2
56618249d7 Merge pull request #2436 from saamas/processing-add-avx2-vaa-routines
[Processing] Add AVX2 VAA routines
2016-04-28 09:08:03 +08:00
Sindre Aamås
fb0b2b3f41 [Encoder/x86] Drop unneeded LOAD_4_PARA in CavlcParamCal_sse42 2016-04-24 22:59:35 +02:00
Sindre Aamås
d1c7713191 [Encoder/x86] Minor CavlcParamCal_sse42 tweak
Do more elaborate register allocation to avoid a few mov instructions.
2016-04-24 22:36:23 +02:00
Sindre Aamås
f56bdc3aa4 [Encoder/x86] Minor CavlcParamCal_sse42 tweak
Avoid loading single-use parameter.
2016-04-21 16:29:02 +02:00
Sindre Aamås
2eb8800712 [Encoder/x86] Remove a leftover mov instruction in CavlcParamCal_sse42 2016-04-21 15:53:33 +02:00
Sindre Aamås
4645bd26aa [Encoder] Add an SSE4.2 implementation of WelsGetNonZeroCount
Avoid touching some cache lines by using popcnt instead of table
lookups.

Also gives a speedup of ~1.4x on Haswell as compared with SSE2.
2016-04-20 19:10:24 +02:00
Sindre Aamås
d906dda224 [UT] Improve GetNonZeroCount tests
Reduce duplication.
Test more combinations.
Always test boundary cases.
2016-04-20 19:10:24 +02:00
Sindre Aamås
3f31aff4dc [Encoder] Add an SSE4.2 implementation of CavlcParamCal
Use a combination of table lookups and pshufb to convert coefficients
to zero run/level format. Two 16-entry lookup tables are used for a
total of 192 bytes worth of tables. (The existing SSE2 version uses a
table of size 2048 bytes.)

Speedup is ~1.5x-3x as compared with the SSE2 version on Haswell (the
speedup is greater for input with many trailing zeros).

The use of popcnt makes it require SSE4.2. This can be replaced with
a small LUT and accumulation which would reduce the requirement to
SSSE3.
2016-04-20 18:37:08 +02:00
Sindre Aamås
502b16925e [UT] Add tests for CavlcParamCal_c and CavlcParamCal_sse2 2016-04-20 18:37:08 +02:00
HaiboZhu
98c6c6de11 Merge pull request #2446 from HaiboZhu/Reduce_log_size_for_parse_only_mode
Add the log reduce logic into parse only mode
2016-04-20 10:48:57 +08:00
HaiboZhu
3b68840d5f Merge pull request #2444 from GuangweiWang/fix-assembly-arm64
Fix assembly arm64
Code review at: https://rbcommons.com/s/OpenH264/r/1594/
2016-04-20 10:03:01 +08:00
Haibo Zhu
3ccecfbdbe Add the log reduce logic into parse only mode 2016-04-20 09:58:12 +08:00
HaiboZhu
c9433ee73b Merge pull request #2442 from ruil2/deblocking_fix
fix 32-bit parameters issue on arm64 assembly function
2016-04-18 09:21:24 +08:00
Guangwei Wang
cc407b4b21 fix code style 2016-04-17 19:47:55 +08:00
Guangwei Wang
0b8cdcaff8 extension 32-bit parameters to 64-bit on arm64 assembly function 2016-04-17 19:41:57 +08:00
Karina
1ecb9582df update arm assembly comments 2016-04-14 14:57:21 +08:00
Karina
dd340b7fe7 modify neon comment 2016-04-14 14:49:11 +08:00
Karina
525dbe7093 add 32-bit parameter sign-extentions for block_add_aarch64_neon.S 2016-04-14 10:06:57 +08:00
Karina
d34e209266 fix 32-bit parameters issue on arm64 assembly function 2016-04-13 19:30:08 +08:00
Sindre Aamås
bb49e23719 [Encoder] Add AVX2 4x4 quantization routines
WelsQuantFour4x4Max_avx2 (~2.06x speedup over SSE2)
WelsQuantFour4x4_avx2    (~2.32x speedup over SSE2)
WelsQuant4x4Dc_avx2      (~1.49x speedup over SSE2)
WelsQuant4x4_avx2        (~1.42x speedup over SSE2)
2016-04-13 11:56:47 +02:00
Sindre Aamås
1e83bec860 [UT] Add some missing quantization tests 2016-04-13 11:56:44 +02:00
Sindre Aamås
abaf3a4104 [UT] Reduce duplication in quantization tests 2016-04-13 08:59:16 +02:00
HaiboZhu
50daa8f737 Merge pull request #2439 from ruil2/deblocking_fix
add missing sign extension for arm64 on deblocking_aarch64_neon.S
2016-04-12 16:48:54 +08:00
Karina
7943764869 add missing sign extension for arm64 2016-04-12 16:27:58 +08:00
Sindre Aamås
93db6511a8 [UT] Test VAA routines with a wider variety of resolutions
Test even and odd multiples of 32 width because some AVX2 routines
have conditional logic based on that.
2016-04-11 16:40:36 +02:00
Sindre Aamås
57fc3e9917 [Processing] Add AVX2 VAA routines
Process 8 lines at a time rather than 16 lines at a time because
this appears to give more reliable memory subsystem performance on
Haswell.

Speedup is > 2x as compared to SSE2 when not memory-bound on Haswell.
On my Haswell MBP, VAACalcSadSsdBgd is about ~3x faster when uncached,
which appears to be related to processing 8 lines at a time as opposed
to 16 lines at a time. The other routines are also faster as compared
to the SSE2 routines in this case but to a lesser extent.
2016-04-11 16:09:56 +02:00
HaiboZhu
eb9f56584f Merge pull request #2432 from ruil2/refine_encode1
refine the workflow for encode one frame
2016-04-06 08:59:48 +08:00
hzwangsiyu
6d2d031fca Update .gitignore 2016-04-04 10:32:29 +08:00
Karina
7e14400b0b refine the workflow for encode one frame 2016-03-31 16:58:20 +08:00
HaiboZhu
c423a80ba4 Merge pull request #2431 from ruil2/temporal_layer
fix frame rate issue
2016-03-30 17:02:43 +08:00
Karina
3927d91b85 fix temporal layer issue when output frame rate is different from input frame rate 2016-03-29 15:48:06 +08:00
ruil2
17d7aa13e4 Merge pull request #2427 from mstorsjo/mktargets
Refresh regenerating targets.mk
2016-03-25 09:36:53 +08:00
sijchen
30da4f196e Merge pull request #2426 from ruil2/fix_trace
fix skip frames statistics issue
2016-03-24 09:49:48 -07:00
zhilwang
25818b0fc2 Merge pull request #2428 from mstorsjo/sign-extension
Add missing sign extension for x86_64 in mb_copy.asm
2016-03-24 17:07:42 +08:00
Martin Storsjö
a4e71d6662 Add missing sign extension for x86_64 in mb_copy.asm
This fixes running the code built for x86_64 OS X with Xcode 7.3.
2016-03-24 10:20:42 +02:00
Martin Storsjö
81493590f8 Remove a stray empty line
This disappears when regenerating the makefiles.
2016-03-24 10:01:48 +02:00
Martin Storsjö
d7bc4f5f03 Make sure that gtest-targets.mk gets regenerated with the right directory 2016-03-24 10:01:21 +02:00
Karina
10dfb2670b fix skip frames statistics issue 2016-03-24 14:17:47 +08:00
sijchen
22bec09507 Merge pull request #2425 from sijchen/ruil_rc_update
fix bitrate overflow issue when adaptive quality turns on
2016-03-23 10:54:51 -07:00
sijchen
47d310539f Squashed commit of the following:
commit c8111942e07437034a74b33887c33b5ad78e476a
Author: Karina <ruil2@cisco.com>
Date:   Wed Mar 23 14:31:18 2016 +0800

    update SHA table

commit f36a25344c25a131581dcbcd2d103fc4b131012e
Author: Karina <ruil2@cisco.com>
Date:   Wed Mar 23 13:45:58 2016 +0800

    fix bitrate overflow issue when adaptive quality turns on
2016-03-23 10:23:33 -07:00
HaiboZhu
c0641f40d9 Merge pull request #2423 from shihuade/SPSUpdate
fix bug for debug mode
2016-03-23 13:27:35 +08:00
HaiboZhu
e52c6eacb0 Merge pull request #2422 from HaiboZhu/Bugfix_level_check_error_fmo_return_value
Fix the level limit check bug and fmo return overflow bug
2016-03-23 12:14:20 +08:00
Haibo Zhu
e4a4fb6577 (1) Fix the level limit check wrong condition
(2) Fix the FMO return value overflow bug
2016-03-23 11:15:26 +08:00
Forrest Shi
47ad929c25 fix bug for debug mode 2016-03-23 11:14:40 +08:00
sijchen
22d6a94919 Merge pull request #2414 from ksb2go/master
Google has deprecated using SVN. Move over to GitHub
2016-03-22 16:20:58 -07:00
sijchen
40e1a69fae Merge pull request #2421 from shihuade/MultiThread_V5.2_Pull_V2
refactor for slice buffer init/allocate/free
2016-03-22 16:20:37 -07:00
huade
a7a5b7b0f4 refactor for slice buffer init/allocate/free 2016-03-22 13:51:20 +08:00
sijchen
33bb96f604 Merge pull request #2420 from sijchen/fix_sps
[Encoder] fix the lack of eSpsPpsIdStrategy==INCREASING_ID under simulcast avc on
2016-03-21 21:51:07 -07:00
sijchen
8103988cde Merge pull request #2418 from ruil2/refine_init
fix preprocessing initialization logic
2016-03-21 11:32:24 -07:00
Karina
228cdeba1b refine reset function 2016-03-21 10:48:41 +08:00
sijchen
38313b913d Merge pull request #2419 from ruil2/bitrate_update
fix bitrate update issue
2016-03-18 16:07:59 -07:00
Karina
7c15d68e24 fix preprocessing initialization logic 2016-03-18 16:43:11 +08:00
Karina
316ab31882 fix bitrate update issue 2016-03-18 14:28:32 +08:00
zhilwang
d7570bfa52 Merge pull request #2401 from saamas/decoder-use-encoder-x86-idct-routines
[Decoder] Use encoder x86 IDCT routines
2016-03-18 08:50:33 +08:00
David Chen
7112938a28 Google has deprecated using SVN. Move over to GitHub 2016-03-17 17:25:22 -07:00
HaiboZhu
a8ab4afe5b Merge pull request #2410 from HaiboZhu/Add_disable_assert_in_release
Diable assert in release with -DNDEBUG macro
2016-03-17 15:46:25 +08:00
HaiboZhu
c441f6f390 Merge pull request #2411 from huili2/memory_leak_fix
fix memory leak when alloc failed in decoder
2016-03-17 15:46:12 +08:00
Haibo Zhu
43f767d06e Diable assert in release with -DNDEBUG macro
Update the code to avoid the function unused warning
2016-03-17 11:24:01 +08:00
unknown
693fd14272 fix memory leak when alloc failed in decoder 2016-03-17 10:31:25 +08:00
Sindre Aamås
b6c4a5447c [Decoder/x86] IDCT one block at a time with SSE2
At lower bitrates, it is overall faster to conditionally do one block
at a time with SSE2 on Haswell and likely other common architectures.
At higher bitrates, it is faster to use the wider routine that IDCTs
four blocks at a time. To avoid potential performance regressions
as compared to MMX, stick with single-block IDCTs with SSE2. There
is still a performance advantage as compared to MMX because the
single-block SSE2 routine is faster than the corresponding MMX
routine.

Stick with four blocks at a time with AVX2 for which that appears
to be consistently faster on Haswell.
2016-03-16 19:55:11 +01:00
huili2
a8d9576297 Merge pull request #2405 from HaiboZhu/Fix_UT_decoder_init_fail
Fix the decoder init failed case in UT
2016-03-16 16:28:14 +08:00
Marcus Johnson
4d6b1c23fe MVC support 2 2016-03-16 01:32:56 -04:00
Marcus Johnson
69bae68698 Add support for MVC NALs to EWelsNalUnitType 2016-03-16 01:28:55 -04:00
HaiboZhu
7a3b3fdbe7 Merge pull request #2403 from ruil2/downsampling1
change downsampling logic
2016-03-16 09:48:08 +08:00
sijchen
90deb80b50 rename the functions 2016-03-14 21:41:08 -07:00
sijchen
c009183e97 fix the lack of eSpsPpsIdStrategy==INCREASING_ID under simulcast avc on 2016-03-14 11:28:44 -07:00
Haibo Zhu
46f42ec5f3 Fix the decoder init failed case in UT 2016-03-14 17:06:58 +08:00
Karina
f84f2315ab change downsampling logic that downsampling source is from the nearest layer instead of the highest layer 2016-03-14 09:55:36 +08:00
HaiboZhu
25f53a2e3d Merge pull request #2399 from saamas/encoder-x86-add-avx2-satd-routines
[Encoder/x86] Add AVX2 SATD routines
2016-03-10 09:59:33 +08:00
Sindre Aamås
98042f1600 [Decoder] Use encoder x86 IDCT routines
Move asm routines to common. Delete obsolete decoder routines.

Use wider routines where applicable.

~1.07x overall faster decode on a quick 720p30 4Mbps test on Haswell.
2016-03-09 10:41:42 +01:00
HaiboZhu
bffda9ec02 Merge pull request #2397 from HaiboZhu/Remove_level_limit_check
Change the level limit check behavior to make the compatibility
2016-03-09 09:50:44 +08:00
Haibo Zhu
31de8bb3a0 Change the level limit check behavior to make the compatibility 2016-03-09 08:34:07 +08:00
Sindre Aamås
48a520915a [Encoder/x86] Add AVX2 SATD routines
WelsSampleSatd16x16_avx2 (~2.31x speedup over SSE4.1 on Haswell).
WelsSampleSatd16x8_avx2  (~2.19x speedup over SSE4.1 on Haswell).
WelsSampleSatd8x16_avx2  (~1.68x speedup over SSE4.1 on Haswell).
WelsSampleSatd8x8_avx2   (~1.53x speedup over SSE4.1 on Haswell).
2016-03-08 11:31:17 +01:00
volvet
d4c68527b1 Merge pull request #2389 from saamas/common-x86-deblock-chroma-horizontal-ssse3-optimizations
[Common/x86] Deblock chroma horizontal ssse3 optimizations
2016-03-08 17:09:08 +08:00
HaiboZhu
d9bfc9204b Merge pull request #2394 from sijchen/th021
[Common] remove sink in WelsThreadPool and hide the construtor to finish the s…
2016-03-08 16:29:40 +08:00
HaiboZhu
74b8a66140 Merge pull request #2395 from ruil2/stat_output
format update and fix build issue when turn on STAT_OUTPUT macro
2016-03-07 13:46:27 +08:00
Karina
fee9d502bb format update and fix build issue when turn on STAT_OUTPUT macro 2016-03-04 13:55:14 +08:00
sijchen
316f740630 Merge pull request #2390 from sijchen/th012
[Common] put CWelsThreadPool to singleTon for future usage
2016-03-03 09:47:20 -08:00
huili2
ac6cf877d6 Merge pull request #2392 from mstorsjo/decoder-error-return
Fix a return value check
2016-03-03 16:40:55 +08:00
Martin Storsjö
7f53c29302 Fix a return value check
In 9cb4f4e8e21af, the error code returned from CheckIntraNxNPredMode
was changed - therefore, these return value checks, that look
for a specific error code, need to be updated accordingly.

This fixes crashes in DecodeCrashTestAPI.DecoderCrashTest
with some seeds.
2016-03-03 10:15:34 +02:00
sijchen
4db9c32976 remove sink in WelsThreadPool and hide the construtor to finish the singleTon 2016-03-02 17:08:09 -08:00
sijchen
d4f09d9048 put CWelsThreadPool to singleTon for future usage (including add sink for IWelsTask) 2016-02-29 11:40:25 -08:00
HaiboZhu
52d25f544a Merge pull request #2386 from huili2/return_info_change
modify return value check inside decoder
2016-02-29 09:21:31 +08:00
sijchen
7e88b13809 Merge pull request #2380 from mstorsjo/fix-slice-realloc
Avoid reading iCountMbNumInSlice out of bounds on slice realloc
2016-02-26 09:46:13 -08:00
Sindre Aamås
a009153741 [Common/x86] DeblockChromaEq4H_ssse3 optimizations
Use packed 8-bit operations rather than unpack to 16-bit.

~5.80x speedup on Haswell (x86-64).
~1.69x speedup on Haswell (x86 32-bit).
2016-02-26 10:58:16 +01:00
Sindre Aamås
9909c306f1 [Common/x86] DeblockChromaLt4H_ssse3 optimizations
Use packed 8-bit operations rather than unpack to 16-bit.

~5.72x speedup on Haswell (x86-64).
~1.85x speedup on Haswell (x86 32-bit).
2016-02-26 10:58:16 +01:00
unknown
9cb4f4e8e2 modify return value check inside decoder 2016-02-26 16:29:35 +08:00
Martin Storsjö
69e3fac093 Avoid reading iCountMbNumInSlice out of bounds on slice realloc
Prior to 7bcb3ba4f4abf18a,
pCurLayer->sLayerInfo.pSliceInLayer[uiSliceIdx].iCountMbNumInSlice
was read after setting pCurLayer->sLayerInfo.pSliceInLayer to
the newly allocated, larger array. After this commit, it is read
before the array has been switched, and thus is read from the
old array (which only holds elements up to iMaxSliceNumOld, not
up to iMaxSliceNum).

This fixes reads out of bounds, and crashes in the test suite.
2016-02-25 10:31:58 +02:00
HaiboZhu
040974f735 Merge pull request #2378 from shihuade/MultiThread_V4.9_V5
add thread-based slice buffer and  refactor reallocate process
2016-02-25 14:40:56 +08:00
HaiboZhu
321c772536 Merge pull request #2372 from ruil2/refine_trace
update trace for ENCODER_OPTION_TRACE_CALLBACK
2016-02-25 10:50:12 +08:00
HaiboZhu
027f027c25 Merge pull request #2371 from GregoryJWolfe/master
Added support for "video signal type present" information.
2016-02-25 10:49:34 +08:00
huade
5e8a716c1d add thread-based slice buffer and refact reallocate process for futher change 2016-02-25 10:08:41 +08:00
Gregory J. Wolfe
03890fe86f Added support for "video signal type present" information.
The "Video signal type present" information is written to the output
video file when it is created, and later is used by the decoder to
properly decode the compressed video data. The saved attributes
are:

- format type (PAL, NTSC, etc.)
- color primaries (BT709, SMPTE170M, etc.)
- transfer characteristics (BT709, SMPTE170M, etc.)
- color matrix ((BT709, SMPTE170M, etc.)

These modifications allow the client to specify these attributes
and, if specified, makes sure they are written to the output file.
2016-02-24 10:33:18 -05:00
Gregory J. Wolfe
c7fcba06c7 Added support for "video signal type present" information.
The "Video signal type present" information is written to the output
video file when it is created, and later is used by the decoder to
properly decode the compressed video data. The saved attributes
are:

- format type (PAL, NTSC, etc.)
- color primaries (BT709, SMPTE170M, etc.)
- transfer characteristics (BT709, SMPTE170M, etc.)
- color matrix ((BT709, SMPTE170M, etc.)

These modifications allow the client to specify these attributes
and, if specified, makes sure they are written to the output file.
2016-02-23 13:21:06 -05:00
ruil2
3e538617cd Merge pull request #2374 from sijchen/for_ts0
[Encoder] fix timestamp = 0 issue when rc mode is BITRATE mode
2016-02-23 17:26:20 +08:00
ruil2
78ae48c686 Merge pull request #2375 from shihuade/MultiThread_V4.8_v4
refactor slice level rc statistic info structure
2016-02-23 17:25:57 +08:00
huade
7bcb3ba4f4 refactor slice level rc structure 2016-02-23 16:49:37 +08:00
sijchen
881fc11c48 finish the remaining prob of fixing ts=0 2016-02-22 10:40:35 -08:00
sijchen
9816e3302d fix timestamp = 0 issue when rc mode is BITRATE mode 2016-02-22 10:33:55 -08:00
Karina
597b4eef73 fix timestamp = 0 issue when rc mode is BITRATE mode. 2016-02-22 10:33:55 -08:00
Karina
65218a3c35 update trace for ENCODER_OPTION_TRACE_CALLBACK 2016-02-22 14:33:10 +08:00
ruil2
2754129064 Merge pull request #2360 from saamas/common-x86-deblock-optimizations
[Common/x86] Deblocking optimizations
2016-02-19 09:52:39 +08:00
Gregory J. Wolfe
f35a0daccf Added support for "video signal type present" information.
The "Video signal type present" information is written to the output
video file when it is created, and later is used by the decoder to
properly decode the compressed video data.  The saved attributes
are:

- format type (PAL, NTSC, etc.)
- color primaries (BT709, SMPTE170M, etc.)
- transfer characteristics (BT709, SMPTE170M, etc.)
- color matrix ((BT709, SMPTE170M, etc.)

These modifications allow the client to specify these attributes
and, if specified, makes sure they are written to the output file.
2016-02-18 11:51:51 -05:00
ruil2
13586a3dfc Merge pull request #2366 from sijchen/fix_free6
[Encoder] add error handling in memory allocation failed case for multi-threading
2016-02-18 10:25:19 +08:00
ruil2
f791ac28ec Merge pull request #2365 from sijchen/fix_free42
[Encoder] avoid memory problem when mem alloc failed during initializing pRefList
2016-02-18 10:25:07 +08:00
ruil2
de1a70d164 Merge pull request #2363 from sijchen/fix_free5
[Encoder] add input parameter check as protection for an encoder interface
2016-02-18 10:24:55 +08:00
sijchen
4537682042 Merge pull request #2362 from ruil2/trace1
trace cleanup
2016-02-17 14:52:46 -08:00
sijchen
e07ee9c096 use WELS_DELETE_OP for deleting 2016-02-17 10:07:33 -08:00
sijchen
74955c877f set pointers to null and call uninit 2016-02-17 10:07:33 -08:00
sijchen
cc675f9fd1 add error handling in memory allocation failed case 2016-02-17 10:07:33 -08:00
sijchen
41b4ecb06b Avoid memory problem when mem alloc failed during initializing pRefList 2016-02-17 09:52:30 -08:00
sijchen
4b97dcb367 avoid memory problem when mem alloc failed during initializing pRefList 2016-02-16 10:05:49 -08:00
Karina
18728a4876 trace cleanup 2016-02-16 10:52:37 +08:00
ruil2
a26955e444 Merge pull request #2358 from sijchen/fix_free2
[Encoder]  avoid memory problem if mem alloc failed in the middle of InitDqLayer
2016-02-16 10:47:23 +08:00
ruil2
6cf240237b Merge pull request #2361 from sijchen/fix_free00
[Encoder] multiple protection if memory allocation failed
2016-02-16 10:47:02 +08:00
sijchen
855d1cf8c2 add input parameter check as protection for an encoder interface 2016-02-15 11:54:51 -08:00
sijchen
b76a79c726 move the rc free to the correct condition to avoid access to invalid memory 2016-02-15 10:13:50 -08:00
sijchen
025500d5aa move the assigning m_uiSpatialPicNum earlier to cover the memory leak if error in allocating pic 2016-02-15 10:13:23 -08:00
sijchen
36722c553b use WelsMallocz instead of WelsMalloc to avoid non-null pointer at init 2016-02-15 10:12:44 -08:00
sijchen
71aa533038 move the printing of MEMORY_CHECK part to more reasonable 2016-02-15 10:12:34 -08:00
sijchen
6a0f0811ae use WelsUninitEncoderExt in all free process in WelsInitEncoderExt 2016-02-15 10:06:43 -08:00
sijchen
408b7cad17 use WelsUninitEncoderExt rather than FreeMemorySvc which correctly deals with release of vpp memory 2016-02-15 10:04:52 -08:00
Sindre Aamås
e96a7b5c92 [Common/x86] DeblockChromaEq4V_ssse3 optimizations
Use packed 8-bit operations rather than unpack to 16-bit.

Avoid spills.

~2.07x speedup on Haswell (x86-64).
~2.12x speedup on Haswell (x86 32-bit).
2016-02-15 02:08:03 +01:00
Sindre Aamås
fc16010583 [Common/x86] DeblockChromaLt4V_ssse3 optimizations
Use packed 8-bit operations rather than unpack to 16-bit.

Avoid spills.

~2.68x speedup on Haswell (x86-64).
~2.38x speedup on Haswell (x86 32-bit).
2016-02-15 02:07:25 +01:00
Sindre Aamås
62fb37d096 [Common/x86] DeblockLumaEq4_ssse3 optimizations
Use packed 8-bit operations rather than unpack to 16-bit.

Minimize spills.

~2.31x speedup on Haswell (x86-64).
~2.40x speedup on Haswell (x86 32-bit).
2016-02-15 02:06:39 +01:00
Sindre Aamås
732e1c5f78 [Common/x86] DeblockLumaLt4_ssse3 optimizations
Use packed 8-bit operations rather than unpack to 16-bit.

Avoid spills.

~1.97x speedup on Haswell (x86-64).
~3.09x speedup on Haswell (x86 32-bit).
2016-02-15 02:06:18 +01:00
sijchen
8b1206001c Merge pull request #2355 from pra85/patch-1
Fix a typo
2016-02-12 16:42:02 -08:00
sijchen
2b9a250fbd include the free-ing of pointer into FreeDqLayer 2016-02-12 16:23:57 -08:00
Prayag Verma
2d378b9db8 Fix a typo
`Availabe` → `Available`
2016-02-11 12:04:58 +05:30
sijchen
a1a3873a62 improve the code structure 2016-02-10 22:25:41 -08:00
sijchen
43fdf74fa6 fix a miss of assigning and remove an unused line 2016-02-10 21:54:53 -08:00
sijchen
914302a462 avoid memory problem if mem alloc failed in the middle of InitDqLayer 2016-02-10 21:54:53 -08:00
sijchen
aaa25160ec Merge pull request #2353 from saamas/encoder-x86-dct-opt2
[Encoder] x86 DCT optimizations
2016-02-08 15:00:12 -08:00
sijchen
e5e7013b73 Merge pull request #2350 from sijchen/th00
[Common] Add sink to IWelsTask
2016-02-08 14:59:38 -08:00
HaiboZhu
ad9ca3824f Merge pull request #2354 from ruil2/remove_trace
fix error width and height issue
2016-02-04 12:00:20 +08:00
Karina
ae508b9724 fix error width and height issue 2016-02-04 10:25:03 +08:00
sijchen
f5fd7420a9 Merge pull request #2351 from huili2/fix_width_height_enc_constraint
fix frame size constraints for width and height
2016-02-02 16:31:05 -08:00
sijchen
fb901269ef Merge pull request #2352 from ruil2/remove_trace
remove trace
2016-02-02 16:30:50 -08:00
Sindre Aamås
db9fa9154c Update README.md nasm version requirement
Version 2.10.06 has some RIP-relative relocation fixes for macho64
that are needed to generate correct code on 64-bit OS X with recent
code changes.
2016-02-02 17:22:49 +01:00
Sindre Aamås
c8c74903f8 [Encoder] Add single-block AVX2 4x4 DCT/IDCT routines
We do four blocks at a time when possible, but need to handle
single blocks at a time for intra prediction.

~3.15x speedup over MMX for the DCT on Haswell.
~2.94x speedup over MMX for the IDCT on Haswell.

Returns diminish with increasing vector length because a larger
proportion of the time is spent on load/store/shuffling.
2016-02-02 17:22:49 +01:00
Sindre Aamås
f90960983c [Encoder] Add single-block SSE2 4x4 DCT/IDCT routines
We do four blocks at a time when possible, but need to handle
single blocks at a time for intra prediction.

~2.31x speedup over MMX for the DCT on Haswell.
~1.92x speedup over MMX for the IDCT on Haswell.
2016-02-02 17:22:48 +01:00
Sindre Aamås
7486de2844 [Encoder] AVX2 DCT tweaks
Do some shuffling in load/store unpack/pack to save some
work in horizontal DCTs.

Use a few 128-bit broadcasts to compact data vectors a bit.

~1.04x speedup for the DCT case on Haswell.
~1.12x speedup for the IDCT case on Haswell.
2016-02-02 17:22:48 +01:00
Karina
2d4cbcf060 remove trace 2016-02-02 17:34:59 +08:00
unknown
3873addc3d fix frame size constraints for width and height 2016-02-01 15:55:53 +08:00
HaiboZhu
1030820ec4 Merge pull request #2342 from sijchen/enh_ut_tem
[UT] correct and enhance the ut template and trace improvement
2016-02-01 09:08:05 +08:00
zhilwang
c420d72443 Merge pull request #2341 from saamas/encoder-x86-dct-opt
[Encoder] x86 DCT optimizations
2016-01-28 10:33:34 +08:00
HaiboZhu
51f3bbdfde Merge pull request #2345 from shihuade/WP8ScriptUpdate
update build script for wp8 under multi-vc version
2016-01-24 07:56:23 +08:00
Forrest Shi
21402ca419 update build script for wp8 under multi-vc version 2016-01-23 16:56:53 +08:00
HaiboZhu
3174e2a220 Merge pull request #2344 from mstorsjo/cleanup-map
Ignore the MSVC generated map file, remove it on make clean
2016-01-22 09:45:57 +08:00
Martin Storsjö
fa52fbfc9d Ignore the MSVC generated map file, remove it on make clean 2016-01-21 10:23:34 +02:00
HaiboZhu
77c40e09e0 Merge pull request #2343 from HaiboZhu/Add_map_file_msvc
Generate map file for msvc build
2016-01-21 14:34:50 +08:00
sijchen
ef329e33c3 add simulcastAvc setting in setting trace 2016-01-20 14:24:16 -08:00
sijchen
47e3f4c45c correct and enhance the ut template 2016-01-19 17:16:39 -08:00
Sindre Aamås
cc8d541432 [UT] Utilize DCT function pointer typedefs 2016-01-19 22:00:24 +01:00
Sindre Aamås
e22d731f26 [Encoder] yasm-compatible vinserti128 syntax in DCT asm 2016-01-19 21:48:23 +01:00
Sindre Aamås
a45c10cf91 [UT] Only run AVX2 tests if host supports AVX2 2016-01-19 14:27:46 +01:00
Sindre Aamås
144ff0fd51 [Encoder] SSE2 4x4 IDCT optimizations
Use a combination of instruction types that distributes more
evenly across execution ports on common architectures.

Do the horizontal IDCT without transposing back and forth.

Minor tweaks.

~1.14x faster on Haswell. Should be faster on other architectures
as well.
2016-01-19 13:12:29 +01:00
Sindre Aamås
991e344d8c [Encoder] SSE2 4x4 DCT optimizations
Use a combination of instruction types that distributes more
evenly across execution ports on common architectures.

Do the horizontal DCT without transposing back and forth.

Minor tweaks.

~1.54x faster on Haswell. Should be faster on other architectures
as well.
2016-01-19 13:12:28 +01:00
Sindre Aamås
3088d96978 [Encoder] Add an AVX2 4x4 IDCT implementation
~2.03x faster on Haswell as compared to the SSE2 version.
2016-01-19 13:12:28 +01:00
Sindre Aamås
b267163f10 [Encoder] Add an AVX2 4x4 DCT implementation
~2.52x faster on Haswell as compared to the SSE2 version.
2016-01-19 13:12:28 +01:00
Sindre Aamås
b9adbcf37c [UT] Add missing SSE2 4x4 IDCT test
IDCT input is defined in such a way that the intermediate values
cannot legally overflow an int16_t. The use of random values
as input causes such overflows. This results in implementation-
dependent output depending on which type is used to hold
intermediate results. Use a template for the test reference
implementation to test implementations with different
intermediate representation.
2016-01-19 13:12:28 +01:00
Sindre Aamås
8764231784 [UT] Improve DCT tests
Initialize input arrays with different random values.

Otherwise, the input to the DCT routines is effectively
all zero values after taking the difference.

Reduce duplication.
2016-01-19 13:12:28 +01:00
Sindre Aamås
7739184dfd Update nasm requirement in README.md
We need version 2.10 or above for AVX2 support.
2016-01-19 13:12:28 +01:00
Sindre Aamås
496de8bf09 Use dist: trusty with travis
Trusty has a newer nasm version with AVX2 support.
2016-01-19 12:10:39 +01:00
Haibo Zhu
3206010a89 Generate map file for msvc build 2016-01-19 17:03:50 +08:00
HaiboZhu
21c1c02441 Merge pull request #2334 from sijchen/fix_ut
[UT] fix the prob in case that the task uID is too big
2016-01-19 15:39:17 +08:00
HaiboZhu
8eb4de10a2 Merge pull request #2337 from HaiboZhu/Add_Protection_wrong_API_call
Add protection for wrong API call without initialize
2016-01-19 13:42:49 +08:00
HaiboZhu
5e3e975ffb Merge pull request #2331 from ruil2/return_value
add return value judgment
2016-01-19 12:25:10 +08:00
Haibo Zhu
6d7bd2daf4 Add protection for wrong API call without initialize 2016-01-19 12:00:54 +08:00
huili2
91fa9fad63 Merge pull request #2335 from mstorsjo/fix-msvc-warnings
Avoid warnings in MSVC about implicitly casting floats to integers
2016-01-18 08:48:15 +08:00
Martin Storsjö
fbe35cffca Avoid warnings in MSVC about implicitly casting floats to integers 2016-01-16 11:10:25 +02:00
sijchen
d46cd07511 fix the prob in case that the task uID is too big 2016-01-15 16:06:09 -08:00
Karina
559e786fa4 add return value judgment 2016-01-15 10:30:41 +08:00
HaiboZhu
d11f12db54 Merge pull request #2330 from ruil2/mt_build_1
fix build issue when some macro turn on
2016-01-15 09:28:07 +08:00
HaiboZhu
67f925674a Merge pull request #2329 from ruil2/layer4
using independent encoder control logic for SAVC case
2016-01-15 09:27:58 +08:00
sijchen
5eb18b101e change the output way of debug trace 2016-01-13 22:13:43 -08:00
Karina
67f4dcf2e2 fix build issue when some macro turn on 2016-01-14 09:40:20 +08:00
Karina
0f0d54ef51 using independent encoder control logic for SAVC case 2016-01-14 09:16:12 +08:00
sijchen
cce1c29844 add sink to IWelsTask (for further enhancements) 2016-01-13 16:24:54 -08:00
ruil2
7bfb96b2b6 Merge pull request #2327 from sijchen/th41
Multiple enhancements and a bug fix
2016-01-13 13:07:58 +08:00
sijchen
5cad0f9bba enhance a UT to cover more case 2016-01-11 22:01:02 -08:00
sijchen
bf35b6fee7 add a debug trace if encoder returns error 2016-01-11 22:00:24 -08:00
sijchen
19f5eb0932 complete a debug trace in load-balancing task 2016-01-11 22:00:14 -08:00
sijchen
7a8da6a468 remove unneed codes after new task-managements 2016-01-11 21:59:49 -08:00
sijchen
dcdd496082 fix a bug in multi-layer case in task-management 2016-01-11 21:58:10 -08:00
HaiboZhu
b940e2cdf8 Merge pull request #2325 from ruil2/trace1
separate each layer trace output
2016-01-11 14:05:55 +08:00
ruil2
737548fe06 Merge pull request #2326 from shihuade/Win10_V1.0_Push
update auto build script for windows 10
2016-01-08 17:15:40 +08:00
ruil2
c32263e06b Merge pull request #2322 from HaiboZhu/Fix_Encoder_Info_Output
Fix the build errors when open the encoder info output
2016-01-08 17:15:15 +08:00
huade
1d9497b7f6 update auto build script for windows 10 2016-01-08 09:38:15 +08:00
Karina
d4f979c495 seperate each layer trace output 2016-01-05 14:02:58 +08:00
HaiboZhu
303fbfeb55 Merge pull request #2324 from ruil2/update_style
update format
2016-01-05 13:08:53 +08:00
Karina
57c87f1845 update format 2016-01-05 11:40:59 +08:00
HaiboZhu
cd75541c8f Merge pull request #2323 from ruil2/rc_timestamp
resolve abnormal timestamp(rollback or jump case)
2015-12-31 09:55:58 +08:00
Haibo Zhu
a6a504f944 Fix the build errors when open the encoder info output 2015-12-31 09:06:59 +08:00
HaiboZhu
539818101f Merge pull request #2321 from huili2/modify_ec_option_comment
modify EC method comment in API
2015-12-30 14:21:58 +08:00
huili2
740968d1f6 modify EC method comment in API 2015-12-30 13:41:29 +08:00
Karina
0d5db3d986 resolve abnormal timestamp(rollback or jump case) 2015-12-29 15:05:42 +08:00
ruil2
e3c2cb00a5 Merge pull request #2317 from shihuade/Scripts_V3
update scripts
2015-12-18 14:50:18 +08:00
huade
f79361ac35 update scripts 2015-12-18 09:05:12 +08:00
sijchen
100e952231 Merge pull request #2314 from shihuade/MultiThread_V4.5_SliceBsRefact_V1
remove pSliceBs from ctx
2015-12-17 12:02:00 -08:00
sijchen
1b0735c3a9 Merge pull request #2315 from shihuade/Scripts_V2
add scripts for multi-encoder comparision
2015-12-17 12:01:49 -08:00
huade
74d73ac7ec add scripts for multi-encoder comparision 2015-12-17 16:22:55 +08:00
huade
f161566458 remove pSliceBs from ctx 2015-12-15 17:10:52 +08:00
HaiboZhu
04bfacd7e1 Merge pull request #2313 from shihuade/MultiThread_V4.4_ThreadIdcUnify
refact threadIdc and CPU cores logic in init module
2015-12-15 13:56:49 +08:00
huade
ef38c2abf8 refact threadIdc and CPU cores logic in init module 2015-12-15 11:27:00 +08:00
sijchen
e75c5852e8 Merge pull request #2312 from shihuade/TravisTestCase
reduce one test sequences and let travis jobs num to 4, thus reduce test time
2015-12-14 09:44:38 -08:00
sijchen
406f89ec54 Merge pull request #2309 from shihuade/MultiThread_V4.4_ThreadSliceNum_V3_Pull
remove iCountThreadsNum and unitfy with iMultipleThreadIdc
2015-12-14 09:44:13 -08:00
sijchen
2620f4bcfd Merge pull request #2310 from shihuade/MultiThread_V4.5_LayerSizeFixed
fixed layer size update bugs
2015-12-14 09:44:01 -08:00
huade
0f24b80af8 reduce one test sequences and let travis jobs num to 4, thus reduce test time 2015-12-14 17:18:21 +08:00
huade
549a1b9bf4 fixed layer size update bugs 2015-12-14 14:56:09 +08:00
huade
e8536c6b73 remove iCountThreadsNum and unitfy with iMultipleThreadIdc 2015-12-14 12:26:02 +08:00
HaiboZhu
ee01b3afaf Merge pull request #2307 from huili2/fix_decstat
fix iAvgLumaQp in decStat
2015-12-14 10:26:16 +08:00
HaiboZhu
762d1812bb Merge pull request #2306 from shihuade/MultiThread_V4.4_ThreadSliceNum_V2_Pull
refact validate and init logic for fixed sliceMode
2015-12-14 09:44:38 +08:00
HaiboZhu
92637b4912 Merge pull request #2304 from sijchen/th21
[Encoder] Add tasks and thread pool call for SM_SIZELIMITED_SLICE mode
2015-12-11 16:16:16 +08:00
HaiboZhu
045e51b075 Merge pull request #2305 from ruil2/qp_layer
update temporal layer quant
2015-12-11 16:10:06 +08:00
huili2
b2d4a95537 fix iAvgLumaQp in decStat 2015-12-11 14:14:42 +08:00
huade
14d89eb48c refact validate and init logic for fixed sliceMode 2015-12-11 13:08:05 +08:00
Karina
fde8bd2554 update temporal layer quant 2015-12-10 15:07:19 +08:00
sijchen
0c820f4c06 adjust encoder test case to cover multi-thread without loadbalancing 2015-12-09 09:58:03 -08:00
sijchen
76ca56498a Add tasks and thread pool call for SM_SIZELIMITED_SLICE mode 2015-12-09 09:55:04 -08:00
HaiboZhu
76b428a453 Merge pull request #2302 from GuangweiWang/platform
add stripped lib for firefox and modify README for the usage fo DEBUG…
2015-12-09 12:36:12 +08:00
Guangwei Wang
8af088af93 merge changed Makefile to master 2015-12-09 11:36:02 +08:00
Guangwei Wang
3bcf6069ab add stripped lib for firefox and modify README for the usage fo DEBUGSYMBOLS 2015-12-09 10:54:09 +08:00
HaiboZhu
7e9fdc181f Merge pull request #2301 from huili2/simple_parseonly_ctx
remove parseonly in decoder ctx
2015-12-09 10:33:29 +08:00
sijchen
fb241569df Merge pull request #2300 from pengyanhai/master
Avoid a potential deadlock between the main thread and worker thread when encoding or decoding complete
2015-12-08 15:50:37 -08:00
Hank Peng
d58ac746a0 Avoid a potential deadlock between the main thread and worker thread when encoding or decoding complete 2015-12-08 11:53:22 -08:00
HaiboZhu
9272995143 Merge pull request #2298 from GuangweiWang/platform
add stripped lib for firefox
2015-12-08 16:16:14 +08:00
HaiboZhu
7999219f61 Merge pull request #2297 from shihuade/MultiThread_V4.3_SliceBs_V5_Pull
unitfy slice bs writing for multi-thread(sliceindex==0 is the same wi…
2015-12-08 16:16:05 +08:00
huade
dcfe76d1ff unitfy slice bs writing for multi-thread(sliceindex==0 is the same with others ) 2015-12-08 14:09:43 +08:00
Guangwei Wang
703ed1d86e add stripped lib for firefox 2015-12-08 09:52:03 +08:00
HaiboZhu
6dc3f72ef8 Merge pull request #2291 from sijchen/api5
[Encoder] Console: update help info in console to sync with recent api change
2015-12-07 14:26:54 +08:00
HaiboZhu
642d5aa453 Merge pull request #2295 from HaiboZhu/Add_Debug_symbols_in_makefile
Add DEBUGSYMBOLS option for makefile under release mode
2015-12-07 14:26:09 +08:00
HaiboZhu
8ee4fdef28 Merge pull request #2294 from HaiboZhu/Add_Bitcode_Enable
Enable bitcode for iOS 9
2015-12-07 14:25:59 +08:00
Haibo Zhu
95491a7584 Enable bitcode for iOS 9 2015-12-07 08:44:16 +08:00
Haibo Zhu
6ebacd0cbf Add DEBUGSYMBOLS option for makefile under release mode 2015-12-04 09:47:39 +08:00
sijchen
b5e9e7e823 Merge pull request #2292 from ruil2/trace
add parameter output trace
2015-12-03 13:47:48 -08:00
Karina
5ac58e8dc9 add parameter output trace 2015-12-03 16:47:57 +08:00
HaiboZhu
988784ffe1 Merge pull request #2289 from ruil2/interface1
change output interface
2015-12-02 17:15:59 +08:00
Karina
fd43759fc2 change output interface 2015-12-02 09:58:56 +08:00
sijchen
c55e5f6130 update help info in console to sync with recent api change 2015-12-01 16:45:37 -08:00
sijchen
4cdbc20da0 Merge pull request #2285 from sijchen/ut13
[UT] moving test cases to specific files to avoid the too long file
2015-12-01 09:23:33 -08:00
sijchen
f38d24f036 fix the conflict with the current master 2015-11-30 23:42:26 -08:00
HaiboZhu
ece95c815c Merge pull request #2286 from sijchen/ut3
[Encoder] adjust the input para judgement of iMaxNalSize
2015-12-01 15:24:02 +08:00
HaiboZhu
5bf677c9f7 Merge pull request #2284 from sijchen/rf2
[Encoder] Refactor: remove CWelsTaskManageMultiD
2015-12-01 15:23:21 +08:00
sijchen
6a75152a9a Merge pull request #2287 from GuangweiWang/bugfix
fix bug in UT code
2015-11-30 23:04:59 -08:00
Guangwei Wang
c917d09263 fix bug in UT code 2015-12-01 08:55:00 +08:00
sijchen
420778f4d8 add valid adjustment in test to avoid outputing warning trace 2015-11-30 11:33:13 -08:00
sijchen
42ac53b5fc update win UT project after UT structure change 2015-11-30 11:29:47 -08:00
sijchen
46667588e3 moving test cases to specific files to avoid the too long encode_decode_api_test.cpp 2015-11-30 10:47:10 -08:00
sijchen
89752ff62f Refactor: remove CWelsTaskManageMultiD 2015-11-30 10:32:48 -08:00
HaiboZhu
f679da900f Merge pull request #2281 from sijchen/th11
[Encoder] remove duplicated operation after thread pool
2015-11-27 12:13:33 +08:00
HaiboZhu
b749fe7160 Merge pull request #2273 from sijchen/th0
[Encoder] use different task when load-balancing or not, to save computation
2015-11-27 09:29:22 +08:00
HaiboZhu
921443ead8 Merge pull request #2272 from sijchen/rf0
[Encoder] put duplicated codes into one function
2015-11-27 09:27:37 +08:00
huili2
926fc67451 remove parseonly in decoder ctx 2015-11-27 08:56:20 +08:00
ruil2
6696022028 Merge pull request #2283 from shihuade/MultiThread_V4.3_SliceBs_V2
initial for iReturn and refact PPS Sps bs write function
2015-11-26 17:03:54 +08:00
huade
436da21ccf initial for iReturn and refact PPS Sps bs write function 2015-11-26 14:06:01 +08:00
ruil2
60aaf48744 Merge pull request #2282 from shihuade/MultiThread_V4.3_SliceBs_V1_Pull
refact WriteSliceBs()
2015-11-26 12:12:33 +08:00
huade
4a4ade1201 refact WriteSliceBs() 2015-11-26 09:32:33 +08:00
sijchen
8667452940 adjust the input para judgement of iMaxNalSize 2015-11-25 14:21:32 -08:00
sijchen
05c89b75f0 remove duplicated operation after thread pool and rename a task for clearer meaning 2015-11-25 13:46:21 -08:00
sijchen
67dab5d70e Merge pull request #2266 from sijchen/ut0
[UT] put class notification to header file
2015-11-25 09:57:43 -08:00
HaiboZhu
a422180695 Merge pull request #2277 from ruil2/qp_trace
add minqp and maxqp parameters in console
2015-11-25 15:05:12 +08:00
HaiboZhu
3dccfabce3 Merge pull request #2276 from shihuade/MultiThread_V4.2_SSliceCtx_pSliceCountInMB_V3
remove pCountMbNumInSlice from SSliceCtx
2015-11-25 15:02:50 +08:00
Karina
ab7eb1535d add minqp and maxqp parameters in console 2015-11-25 14:21:44 +08:00
huade
d02addd90f remove pCountMbNumInSlice from SSliceCtx 2015-11-25 13:36:37 +08:00
HaiboZhu
60f36eb25a Merge pull request #2275 from HaiboZhu/Fix_Emulation_Prevention_Bytes_Profiles_Bugs
Add protection for emulation prevention bytes and profile_id
2015-11-25 12:30:51 +08:00
HaiboZhu
f47be08065 Merge pull request #2271 from sijchen/rf1
[Encoder] refactor multi-thread logic and add error-dealing
2015-11-25 12:04:00 +08:00
unknown
cc6b409f12 Add protection for emulation prevention bytes and profile_id 2015-11-25 11:48:07 +08:00
HaiboZhu
d85b1f6863 Merge pull request #2274 from shihuade/MultiThread_V4.2_SSliceCtx_PFirstMBInSlice_Pull_BugFixed
fixed bug for firsMbIndex in multi-thread-slice encoding with slicemo…
2015-11-25 11:12:24 +08:00
HaiboZhu
404315ab19 Merge pull request #2270 from huili2/parseonly_api_bugfix
disable wrongly calling for parseonly related
2015-11-25 09:00:54 +08:00
sijchen
13cb84e695 use different task when load-balancing or not to save computation 2015-11-24 14:19:15 -08:00
sijchen
1247006cbb remove unneeded variable 2015-11-24 13:39:27 -08:00
sijchen
2df092bcae refactor multi-thread logic 2015-11-24 13:35:55 -08:00
sijchen
2fc9c08710 put duplicated codes into one function 2015-11-24 11:14:58 -08:00
huade
29dd5e71be fixed bug for firsMbIndex in multi-thread-slice encoding with slicemode==SM_SIZELIMITED_SLICE 2015-11-24 17:55:30 +08:00
HaiboZhu
01016b1c83 Merge pull request #2264 from sijchen/api41
[Encoder] put bUseLoadBalancing into actual usage and add test case for it
2015-11-24 14:16:21 +08:00
ruil2
9ea1f0c7ea Merge pull request #2269 from shihuade/MultiThread_V4.2_SSliceCtx_pSliceComplexRatio_pull
remove pSliceComplexRatio from SliceThreading
2015-11-24 12:37:58 +08:00
huili2
9fade10d77 disable wrongly calling for parseonly related 2015-11-24 11:11:27 +08:00
huade
f263f0710a remove pSliceComplexRatio from SliceThreading 2015-11-24 10:44:23 +08:00
HaiboZhu
aeb55e07fe Merge pull request #2268 from HaiboZhu/Update_ftell_fseek_support_long_file
Update encoder console to support 64bit file length
2015-11-24 10:35:54 +08:00
HaiboZhu
4c19823d44 Merge pull request #2267 from shihuade/MultiThread_V4.2_SSliceCtx_SliceConSumeTime_Pull
remove pSliceConsumeTime in SSliceCtx and SliceThreading
2015-11-24 10:35:43 +08:00
Haibo Zhu
d7644664a6 Update the ftell and fseek to support 64bit length 2015-11-24 09:23:18 +08:00
huade
b001785eee remove pSliceConsumeTime in SSliceCtx and pSliceThreading 2015-11-24 08:58:37 +08:00
sijchen
5d03a8a692 put class notification to header file 2015-11-23 15:55:24 -08:00
sijchen
f3c4b878ff update the usage of flag and MD5 value 2015-11-23 11:54:43 -08:00
ruil2
2d3071e37c Merge pull request #2262 from shihuade/MultiThread_V4.2_SSliceCtx_PFirstMBInSlice_Pull
remove pFirstMbInSlice in SSliceCtx
2015-11-20 14:35:00 +08:00
huade
9ef07c5b99 remove pFirstMbInSlice in SSliceCtx 2015-11-20 09:51:01 +08:00
huili2
6f15550b9e Merge pull request #2261 from mstorsjo/fix-test-init-uninit
Fix DecoderInterfaceTest::TestInitUninit()
2015-11-20 08:35:33 +08:00
Martin Storsjö
eaf4798119 Readd a test for GetOption in TestInitUninit
In dc2cbe4, the previous test for GetOption that succeeds when the
decoder is initialized was removed. Add a GetOption call for a different
option, now that DECODER_OPTION_DATAFORMAT is removed.
2015-11-20 00:17:43 +02:00
Martin Storsjö
b3b083c883 Fully initialize m_sDecParam in TestInitUninit
Before dc2cbe4, the DecoderConfigParam function returned early
since DecoderSetCsp signaled a failure, which is why the uninitialized
parameters weren't read before.

This fixes valgrind warnings about conditional jumps depending on
uninitialized values.
2015-11-20 00:13:42 +02:00
sijchen
222c84c193 Merge pull request #2260 from shihuade/MultiThread_V4.1_SliceCtx_V10V11_Pull_V4
change input parameters for  UpdateMbNeighbourInfoForNextSlice etc.
2015-11-19 13:20:28 -08:00
huade
b77b68ffa0 change input parameters for UpdateMbNeighbourInfoForNextSlice etc. 2015-11-19 17:18:03 +08:00
HaiboZhu
54a194ce66 Merge pull request #2258 from shihuade/MultiThread_V4.1_SliceCtx_V6V7V8V9_Pull_V2
change input parameters for AssignMbMapMultipleSlices etc,
2015-11-19 16:10:54 +08:00
huade
c842c5c946 change input parameters for DynamicAdjustSlicePEncCtxAll etc, SSliceCtx refactoring 2015-11-19 15:00:38 +08:00
HaiboZhu
e4229db53d Merge pull request #2257 from shihuade/MultiThread_V4.1_SliceCtx_V5_Pull
change input parameters for AssignMbMapMultipleSlices
2015-11-19 14:51:52 +08:00
HaiboZhu
40b2cc85f3 Merge pull request #2256 from shihuade/MultiThread_V4.1_SliceCtx_V4_Pull_V3
change input paramters for Init/UninitSlicePEncCtx()
2015-11-19 14:07:29 +08:00
huade
c298755da5 SSliceCtx structure refactoring----change input parameters for AssignMbMapMultipleSlices 2015-11-19 13:29:16 +08:00
huade
b60bb67b4e SSliceCtx struture refactoring----change input paramters for Init/UninitSlicePEncCtx() 2015-11-19 13:19:34 +08:00
HaiboZhu
268e6cf09f Merge pull request #2255 from shihuade/MultiThread_V4.1_SliceCtx_V3_Pull_V3
remove (ppCtx)->pSliceCtxList and only keep DqLayer->sSliceCtx
2015-11-19 13:13:01 +08:00
huade
35ab32b1a3 remove (ppCtx)->pSliceCtxList and only keep DqLayer->sSliceCtx to simply the structure manage 2015-11-19 11:03:50 +08:00
HaiboZhu
f9d8e9a76e Merge pull request #2249 from huili2/remove_output_colorformat
remove data format in decoder API
2015-11-19 09:11:29 +08:00
sijchen
e0282587d1 Merge pull request #2251 from luser/plugin-name
add an echo-plugin-name target
2015-11-18 10:03:42 -08:00
Ted Mielczarek
bdb837ffaf add an echo-plugin-name target 2015-11-18 06:47:39 -05:00
ruil2
174f09bd10 Merge pull request #2246 from shihuade/MultiThread_V4.1_SliceCtx_V2_Pull
SSliceCtx structure refactoring----change input parameters for UpdateSl…
2015-11-18 13:42:20 +08:00
ruil2
a8584b530f Merge pull request #2245 from shihuade/MultiThread_V4.1_SliceCtx_V1_Pull_V2
SSliceCtx structure refactoring----change input parameters for UpdateMb…
2015-11-18 13:42:02 +08:00
huade
8d44427dc6 SSliceCtx struture refactoring----change input paramters for UpdateSlicepEncCtxWithPartition 2015-11-17 20:54:27 +08:00
huade
06eb03578d SSliceCtx struture refactoring----change input paramters for UpdateMbListNeighborParallel 2015-11-17 17:54:58 +08:00
HaiboZhu
148f86f3b0 Merge pull request #2244 from pengyanhai/master
Merge back the changes of v1.5.2 to master and generate PDB file on Windows
2015-11-17 14:35:16 +08:00
huili2
dc2cbe4a22 remove API data format in decoder in 1.6 2015-11-17 13:58:57 +08:00
Hank Peng
28bdcc3871 Update the plugin version to v1.5.2 2015-11-16 16:59:21 -08:00
Hank Peng
baa69f3cd0 Shut down the encoder/decoder thread when Encoding/DecodingComplete is invoked, to avoid potential crash on Android 2015-11-16 16:56:11 -08:00
Hank Peng
e014b5ea43 Avoid to call any host API after Encoding/DecodingComplete(), to avoid potential crash in the browser 2015-11-16 16:55:58 -08:00
Hank Peng
545612e4d7 Merge branch 'master' of github.com:pengyanhai/openh264 2015-11-16 16:53:58 -08:00
sijchen
7bc1b7abf5 Merge pull request #2240 from ruil2/qp_trace
add qp related trace
2015-11-16 10:36:24 -08:00
sijchen
18fdf6292d Merge pull request #2239 from ruil2/remove_trace
remove iAbsDiffPicNumMinus1 processing for no reference frame
2015-11-16 10:36:00 -08:00
ruil2
8f785ebcd5 Merge pull request #2241 from shihuade/MultiThread_V4.0_ThreadPoolChange_V5_astyle
astyle for codec/encoder/core/src/slice_multi_threading.cpp
2015-11-16 17:39:40 +08:00
huade
953f74a8a2 astyle for codec/encoder/core/src/slice_multi_threading.cpp 2015-11-16 15:20:24 +08:00
Karina
96b5b3965e add qp related trace 2015-11-16 13:08:48 +08:00
Karina
42222b8e7e remove iAbsDiffPicNumMinus1 processing for no reference frame 2015-11-16 12:22:10 +08:00
HaiboZhu
8d2883277c Merge pull request #2236 from sijchen/thp82
[Encoder] add error handling of task returns
2015-11-16 10:26:45 +08:00
HaiboZhu
991b05fb69 Merge pull request #2238 from shihuade/MultiThread_V4.0_ThreadPoolChange_V2
fixed bug for NeedDynamicAdjust()
2015-11-16 10:13:02 +08:00
huade
0d4d32efbd fixed bug for NeedDynamicAdjust() 2015-11-16 08:57:38 +08:00
sijchen
6fe05b0996 add error handling of task returns 2015-11-13 12:05:06 -08:00
sijchen
b5d890c1ea Merge pull request #2224 from sijchen/thp73
[Encoder] put the logic related to multiple D layer into a class …
2015-11-13 11:57:07 -08:00
HaiboZhu
da0965c42f Merge pull request #2234 from HaiboZhu/Revert_Simply_Dec_Ctx
Revert "Merge pull request #2217 from huili2/simply_dec_ctx"
2015-11-13 20:45:11 +08:00
Haibo Zhu
628befe8be Revert "Merge pull request #2217 from huili2/simply_dec_ctx"
This reverts commit 27172bafd7ff2cc80b08768a32a23470f3d6d3fd, reversing
changes made to 24916a652ee5d3e36d931c222df20966f7c158fa.
2015-11-13 20:16:03 +08:00
HaiboZhu
513a34069d Merge pull request #2232 from ruil2/fix_crash_1
fix crash
2015-11-13 17:19:16 +08:00
Karina
7c1fbad53a fix crash 2015-11-13 17:16:26 +08:00
huili2
d2e66deb66 Merge pull request #2227 from sijchen/thp92
[Encoder] fix the missing loadbalancing part
2015-11-13 07:38:06 +08:00
sijchen
e508c86dac fix the missing loadbalancing part 2015-11-12 13:15:07 -08:00
sijchen
aeb5ab4b99 [Encoder] put the logic related to multiple D layer into a class for better structure 2015-11-11 22:55:16 -08:00
HaiboZhu
beacba76e3 Merge pull request #2220 from sijchen/thp61
[Encoder] add preencodingtasklist in task management
2015-11-12 13:54:49 +08:00
pengyanhai
b5792a09f9 Generate PDB file for openh264.dll and gmpopenh264.dll 2015-11-10 20:37:17 -08:00
HaiboZhu
1a2606f45d Merge pull request #2219 from sijchen/api3
[Encoder] change API for slicing part for easier usage
2015-11-11 09:19:03 +08:00
HaiboZhu
27172bafd7 Merge pull request #2217 from huili2/simply_dec_ctx
remove bParseonly in ctx using that in param, and slightly modify the…
2015-11-11 09:18:04 +08:00
sijchen
33c378f7b7 change API for slicing part for easier usage (the UseLoadBalancing flag is still under working) 2015-11-10 09:50:06 -08:00
huili2
24916a652e Merge pull request #2215 from pengyanhai/master
Tear down the OpenH264 encoder and decoder properly to avoid potential crash and memory leak
2015-11-10 09:07:41 +08:00
pengyanhai
b5f1460dd1 Tear down the OpenH264 encoder and decoder properly to avoid potential crash and memory leak 2015-11-09 11:52:11 -08:00
HaiboZhu
643df65c58 Merge pull request #2212 from ruil2/rc2
remove an useless code line
2015-11-09 09:53:28 +08:00
HaiboZhu
f1b10e454d Merge pull request #2213 from ruil2/rc4
do GOM rate control for I frame
2015-11-09 09:53:05 +08:00
Karina
e20ce63778 do GOM rate control for I frame 2015-11-06 16:08:52 +08:00
Karina
a251504aa2 remove an useless code line 2015-11-06 13:43:21 +08:00
huili2
17e610da9f Merge pull request #2209 from sijchen/fixslc
[UT] add autolock in ThreadPoolTest to avoid possible conflict
2015-11-05 13:46:51 +08:00
huili2
c47d235942 Merge pull request #2210 from pengyanhai/master
Never call GMPVideoDecoderCallback after Encoding/DecodingComplete, to fix bug #1204588 in Bugzilla
2015-11-05 09:09:55 +08:00
Hank Peng
955fce60a1 Never call GMPVideoDecoderCallback after DecodingComplete, to fix bug #1204588 in Bugzilla 2015-11-04 11:29:02 -08:00
sijchen
59779539e7 add autolock in ThreadPoolTest to avoid possible conflict 2015-11-04 10:29:08 -08:00
HaiboZhu
f13f502203 Merge pull request #2208 from sijchen/fixslc
[Encoder] Fix for a slicing and multi-threading setting
2015-11-04 09:24:08 +08:00
HaiboZhu
e6d9d44344 Merge pull request #2204 from sijchen/ut_template2
[UT] add a .template file for codec UT
2015-11-04 09:23:26 +08:00
Sijia Chen
2dab8bf087 fix for a slicing and multi-threading setting 2015-11-03 14:42:56 -08:00
Sijia Chen
ee27d13262 add preencodingtasklist in task manegement
add interface to enable different task list
2015-11-03 09:33:26 -08:00
sijchen
597adfd98c Merge pull request #2207 from sijchen/thp53
[Encoder] remove unneeded codes and add some logs (basing on PR2206)
2015-11-03 09:05:55 -08:00
sijchen
b0c6ea9385 Merge pull request #2206 from sijchen/thp42
[Encoder] adjust encoder tasks, add ut and enable new thread pool under some cases
2015-11-03 09:05:43 -08:00
Sijia Chen
3d3884641c use the correct commit number in comment 2015-11-02 23:19:02 -08:00
Sijia Chen
3e0ee69812 remove unneeded codes and add some logs 2015-11-02 23:15:29 -08:00
HaiboZhu
cda6a1fa76 Merge pull request #2191 from mstorsjo/cabac-warnings
Avoid warnings in the cabac code
2015-10-29 14:19:22 +08:00
HaiboZhu
17934b9843 Merge pull request #2192 from sijchen/fix_slc
[Encoder] change an improper setting of max_slice_count
2015-10-29 14:17:26 +08:00
HaiboZhu
0292647449 Merge pull request #2195 from sijchen/add_stat_log
[Encoder] Log enhancement for easier debugging
2015-10-29 14:17:19 +08:00
sijchen
8eed27a357 Merge pull request #2197 from HaiboZhu/Add_binary_address_RELEASES
Add binary package address in RELEASES
2015-10-28 21:54:03 -07:00
Sijia Chen
3350cf75a5 add one test case 2015-10-28 21:51:47 -07:00
sijchen
1ed0e8c37b Merge pull request #2196 from shihuade/PSliceRefact_V1.5
refact WelsMarkPicScreen  based on pSlice buffer refactoring
2015-10-28 21:28:42 -07:00
Haibo Zhu
45f26e4fb7 Add binary package address in RELEASES 2015-10-29 09:18:23 +08:00
huade
d962ff1ed1 refact WelsMarkPicScreen based on pSlice buffer refactoring 2015-10-29 09:17:39 +08:00
Sijia Chen
32669bc941 change an improper setting of max_slice_count 2015-10-28 13:55:21 -07:00
Sijia Chen
054a297ca7 adjust encoder tasks, add ut and enable new thread pool under some slice modes 2015-10-28 09:39:26 -07:00
Martin Storsjö
1661a60090 Avoid warnings in the cabac code
Use int32_t for a parameter that is always 0 or 1, because it is
negated. This fixes "warning C4146: unary minus operator applied
to unsigned type, result still unsigned" in MSVC.

Also add casts to silence MSVC warnings about "conversion from
'WelsEnc::cabac_low_t' to 'uint8_t', possible loss of data".

The generated code still is identical to before, on both gcc
and clang.
2015-10-28 14:39:30 +02:00
HaiboZhu
1a7a3e2462 Merge pull request #2188 from shihuade/PSliceRefact_V1.2
refact WelsMarkPic based on pSlice buffer refactoring
2015-10-28 11:04:22 +08:00
HaiboZhu
fe7684bf37 Merge pull request #2187 from shihuade/PSliceRefact_V1.1
refact slice header init
2015-10-28 09:58:31 +08:00
huade
ff8bb6238d refact WelsMarkPic based on pSlice buffer refactoring 2015-10-27 17:44:55 +08:00
huili2
777dbc09d4 remove bParseonly in ctx using that in param, and slightly modify the initialize process of decoder 2015-10-27 16:12:08 +08:00
HaiboZhu
a3e60a1c6f Merge pull request #2186 from shihuade/PSliceRefact_V1.0
change the AbsDiffPicNumMinus1 check logic
2015-10-27 15:07:54 +08:00
sijchen
a0328cda80 Merge pull request #2184 from mstorsjo/fix-readme
Remove a false claim about older android versions not being supported
2015-10-26 13:36:01 -07:00
Martin Storsjö
0a57ec3c40 Remove a false claim about older android versions not being supported
Building for older android versions work just fine.
2015-10-26 16:54:00 +02:00
HaiboZhu
319552db48 Merge pull request #2160 from cisco/cj-build1
Cj build1
2015-10-26 13:58:29 +08:00
HaiboZhu
906627a029 Merge pull request #2179 from alexcohn/patch-1
Update README.md
2015-10-26 13:56:01 +08:00
HaiboZhu
51d8e00564 Merge pull request #2180 from saamas/cabac_encode_opt
[Encoder] CABAC optimizations
2015-10-26 09:02:51 +08:00
huade
08f7ad3f1f refact slice header init 2015-10-23 15:46:06 +08:00
huade
741c122399 change the AbsDiffPicNumMinus1 check logic 2015-10-23 14:45:18 +08:00
HaiboZhu
e0cee02d77 Merge pull request #2177 from sijchen/thp21
[Encoder] add encoder tasks and task-management class
2015-10-23 13:21:42 +08:00
Sindre Aamås
ed133d4c3d [Encoder] CABAC optimizations
~2.4x speedup (time attributed to all CABAC-related fuctions) on x86
(Ivy Bridge) with GCC version 4.9.2 (Debian 4.9.2-10).

~1.3x overall faster encode on a quick 720p30 6Mbps test.

Reviewed at https://rbcommons.com/s/OpenH264/r/1347/
2015-10-21 12:53:12 +02:00
Alex Cohn
a9605ac063 Update README.md
See https://github.com/cisco/openh264/issues/1807#issuecomment-149794717.
2015-10-21 09:49:58 +03:00
sijchen
b700b67bba Merge pull request #2178 from mstorsjo/add-missing-include
Add a missing include of stdlib.h
2015-10-19 23:15:46 -07:00
Martin Storsjö
80c8b7b1cc Add a missing include of stdlib.h
This is required for malloc in this header.

This fixes building for Windows Phone.
2015-10-20 08:59:41 +03:00
Sijia Chen
819f6f5d93 [Encoder] add encoder tasks and task-management class
https://rbcommons.com/s/OpenH264/r/1334/
2015-10-19 22:48:28 -07:00
HaiboZhu
490098915f Merge pull request #2176 from HaiboZhu/Bugfix_CHECK_SE_UPPER_conditions
Fix the macro UPPER_CHECK conditions
2015-10-20 10:31:57 +08:00
Haibo Zhu
151c1d9ffd Fix the macro UPPER_CHECK conditions 2015-10-19 18:12:53 -07:00
sijchen
9befe7b1a3 Merge pull request #2173 from mstorsjo/remove-includes
Remove unused STL includes
2015-10-19 10:41:13 -07:00
HaiboZhu
3ee8784c01 Merge pull request #2170 from HaiboZhu/Bugfix_entropy_decoding_upper_check
Add protection for unsigned int output
2015-10-19 16:31:15 +08:00
Martin Storsjö
dac26cf923 Remove unused STL includes
This fixes building for Android, where libopenh264.so is intended
not to link to any particular STL implementation.
2015-10-19 11:21:29 +03:00
Haibo Zhu
9ba2c9825c (1) add protection for golomb GetUe output value
(2) change the max length of cabac bypass to 16
2015-10-18 20:12:34 -07:00
HaiboZhu
fb61733b27 Merge pull request #2163 from HaiboZhu/Remove_cabac_shift_exponent_too_large
Remove the shift exponent too large warning
2015-10-16 21:16:56 +08:00
HaiboZhu
ea52112d45 Merge pull request #2158 from sijchen/thp0a
[Common] basic thread pool functions
2015-10-16 16:50:39 +08:00
HaiboZhu
7cbc31a0bf Merge pull request #2161 from huili2/MMCO_overflow
prevent too many MMCO num overflow
2015-10-16 16:50:26 +08:00
HaiboZhu
10179539cf Merge pull request #2157 from sijchen/mb
Sync from release 1.5 on API and release notes, etc.
2015-10-16 16:47:04 +08:00
Haibo Zhu
f1d92ef363 Remove the shift exponent too large warning 2015-10-16 01:13:23 -07:00
huili2
4bafe1c430 prevent too many MMCO num overflow 2015-10-16 10:36:13 +08:00
unknown
cb6ab3211d add new ut to win ut proj 2015-10-16 02:37:39 +08:00
Sijia Chen
b29760ee31 remove unneeded parts 2015-10-15 11:31:34 -07:00
Sijia Chen
ade32f5c48 implementation for WelsSleep on WP8.0
https://rbcommons.com/s/OpenH264/r/1315/
2015-10-15 11:27:43 -07:00
Sijia Chen
a3f606e58a replacement of std::list for m_cBusyThreads
https://rbcommons.com/s/OpenH264/r/1320/
2015-10-15 11:17:29 -07:00
Sijia Chen
bc566f0923 put m_cIdleThreads to CWelsCircleQueue rather than std::map
https://rbcommons.com/s/OpenH264/r/1313/
2015-10-15 10:24:48 -07:00
Sijia Chen
eb00d5cb9e change std::list to internal implementation and add the new ut file for CWelsCircleQueue
https://rbcommons.com/s/OpenH264/r/1310/
2015-10-15 10:11:29 -07:00
Sijia Chen
757a596e97 add basic threadpool functions
https://rbcommons.com/s/OpenH264/r/1294/
2015-10-15 10:04:00 -07:00
Sijia Chen
6ca397e758 correct a typo along with the in-plan v1.5 release 2015-10-15 09:55:06 -07:00
Sijia Chen
9d25161f40 add version updates after 1.5 release 2015-10-15 09:54:10 -07:00
Sijia Chen
2f836fc787 add release notes for 1.5 2015-10-15 09:53:02 -07:00
HaiboZhu
af6a9a838f Merge pull request #2152 from mstorsjo/remove-unused-code
Remove unused source files from the encoder
2015-10-15 12:03:41 +08:00
HaiboZhu
813cfca95f Merge pull request #2155 from HaiboZhu/Remove_UBSAN_negative_left_shift_warning
Remove UBSAN warnings about negative left shift
2015-10-15 11:31:55 +08:00
Haibo Zhu
03d16bb4d1 Remove UBSAN warnings about negative left shift 2015-10-14 19:43:19 -07:00
HaiboZhu
3067d127aa Merge pull request #2153 from mstorsjo/fix-warnings
Fix warnings when building for iOS with xcode
2015-10-13 18:26:56 +08:00
HaiboZhu
6c13a2c496 Merge pull request #2151 from mstorsjo/fix-msvc
Revert an accidental change that broke MSVC compilation
2015-10-13 18:26:14 +08:00
Martin Storsjö
8363d43588 Fix warnings when building for iOS with xcode 2015-10-13 12:27:11 +03:00
Martin Storsjö
5ff8af6883 Remove unused source files from the encoder 2015-10-13 12:21:34 +03:00
Martin Storsjö
837599becc Revert an accidental change that broke MSVC compilation
This reverts an unrelated part of e7e3b4f37f0.

Since the function still is declared as taking an int32_t parameter
in the header, changing the function implementation makes it end
up as a different function.
2015-10-13 12:15:01 +03:00
HaiboZhu
6239fbe131 Merge pull request #2150 from huili2/log_memory_decrease
decrease log output for decoder momery info
2015-10-13 16:42:03 +08:00
HaiboZhu
df936ad73b Merge pull request #2131 from sijchen/fix_simul3
[Encoder] Add fix for simulcast for 3 spatial layers
2015-10-13 16:41:15 +08:00
huili2
410689f7ca Merge pull request #2147 from HaiboZhu/Bugfix_uninit_strcat
Init the string value and add protection for WelsStrcat()
2015-10-13 09:04:51 +08:00
huili2
042ac9aba1 decrease log output for decoder momery info 2015-10-12 10:53:33 +08:00
Haibo Zhu
e7e3b4f37f Init the string value and add protection for WelsStrcat() 2015-10-10 08:45:48 -07:00
sijchen
b37cda2482 Merge pull request #2138 from HaiboZhu/Bugfix_SPS_update_logic_under_EC
Fix a SPS update logic bug under EC mode
2015-10-08 10:11:32 -07:00
Haibo Zhu
4ffdca6b06 Fix the SPS update logic bug under EC mode 2015-10-08 02:01:15 -07:00
huili2
4901821328 Merge pull request #2137 from HaiboZhu/Bugfix_CAVCL_8x8_init_error
Fix the 8x8 init bug under CAVCL when scalinglist enable
2015-10-08 16:36:16 +08:00
Haibo Zhu
2cd3fc805d Fix the 8x8 init bug under CAVCL when scalinglist enable 2015-10-07 19:49:37 -07:00
Sijia Chen
542fd232cc add a .template file for codec UT 2015-10-06 11:10:06 -07:00
Sijia Chen
b86bd5f7f6 modify forceIDR log 2015-10-05 16:22:30 -07:00
Sijia Chen
f230c63777 add one more log statstics 2015-10-05 16:16:27 -07:00
Sijia Chen
82cc0535ae Add fix for simulcast if frame rate in the middle spatial layer is smaller 2015-09-30 17:26:50 -07:00
HaiboZhu
f9f2bbf805 Merge pull request #2127 from huili2/repos_DecoderConfigParam
move DecoderConfigParam into InitDecoder
2015-09-23 17:41:52 +08:00
huili2
ecab683f0f move DecoderConfigParam into InitDecoder 2015-09-23 14:37:53 +08:00
huili2
6efeb0ef95 Merge pull request #2124 from HaiboZhu/Bugfix_Duplicate_frame_num
Check the duplicate frame_num in short ref list
2015-09-22 15:45:22 +08:00
HaiboZhu
936747e9a4 Merge pull request #2122 from sijchen/fixsimul
[Encoder] fix for simulcast case when frame rate of lower resolution is higher
2015-09-22 14:51:29 +08:00
unknown
868c8e45a1 Check the duplicate frame_num in short ref list
Add more judgement for return value in WelsMarkAsRef()
2015-09-21 21:31:59 -07:00
Sijia Chen
53c057a8a8 fix for simulcast case when the frame rate of lower resolution is higher, and add test case 2015-09-21 15:42:17 -07:00
HaiboZhu
5c301defba Merge pull request #2119 from sijchen/size_limit
fix a size range to avoid triggering latest constraints of input
2015-09-17 14:21:43 +08:00
Sijia Chen
829f216dbf fix a size range to avoid triggering latest constraints of input 2015-09-16 15:23:13 -07:00
HaiboZhu
d0d7ad57c2 Merge pull request #2116 from mstorsjo/remove-tab-indentation
Fix indentation to consistently use spaces instead of tabs
2015-09-16 09:12:07 +08:00
HaiboZhu
8994f1f757 Merge pull request #2115 from fstd/support_netbsd_2
Support NetBSD and OpenBSD; consolidate BSD build.
2015-09-16 09:07:08 +08:00
fstd
f383137fe1 Consolidate BSD build to support NetBSD and OpenBSD as well 2015-09-15 18:06:16 +02:00
HaiboZhu
0474068503 Merge pull request #2118 from ruil2/valid1
fix UT failed
2015-09-15 14:00:48 +08:00
Martin Storsjö
c31e4e23f2 Fix indentation to consistently use spaces instead of tabs
Also get rid of other stray tabs in scripts.
2015-09-15 08:41:19 +03:00
karina li
1c3f7b2b11 fix UT failed 2015-09-15 13:07:30 +08:00
HaiboZhu
e0d43a8a1f Merge pull request #2117 from mstorsjo/fix-arm-binutils
Fix building down_sample_neon.S with gnu binutils
2015-09-15 09:16:46 +08:00
Martin Storsjö
77bd41ca7e Fix building down_sample_neon.S with gnu binutils 2015-09-14 21:38:26 +03:00
fstd
4d063b84cc Build successfully on OpenBSD (which lacks sysctlbyname(3)) 2015-09-12 21:31:39 +02:00
HaiboZhu
5373b8a3aa Merge pull request #2111 from GuangweiWang/downsampler
add new c and assembly functions to optimize downsampler when downscale equal 1:3/1:4
2015-09-11 17:36:13 +08:00
Guangwei Wang
64657d3cfd add new c and assembly functions to optimize downsampler when downscale equal 1:3/1:4 2015-09-11 16:45:40 +08:00
huili2
69a62ea58e Merge pull request #2108 from HaiboZhu/Bugfix_ResetDecoder
Bug fix with add DecoderConfigParam in ResetDecoder
2015-09-11 10:17:40 +08:00
Haibo Zhu
28d7d303e3 Bug fix with add DecoderConfigParam in ResetDecoder 2015-09-10 16:47:37 +08:00
HaiboZhu
12d50ad565 Merge pull request #2105 from ruil2/valid
update UT that makes input width or height more than 16
2015-09-10 09:05:20 +08:00
karina li
e8d09bac0c update UT that makes input width or height more than 16 2015-09-09 10:29:51 +08:00
HaiboZhu
e84284523a Merge pull request #2104 from ruil2/valid
exception case for width or height is less than 16
2015-09-09 09:01:18 +08:00
karina li
2c830e64d7 exception case for width or height is less than 16 2015-09-08 17:21:56 +08:00
HaiboZhu
c48f47ab19 Merge pull request #2099 from nathankidd/master
Use stdbool.h with Visual Studio 2013 or higher
2015-09-06 09:51:44 +08:00
HaiboZhu
9add9883b1 Merge pull request #2100 from nathankidd/fix-CPU_COUNT-error
Only use CPU_COUNT if available
2015-09-06 09:18:29 +08:00
Nathan Kidd
fdabca4cc9 Only use CPU_COUNT if available
Fixes build error on Linux hosts with GLIBC < 2.6.

Resolves issue #2089
2015-09-02 18:24:24 -04:00
Nathan Kidd
f21fffda3b Use stdbool.h with Visual Studio 2013 or higher
2013 is the first version to include the header.

Avoids "codec_api.h(40): error C2632: 'char' followed by 'bool' is illegal"
when building C code.
2015-09-02 09:32:41 -04:00
HaiboZhu
fd7a02b557 Merge pull request #2096 from ruil2/rc0
use individual iDecompositionStages for each spatial layer
2015-09-02 10:10:02 +08:00
karina li
8c7ef9c1a7 use individual iDecompositionStages for each spatial layer 2015-09-01 16:46:59 +08:00
zhilwang
d1fc002430 Merge pull request #2091 from HaiboZhu/Bugfix_CheckRefPicturesComplete_FMO_enable
Fix the bug that calculate mbAddr error when FMO enable
2015-08-28 17:22:36 +08:00
Haibo Zhu
646f3e92de Fix the bug that calculate mbAddr error when FMO enable 2015-08-27 23:46:47 -07:00
HaiboZhu
96de6e0158 Merge pull request #2088 from shihuade/RDBugFixed_V2.1_Push
replace LayerBsInfo with FrameBsInfo in thread-based private data str…
2015-08-28 10:04:16 +08:00
huade
7b286bc637 replace LayerBsInfo with FrameBsInfo in thread-based private data structure 2015-08-27 17:24:48 +08:00
zhilwang
5d9b95288f Merge pull request #2083 from HaiboZhu/Bugfix_OutOfMemory_post_process
Force reset decoder when out of memory error
2015-08-26 16:14:32 +08:00
zhilwang
7da20f8738 Merge pull request #2081 from HaiboZhu/Change_InitDecoder_Trace
Add bParseOnly flag into Trace
2015-08-26 16:14:21 +08:00
Haibo Zhu
27a9af0b09 Force reset decoder when out of memory error 2015-08-26 00:13:44 -07:00
Haibo Zhu
195dbdd5bd Add bParseOnly flag into Trace 2015-08-25 08:58:28 +08:00
huili2
ab4e0df75a Merge pull request #2079 from HaiboZhu/Change_ParserBsInfo_resolution
Change the SParserBsInfo resolution to actual value
2015-08-24 15:13:51 +08:00
Haibo Zhu
1173f879f1 Change the SParserBsInfo resolution to actual value 2015-08-24 14:37:32 +08:00
HaiboZhu
2b59746c68 Merge pull request #2077 from shihuade/RDBugFixed_V2.0_01
bug-fixed----left length of destination buffer for writing slice bs
2015-08-19 10:30:30 +08:00
huade
47d6ac3b57 bug-fixed----left length of destination buffer for writing slice bs 2015-08-19 09:05:15 +08:00
HaiboZhu
bf33bde15d Merge pull request #2075 from sijchen/fix_abnormal_tid
[Encoder] change the solution when invalid tid is found
2015-08-17 16:38:54 +08:00
HaiboZhu
c9f19241fb Merge pull request #2076 from ruil2/rc0
convert maxqp and minqp to encoder
2015-08-17 16:02:08 +08:00
karina li
d569a0276b convert maxqp and minqp to encoder 2015-08-17 13:19:20 +08:00
Sijia Chen
82e7dcd84f change the solution when invalid tid is found 2015-08-14 17:01:19 -07:00
zhilwang
8a96d06fa2 Merge pull request #2074 from HaiboZhu/Bugfix_max_ref_pic_count_error
Bug fix about RefList size memory access violation
2015-08-14 15:44:21 +08:00
HaiboZhu
669089d63a Merge pull request #2073 from GuangweiWang/sub8x8asmUT
add UT for sub8x8 modes assembly functions
2015-08-14 15:44:08 +08:00
Haibo Zhu
5ebb64cc45 Add MAX_DPB_COUNT equals to MAX_REF_PIC_COUNT + 1 to set the size of RefList
Make the reorder search range sync with JM
2015-08-13 23:54:47 -07:00
HaiboZhu
c0808f1f1d Merge pull request #2072 from sijchen/fix_readcfg
[Encoder] fix the range of writable cfg to avoid problem
2015-08-14 08:58:22 +08:00
Sijia Chen
97351a5cdf fix the range of writable cfg to avoid problem 2015-08-13 16:01:49 -07:00
huili2
0fb5242b86 Merge pull request #2071 from HaiboZhu/Bugfix_Encoder_DetectSceneChangeScreen_overflow
Add default when iCurTId invalid
2015-08-13 17:19:10 +08:00
Haibo Zhu
68d9bc230d Add default when iCurTId invalid 2015-08-13 01:11:30 -07:00
HaiboZhu
2273624a6a Merge pull request #2070 from HaiboZhu/Bugfix_Emulation_prevention_three_byte
Add protection about emulation_prevention_three_byte error bytes
2015-08-11 22:52:28 +08:00
HaiboZhu
d7b344f18d Merge pull request #2069 from huili2/bugfix_rplr_num_overflow
prevent error RPLR number overflow case
2015-08-11 17:26:46 +08:00
Haibo Zhu
e90068c234 Add protection about emulation_prevention_three_byte error bytes 2015-08-11 12:56:09 +08:00
huili2
c45e08a984 prevent error RPLR number overflow case 2015-08-11 09:45:09 +08:00
huili2
6ba10ce6f3 Merge pull request #2065 from HaiboZhu/Bugfix_RPLR_logic
Fix the RPLR logic error when picNumLX <= refIdxLX
2015-08-07 17:30:08 +08:00
huili2
be2b7f196f Merge pull request #2063 from HaiboZhu/Add_EC_memcpy_protection
Add protection for memcpy overlap
2015-08-05 11:09:06 +08:00
huili2
6ab697ef78 Merge pull request #2060 from HaiboZhu/Bugfix_default_value_chroma_array_type
Add default value for ChromaArrayType to avoid NO value
2015-08-05 11:08:41 +08:00
HaiboZhu
47dcacee83 Merge pull request #2059 from sijchen/mt52
[Encoder] multi-threading refactoring
2015-08-05 09:28:13 +08:00
Haibo Zhu
6b4912c716 Add protection for memcpy overlap 2015-08-05 09:23:32 +08:00
Haibo Zhu
930161c6cc Fix the RPLR logic error when picNumLX <= refIdxLX 2015-08-04 14:04:48 +08:00
Sijia Chen
9aafb779eb 1, refactor to remove similar function (WriteSliceToFrameBs is removed)
2, use slice-level variable in child-thread function so there can be a better independency in child-thread function
    3, add two more test cases
2015-08-03 21:42:47 -07:00
Haibo Zhu
e621610776 Add default value for ChromaArrayType to avoid NO value 2015-08-04 11:11:06 +08:00
Guangwei Wang
e42ce60cc9 add UT for sub8x8 modes assembly functions 2015-07-30 10:02:32 +08:00
huili2
6b503843ec Merge pull request #2054 from HaiboZhu/Bugfix_pps_update_logic
Fix the pps update logic error
2015-07-29 09:56:50 +08:00
Haibo Zhu
bc8dfcd1f4 Fix the pps update logic error 2015-07-28 01:59:26 -07:00
huili2
11e0fc8376 Merge pull request #2051 from huili2/sh_check_slice_type
add slice_type check for num_ref_frame
2015-07-27 14:19:42 +08:00
huili2
0400792778 add slice_type check for num_ref_frame 2015-07-27 10:53:51 +08:00
HaiboZhu
87c7307391 Merge pull request #2049 from ruil2/rc6
refine RC parameters
2015-07-27 09:44:33 +08:00
karina li
ab370cd607 refine RC parameters 2015-07-24 09:07:55 +08:00
ruil2
3c06753dcc Merge pull request #2047 from huili2/T1_error_handling
bugfix for T1 error decoder dealing
2015-07-23 17:29:09 +08:00
huili2
091805b883 bugfix for T1 error decoder dealing 2015-07-23 11:04:23 +08:00
HaiboZhu
f30ad4e512 Merge pull request #2039 from shihuade/NewSHA1TableV1.3
syn/unify  with local SHA1 script and update SHA1 tables
2015-07-20 15:54:20 +08:00
huili2
36a7aca674 Merge pull request #2040 from mstorsjo/fix-warnings
Avoid warnings about comparison between signed and unsigned
2015-07-20 08:55:29 +08:00
Martin Storsjö
9319301621 Avoid warnings about comparison between signed and unsigned 2015-07-18 16:31:36 +03:00
huili2
2c7857ab53 Merge pull request #2038 from HaiboZhu/Bugfix_disable_redundant_picture
[Decoder bug fix] Disable redundant picture to avoid the memory overflow
2015-07-17 10:46:03 +08:00
huili2
4ecdd071ff Merge pull request #2035 from HaiboZhu/Bugfix_width_height_level_limit_check
Fix the bug that decoder not return when level limit occur
2015-07-17 10:45:03 +08:00
huili2
a0c9f02bde Merge pull request #2034 from HaiboZhu/BugFix_CheckAccessUnitBoundaryExt
Fix logic errors in CheckAccessUnitBoundaryExt
2015-07-17 10:44:50 +08:00
huade
057799e298 syn/unify with local SHA1 script and update SHA1 tables 2015-07-17 10:44:15 +08:00
huili2
c0feee817d Merge pull request #2032 from GuangweiWang/sub8x8asm
add new assembly functions to support sub8x8 mode
2015-07-16 13:33:04 +08:00
huili2
24d8b8a82c Merge pull request #2033 from HaiboZhu/Bugfix_FMO_judgement_error
Fix max slice group number judgement error in FMO
2015-07-16 13:32:29 +08:00
HaiboZhu
b6ddfabf2b Merge pull request #2028 from sijchen/mt42
[Encoder] save memory usage and improve error return logic under VLCOVERFLOW
2015-07-16 11:38:24 +08:00
Haibo Zhu
11c7bfa098 Disable redundant picture to avoid the memory overflow 2015-07-16 11:20:21 +08:00
sijchen
2407292882 Merge pull request #2031 from mstorsjo/astyle-tabs
Make astyle convert tabs to spaces
2015-07-14 17:59:01 +08:00
Haibo Zhu
d48b8b49d0 Fix the bug that decoder not return when level limit occur 2015-07-14 15:58:45 +08:00
Haibo Zhu
663bd94038 Fix max slice group number judgement error in FMO 2015-07-14 15:45:40 +08:00
Haibo Zhu
70d08736dd Fix logic errors in CheckAccessUnitBoundaryExt 2015-07-14 15:38:16 +08:00
Martin Storsjö
7c739795b7 Make astyle convert tabs to spaces
Previously astyle only changed tabs to spaces if they were used for
indentation, but tabs in the middle of lines were left untouched.
2015-07-14 10:03:40 +03:00
sijchen
f743f04ed7 Merge pull request #2029 from mstorsjo/remove-tabs
Remove unnecessary tabs in the middle of lines
2015-07-14 10:33:58 +08:00
Martin Storsjö
282eda21cb Remove unnecessary tabs in the middle of lines
At 6ff4ef3b38 all the (stray, mixed) tabs had been cleaned out from
the source code; remove newly added tabs and convert to spaces.
2015-07-13 23:05:26 +03:00
sijchen
41caf38152 Merge pull request #2027 from sijchen/dbp2
[Encoder] use func pointer for deblocking to save judgements at each slice
2015-07-10 11:02:37 +08:00
Guangwei Wang
1f8ef8f0a3 Add new x86 assembly functions to support sub8x8 mode 2015-07-10 09:00:05 +08:00
sijchen
703cce0214 Merge pull request #2023 from ethanhugg/refcount
Change GMP code to RefCount instead of deleting on enc/decode complete.
2015-07-09 16:28:02 +08:00
sijchen
95ad76f65d Merge pull request #2024 from huili2/submbtype_modif
modify sub_mb_type, and fix a function name typo
2015-07-09 12:37:57 +08:00
Sijia Chen
e70621c194 save memory usage and improve error return logic under VLCOVERFLOW 2015-07-09 12:37:08 +08:00
Sijia Chen
cae5af52d7 use func pointer for deblocking to save judgements at each slice 2015-07-09 10:03:00 +08:00
sijchen
a8ae134610 Merge pull request #2026 from sijchen/fix_rc
[Encoder] let qp clip to min/max qp available in all rc settings
2015-07-08 17:02:17 +08:00
Guangwei Wang
49b569a018 Add new ARM AArch64 assembly functions to support sub8x8 mode 2015-07-08 10:34:49 +08:00
Sijia Chen
ee09f4d7bf let qp clip to min/max qp available in all rc settings, so as to avoid qp exceed 51 2015-07-07 17:49:11 +08:00
Guangwei Wang
9f0d51d8d2 add new AArch32 asm functions to support sub8x8 mode 2015-07-07 10:13:56 +08:00
Ethan Hugg
a4bddf417e Change GMP code to RefCount instead of deleting on enc/decode complete. 2015-07-06 09:48:50 -07:00
huili2
338a448946 modify sub_mb_type to be faster, and fix a function nam typo 2015-07-06 13:46:32 +08:00
Ethan Hugg
d04c7b9347 Merge pull request #2020 from brion/emscripten
Allow compilation to JavaScript via emscripten
2015-07-04 11:30:28 -07:00
Brion Vibber
522639f768 Allow compilation to JavaScript via emscripten
Currently the emscripten JavaScript environment for C/C++ programs
cannot do multithreading, and doesn't have a sysctl implementation
to get hardware CPU count. Hardcode to 1.

Using the Linux OS settings works, so not adding a platform file.

To build with emscripten (tested 1.30.0):

  emmake make OS=emscripten ARCH=asmjs

The resulting libopenh264.so is LLVM bitcode which can be further
linked into an emscripten project for final JavaScript output.
2015-07-03 03:15:40 -07:00
sijchen
507ffbadb6 Merge pull request #2022 from sijchen/fix_slc
[Encoder] fix a first-mb judgement
2015-07-03 12:25:40 +08:00
huili2
159ca4461f Merge pull request #2021 from sijchen/mt32
[Encoder] put pSliceBsBuffer to thread buffer rather than per slice, so as …
2015-07-03 11:10:05 +08:00
Sijia Chen
43ca6db9f5 put pSliceBsBuffer to thread buffer rather than per slice, so as to save memory usage 2015-07-03 09:55:16 +08:00
Sijia Chen
f265ab8e85 fix a first-mb judgement and enablings a test 2015-07-02 15:59:02 +08:00
sijchen
bee0d7d230 Merge pull request #2015 from huili2/sub8_final
add sub8x8 mode decision functions
2015-07-02 15:52:36 +08:00
huili2
1308027377 Merge pull request #2013 from sijchen/mem10
[Encoder] refactoring: simplify and wrap a function
2015-06-30 14:25:33 +08:00
huili2
57bd721b2f add sub8x8 mode decision functions 2015-06-30 10:29:49 +08:00
Sijia Chen
dfcc78eaf5 refactor for future simplification 2015-06-29 09:31:08 +08:00
sijchen
82a0d3e4a2 Merge pull request #2010 from sijchen/mt2
[Encoder] correct the termination of error handling under multi-thread
2015-06-29 09:13:22 +08:00
Ethan Hugg
e6e46f84f3 Merge pull request #2011 from mstorsjo/fix-arflags
Don't concatenate $@ to AR_OPTS
2015-06-26 07:56:53 -07:00
Martin Storsjö
4c8347aa22 Don't concatenate $@ to AR_OPTS
The MSVC version of AR_OPTS already contains $@, in a very specific
way.

This fixes MSVC builds after c8bed8a9.
2015-06-26 14:09:00 +03:00
sijchen
0f1371e461 Merge pull request #2004 from sijchen/ps55
[Encoder] first version of post-frame skipping for rate control (not enabled)
2015-06-26 17:42:08 +08:00
sijchen
d0a1b58374 Merge pull request #2003 from sijchen/rc_trace2
[Encoder] improve statistics logs
2015-06-26 17:41:55 +08:00
Sijia Chen
2a15a7975f correct the termination of error handling under multi-thread 2015-06-26 17:40:49 +08:00
sijchen
25dd5c3c6f Merge pull request #2009 from ruil2/rc3
use the external qp setting for screen content (reviewed: https://rbcommons.com/s/OpenH264/r/1246/)
2015-06-26 15:58:23 +08:00
sijchen
a4fb978bb7 Merge pull request #1997 from deadNightTiger/deterministic-build
Enable deterministic mode for ar
2015-06-26 15:06:41 +08:00
karina li
c51975acdf use the external qp setting for screen content 2015-06-26 12:35:21 +08:00
deadNightTiger
c8bed8a9bd Move -D flag for ar to platform-linux.mk 2015-06-25 14:25:28 +04:00
deadNightTiger
3a131800a8 Enable deterministic mode for ar 2015-06-25 13:57:00 +04:00
Sijia Chen
99aaf3198c first version of post-frame skipping for rate control (not enabled) 2015-06-23 17:04:02 +08:00
Sijia Chen
fe965a2444 improve statistics logs 2015-06-23 17:01:30 +08:00
Ethan Hugg
9be80c088d Merge pull request #1999 from bmiklautz/build
Make the static library directory configurable
2015-06-21 07:54:48 -07:00
Bernhard Miklautz
356f081f0a Make the static library directory configurable
When running "make install" the destination of pkgconfig/openh264.pc and
lib/libopenh264.a was hard coded to "lib". When building packages it
might be required to change the install location of those files to
the systems default library location (like lib64 or lib/x86_64-linux-gnu
for example).

This commit adds an additional make variable "LIBDIR_NAME" that allows
it to change the destination directory for those files.
Without setting LIBDIR_NAME the installation location is the same as before
(lib).
2015-06-19 16:23:34 +02:00
sijchen
93af25eaef Merge pull request #1993 from huili2/dec_mem_stat
add dec memory check
2015-06-19 13:37:41 +08:00
huili2
2ca6af54b9 Merge pull request #1995 from sijchen/ps22
[Encoder] make two un-error ending of encoding go to a same exit and save the d…
2015-06-19 08:44:55 +08:00
huili2
dea4303357 Merge pull request #1994 from sijchen/mt1
[encoder] remove one always-on macro to save code complexity
2015-06-19 08:44:16 +08:00
huili2
443630b098 Merge pull request #1992 from sijchen/ps11
[Encoder] Refactoring: move the post-encoding exchanging in preprocessing to more reasonable function
2015-06-18 08:33:19 +08:00
sijchen
e9429e2f93 Merge pull request #1988 from sijchen/ps4
add a frame-skip setting option
2015-06-17 17:35:03 +08:00
sijchen
bf44265c2c Merge pull request #1989 from sijchen/memc
[Encoder] Amendments with MEMORY_CHECK on
2015-06-17 17:34:57 +08:00
Sijia Chen
ee4dafaa70 remove the core-1 setting for multi-thread, if application has concern of using all thread, it can be done by setting specific value to iMultipleThreadIdc 2015-06-16 17:05:48 +08:00
huili2
3cb417f14a add dec memory check 2015-06-16 14:17:12 +08:00
Sijia Chen
daee3dcf22 remove one always-on macro to save code complexity, and use core-1 for multi-threading in real-time 2015-06-15 18:09:39 +08:00
zhilwang
9ecc671fc3 Merge pull request #1984 from mstorsjo/aarch64-fix
Fix the NEON register restoring in McHorVer30WidthEq8_AArch64_neon
2015-06-11 17:51:51 -07:00
Martin Storsjö
22cb778730 Fix the NEON register restoring in McHorVer30WidthEq8_AArch64_neon
This function pushes 16 bytes to the stack, but popped off 32
bytes.

This fixes a regression since 6f64f2372.
2015-06-11 21:30:40 +03:00
Sijia Chen
71d0a7f71f fix macro 2015-06-11 15:45:26 +08:00
Sijia Chen
89d5ad249f add byte info in free 2015-06-11 15:29:19 +08:00
Sijia Chen
4fb4c9536f remove build error if MEMORY_CHECK is on 2015-06-11 15:21:58 +08:00
Sijia Chen
dea37ce439 add a frame-skip setting option 2015-06-11 12:35:03 +08:00
sijchen
52cd5d99ab Merge pull request #1979 from GuangweiWang/lumaMc
modify part of AArch64 LumaMc assembly functions to get improvement
2015-06-10 15:58:38 +08:00
sijchen
6ff4ef3b38 Merge pull request #1983 from mstorsjo/remove-tabs
Remove tabs from the source code
2015-06-10 15:51:09 +08:00
Martin Storsjö
78e0ec6130 Convert tabs to spaces before comments 2015-06-10 10:22:29 +03:00
Martin Storsjö
3052b7ac64 Remove tabs from vertically aligned function declarations and typedefs 2015-06-10 10:22:13 +03:00
Martin Storsjö
764793d74b Remove tabs in struct and class definitions 2015-06-10 10:22:01 +03:00
Martin Storsjö
ca51ee0f44 Remove tabs where a simple space is just enough 2015-06-10 10:21:52 +03:00
Martin Storsjö
51efa57a3d Convert tabs to spaces in vertically aligned code 2015-06-10 10:21:29 +03:00
Martin Storsjö
723044837a Convert tabs to spaces in defines 2015-06-10 10:21:25 +03:00
Martin Storsjö
43767cddb6 Remove tabs from commented out code 2015-06-10 10:21:21 +03:00
Martin Storsjö
e1840a0ed6 Change indentation to use tabs instead of spaces in a few test project files 2015-06-10 10:21:19 +03:00
Martin Storsjö
8796e40f89 Run astyle on a newly added function
This function previously used tabs for indentation.
2015-06-10 10:21:15 +03:00
Martin Storsjö
c2b79fa51d Convert tabs to spaces within comments 2015-06-10 10:21:13 +03:00
Sijia Chen
2ff38e9175 make two un-error ending of encoding go to a same exit and save the duplicated calling of UpdateSpatialPictures and ForceCodingIDR 2015-06-10 11:28:23 +08:00
Sijia Chen
84b441d4e4 move the post-encoding exchanging in preprocessing to more reasonable function 2015-06-10 10:49:39 +08:00
Guangwei Wang
6f64f2372e save neon register d8,d9 2015-06-09 11:06:15 +08:00
Guangwei Wang
0237194f6e bugfix:save neon register v8-v15 2015-06-09 10:19:09 +08:00
huili2
32d1510d29 Merge pull request #1981 from HaiboZhu/Debug_mosaic_T30
Bug fix about PrevRefFrameNum update logic error
2015-06-09 09:10:36 +08:00
Haibo Zhu
682b0b7335 Bug fix about mosaic on T30 which caused by prev frame num update 2015-06-08 01:10:12 -07:00
sijchen
aeed1fa677 Merge pull request #1980 from ruil2/rc_update
use the external setting for max_qp and min_qp
2015-06-08 13:25:27 +08:00
sijchen
b2c08598bc Merge pull request #1978 from sijchen/doc
improve comments of the API
2015-06-08 12:07:03 +08:00
sijchen
70de76a253 Merge pull request #1975 from sijchen/rc_tr
[Encoder] Improve rate control trace
2015-06-08 12:06:36 +08:00
karina li
f2d391980e use the external setting for max_qp and min_qp 2015-06-08 00:44:42 +08:00
Guangwei Wang
c930424642 modify part of AArch64 LumaMc assembly functions to get improvement 2015-06-05 13:26:00 +08:00
Sijia Chen
8ca76ec342 improve comments of the API 2015-06-04 15:06:46 +08:00
sijchen
a3c96509ec Merge pull request #1976 from mstorsjo/remove-tabs
Remove tabs from table-like code, SIMD function pointer assignments and accidental tabs
2015-06-04 15:04:02 +08:00
Martin Storsjö
ebbcb67fb7 Convert tabs to spaces in assignment of SIMD function pointers 2015-06-03 15:39:30 +03:00
Martin Storsjö
26c1ce2d05 Remove tabs from class constructor member initializer lists 2015-06-03 15:39:30 +03:00
Martin Storsjö
c618b44b9e Remove tabs from the end of lines like ") {" 2015-06-03 15:39:30 +03:00
Martin Storsjö
c134aa753a Remove unnecessary/pointless/accidental tabs from the middle of lines of code 2015-06-03 15:39:30 +03:00
Martin Storsjö
b052a9580e Convert tabs to spaces in code that looks like tables
Also fix the alignment in some related cases, even though they
didn't use tabs originally.
2015-06-03 13:26:36 +03:00
sijchen
8c60f84f7b Merge pull request #1974 from mstorsjo/sample-test-valgrind
Initialize enough samples in the new 4x8 tests
2015-06-03 16:59:20 +08:00
Martin Storsjö
0298b3f580 Initialize enough samples in the new 4x8 tests
This fixes valgrind warnings about tests using uninitialized data.
2015-06-03 09:45:06 +03:00
Sijia Chen
a9d0d90ed2 correct a typo in rc log 2015-06-03 14:31:00 +08:00
Sijia Chen
ece17ff1b4 add layer info in RC detail trace 2015-06-03 14:13:21 +08:00
huili2
f76325edc7 Merge pull request #1973 from huili2/sub8
modify some functions extending to sub8x8 usage, especially in ME part
2015-06-02 14:44:06 +08:00
huili2
87f22d35fb Merge pull request #1972 from GuangweiWang/mc
change aarch64 chroma mc function
2015-06-02 14:42:50 +08:00
huili2
c3cfce5223 modify some functions extending to sub8x8 usage, especially in ME part 2015-06-02 13:39:38 +08:00
sijchen
b0a822dd30 Merge pull request #1971 from mstorsjo/version-header-spacing
Regenerate codec_ver.h using generate_codec_ver.sh
2015-06-01 16:23:18 +08:00
sijchen
b55292413b Merge pull request #1969 from BelledonneCommunications/bc-out-of-tree-build
fixes for out-of-tree build
2015-06-01 16:20:08 +08:00
Ghislain MARY
9d1ff982a7 Use -fo option instead of /fo. 2015-06-01 09:54:42 +02:00
Martin Storsjö
87eabf2721 Regenerate codec_ver.h using generate_codec_ver.sh
This adds some spacing to the version struct, so that astyle won't
need to change the file.

This was changed in 02354832cf8, both in the earlier codec_ver.h
and in the script that generates it, but a recent change manually
overwrote the spacing.
2015-06-01 09:20:03 +03:00
sijchen
ed73d51945 Merge pull request #1963 from llyzs/dynamic_qp
Copy QP value when changing encoder config
2015-06-01 10:43:58 +08:00
sijchen
5588e82fce Merge pull request #1961 from mstorsjo/fix-warnings
Remove a redundant check of this!=NULL
2015-06-01 10:42:56 +08:00
sijchen
7150d4feb1 Merge pull request #1968 from sijchen/mup
[Encoder] Multiple updates on logging and UT
2015-06-01 10:40:25 +08:00
Ghislain MARY
93a5597c11 More fixes for out-of-tree build:
- Generate version header in the build tree
 - Generate .res file in the build tree on Windows
 - Add the $(SRC_PATH) prefix to the .def files on Windows
2015-05-29 14:57:07 +02:00
Guangwei Wang
b8592d105b add aarch64 for mc 2015-05-29 13:50:07 +08:00
Sijia Chen
92237fa329 improve a log for frame-skip 2015-05-29 10:48:02 +08:00
sijchen
fc97e3a602 Merge pull request #1967 from mstorsjo/outoftree-install
Use vpath instead of explicit $(SRC_PATH) for building .pc files out of tree
2015-05-29 09:31:09 +08:00
Martin Storsjö
9ed902a8d7 Use vpath instead of explicit $(SRC_PATH) for building .pc files out of tree 2015-05-29 00:10:45 +03:00
sijchen
3a42ae54cf Merge pull request #1958 from BelledonneCommunications/master
Fix install targets for out-of-tree builds.
2015-05-28 17:04:32 +08:00
Vic Lee
ccaf242b80 Copy QP value when changing encoder config 2015-05-28 10:19:55 +08:00
Martin Storsjö
1239bb24ba Remove a redundant check of this!=NULL
'this' can't be NULL in well-defined C++ code. This fixes a warning
with clang 3.6 from Xcode 6.3.
2015-05-27 11:46:53 +03:00
Sijia Chen
5eb11b5329 Add encoding in UT for better coverage 2015-05-26 15:46:44 +08:00
Sijia Chen
9442a7a0b5 add parameter checking on resolution and related UT 2015-05-26 15:41:47 +08:00
Sijia Chen
11c159b6a2 add parameter checking on resolution and related UT 2015-05-26 15:21:45 +08:00
Sijia Chen
8b7af7cbef add comment for interface and better condiction for warning trace 2015-05-26 15:19:47 +08:00
Sijia Chen
585b61626c add some warning traces in case the setting of frame rate has problem 2015-05-26 14:49:46 +08:00
Ghislain MARY
1b97daab20 Fix install targets for out-of-tree builds. 2015-05-25 13:02:12 +02:00
Sijia Chen
d15afbbee0 improve rate control trace 2015-05-25 10:31:58 +08:00
Sijia Chen
7a3ef3a003 update version info to get accord with release 2015-05-25 10:30:45 +08:00
huili2
4da932426c Merge pull request #1957 from HaiboZhu/Change_trace_level_avoid_too_many_traces
Change the trace level from INFO to DEBUG to avoid too many traces
2015-05-22 14:37:31 +08:00
huili2
a62784e482 Merge pull request #1956 from HaiboZhu/Debug_EC_off_mosaic
Fix bug about the decoder with mosaic when EC off
2015-05-21 15:39:07 +08:00
Haibo Zhu
e757dce0e4 Change the trace level from INFO to DEBUG to avoid too many traces 2015-05-20 20:54:51 -07:00
Haibo Zhu
a484681202 Fix bug about the decoder with mosaic when EC off 2015-05-20 18:27:20 -07:00
sijchen
7d7a5c28bc Merge pull request #1954 from mstorsjo/fix-screen-enc-bigendian
Avoid endian assumptions in FillQpelLocationByFeatureValue_c
2015-05-18 16:57:20 +08:00
sijchen
a3ab13c30d Merge pull request #1955 from ruil2/rc_reset
reset buffer status when force IDR
2015-05-18 16:56:32 +08:00
karina li
85869921d3 reset buffer status when force IDR 2015-05-18 02:40:21 +08:00
Martin Storsjö
b90eca78cd Avoid endian assumptions in FillQpelLocationByFeatureValue_c
These values are read as two separate 16 bit integers from an
array in the FeatureSearchOne function, therefore we should
also store them in a well-defined order.

This fixes encoding of screen content on big endian; now the
full testsuite passes on big endian.
2015-05-15 13:11:23 +03:00
sijchen
89728faf8d Merge pull request #1953 from mstorsjo/remove-tabs
Remove tabs from multiline comments, public headers, enums and lists of defines
2015-05-15 18:09:02 +08:00
sijchen
5994075317 Merge pull request #1952 from mstorsjo/deblock-fix-test-bigendian
Revert broken big-endian fix for DeblockingBsMarginalMBAvcbase
2015-05-15 18:05:59 +08:00
Martin Storsjö
df994fa3f5 Convert tabs to spaces in enums and tables of defines 2015-05-15 11:20:11 +03:00
Martin Storsjö
61027613dd Convert tabs to spaces in the public headers
Since these spaces aren't at the start of lines, astyle doesn't
change it when fixing indentation.

The spacing and alignment is manually fixed up in a few places.
2015-05-15 10:52:42 +03:00
Martin Storsjö
b05468b5c1 Convert tabs to spaces in multiline comments 2015-05-15 10:50:49 +03:00
Martin Storsjö
31453e3072 Revert broken big-endian fix for DeblockingBsMarginalMBAvcbase
The function actually was correct for big-endian use already
(and the changes in 239e22d0 actually broke normal decoding tests),
it was only the test function itself that needed fixing for big-endian.
2015-05-15 10:13:40 +03:00
sijchen
853423b5ad Merge pull request #1944 from mstorsjo/deblock-bigendian
Remove endianness assumptions from DeblockingBsMarginalMBAvcbase
2015-05-15 14:08:08 +08:00
sijchen
1d1b4f1d30 Merge pull request #1950 from mstorsjo/remove-tabs
Remove tabs fom copyright headers, def files, public header code examples and SIMD function pointer assignments
2015-05-15 14:07:47 +08:00
sijchen
f5b7513df6 Merge pull request #1949 from shihuade/NewSHATableV1.2
update SHA1 table as long time cost on travis, for issue#1946
2015-05-15 08:44:13 +08:00
Martin Storsjö
0ca7ff49e2 Convert tabs to spaces in assignment of SIMD function pointers 2015-05-14 14:07:49 +03:00
Martin Storsjö
95ac72754e Convert tabs to spaces in .def files
The three def files in the project currently use tabs very inconsistently.
2015-05-14 13:58:44 +03:00
Martin Storsjö
5c7fe31277 Convert tabs to spaces in the public header code examples 2015-05-14 13:58:44 +03:00
Martin Storsjö
d152c25485 Remove tabs from the copyright/license section in file headers 2015-05-14 13:58:40 +03:00
huade
8c66a7c2f8 update SHA1 table as long time cost on travis 2015-05-14 18:09:11 +08:00
sijchen
569e7d1253 Merge pull request #1945 from mstorsjo/remove-tabs
Remove tabs from multi-line macro indentation and tables
2015-05-14 12:37:31 +08:00
sijchen
8c5f36ba23 Merge pull request #1941 from mstorsjo/c++-warnings
Enable -Wc++11-compat-reserved-user-defined-literal when building with clang on linux
2015-05-14 09:57:23 +08:00
sijchen
0185a07e7a Merge pull request #1942 from mstorsjo/fix-longlong-consts
Add a LL suffix to 64 bit integer literals
2015-05-14 09:56:30 +08:00
Martin Storsjö
7a80c21526 Reformat tables without tabs 2015-05-13 22:06:58 +03:00
Martin Storsjö
dd913ef878 Don't use tabs for indentation in multi-line macros
The astyle configuration makes sure normal code is indented consistently
with 2 spaces, but astyle doesn't seem to touch the indentation in
these multi-line macros.
2015-05-13 22:06:54 +03:00
Martin Storsjö
239e22d088 Remove endianness assumptions from DeblockingBsMarginalMBAvcbase
This fixes a decoder unit test when running on big endian.
2015-05-13 20:48:04 +03:00
Martin Storsjö
652ee84e0d Enable -Wc++11-compat-reserved-user-defined-literal when building with clang on linux
This allows catching issues that causes the build to fail on MSVC 2015 RC,
without having to include such a configuration in travis.
2015-05-13 14:53:00 +03:00
Martin Storsjö
2af19fa654 Add a LL suffix to 64 bit integer literals
This fixes building with gcc 4.0.
2015-05-13 10:38:02 +03:00
zhilwang
cf33d7031e Merge pull request #1937 from brly/feature-detect-avx2
Add detection of AVX2
2015-05-13 00:37:56 -07:00
sijchen
2453042bf0 Merge pull request #1938 from mstorsjo/format-string-spacing
Add spaces around PRId64 macros in format strings, fix building with MSVC 2015 RC
2015-05-13 14:58:42 +08:00
sijchen
6e3e42b625 Merge pull request #1939 from mstorsjo/msvc-app
Add a separate platform makefile for "msvc-app"
2015-05-13 14:57:55 +08:00
Martin Storsjö
9ac4c8208e Add spaces around PRId64 macros in format strings
This does the same cleanup as was done in 4fc27714bd on new occurrances
in the code base.

This fixes building with MSVC 2015 (which is still only a release
candidate).
2015-05-12 13:38:08 +03:00
Martin Storsjö
b2f1cbaae9 Add a separate platform makefile for "msvc-app"
This is for building code in the "app" mode (for Windows
Store apps/RT/metro/modern UI/appcontainer), which restricts API
usage and uses the Windows Runtime APIs for threading instead of the
old Win32 functions that aren't available for such apps.

This is similar to building for Windows Phone, but without the phone
specific libraries.

The common parts are abstracted to a common include makefile, that
both the targets "msvc-app" and "msvc-wp" use.
2015-05-11 23:30:46 +03:00
brly
b7fb9414c5 Add detection of AVX2 2015-05-10 20:27:36 +09:00
Martin Storsjö
6d5ef0ba2d Use separate string literals instead of line continuation for multiline log messages
This avoids including excessive spacing from the indentation in
the actual message.
2015-05-08 21:48:52 +03:00
Martin Storsjö
b3342fa11a Add spaces around an assignment to match the surrounding style 2015-05-08 14:19:06 +03:00
huili2
f1d1af0d34 Merge pull request #1934 from sijchen/fix_stat
[Encoder] remove un-calculated value setting, and add one more item in log
2015-05-08 16:24:49 +08:00
huili2
84a5f883db Merge pull request #1935 from sijchen/fix_rc3
fix an improper mb-size assignment
2015-05-08 16:24:22 +08:00
Sijia Chen
38ffbf7df4 fix an improper mb-size assignment 2015-05-08 11:10:19 +08:00
Sijia Chen
00168404b7 remove un-calculated value setting, and add one more item in log to supervise 2015-05-07 14:50:06 +08:00
huili2
7c868cab4d Merge pull request #1931 from HaiboZhu/Bug_Fix_EncoderInterface_OptionSetTest
Bug fix for encoder interface UT
2015-05-06 13:43:50 +08:00
Haibo Zhu
61b82d28c4 Add framerate & spatialbitrate comparison for encoder UT 2015-05-05 18:53:50 -07:00
sijchen
55a5272f68 Merge pull request #1927 from shihuade/WP8_UNICODE_API_Fixed
fixed no-support issues due to UNICODE macro for WP8
2015-05-05 11:53:08 +08:00
sijchen
3aed85f717 Merge pull request #1926 from mstorsjo/remove-unnecessary-continuation
Remove unnecessary line continuation for concatenating strings
2015-05-05 11:44:13 +08:00
sijchen
fc4e905891 Merge pull request #1925 from mstorsjo/misc-minor-whitespace
Misc minor whitespace fixes
2015-05-05 11:43:06 +08:00
sijchen
b19041c1b0 Merge pull request #1924 from mstorsjo/mismatched-filenames
Fix cases where file headers refer the wrong (old?) file name
2015-05-05 11:42:49 +08:00
Martin Storsjö
f21aaa1cd4 Remove unnecessary line continuation for concatenating strings
There's no need to use backslashes for continuing the lines here,
the strings are concatenated just fine even if split over multiple
lines.
2015-05-04 12:49:01 +03:00
Martin Storsjö
65d6826470 Astyle a cpp file in the android test project
This gets rid of indentation with tabs.
2015-05-04 12:47:31 +03:00
Martin Storsjö
ad9e65b96a Remove trailing whitespace in the iOS codec unittest files 2015-05-04 12:47:19 +03:00
Martin Storsjö
8d34c68ad6 Add a missing newline at the end of a file
Some tools (like git) complain if a file lacks a newline at
the end of a file, and some editors will automatically readd
it when editing such files.
2015-05-04 12:46:48 +03:00
Martin Storsjö
613a7a0ead Convert a tab to a space in an #ifndef 2015-05-04 12:46:38 +03:00
huade
67723a5122 fixed no-support issues due to UNICODE macro for WP8 2015-05-04 17:45:47 +08:00
Martin Storsjö
2bd89983cd Fix cases where file headers refer the wrong (old?) file name 2015-05-04 12:45:03 +03:00
zhilwang
2d2c5d0112 Merge pull request #1918 from mstorsjo/ifdef-spaces
Remove unnecessary double spaces and tabs in ifdef directives
2015-04-29 17:41:52 -07:00
zhilwang
15a8977ad8 Merge pull request #1919 from mstorsjo/printf-tabs
Use \t or plain spaces instead of literal tabs in printf formats
2015-04-29 17:41:42 -07:00
zhilwang
9bda41b1ae Merge pull request #1920 from mstorsjo/codec-ver-spacing
Add spaces in the struct in codec_ver.h
2015-04-29 17:41:32 -07:00
zhilwang
617f7c5d73 Merge pull request #1921 from mstorsjo/remove-brace-tabs
Remove tabs from the end of lines like ") {"
2015-04-29 17:41:20 -07:00
Martin Storsjö
a9c6a9d760 Remove tabs from the end of lines like ") {" 2015-04-29 15:49:28 +03:00
Martin Storsjö
02354832cf Add spaces in the struct in codec_ver.h
This avoids unnecessary changes if this file is run through astyle.
2015-04-29 15:48:33 +03:00
Martin Storsjö
ec99a3bcc5 Use \t or plain spaces instead of literal tabs in printf formats 2015-04-29 15:46:27 +03:00
Martin Storsjö
f324c354b1 Remove unnecessary double spaces and tabs in ifdef directives 2015-04-29 15:34:38 +03:00
HaiboZhu
baf93a340e Merge pull request #1916 from huili2/bugfix_nodelay_dpbcrash
disable ECed output for nodelay decoding
2015-04-29 15:18:17 +08:00
huili2
3c8e2a1792 Merge pull request #1915 from sijchen/winver3
remove the VS2008 unsupport option -nologo
2015-04-28 16:25:03 +08:00
huili2
ecd6102688 disable ECed output for nodelay decoding 2015-04-28 13:42:01 +08:00
zhilwang
5cf163449f Merge pull request #1914 from mstorsjo/asm-cleanup
Clean up assembly source files
2015-04-27 17:54:38 -07:00
huili2
faf1bdde0f Merge pull request #1913 from mstorsjo/style-cleanup
Clean up trailing whitespace, astyle a new file, clean up mixed spaces/tabs indentation
2015-04-28 08:47:04 +08:00
Martin Storsjö
b1570b17be Convert mixed tabs to spaces in shell scripts
All other shell scripts use spaces for indentation.
2015-04-27 14:10:09 +03:00
Martin Storsjö
a00e2e7229 Convert tabs to spaces in sample_sc.asm
This makes them consistent with the rest of the assembly source
files. Prior to f2314151e8, all the assembly files had consistent
indentation, but after that, this file had been made different.
2015-04-27 14:07:04 +03:00
Martin Storsjö
7d3bb19bed Fix up indentation in some arm assembly files 2015-04-27 14:05:52 +03:00
Martin Storsjö
db750af868 Remove stray dos newlines in files that otherwise have unix newlines 2015-04-27 14:05:42 +03:00
Martin Storsjö
8e26d9c31c Astyle the android unittest java file 2015-04-27 14:03:15 +03:00
Martin Storsjö
31a9fb6913 Remove trailing whitespace 2015-04-27 14:02:28 +03:00
Sijia Chen
486f2daf3d remove the unsupport option -nologo 2015-04-27 12:11:37 +08:00
sijchen
81df4c6972 Merge pull request #1910 from mstorsjo/make-simplify
Simplify handling of the default "all" rule
2015-04-27 10:34:42 +08:00
huili2
f78db981f8 Merge pull request #1912 from HaiboZhu/Bug_fix_ref_picture
Bug fix about ref picture management
2015-04-23 14:56:47 +08:00
Haibo Zhu
c24c967c65 Fix the possible infinite loop bug and Fix the judgement condition 2015-04-22 19:58:39 -07:00
Martin Storsjö
9ebab7094f Clean up spacing in the quiet rules in the makefile 2015-04-22 09:23:08 +03:00
Martin Storsjö
f077d51f7e Move the "all" make target before including any platform files
This makes sure that "all" stays as the default make target even if
platform makefiles add extra rules.
2015-04-22 09:20:31 +03:00
Martin Storsjö
75251b5af7 Remove stray spaces before colon in messages 2015-04-22 09:19:59 +03:00
Martin Storsjö
33e4f14be4 Remove a stray space in a makefile rule 2015-04-22 09:18:01 +03:00
Martin Storsjö
fed2043f8d Group version related makefile variables together 2015-04-22 09:15:57 +03:00
sijchen
4f527a0fb6 Merge pull request #1909 from mstorsjo/fix-msvc-make
Mention the "all" target before the extra dependencies for openh264.dll in msvc.mk
2015-04-22 09:31:01 +08:00
Martin Storsjö
615b0b53d1 Mention the "all" target before the extra dependencies for openh264.dll in msvc.mk
This makes sure that all components get built, not only the DLL,
if doing a plain "make OS=msvc" after 2b33c749939.
2015-04-21 09:21:31 +03:00
huili2
dac13639c9 Merge pull request #1908 from HaiboZhu/Add_Highprofile
Add high profile support
2015-04-21 09:42:49 +08:00
sijchen
15b7bc22c3 Merge pull request #1907 from mstorsjo/x86-64-arch-simplify
Use ARCH instead of ENABLE64BIT for distinguishing between x86 and x86_64
2015-04-21 09:06:33 +08:00
sijchen
dc59a7586f Merge pull request #1906 from mstorsjo/dll-res
Include the version number and other info in the built DLL file
2015-04-21 08:55:42 +08:00
sijchen
3b01ce3f82 Merge pull request #1903 from mstorsjo/fix-msvc-autobuild
Fix an error in the msvc autobuild script, output into the correct outdir used by the project files
2015-04-21 08:51:37 +08:00
Haibo
e9916c7592 Add Transform 8x8 support
Add Intra 8x8 support
Add no_deblocking support inside T8x8
Add CABAC parse support
Add static data sheet for dequant
Fix bugs and clean/astyle the code
Remove build warnings
Modify the UT cases
Fix the ParseNalHeader bug
2015-04-20 04:04:30 -07:00
Martin Storsjö
9acca331c0 Remove unnecessary setting of ENABLE64BIT
The ARCH variable already indicates everything here.
2015-04-20 12:25:20 +03:00
Martin Storsjö
24f8f2138a Use ARCH instead of ENABLE64BIT for distinguishing between x86 and x86_64
Keep support for the ENABLE64BIT flag (as a flag for choosing between
32 and 64 bit, if the current arch happens to be x86) but avoid using
it in code that wants to know the exact architecture used.

This makes the platform build files more straightforward and
consistent.
2015-04-20 12:22:46 +03:00
Martin Storsjö
a436676bc8 Update openh264.rc when updating the version number 2015-04-20 12:08:52 +03:00
Martin Storsjö
350b69bbf0 Simplify the version generation script 2015-04-20 12:08:52 +03:00
Martin Storsjö
2b33c74993 Include the version number and other info in the built DLL file 2015-04-20 12:08:52 +03:00
Martin Storsjö
e5439b4533 Output MSVC autobuild files into bin/arch/config instead of into bin/arch-config-asm
This is the same dirs as used as output dir by the msvc project files.
This makes sure that the project files can pick up the output files
directly instead of having to manually copy them around.
2015-04-20 09:37:22 +03:00
Martin Storsjö
dc661a6139 Fix a typo in the MSVC autobuild script
This typo made it fail to copy ut.dll when building for windows
phone.
2015-04-20 09:33:17 +03:00
sijchen
473f2e3d42 Merge pull request #1901 from mstorsjo/cleanup
Clean up warnings and incorrect indentation in the console tools
2015-04-20 11:18:59 +08:00
sijchen
d0eec6df78 Merge pull request #1902 from mstorsjo/makefile-cleanup
Simplify the makefile rules for unit test libraries for mobile platforms
2015-04-20 11:18:28 +08:00
sijchen
c8ee9a0308 Merge pull request #1904 from mstorsjo/wp-proj-gitignore
Add a gitignore file for the windowsphone project
2015-04-20 11:18:05 +08:00
sijchen
cffd2df923 Merge pull request #1895 from mstorsjo/add-release-binaries
List the v1.4.0 release binaries in the release file
2015-04-20 09:57:59 +08:00
zhilwang
91800fbc49 Merge pull request #1900 from mstorsjo/x86-32-asm
Hook up the x86_32-only assembly as well
2015-04-19 18:42:29 -07:00
Martin Storsjö
aa0fa56cdc Simplify the makefile handling of building the unit test library
Instead of repeating everything hardcoded with platform ifdefs,
use a common define BUILD_UT_EXE to define whether we should build
an executable or a library of the unit test suite. Later factorize
all other platform differences into smaller and simpler ifdefs.
2015-04-17 16:17:35 +03:00
Martin Storsjö
95a46f1fc6 Add a gitignore file for the windowsphone project 2015-04-17 16:13:31 +03:00
Martin Storsjö
0e99473a46 Reorder ifeq/ifneq for a long if statement
By having the very short clause first, it is easier to see
what it belongs to.
2015-04-17 15:56:56 +03:00
Martin Storsjö
8368f66afe Remove a stray double space 2015-04-17 15:46:15 +03:00
Martin Storsjö
513dfde31c Reduce some nested ifdefs in the makefile 2015-04-17 15:38:06 +03:00
Martin Storsjö
4f8c4f5925 Don't try to run the unit test suite on "make test" for windows phone
This makes it consistent with android and iOS.
2015-04-17 15:28:05 +03:00
Martin Storsjö
f39f58e9db Avoid warnings about conversion from double to float 2015-04-17 14:58:55 +03:00
Martin Storsjö
15c71312d2 Use spaces for indentation instead of tabs 2015-04-17 14:58:55 +03:00
Martin Storsjö
f619c16840 Hook up the x86_32-only assembly as well
This makes sure the code is at least somewhat tested. Ideally those
assembly functions should be upgraded to work in 64 bit mode as well,
but until then it's better to actually use them in the configurations
where they can be built.
2015-04-17 13:00:46 +03:00
sijchen
864ff21021 Merge pull request #1899 from shihuade/WP8V4.8-UTDemo
add ut demo for wp8
2015-04-17 17:24:30 +08:00
huade
f092b2a478 add ut demo for wp8 2015-04-17 14:10:12 +08:00
sijchen
18dc37a887 Merge pull request #1897 from shihuade/WP8V4.6
enhance auto script for windows platform
2015-04-17 10:45:03 +08:00
ruil2
7e3c06421f Merge pull request #1894 from sijchen/smallfix2
[Encoder] multiple small improvements on logs and statistics and avoid warning
2015-04-17 09:23:40 +08:00
huade
ea4f7f1b89 enhance auto script for both windows phone and win32/win64 under VC9.0/VC10./VC11.0/VC/12.0 2015-04-16 17:03:55 +08:00
Martin Storsjö
052a379ec3 List the v1.4.0 release binaries in the release file 2015-04-16 11:48:21 +03:00
Sijia Chen
7b52c402db add command line option to set input frame rate 2015-04-16 12:46:18 +08:00
Sijia Chen
8c2ee58fd9 update the SHA table because of default setting changed 2015-04-16 12:46:11 +08:00
Sijia Chen
cfea91666c add the usage of unspecified bit rate into cfg files and use it 2015-04-16 12:46:01 +08:00
Sijia Chen
1922b533f6 change the range of frame rate from 30 to 60 2015-04-16 12:45:43 +08:00
Sijia Chen
8b679cad73 improve statistic calc 2015-04-16 12:45:33 +08:00
Sijia Chen
6a31bc3785 downgrade the log level of screen reference logs to save log volume 2015-04-16 12:45:22 +08:00
Sijia Chen
2a9035a571 add a clip to avoid warning on gcc4.8.2
https://github.com/cisco/openh264/issues/1858
2015-04-16 12:45:09 +08:00
sijchen
d718ad89f4 Merge pull request #1891 from darealshinji/patch-1
Indentation in PrintHelp() for better reading flow
2015-04-13 14:38:29 +08:00
HaiboZhu
46d1c93016 Merge pull request #1892 from huili2/bugfix_greenissue_parseonly
bugfix for HW decoding green issue
2015-04-13 10:24:28 +08:00
HaiboZhu
2f0b6c8f14 Merge pull request #1893 from huili2/bugfix_nodelayAPI
bug fix for nodelay API for buffer storage
2015-04-13 10:24:19 +08:00
huili2
cf3845779f bugfix for HW decoding green issue 2015-04-10 12:52:32 +08:00
darealshinji
60a6dceb7d Indentation in PrintHelp() for better reading flow 2015-04-10 00:38:13 +02:00
huili2
4d913096a1 bug fix for nodelay API for buffer storage 2015-04-08 11:20:52 +08:00
HaiboZhu
78ab4000c0 Merge pull request #1890 from huili2/parseonly_bugfix_for_multi_in
bug fix for parseonly multi-data in
2015-04-08 10:29:54 +08:00
huili2
20f28cd2f2 bug fix for parseonly multi-data in 2015-04-07 02:18:13 -07:00
sijchen
050c683a27 Merge pull request #1887 from ethanhugg/gmpapiff39
Use gmp-api branch Firefox39
2015-04-07 10:53:05 +08:00
sijchen
f771347483 Merge pull request #1888 from shihuade/WP8V4.1
add Codec demo and auto build script for WP8
2015-04-07 10:52:41 +08:00
huade
8abe601d33 add Codec demo and auto build script for WP8 2015-04-07 09:55:37 +08:00
Ethan Hugg
ee4ae13ce3 Use gmp-api branch Firefox39 2015-04-03 09:39:02 -07:00
Ethan Hugg
819f379837 Merge pull request #1885 from mstorsjo/add-release-binaries
Add (old) binary releases for 1.3.1
2015-03-31 10:21:52 -07:00
Martin Storsjö
649456a2a3 Add (old) binary releases for 1.3.1 2015-03-31 09:06:19 +03:00
zhilwang
7751d756b0 Merge pull request #1883 from mstorsjo/arm-asm-cleanup
Remove duplication in arm assembly
2015-03-30 01:02:02 -07:00
Ethan Hugg
ae0f6cc465 Merge pull request #1882 from zhilwang/readme
exlpain to prevent building with nasm2.11.08 in Mac OSX 64-bit
2015-03-27 10:14:27 -07:00
Martin Storsjö
0995390c4a Remove apple specific versions of arm macros with arguments
The apple assembler for arm can handle the gnu binutils style
macros just fine these days, so there is no need to duplicate all
of these macros in two syntaxes, when the new one works fine in all cases.

We already require a new enough assembler to support the gnu binutils
style features since we use the .rept directive in a few places.
2015-03-27 11:11:45 +02:00
Martin Storsjö
d8202cf38f Remove apple specific versions of arm64 macros with arguments
The apple assembler for arm64 can handle the gnu binutils style
macros just fine, so there is no need to duplicate all of these
macros in two syntaxes, when the new one works fine in all cases.

We already require a new enough assembler to support the gnu binutils
style features since we use the .rept directive in a few places.
2015-03-27 11:11:23 +02:00
Martin Storsjö
cdce1b73ca Remove a stray, unused parameter to a gnu binutils style macro in arm assembly 2015-03-27 11:11:23 +02:00
Martin Storsjö
0b0884874d Remove superfluous .text directives at the start of arm assembly files
This directive can be set by the common include header that is
included by all files anyway.
2015-03-27 10:46:34 +02:00
zhiliang wang
573a9f394e exlpain to prevent building with nasm2.11.08 in Mac OSX 64-bit 2015-03-27 14:56:49 +08:00
HaiboZhu
2b1c815184 Merge pull request #1880 from huili2/wels_const
merge wels_const.h
2015-03-26 16:14:40 +08:00
huili2
62bcf95d8c Merge pull request #1878 from mstorsjo/msvc-proj-cleanup
Remove references to missing files, clean up MSVC proj files
2015-03-26 09:46:24 +08:00
zhilwang
4768087556 Merge pull request #1879 from mstorsjo/downscale-min-res
Don't downsample to anything smaller than 4x4 pixels
2015-03-25 17:44:38 -07:00
Martin Storsjö
b60d91f78e Don't downsample to anything smaller than 4x4 pixels
This makes for a chroma plane of 2x2. The SIMD versionf of generic
downscalers assume that the width and height is at least 2, since
it does an unconditional loop for the body of the image, and a
separate step for the last pixel and last row. The SIMD versions
assume that (width-1) and (height-1) are larger than zero.

This is the same fix as in e8cdbd2ea7, but making sure it applies
to both dimensions, that commit only fixed it for one of the
dimensions.

This fixes spurious crashes in EncodeDecodeTestAPI.SimulcastSVC.
2015-03-25 12:15:51 +02:00
Martin Storsjö
b98e7c1f7d Rename a vcproj folder to camelcase, to match all other folders in the same project 2015-03-25 11:46:41 +02:00
Martin Storsjö
19bcb45c22 Fix the indentation of a line in a vcproj file
This line seems to have been misindented by a manual edit.
2015-03-25 11:40:28 +02:00
Martin Storsjö
b6a1e1ce83 Remove references to missing files from the vcproj files 2015-03-25 11:40:10 +02:00
huili2
2673f0a579 merge wels_const.h 2015-03-25 17:11:40 +08:00
sijchen
cbc5681c01 Merge pull request #1876 from ruil2/base_vui
fix vui writting
2015-03-25 15:11:44 +08:00
ruil2
149e029c27 Merge pull request #1874 from sijchen/check_param2
[Encoder] fix a param checking for profile_idc
2015-03-25 14:12:11 +08:00
ruil2
4c352d13f3 fix vui writting 2015-03-25 14:10:18 +08:00
sijchen
3dbc36cdda Merge pull request #1872 from huili2/fix_1145964
fix order of null pointer protection
2015-03-25 11:18:37 +08:00
Sijia Chen
91b186ddc8 fix a param checking for profile_idc
reviewed at: https://rbcommons.com/s/OpenH264/r/1163/
2015-03-25 10:02:10 +08:00
sijchen
dd1d979d33 Merge pull request #1871 from huili2/nal_prefix
remove nal_prefix in encoder
2015-03-25 09:51:10 +08:00
huili2
bd8ad20e8a fix order of null pointer protection 2015-03-24 18:41:09 -07:00
huili2
88f5d1dde7 remove nal_prefix in encoder 2015-03-24 15:25:40 +08:00
huili2
a384df3246 Merge pull request #1868 from huili2/wels_common_basis
merge common part of wels_common_basis
2015-03-24 09:18:43 +08:00
sijchen
da8646f5b2 Merge pull request #1865 from ruil2/vui
update bGapsInFrameNumValueAllowedFlag according to parameters setting
2015-03-23 09:50:09 +08:00
huili2
403cc57dc6 merge common part of wels_common_basis 2015-03-20 12:44:00 +08:00
ruil2
e7fb44c451 update tables and update ut for different return value 2015-03-18 16:05:16 +08:00
ruil2
cce966fbba update bGapsInFrameNumValueAllowedFlag according to parameters setting 2015-03-18 13:44:03 +08:00
sijchen
499be24cda Merge pull request #1863 from mstorsjo/aarch64-official-instructions
Use the correct, official syntax for aarch64 mov instructions
2015-03-18 11:52:02 +08:00
huili2
821a0c981b Merge pull request #1862 from mstorsjo/avoid-variable-shadowing
Avoid shadowing variables within functions
2015-03-17 16:34:38 +08:00
huili2
2e8e0d0a28 Merge pull request #1861 from mstorsjo/readme-wp
Mention Windows Phone in the list of supported OSes
2015-03-17 16:09:39 +08:00
Martin Storsjö
18a595468f Avoid shadowing variables within functions
There is already a variable int iIdx declared just a few lines
above.
2015-03-17 09:44:08 +02:00
Martin Storsjö
3956bccc3d Use the correct, official syntax for aarch64 mov instructions
Previously this used unofficial, apple specific syntax (with fallback
macros for gnu binutils), since Xcode 5.x didn't support the official
syntax of these instructions. Since Xcode 6 has been out for quite a
number of months already, it should be safe to require this (for
building 64 bit binaries for iOS, armv7 builds can still be built
with older Xcode versions).

This clarifies the code by avoiding apple specific syntax in the
assembler instructions.
2015-03-17 09:26:01 +02:00
Martin Storsjö
858e73c4be Mention Windows Phone in the list of supported OSes 2015-03-17 09:02:54 +02:00
sijchen
b66703133e Merge pull request #1856 from mstorsjo/ltr-mark-test-init
Initialize iLastCorrectFrameNum in GetOptionLTR_ALLLTR
2015-03-17 09:23:20 +08:00
sijchen
4f43624eec Merge pull request #1849 from mstorsjo/msvc2013-wp-dll
Fix building DLLs for Windows Phone with MSVC 2013
2015-03-17 09:19:36 +08:00
Ethan Hugg
74545d3d6b Merge pull request #1857 from mstorsjo/destdir-slash
Remove the extra slash between $(DESTDIR) and $(PREFIX)
2015-03-16 14:32:40 -07:00
Martin Storsjö
4780c6a8f8 Remove the extra slash between $(DESTDIR) and $(PREFIX)
If DESTDIR is set, it needs to include a trailing slash now.

This fixes "make install" on msys (i.e. on windows), where a path
starting with // is interpreted as a special network path.
2015-03-16 15:47:32 +02:00
ruil2
df1435835a Merge pull request #1854 from sijchen/fix_rc
Fixes in using RC variables
2015-03-16 17:21:02 +08:00
Martin Storsjö
09fcc93575 Initialize iLastCorrectFrameNum in GetOptionLTR_ALLLTR
This avoids valgrind warnings about uninitialized variables
in case the random uiIDRPicId actually turns out to be correct.
2015-03-16 11:08:49 +02:00
sijchen
45d13338ed Merge pull request #1850 from mstorsjo/readme-update
Update the readme styling, fix outdated information
2015-03-16 15:18:33 +08:00
Sijia Chen
cd3ebfa3d4 fix the usage of a rc variable 2015-03-16 15:01:14 +08:00
Sijia Chen
b4a9e99823 fix an uninitialization in RC when slice-increasing 2015-03-16 14:48:55 +08:00
huili2
7f3d6d8411 Merge pull request #1853 from syureyi/scalinglist_8x8
support scalinglist8x8
2015-03-16 10:48:15 +08:00
huili2
2d5a94ca75 Merge pull request #1847 from huili2/bit_stream
merge bit_stream.h for encoder&decoder
2015-03-16 10:47:44 +08:00
sijchen
9243fdf58a Merge pull request #1852 from ruil2/vui
update vui parameters
2015-03-16 09:15:07 +08:00
zhuiling
17e5ea95c0 support scalinglist8x8
fix issue

update according to wayne's suggestiong
2015-03-16 08:57:04 +08:00
ruil2
ae9c5e2516 update vui parameters 2015-03-13 19:11:10 +08:00
Martin Storsjö
52808550d8 Fix building DLLs for Windows Phone with MSVC 2013 2015-03-13 13:04:04 +02:00
Martin Storsjö
12046fba2e Recommend using ARCH instead of ENABLE64BIT for setting the target arch
This is more generic, while the ENABLE64BIT variable is used on
x86 only.
2015-03-13 12:57:19 +02:00
Martin Storsjö
5f3fef469d Don't mention require setting the SDK variable when building for iOS
This variable is set automatically nowadays.
2015-03-13 12:53:50 +02:00
Martin Storsjö
2394e793bc Update the information about the supported android architectures 2015-03-13 12:53:29 +02:00
Martin Storsjö
36360c521d Adjust README.md to use proper markdown styling 2015-03-13 12:51:18 +02:00
sijchen
60f6f13d7e Merge pull request #1846 from ruil2/vui
add VUI for base layer
2015-03-13 16:41:29 +08:00
huili2
ed1140b846 merge bit_stream.h for encoder&decoder 2015-03-13 16:19:25 +08:00
ruil2
c109f4dc8d add VUI for base layer 2015-03-13 14:31:08 +08:00
sijchen
d7af7cedf9 Merge pull request #1845 from ruil2/rc_check
use each spatial layer qp instead of global qp and update traces
2015-03-12 17:27:24 +08:00
ruil2
fd7cd76b60 use each spatial layer qp instead of global qp and update traces 2015-03-12 15:05:51 +08:00
HaiboZhu
585855b00e Merge pull request #1843 from huili2/as264_common
remove unused as264_common.h in decoder
2015-03-11 11:11:30 +08:00
huili2
a93e4647df remove unused as264_common.h in decoder 2015-03-10 15:48:37 +08:00
sijchen
698ba11bb6 Merge pull request #1840 from shihuade/UT_BugFixed_V1.0
fixed bug for UT--setoptionParamExt
2015-03-09 09:16:05 +08:00
huashi
82cd357bae fixed bug for UT--setoptionParamExt 2015-03-06 13:47:08 +08:00
sijchen
3a75956fb2 Merge pull request #1838 from sijchen/upd_doc
update RELEASES file
2015-03-05 17:25:12 +08:00
Sijia Chen
d086f28a30 re-order the items in RELEASES 2015-03-05 17:10:17 +08:00
sijchen
18b202df0a Merge pull request #1837 from mstorsjo/initialize-func-pointers
Set pfMeCost to NULL when it isn't initialized
2015-03-05 17:05:07 +08:00
Sijia Chen
46de229fee update RELEASES file 2015-03-05 16:41:48 +08:00
Martin Storsjö
0ef69e55e2 Set pfMeCost to NULL when it isn't initialized
This avoids using uninitialized data in the check for bSatdInMdFlag.
2015-03-05 10:29:40 +02:00
ruil2
5921e5e7d3 Merge pull request #1836 from sijchen/imp_ut4
[UT] add more condition to improve the coverage of DecoderCrashTest
2015-03-05 15:47:24 +08:00
Sijia Chen
2c44dbae5c [UT] add more condition to improve the coverage of DecoderCrashTest
https://rbcommons.com/s/OpenH264/r/1132/
2015-03-05 13:22:48 +08:00
huili2
4048b9791a Merge pull request #1834 from sijchen/check_param
complete parameter checking related to loop-filter-idc
2015-03-05 09:39:46 +08:00
huili2
3022d4f655 Merge pull request #1832 from sijchen/imp_mc
[Encoder] replace conditional judgements with faster operations
2015-03-05 09:39:31 +08:00
sijchen
b304687197 Merge pull request #1833 from huili2/parseonly_au_incomplete_input_final
allow slice-level data come in for parse only
2015-03-05 09:24:30 +08:00
huili2
06b8e1abb7 allow slice-level data come in for parse only 2015-03-04 00:57:43 -08:00
dongzha
5b12578960 Merge pull request #1829 from syureyi/wp_p
Decoder WP support
2015-03-04 14:58:40 +08:00
zhuiling
9ef0c74fdd Decoder WP suppor
missed some part

fix clip value

update according to wayne's suggestion
2015-03-04 09:49:32 +08:00
Sijia Chen
94d1976a4e complete parameter checking related to loop-filter-idc 2015-03-03 18:31:37 +08:00
sijchen
5a1aedb622 Merge pull request #1827 from dongzha/cleanlog
modify decoder log
2015-03-03 11:01:46 +08:00
dong zhang
153dd0d3f5 format the files 2015-03-03 09:14:27 +08:00
Sijia Chen
63926a3d10 put a flag calculation in higher-level to save calculation in MB level 2015-03-02 17:36:55 +08:00
Sijia Chen
303bf77e42 replace conditional judgements with function pointer for acceleration 2015-03-02 17:11:11 +08:00
dong zhang
d28970d625 modify decoder log 2015-03-02 16:55:37 +08:00
huili2
2da0ce6451 Merge pull request #1826 from HaiboZhu/Add_Length_Input_Support
Add Bs Lenght File Input in Console
2015-03-02 14:05:00 +08:00
Haibo Zhu
afbb499c77 Add Bs Lenght File Input in Console 2015-03-01 18:22:40 -08:00
sijchen
7c9597c36d Merge pull request #1825 from ethanhugg/gmpapi-version-38
Change gmp-api version to Firefox38
2015-03-02 09:40:33 +08:00
zhilwang
bf3cc1ed63 Merge pull request #1823 from mstorsjo/downsample-min
Don't downsample to anything smaller than 4x4 pixels
2015-03-01 16:45:03 -08:00
Ethan Hugg
cea83438bf Change gmp-api version to Firefox38 2015-02-28 08:50:23 -08:00
Martin Storsjö
e8cdbd2ea7 Don't downsample to anything smaller than 4x4 pixels
This makes for a chroma plane of 2x2. The SIMD versionf of generic
downscalers assume that the width and height is at least 2, since
it does an unconditional loop for the body of the image, and a
separate step for the last pixel and last row. The SIMD versions
assume that (width-1) and (height-1) are larger than zero.

This fixes spurious crashes in EncodeDecodeTestAPI.SetOptionEncParamExt.
2015-02-28 14:58:53 +02:00
Ethan Hugg
67664f4dc0 Merge pull request #1821 from mstorsjo/remove-srand
Remove a stray srand
2015-02-27 11:16:41 -08:00
Martin Storsjö
c301db696e Remove a stray srand
The individual tests shouldn't reseed the random number generator
(other than for local debugging).

Hardcoding a specific random seed here leads to this test (and
all subsequent tests) not testing things randomly as intended, but
always testing the same parameters.
2015-02-27 12:06:44 +02:00
sijchen
2294b786cf Merge pull request #1774 from huili2/dec_flowchart_ec
modify decoder flowchart for non vcl AU check
2015-02-27 17:44:03 +08:00
Ethan Hugg
9ea4d5bd73 Merge pull request #1816 from mstorsjo/downscale-min-limit
Avoid trying to downscale layers to dimensions below 2
2015-02-23 13:53:58 -08:00
Ethan Hugg
497b38e341 Merge pull request #1815 from mstorsjo/test-param-strings
Store a const char* instead of a std::string in gtest parameter arrays
2015-02-23 13:52:19 -08:00
Martin Storsjö
861f54887d Avoid trying to downscale layers to dimensions below 2
When calculating what resolution to actually downscale to,
it can end up smaller than what the caller set. When scaling
down to resolutions close to the limit of allowed values,
this can end up setting values lower than the limit.

Previously, e.g. a downscale from 2266x8 to 566x2 will end
up as 566x1 after this calculation. When scaling to a
566x1, the chroma plane gets a height of 0, which doesn't
make sense, and which breaks e.g. the SSE2 scaler. Therefore,
make sure none of the dimensions end up set below 2.
2015-02-19 14:53:02 +02:00
Martin Storsjö
7208ed14b1 Store a const char* instead of a std::string in gtest parameter arrays
This avoids valgrind warnings about using unintialized data.
2015-02-19 14:52:11 +02:00
ruil2
e29ceca392 Merge pull request #1813 from sijchen/savc61
[Encoder] complete logic of simulcastavc with sps_pps_listing
2015-02-13 16:31:18 +08:00
Sijia Chen
15723e1204 add comments for write para set functions 2015-02-13 15:48:17 +08:00
HaiboZhu
1641ce9ee5 Merge pull request #1812 from huili2/cropping_error
return error for cropping data error
2015-02-12 11:27:48 +08:00
Sijia Chen
f9080ac090 complete logic of simulcastavc with sps_pps_listing 2015-02-11 17:31:17 +08:00
huili2
a73c1e6814 Merge pull request #1810 from dongzha/addUTLargeSize
add a UT for large picture
2015-02-11 17:28:08 +08:00
dong zhang
7d6d86b63a add a UT for large picture 2015-02-11 16:31:00 +08:00
huili2
4e9e5f5c36 Merge pull request #1794 from syureyi/monochroma
to support monochroma
2015-02-11 16:10:07 +08:00
huili2
5683393f38 return error for cropping data error 2015-02-10 22:31:24 -08:00
ruil2
ab3b55ae9c Merge pull request #1809 from sijchen/savc51
[Encoder] fix a nal generation for simulcast avc
2015-02-11 14:08:08 +08:00
Sijia Chen
943981abc4 fix a nal generation for simulcast avc and add nal-type check for simulcast avc UT 2015-02-09 13:50:31 +08:00
sijchen
bea361a1f0 Merge pull request #1805 from syureyi/fix_android_demo
Maintain android demo of encoder, fix a typo error
2015-02-09 11:05:17 +08:00
Ethan Hugg
9391c1586d Merge pull request #1808 from mstorsjo/update-readme
Update the readme about android 64 bit support
2015-02-08 11:21:23 -08:00
Martin Storsjö
58d9efb582 Update the readme about android 64 bit support 2015-02-08 21:17:29 +02:00
sijchen
9008b15d94 Merge pull request #1799 from mstorsjo/copy-spatial-downsample
Allow forcing copying in downscale
2015-02-06 14:22:18 +08:00
ruil2
8fc2af760f Merge pull request #1804 from sijchen/fix_over3
[Encoder] fix potential overflow under large bit rate
2015-02-06 14:22:01 +08:00
ruil2
296ab4d490 Merge pull request #1802 from sijchen/savc50
[Encoder] fix for in-middle changing simulcast avc setting
2015-02-06 14:21:47 +08:00
Sijia Chen
431bcee310 1, update the max-nal-size setting in UT and param check since we are using a larger input check
2, fix potential overflow (will change bs but little impact on bs)
2015-02-06 13:24:20 +08:00
ruil2
7d055cae94 Merge pull request #1786 from sijchen/fix_over
improve error logging in UT
2015-02-06 12:17:56 +08:00
ruil2
8246225eed Merge pull request #1791 from sijchen/fix_nal1
[Encoder] add a para check for max_nal_size
2015-02-06 12:17:40 +08:00
sijchen
3f19534dd6 Merge pull request #1790 from mstorsjo/simplify-vcproj
Remove the intermediate SW folder in the decoder vcproj files
2015-02-06 09:49:49 +08:00
Martin Storsjö
0a2cd1e59a Allow forcing copying in downscale
Normally, the DownsamplePadding skips scaling if the target
size is the same as the source size, assuming that the caller
will use the source data pointer in that case. This is true
for the base layer (the first call to DownsamplePadding in
SingleLayerPreprocess), but when downsampling the other layers,
there is no special handling for the case when the target
is the same size as the source.

Previously, the encoding of such spatial layers will use
completely uninitialized data, encoding complete garbage.

Instead force DownsamplePadding to make a copy if no scaling
is required, for the dependency layers. The base layer still
avoids a copy unless scaling of that layer is required.

Whether it actually makes sense to have lower spatial layers
the same size as the original one is a different question
though - currently the code allows it, and
EncodeDecodeTestAPI.SetOptionEncParamExt will try to use it.
2015-02-05 13:10:39 +02:00
Sijia Chen
bc1b28b5dd fix for in-middle changing simulcast avc setting 2015-02-05 16:34:28 +08:00
sijchen
09518da545 Merge pull request #1795 from mstorsjo/avoid-variable-shadowing
Avoid declaring a new variable shadowing an existing one in the same function
2015-02-04 17:57:38 +08:00
Martin Storsjö
6c1aa29431 Avoid declaring a new variable shadowing an existing one in the same function
All the following loops below assume that int iIdx already is declared.
2015-02-04 11:25:09 +02:00
sijchen
dc067286b3 Merge pull request #1792 from dongzha/AddUTMaxNalLen
add UT for set MaxNalUnitLen
2015-02-04 15:56:51 +08:00
zhuiling
0a8a4f2284 to support monochroma
add mbtype judge logic
2015-02-04 15:00:54 +08:00
dong zhang
d3b2be5ec2 add UT for set MaxNalUnitLen
ignore the cases: 2 MBs in one picture, and the multithreads case, enable them when code is ready
2015-02-04 14:39:11 +08:00
HaiboZhu
442230a91d Merge pull request #1789 from huili2/bugfix_checkspsactive
bug fix for multi-layer active sps check
2015-02-04 09:13:18 +08:00
Sijia Chen
2211324e2b add a para check for max_nal_size 2015-02-03 15:14:36 +08:00
Martin Storsjö
87b73257cb Remove the intermediate SW folder in the decoder vcproj files
This makes the folder structure in these project files match all
the other ones.
2015-02-03 09:09:58 +02:00
sijchen
fba745f04e Merge pull request #1788 from mstorsjo/share-wels-const
Share parts of wels_const.h
2015-02-03 15:06:44 +08:00
huili2
1734133012 bug fix for multi-layer active sps check 2015-02-02 22:31:50 -08:00
Martin Storsjö
e4a278620b Remove dependencies on the decoder internals in unit test for the common library 2015-02-02 12:44:04 +02:00
Martin Storsjö
4f237b51ef Move parts of wels_const.h into a shared header 2015-02-02 12:41:11 +02:00
Martin Storsjö
713beb7df7 Fix typos in header include guards 2015-02-02 12:41:11 +02:00
sijchen
5fdd01ec0c Merge pull request #1787 from mstorsjo/remove-stray-semicolon
Remove accidental double semicolons
2015-02-02 18:15:02 +08:00
sijchen
e7a7a35611 Merge pull request #1779 from mstorsjo/share-memalign
Move the memory allocation/deallocation routines to the common library
2015-02-02 18:14:55 +08:00
Martin Storsjö
a3063531c4 Remove accidental double semicolons 2015-02-02 09:20:35 +02:00
zhuiling
ee515e8b35 fix it 2015-02-02 10:17:19 +08:00
zhilwang
fb5c60b6fc Merge pull request #1782 from mstorsjo/avoid-yasm-warnings
Move DEFAULT REL into the x86_64 cases
2015-02-01 17:38:59 -08:00
zhilwang
7629543e3e Merge pull request #1784 from mstorsjo/force-arm-mode
Force armv7/neon within the arm assembly header file
2015-02-01 17:36:36 -08:00
sijchen
79b38f55ff Merge pull request #1783 from mstorsjo/simplify-includes
Simplify include paths for unittest sub libraries
2015-02-02 09:30:27 +08:00
sijchen
16ca41cada Merge pull request #1780 from mstorsjo/speedup-tests
Set m_iPicResSize in PrepareOneSrcFrame
2015-02-02 09:29:50 +08:00
sijchen
0f1737e035 Merge pull request #1778 from mstorsjo/fix-version-generation
Don't overwrite the git-tracked version.h
2015-02-02 09:23:05 +08:00
Martin Storsjö
5a78735802 Force armv7/neon within the arm assembly header file
This avoids having to add extra compiler flags to be able to build
them.
2015-02-02 00:53:39 +02:00
Martin Storsjö
8d539600bb Simplify unittest include paths
Move the "test" directory to CODEC_UNITTEST_INCLUDES instead of
duplicating it in every definition.
2015-02-02 00:51:02 +02:00
Martin Storsjö
84b3216d7c Remove redundant unittest include paths
The local directory doesn't need to be added to the include path.
2015-02-02 00:50:54 +02:00
Martin Storsjö
3243a78959 Move DEFAULT REL into the x86_64 cases
This fixes warnings when building for x86_32 using yasm, which says
the "DEFAULT REL" is ignored for non-64-bit targets.
2015-02-02 00:49:37 +02:00
Ethan Hugg
195df08bb9 Merge pull request #1746 from kinetiknz/gmp-fixes
Various fixes for the GeckoMediaPlugin wrapper
2015-01-30 09:25:35 -08:00
Martin Storsjö
4394d22b70 Set m_iPicResSize in PrepareOneSrcFrame
If the calling test hasn't set m_iPicResSize, it is set to the
maximum frame size, which takes much longer to initialize than the
current actual frame size.

This reduces the runtime of EncoderInterfaceTest.SkipFrameCheck
in valgrind from 229 seconds to 8 seconds, and the total runtime
of all the test cases in EncoderInterfaceTest from 405 seconds
to 89 seconds.
2015-01-30 16:02:40 +02:00
Martin Storsjö
2356eb1ff6 Move the memory allocation/deallocation routines to the common library
They are still used slightly differently in the encoder and decoder;
the decoder uses plain functions while the encoder uses one object
keeping track of the number of allocated bytes, and keeping track
of the requested alignment.
2015-01-30 11:30:59 +02:00
Martin Storsjö
078d96bef7 Don't overwrite the git-tracked version.h
When generating a new version of the header, that includes the
actual git hash, don't overwrite the file that is tracked by git.
Instead create a new file, and include this only if the build system
indicates that it exists (by setting a define). This allows the
untouched source tree to be built from within an IDE even if make
has not been run.

This reduces the hassle with a file that needs to be ignored in the
git configuration.

The downside is that the generated file isn't used if building
from within an IDE, if the header has been updated by calling make
before (since the IDE configuration doesn't know whether the user
actually has run make). Since users of the IDE might not build via
make in the command line at all (in the same source checkout at least),
this should not be an issue in practice. The previous way things worked,
the version hash (generated by make) when used in an IDE could actually
be outdated and misleading.
2015-01-30 10:55:16 +02:00
Martin Storsjö
869870e670 Rename the decoder WelsMalloc to WelsMallocz
This function actually zero-initializes the allocated memory, thus
make this clear in the function name.

This makes the function name match the same behaviour in the encoder.
2015-01-30 10:37:48 +02:00
Sijia Chen
3c085aec79 improve error logging in UT 2015-01-30 15:43:20 +08:00
sijchen
9b442b3d44 Merge pull request #1776 from mstorsjo/mc-test-fix
Avoid writing outside of the target rect in MCHalfPelFilterAnchor
2015-01-30 10:38:40 +08:00
sijchen
e48cf9f471 Merge pull request #1769 from ruil2/status
add screen content type setting
2015-01-30 10:25:19 +08:00
sijchen
28469ab3dc Merge pull request #1775 from sijchen/upd_ver
update the version info to sync with recent change of API
2015-01-30 10:24:56 +08:00
Martin Storsjö
76b0f8c17a Avoid writing outside of the target rect in MCHalfPelFilterAnchor
This simplifies comparison between the output of MCHalfPelFilterAnchor
and the actual MC function implementations.
2015-01-29 08:51:02 +02:00
Matthew Gregan
02365371e8 Initialize SVideoProperty struct completely. 2015-01-29 19:01:47 +13:00
Matthew Gregan
9ea6603071 Pass AVCC extra data to the decoder (in AnnexB format) in InitDecode. 2015-01-29 18:58:44 +13:00
Matthew Gregan
30d7352d03 Call InputExhausted when input has not produced a frame, call Error when
the decoder did not produce valid output, call DrainComplete in Drain
and FlushComplete in Flush.  Without these, the caller of the GMP may
end up waiting forever on a requested operation to complete.
2015-01-29 18:58:44 +13:00
Sijia Chen
a4f09f4d76 update the version info to sync with recent change of API 2015-01-29 11:14:08 +08:00
dongzha
4f4adcec49 Merge pull request #1772 from mstorsjo/mc-unify
Move the MC implementation to the common library
2015-01-29 09:28:57 +08:00
dongzha
59b3b428a2 Merge pull request #1768 from mstorsjo/msvc-ignore
Add a .gitignore file for test/build/win32
2015-01-29 09:28:02 +08:00
huili2
8a84d14617 Merge pull request #1770 from mstorsjo/remove-moved-file
Remove leftover references to expand_pic in the welsdec xcode project
2015-01-29 09:22:28 +08:00
huili2
7ab0386436 Merge pull request #1771 from mstorsjo/mc-enc-ut
Improve and fix a few details in the encoder MC test
2015-01-29 09:18:46 +08:00
Martin Storsjö
605f2fb858 Remove the now unnecessary mc_test_common.h 2015-01-28 23:59:41 +02:00
Martin Storsjö
f03edd79c2 Merge all MC unit tests into one file
Since both encoder and decoder use the same MC implementation now,
one set of tests is enough.
2015-01-28 23:59:37 +02:00
Martin Storsjö
9a0663620a Move the MC routines to the common library
Use the decoder versions of the functions (which are capable
of handling widths 4/8/16 for luma, not only 16 as in the
encoder). By using the more generic versions, there may be a small
performance loss since the functions need to check the width
in every call. Actual measurements show that the actual change is
very small (and the shared routines turn out to actually be faster
than the existing ones in ARM NEON setups).
2015-01-28 15:32:46 +02:00
Martin Storsjö
1a7d0ab831 Hook up McChromaWidthEq8_ssse3 into use in the decoder as well 2015-01-28 15:20:43 +02:00
Martin Storsjö
909a508749 Use the right stride in a memset in the EncMcHalfpel test 2015-01-28 15:19:19 +02:00
Martin Storsjö
5d67df4adb Remove leftover references to expand_pic in the welsdec xcode project
These files are part of the common library (and the common xcode
project) now instead.
2015-01-28 15:13:50 +02:00
Martin Storsjö
151dfe04d5 Extend the tested area in the encoder MC test 2015-01-28 15:11:17 +02:00
Martin Storsjö
9a9fc4c489 Change pfSampleAveraging to be a single function with internal width handling
This makes it match the behaviour of pMcLumaFunc and pMcChromaFunc.
2015-01-28 13:59:58 +02:00
Martin Storsjö
1127aa7761 Simplify the MC unit tests now that the naming is made consistent 2015-01-28 13:59:58 +02:00
Martin Storsjö
8b6bf0499f Rename the encoder MC chroma/luma functions to match the naming in the decoder 2015-01-28 13:59:58 +02:00
Martin Storsjö
bb21b62cbd Simplify the MC unit tests now that the luma functions have a similar signature 2015-01-28 13:59:58 +02:00
Martin Storsjö
1cf68cad13 Move the qpel function table into the luma function itself
This unifies the luma MC interface to match the decoder side.
2015-01-28 13:59:58 +02:00
sijchen
a8262dd9e6 Merge pull request #1767 from mstorsjo/fix-msvc-warnings
Use float literals instead of double literals when setting float values
2015-01-28 16:48:23 +08:00
sijchen
c245cd2d68 Merge pull request #1766 from mstorsjo/make-clean
Remove more generated files in "make clean"
2015-01-28 16:34:53 +08:00
ruil2
095bb83e77 add screen content type setting 2015-01-28 16:25:51 +08:00
huili2
b6e28495dd modify decoder flowchart for non vcl AU check 2015-01-28 00:22:48 -08:00
Martin Storsjö
1be2cd14c0 Add a .gitignore file for test/build/win32
This file is copied from codec/build/win32.
2015-01-28 09:42:10 +02:00
sijchen
e4260f6e97 Merge pull request #1765 from mstorsjo/mccopy-neon
Handle width==2 for the neon version of McCopy
2015-01-28 15:40:02 +08:00
Martin Storsjö
b444f8d9d0 Remove more generated files in "make clean"
Make sure to remove *.exe also, if cross-building from unix to
windows (and running "make clean" without specifying mingw as
target OS).
2015-01-28 09:39:55 +02:00
Martin Storsjö
853d2922db Use float literals instead of double literals when setting float values
This fixes warnings with MSVC 2008.
2015-01-28 09:19:09 +02:00
Martin Storsjö
7354a8cbae Handle width==2 for the neon version of McCopy
Fall back on the C version of the algorithm here, just as in
McCopy_sse2.

This fixes 2 of the McCopy tests on arm/aarch64.
2015-01-28 09:01:00 +02:00
ruil2
c4c73ee5d6 Merge pull request #1764 from sijchen/fix_br3
[Encoder] fix potential overflow and save unnecessary calculation
2015-01-28 11:45:47 +08:00
ruil2
051a16e02e Merge pull request #1762 from sijchen/fix_sta
[Encoder] fix statistics: updating should be independent with log interval
2015-01-28 10:51:51 +08:00
Sijia Chen
5752888c81 1, fix a potential overflow
2,    remove some unnecessary multiplier and add input check of spatial BR
2015-01-28 10:51:27 +08:00
sijchen
a00dd56f1c Merge pull request #1763 from mstorsjo/mc-ut-simplify
Remove the forceC parameter from DEF_MCCOPYTEST
2015-01-28 10:13:46 +08:00
Martin Storsjö
e5c2f333be Remove the forceC parameter from DEF_MCCOPYTEST
Even if there actually is no SIMD optimized version of the
width==2 cases, luma function for SIMD still needs to handle
it by calling McCopyWidthEq2_c for these cases.

This simplifies the UT code a little, and makes sure that
those codepaths are tested properly.
2015-01-27 12:11:38 +02:00
sijchen
d9ee702031 Merge pull request #1759 from mstorsjo/enc-mc-ut
Add unit tests for encoder MC
2015-01-27 16:51:42 +08:00
Martin Storsjö
23b20fb14c Simplify code in HorFilterInput16bit in MC
This avoids a gcc optimizer bug (which seems to be present in some
gcc 4.6 and 4.7 versions) at the -O3 level.
2015-01-27 09:41:00 +02:00
Martin Storsjö
279e14b34e Add const to some inline functions within MC 2015-01-27 09:41:00 +02:00
Martin Storsjö
10e2f90b7e Bundle MC tests for all motion vectors in one single test
This speeds up the compile time from 21.3 to 2.6 seconds
for the MC test files.

This makes it slightly harder to see exactly which test
failed on a quick glance, but it makes the overall structure of
the unit test output more manageable and readable, by reducing
the number of tests from 1300 to 430.
2015-01-27 09:41:00 +02:00
Martin Storsjö
ca97f78ae8 Add unit tests for special cased MC functions in the encoder 2015-01-27 09:41:00 +02:00
Martin Storsjö
8084a2c797 Add unit tests for encoder MC 2015-01-27 09:41:00 +02:00
Martin Storsjö
4df4c1d757 Prepare the shared MC test code for adding an encoder MC test 2015-01-27 09:41:00 +02:00
Martin Storsjö
49af2b592d Split DecUT_MotionCompensation to a shareable header
This allows adding a version of the same test for the encoder.
2015-01-27 09:40:59 +02:00
Martin Storsjö
cf3e7b5dec Make local functions and tables in DecUT_MotionCompensation static 2015-01-27 09:40:59 +02:00
Martin Storsjö
478af8f00c Unify the pfChromaMc function signature with the decoder version
Instead of passing a struct with x/y, pass them as two separate
parameters.
2015-01-27 09:40:59 +02:00
Martin Storsjö
8ecb8b4200 Remove unused includes in DecUT_MotionCompensation 2015-01-27 09:40:59 +02:00
Martin Storsjö
420a81afe4 Unify the order of iX and iY in DecUT_MotionCompensation
They are in the order iX, iY in the rest of the file.
2015-01-27 09:40:59 +02:00
Martin Storsjö
9fc9acfd14 Avoid a duplicate local typedef 2015-01-27 09:40:59 +02:00
Martin Storsjö
7d9fc35235 Unify the encoder MC init function with the decoder
This simplifies the code a little, by passing a pointer to the sub-struct
SMcFunc instead of to the full SWelsFuncPtrList, which isn't necessary.
2015-01-27 09:40:59 +02:00
ruil2
5b27407993 Merge pull request #1757 from sijchen/sps_list4
[Encoder] add input checking and fix a bs length under new strategy
2015-01-27 10:43:20 +08:00
ruil2
1b48e6c88c Merge pull request #1756 from sijchen/savc4
[Encoder] Implementation of bSimulcastAVC and UT
2015-01-27 10:42:50 +08:00
Sijia Chen
d557578be3 fix statistics: updating should be independent with log interval 2015-01-27 10:12:51 +08:00
sijchen
f404ce2e56 Merge pull request #1758 from mstorsjo/add-missed-test
Hook up the DecUT_ParseSyntax test
2015-01-27 08:47:40 +08:00
Martin Storsjö
e64e2bb620 Avoid warnings in DecUT_ParseSyntax 2015-01-26 23:54:34 +02:00
Martin Storsjö
4192165ec9 Add DecUT_ParseSyntax to the build system
This test seems to have been added to the git tree in commit
9a602cac (which does much more than what the commit message
tells), and finally merged into git master in 2c99f581.
2015-01-26 15:59:43 +02:00
Martin Storsjö
faf62464a8 Make DecUT_ParseSyntax.cpp actually build and run successfully 2015-01-26 15:59:43 +02:00
Martin Storsjö
4ca8ad2612 Initialize pCodecInstance in the constructor
This avoids using uninitialized memory if SetCodecInstance
isn't ever called (as in DecUT_ParseSyntax).
2015-01-26 13:16:09 +02:00
Sijia Chen
deccd1eadb fix profileidc 2015-01-26 16:36:42 +08:00
ruil2
1ae06eab91 Merge pull request #1755 from sijchen/fix_lvl
[Encoder] fix level-idc related input checking and a statistics calculation
2015-01-26 15:58:03 +08:00
Sijia Chen
e2fb48d404 change the trace to warning 2015-01-26 15:42:09 +08:00
Sijia Chen
8d5ec6759d add support of SimulcastAVC functions 2015-01-26 15:25:09 +08:00
sijchen
89159ab25f Merge pull request #1754 from ruil2/status
use the new no delay decoderframe interface instead of old one
2015-01-26 15:23:49 +08:00
Sijia Chen
f13624316e fix level-idc related input checking and a statistics calculation
will change bs but tested there is little impact on RD
being reviewed at: https://rbcommons.com/s/OpenH264/r/1084/
2015-01-26 15:20:58 +08:00
Sijia Chen
45e3424364 add input checking and fix a bs length under new strategy 2015-01-26 11:12:24 +08:00
ruil2
4b52d99d97 use the new no delay decoderframe interface instead of old one 2015-01-26 09:56:11 +08:00
dongzha
de68ec6f45 Merge pull request #1751 from ruil2/status
return decoder error
2015-01-26 09:31:48 +08:00
dongzha
51f1ea3839 Merge pull request #1753 from mstorsjo/test-cpu-flags
Add checks for cpu features in tests
2015-01-26 09:29:47 +08:00
Martin Storsjö
acafbb442d Add checks for cpu features in tests
This allows running the tests on devices that don't have
all the SIMD instruction sets.
2015-01-24 22:47:23 +02:00
ruil2
6afdf36ecc return decoder error 2015-01-23 15:48:13 +08:00
sijchen
7f967f6fc4 Merge pull request #1750 from syureyi/crqp
to support different chroma qp
2015-01-23 13:30:21 +08:00
sijchen
dfd24a987d Merge pull request #1748 from dongzha/fixcrash
fix crash in SGE test
2015-01-23 09:45:54 +08:00
zhuiling
a45c661525 to support different chroma qp
fix travis ci error
2015-01-23 09:06:09 +08:00
dong zhang
6dcaf2f890 fix crash in SGE test 2015-01-22 09:10:28 +08:00
ruil2
e7fff10d91 Merge pull request #1745 from sijchen/fix_ut
[UT] fix a random failure of UT
2015-01-21 17:31:34 +08:00
ruil2
17030193e6 Merge pull request #1742 from sijchen/fix_max_br
[Encoder] improve the para checking of max-br
2015-01-21 17:31:24 +08:00
Sijia Chen
d74234d975 enhance max-br checking logic 2015-01-21 16:54:43 +08:00
Sijia Chen
6664593ef7 Merge branch 'master' of https://github.com/cisco/openh264 into fix_max_br 2015-01-21 16:35:31 +08:00
sijchen
4b231c8fe6 Merge pull request #1744 from dongzha/modifydecoderlog
modify decoder console log level to WELS_LOG_WARNING
2015-01-21 09:43:41 +08:00
ruil2
96b1183574 Merge pull request #1743 from sijchen/fix_test
[UT] add a default param function for EncodeDecoderAPI test
2015-01-21 09:19:21 +08:00
Sijia Chen
5b10c1ff8d fix random failure of UT under randon seed 1421732719 2015-01-20 15:47:05 +08:00
dong zhang
bd7fabd892 modify decoder console log level to WELS_LOG_WARNING
change the postion of setting EC method
2015-01-20 13:18:33 +08:00
Sijia Chen
8cc53b0231 astyle an unformatted file 2015-01-20 10:50:44 +08:00
Sijia Chen
489d121549 add a default param function for EncodeDecoderAPI test 2015-01-20 10:49:25 +08:00
Sijia Chen
ee40ba6392 improve the para checking of max-br 2015-01-20 10:31:13 +08:00
sijchen
8bef6bc942 Merge pull request #1738 from huili2/init_EC_modify
modify EC init position
2015-01-19 16:36:29 +08:00
sijchen
2df0185252 Merge pull request #1740 from mstorsjo/fix-tests
Fix issues in the ParameterSetStrategy tests
2015-01-19 16:36:07 +08:00
Martin Storsjö
d6f7a07b14 Undefine a define for writing debug files 2015-01-19 10:06:30 +02:00
Martin Storsjö
c1aa2a1edb Use WelsClip3 instead of WELS_CLIP3 for random values
Since WELS_CLIP3 is a macro, using it will cause the arguments
to be evalated multiple times, which means that the clip will
not work as intended. If using a rand() argument, always use
WelsClip3 instead, which is an inline function.
2015-01-19 10:02:21 +02:00
Martin Storsjö
fcae7fd300 Compare macro block widths instead of picture widths
Since cropping is disabled (prepareParam does
memset (pParam, 0, sizeof (SEncParamExt)); which clears the
cropping flag), we need to make sure that the number of
macroblocks differ, not only the number of pixels.
2015-01-19 10:01:12 +02:00
Martin Storsjö
58f1fef520 Fix a comparison in ParameterSetStrategy_SPS_LISTING_AND_PPS_INCREASING3
Previously, this test picked a width at random until it found
a width that had been used before, meaning that all tests were
made with the same single width.
2015-01-19 09:58:25 +02:00
huili2
01fd220ef9 Merge pull request #1739 from sijchen/sps_list3
[Encoder] rename the SpsPpsStrategy to enum
2015-01-19 13:31:51 +08:00
sijchen
eb7b149fcc Merge pull request #1736 from mstorsjo/werror-tests
Build using -Werror in travis unit tests
2015-01-19 10:54:11 +08:00
sijchen
4930111ad3 Merge pull request #1734 from mstorsjo/fix-unused-variable-warning
Avoid a warning about a variable set but not used
2015-01-19 10:51:33 +08:00
Sijia Chen
d9502aa71d rename the strategy to enum 2015-01-19 10:49:38 +08:00
huili2
50ce93e31c modify EC init position 2015-01-18 18:07:27 -08:00
dongzha
7d1d2d658f Merge pull request #1735 from mstorsjo/msvc-test-warnings
Fix build warnings with MSVC
2015-01-19 09:37:39 +08:00
Martin Storsjö
5702e7c0ca Build using -Werror in travis unit tests
This makes all compiler warnings to be treated as errors.

This allows catching warnings that are introduced, that may only be
visible with some compilers.

This option is only added within travis unit tests, not during normal
builds, so there is no risk of unnecessarily breaking builds on
new/untested systems.
2015-01-16 14:02:01 +02:00
Martin Storsjö
c69d628a82 Avoid warnings about an unused variable in debug mode 2015-01-16 14:02:01 +02:00
Martin Storsjö
4df6f9420f Check for an already defined nullptr macro
In addition to the existing compiler version/feature checks, also
check if there is such a macro.

This avoids warnings when building with Xcode 6.0.
2015-01-16 14:02:01 +02:00
Martin Storsjö
3cf2be2590 Don't override the externally set CFLAGS variable in debug mode
This is similar to how it is done in release mode already.

The fact that this behaviour differed between release and debug
can be traced back to commit cf92e8d6.
2015-01-16 14:02:01 +02:00
Martin Storsjö
9e00bf89aa Use VerifyVersionInfo instead of GetVersionEx
The GetVersionEx function has been deprecated since Windows 8.1.
VerifyVersionInfo exists at least since Windows 2000.

This fixes warnings about use of deprecated functions in MSVC.
2015-01-16 13:38:21 +02:00
Martin Storsjö
4f33b38ac1 Move a conversion from size_t to int into one single place within BaseDecoderTest.cpp 2015-01-16 13:38:07 +02:00
Martin Storsjö
b83b19254d Add a cast when converting from uint64_t to int
This silences warnings with MSVC.
2015-01-16 13:38:07 +02:00
Martin Storsjö
96384bd578 Add casts when converting from size_t or std::streamsize to int 2015-01-16 13:38:07 +02:00
Martin Storsjö
af938a640f Add casts when converting from float to int 2015-01-16 13:38:07 +02:00
Martin Storsjö
ef82e18d74 Silence warnings about insecure CRT functions in the test suite
There is no problem in using the "insecure" CRT functions, as long as
they are used correctly - especially not within the test suite where
they are only are exposed to the test suite input data.

Within the library, these are used via the library internal wrappers
in codec/common/src/crt_util_safe_x.cpp, but we'd rather not use them
in the test suite - just use the normal standard C functions here.
2015-01-16 13:38:06 +02:00
Martin Storsjö
1646f86b37 Allow setting cflags specifically for the unit test suite 2015-01-16 13:38:06 +02:00
Martin Storsjö
a1b8ffc9df Use the right data type for a variable
There is little point in using an int32_t variable for something
that will only be used for passing in as a bool parameter to a
function.
2015-01-16 13:38:06 +02:00
Martin Storsjö
a852ac99ed Fix a cast to actually cast to the right type
The existing cast didn't make much sense. The expression itself is
already int, there's little point in casting it to int, especially
when assigning to a float.

This fixes warnings with MSVC.
2015-01-16 13:38:06 +02:00
Martin Storsjö
93cb617932 Add a comparison in ASSERT_TRUE
This makes sure the compared value actually is bool, not any other
type that can be used as condition.

This fixes warnings with MSVC.
2015-01-16 13:38:06 +02:00
Martin Storsjö
99925984b3 Consistently compare integers with integers and bools with bools
MSVC warns when comparing integers with booleans in with the gtest
assertion macros.
2015-01-16 13:37:15 +02:00
Martin Storsjö
cd55201600 Ignore armasm warnings about instructions that are deprecated in ARMv8
This disables armasm warning A4509, "This form of conditional
instruction is deprecated".

The conditional instructions (such as movcs, addcs, subscs)
have been deprecated in ARMv8, in favor of conditional branches.
This isn't something that we need to take immediate action about,
though, therefore silence the warning.
2015-01-16 13:36:35 +02:00
Martin Storsjö
a44643aeda Avoid a warning about a variable set but not used
The return values may be useful later, so instead of removing the
variable, just silence the warning.

This fixes a warning in builds with GCC.
2015-01-16 09:26:42 +02:00
ruil2
aea1017562 Merge pull request #1732 from sijchen/sps_list2
[Encoder] add new SpsPpsStrategy and UT
2015-01-16 10:53:45 +08:00
ruil2
9ba316caf4 Merge pull request #1731 from mstorsjo/warning-fixes
Fixes for some new compiler warnings
2015-01-16 09:00:46 +08:00
Martin Storsjö
d6b4b5365d Declare a float constant as float instead of as double
This avoids warnings about converting from double to float
in MSVC.
2015-01-15 12:38:42 +02:00
Martin Storsjö
75bbc286e1 Add explicit casts when converting from double to int32_t
This fixes build warnings with MSVC.
2015-01-15 12:38:39 +02:00
Martin Storsjö
c8972f1c32 Consistently use the right type for log prints
These fields were originally int64_t. Even though long long is
the same size as int64_t in all setups, some compilers treat
it as a different type than long long (in 64 bit environments,
int64_t is a long, not a long long, even if they are the same
size).

%"PRId64" is used for printing int64_t, while %lld is used
for printing long long.

This fixes build warnings with gcc.
2015-01-15 12:33:44 +02:00
Sijia Chen
98ed302990 add new SpsPpsStrategy and UT 2015-01-15 18:04:39 +08:00
sijchen
e9ec603fd7 Merge pull request #1727 from huili2/addUT_parseonly_frameincomplete
add UT for incomplete frame for parse only
2015-01-15 16:23:05 +08:00
sijchen
dbcbe180e6 Merge pull request #1729 from ruil2/rc_submit1
add rc function
2015-01-15 16:22:39 +08:00
dongzha
b603844126 Merge pull request #1730 from HaiboZhu/Debug_EC_off_Delay_mode_early_exit_process
Fix the bug that the pDec not set to NULL when early exit
2015-01-15 14:08:26 +08:00
ruil2
0250acc665 Merge pull request #1725 from ethanhugg/startcode2
gmp-openh264 should avoid writing outside the input frame buffer with start code.
2015-01-15 11:33:29 +08:00
ruil2
d7304bbaf4 Merge pull request #1728 from sijchen/fix_mbidx
[Encoder] expand the mb_idx range so as to support frame size > 32767
2015-01-15 11:33:15 +08:00
Haibo Zhu
264cf57616 Fix the bug that the pDec not set to NULL when early exit
Add more judgement for diff set EC mode under no-delay call
2015-01-14 19:22:34 -08:00
ruil2
5b5cc8434e add rc function 2015-01-15 11:14:05 +08:00
huili2
ea533e6405 add UT for incomplete frame for parse only 2015-01-14 18:00:33 -08:00
dongzha
993caea18c Merge pull request #1721 from huili2/DecodeFrameNodelay
add new API as DecodeFrameNoDelay for immediate decoding
2015-01-15 09:54:10 +08:00
dongzha
cb49f8ecbd Merge pull request #1718 from huili2/sps_avc_flag_remove
allow non-avc check when subset SPS exists
2015-01-15 09:53:15 +08:00
Ethan Hugg
fc6ea7e5a8 gmp-openh264 check buffer length before we overwrite with start code. 2015-01-14 15:28:55 -08:00
Ethan Hugg
9a55a8609e Merge pull request #1722 from sijchen/win_pdb2
add option for generating pdb in windows builds
2015-01-14 07:35:49 -08:00
Sijia Chen
560a33a373 fix to avoid link warning 2015-01-14 18:02:24 +08:00
Sijia Chen
c02d9b0865 expand the mb_idx range so as to support frame size > 32767 2015-01-14 17:59:16 +08:00
Sijia Chen
4f826f2e94 add option for generating pdb in windows builds 2015-01-14 16:31:48 +08:00
ruil2
a39c46601d Merge pull request #1720 from mstorsjo/remove-unused-format-args
Log all provided parameters in WelsEncoderApplyLTR
2015-01-14 16:19:43 +08:00
Martin Storsjö
f594d96a51 Log all provided parameters in WelsEncoderApplyLTR
This fixes warnings with gcc and clang.
2015-01-14 09:06:36 +02:00
ruil2
34661f1d86 Merge pull request #1715 from huili2/parseonly_flowchart_modify
modify parse only flowchart to use DecodeFrameConstruction()
2015-01-13 16:11:02 +08:00
ruil2
cdd072e1d4 Merge pull request #1714 from sijchen/fix_ref4
[Encoder] enhance param checking with num-ref and related logging
2015-01-13 16:10:20 +08:00
ruil2
47dd4de412 Merge pull request #1717 from sijchen/fix_ltr1
[Encoder] fix for the valgrid warning of issue#1362
2015-01-13 15:30:53 +08:00
huili2
1518b5da58 allow non-avc check when subset SPS exists 2015-01-12 22:29:18 -08:00
huili2
8e35224134 modify parse only flowchart to use DecodeFrameConstruction() 2015-01-11 23:16:24 -08:00
Sijia Chen
ea06cbe06b enhance param checking with num-ref and related logging 2015-01-12 10:39:51 +08:00
ruil2
04cb9f3477 Merge pull request #1678 from sijchen/savc1
[Encoder] interface for simulcast avc
2015-01-12 09:23:17 +08:00
ruil2
958c60d041 Merge pull request #1713 from mstorsjo/valgrind
Avoid a spurious valgrind warning in DecoderIntraPredictionTest.WelsDecoderI16x16LumaPredPlane_sse2
2015-01-12 09:22:37 +08:00
Martin Storsjö
44bce08d60 Avoid a spurious valgrind warning in DecoderIntraPredictionTest.WelsDecoderI16x16LumaPredPlane_sse2
valgrind thinks xmm2 is uninitialized - in fact it is, but
its value here doesn't really matter. Instead set it to a known value
before using it in SUMW_HORIZON.
2015-01-10 13:25:00 +02:00
Sijia Chen
a4ae5e3747 add fix for the valgrid warning of issue#1362 2015-01-09 16:17:51 +08:00
Sijia Chen
76ef30dc82 refactor 2015-01-09 15:55:03 +08:00
dongzha
a5cb0ea22c Merge pull request #1711 from huili2/parseonly_noEC
disable EC for parseonly
2015-01-09 09:23:55 +08:00
huili2
900a908929 disable EC for parseonly 2015-01-08 00:16:01 -08:00
HaiboZhu
3a91abf28c Merge pull request #1710 from huili2/parseonly_framecomplete_error_prop
prevent error propagation for parse only when frame is not complete
2015-01-08 16:09:02 +08:00
huili2
e48585236e prevent error propagation for parse only when frame is not complete 2015-01-07 22:34:55 -08:00
Ethan Hugg
d92853c88e Merge pull request #1706 from mstorsjo/add-destdir-static
Add $(DESTDIR) for the install-static rule as well
2015-01-07 13:13:23 -08:00
Martin Storsjö
fb33b359d5 Add $(DESTDIR) for the install-static rule as well
The change for adding these were merged after the commit for
adding $(DESTDIR) was done.
2015-01-07 20:24:09 +02:00
Ethan Hugg
17a87e8081 Merge pull request #1704 from lu-zero/master
build: Support DESTDIR
2015-01-07 10:20:17 -08:00
Ethan Hugg
71123f29ef Merge pull request #1702 from mstorsjo/adjust-comment
Clarify the comment about ABI issues with WelsGetCodecVersion
2015-01-07 09:07:12 -08:00
Ethan Hugg
178a18b30e Merge pull request #1703 from mstorsjo/add-cast
Add a cast to silence GCC warnings about comparison between signed and unsigned
2015-01-07 09:05:42 -08:00
Luca Barbato
735172d387 build: Support DESTDIR
Distribution rely on that to properly package software.
2015-01-07 10:44:35 +01:00
Martin Storsjö
5c3c2a569c Add a cast to silence GCC warnings about comparison between signed and unsigned 2015-01-07 09:15:48 +02:00
Martin Storsjö
aa1ec23ecd Clarify the comment about ABI issues with WelsGetCodecVersion
The incompatibility between mingw and msvc is smaller than it seemed
at first; this turned out to only be a bug in older versions.
2015-01-07 09:15:34 +02:00
huili2
62c6a1e099 Merge pull request #1705 from HaiboZhu/Debug_Delay_mode_rawdata_update_error
Fix a bug when EC disable under delay mode
2015-01-07 15:12:11 +08:00
Haibo Zhu
207082e237 Fix a bug when EC disable under delay mode (buf point not update when early exit) 2015-01-06 17:48:58 -08:00
sijchen
68ff8468af Merge pull request #1691 from mstorsjo/pkgconfig-fixes
Improve pkg-config files for use with static libraries
2015-01-07 09:45:45 +08:00
ruil2
61cd77d487 Merge pull request #1701 from huili2/parseonly_framecomplete_bugfix
bug fix for parseonly for complete frame judge
2015-01-07 09:13:16 +08:00
huili2
e8b68d2460 bug fix for parseonly for complete frame judge: reset total_mb if correct. 2015-01-05 23:07:17 -08:00
huili2
ac08cc4b2f Merge pull request #1694 from zhilwang/asm-SetNoneZero
Add asm code for NoneZeroCount and refine related code
2015-01-06 13:37:56 +08:00
sijchen
9a89ee72b0 Merge pull request #1698 from ruil2/fix_param
fix bug when some parameters change dynamically
2015-01-06 09:37:48 +08:00
ruil2
c72d3ad51a Merge pull request #1697 from huili2/parseonly_frame_complete_return
output error when frame incomplete for parse only usage
2015-01-05 17:06:56 +08:00
ruil2
ce14a0e4f9 fix bug when some parameters change dynamically 2015-01-05 17:01:35 +08:00
huili2
3244f11cfe Merge pull request #1696 from mstorsjo/add-header-const
Declare the g_strCodecVer variable as const
2015-01-05 09:42:43 +08:00
huili2
b719c3b0d5 output error when frame incomplete for parse only usage 2015-01-04 17:13:57 -08:00
Martin Storsjö
3422d3b976 Declare the g_strCodecVer variable as const
Previously, the variable itself wasn't const (which meant that
it could be set to point to another const string instead).

By declaring it as const, gcc doesn't warn about it being unused,
and we can get rid of a workaround.
2015-01-04 21:00:23 +02:00
zhiliang wang
01b74ea7c1 Add asm code for NoneZeroCount and refine related code 2015-01-04 16:39:17 +08:00
sijchen
7d5e88ffda Merge pull request #1687 from mstorsjo/update-releases
Update the RELEASES file with the 1.3.0 binaries
2015-01-04 10:21:29 +08:00
ruil2
2ef9a8aee9 Merge pull request #1692 from mstorsjo/improved-version-function
Add a new public function WelsGetCodecVersionEx
2015-01-04 09:14:29 +08:00
huili2
65e73d969a Merge pull request #1688 from mstorsjo/add-void
Add void to the parameter list of WelsGetCodecVersion
2015-01-04 09:00:26 +08:00
Martin Storsjö
50dc4757e4 Add a new public function WelsGetCodecVersionEx
This function doesn't return a struct, but fills in a struct via
a provided pointer.

The ABI of returning a struct is different between MSVC and mingw.

This allows using the same function from mingw, even though the DLL
has been built with MSVC.
2015-01-03 01:09:04 +02:00
Martin Storsjö
1a995cc991 Include private dependencies in the Libs line in pkg-config if only installing a static library
If only a static library is installed, the user of the library may
not know that only a static version of this particular library is
available (and doesn't know that --static should be added to the
pkg-config call). Therefore, one common practice is to include private
dependencies in the public Libs line if a static-only library is
installed.
2015-01-02 22:07:29 +02:00
Martin Storsjö
93621d6d9a Include -lstdc++ under Libs.private in the pkg-config file
This allows linking statically to the library, by passing --static
to pkg-config.
2015-01-02 21:54:21 +02:00
Martin Storsjö
a24bac34bd Don't install the pkg-config file as readonly
This file should be installed just as any other file, protected by
normal user permissions, not by making the file readonly.
2015-01-02 21:52:36 +02:00
Martin Storsjö
3901045318 Simplify the makefile rule for generating the pkg-config file 2015-01-02 21:52:05 +02:00
Martin Storsjö
ba314d16e7 Add void to the parameter list of WelsGetCodecVersion
When the header is used from C instead of C++, an empty parameter
list means that it can take any number of parameters, and can cause
warnings like "function declaration isn’t a prototype" with some
C compilers. Clarify this by explicitly adding void to this function.
2014-12-31 17:07:36 +02:00
Martin Storsjö
bdd02db04a Update the RELEASES file with the 1.3.0 binaries 2014-12-31 15:37:07 +02:00
huili2
e3e5208509 add new API as DecodeFrameNoDelay for immediate decoding, which will be recommended decoding method for h.264 bitstream 2014-12-30 23:43:47 -08:00
huili2
47d8a840c0 Merge pull request #1682 from huili2/parseonly_initial_no_colorformat
disable color format check for parse only
2014-12-31 13:14:47 +08:00
huili2
ad8ba85136 Merge pull request #1685 from HaiboZhu/Debug_No_Deblocking_when_TotalMB_equals_to_0
Force NO deblocking when no MB decoded in current slice
2014-12-31 13:14:17 +08:00
Haibo Zhu
81805ab23d Force NO deblocking when no MB decoded in current slice
Remove the judgment outside of the function
2014-12-30 18:25:54 -08:00
sijchen
22cabd39ca Merge pull request #1683 from HaiboZhu/Change_default_EC_mode
Change default EC mode
2014-12-30 16:17:42 +08:00
Haibo Zhu
a53dc467f6 Change default EC mode to ERROR_CON_SLICE_MV_COPY_CROSS_IDR_FREEZE_RES_CHANGE 2014-12-29 22:17:38 -08:00
HaiboZhu
d2d4ab8c67 Merge pull request #1680 from dongzha/SpeedupDecoding
speedup decoding
2014-12-29 17:17:25 +08:00
huili2
65dcd57c1b Merge pull request #1679 from HaiboZhu/Debug_Crash_1115349_AU_StartPos_Not_Reset
Reset AU start pos to 0 after construct AU
2014-12-29 16:58:26 +08:00
dong zhang
dc86cfe5d8 speedup decoding 2014-12-29 16:40:26 +08:00
huili2
b12b39a47b disable color format check for parse only 2014-12-28 23:43:09 -08:00
Haibo Zhu
7ee00b0618 Reset AU uiStartPos to 0 in ResetCurrentAccessUnit for svc
Reset uiStartPos to 0 when init and forceReset
2014-12-28 23:14:33 -08:00
Sijia Chen
6050bf89f6 add interface of simulcast avc, the actual support is coming later 2014-12-29 10:54:01 +08:00
sijchen
26ccd837f1 Merge pull request #1672 from huili2/parseonly_sizemodif
unify parseonly to have 0x0001
2014-12-26 09:58:28 +08:00
dongzha
4ebeb4bb70 Merge pull request #1673 from HaiboZhu/Debug_Crash_NoAU_SPS_Update
Add SPS/SubSPS/PPS update when AU number==0 and iOverwriteFlags==true
2014-12-26 09:30:43 +08:00
Haibo Zhu
586893ca4b Add SPS/SubSPS/PPS update when AU number==0 and iOverwriteFlags==true
Add TotalNumMbRec>0 judgement for EC
2014-12-25 15:03:47 -08:00
sijchen
b455c035f7 Merge pull request #1670 from ruil2/level
add profile and level checking in ParamValidation
2014-12-25 17:37:01 +08:00
ruil2
00a2dc290c modify trace info for LEVEL_UNKNOWN 2014-12-25 16:58:29 +08:00
sijchen
bac135ae81 Merge pull request #1665 from ruil2/frame_rate
refine frame rate
2014-12-25 16:53:52 +08:00
sijchen
1fb6b91b72 Merge pull request #1669 from ruil2/rc
add RC_TIMESTAMP_MODE mode
2014-12-25 16:35:40 +08:00
huili2
9c0bbeb4da unify parseonly to have 0x0001 2014-12-24 23:11:49 -08:00
ruil2
0babd8d7ab add profile and level checking in ParamValidation 2014-12-24 15:40:30 +08:00
ruil2
13f6ff59cc add RC_TIMESTAMP_MODE mode 2014-12-24 14:57:03 +08:00
ruil2
bd50f64152 Merge pull request #1668 from mstorsjo/fix-warnings
Fix build warnings with GCC
2014-12-24 09:09:29 +08:00
Martin Storsjö
8b7be9f3bc Initialize a local variable
This fixes warnings with GCC about a variable that may be used
uninitialized (if iResProperty was an incorrect value).
2014-12-23 23:18:20 +02:00
Martin Storsjö
8de54078d7 Use an unsigned variable for comparison with unsigned values
This avoids warnings about comparison between signed and unsigned.
2014-12-23 23:17:18 +02:00
Martin Storsjö
328094acfd Remove a write-only variable
This fixes warnings with GCC about a variable that is set but
not used.
2014-12-23 23:16:56 +02:00
ruil2
cf6450b269 refine frame rate 2014-12-23 17:30:01 +08:00
ruil2
59aee6052a Merge pull request #1667 from lyao2/ut_fix3
fix a spatial layer index error
2014-12-23 17:19:49 +08:00
lyao2
2e4fd4248a fix a spatial layer index error 2014-12-23 16:25:11 +08:00
sijchen
9cc395fc4e Merge pull request #1632 from ruil2/encoder_refine
use the same complexity computation branch for screen and camera
2014-12-23 10:51:53 +08:00
huili2
2c99f5810e Merge pull request #1659 from syureyi/scalinglist
Scalinglist
2014-12-23 10:50:49 +08:00
ruil2
1c7d3d4b47 Merge pull request #1664 from mstorsjo/type-signatures
Use the correct types instead of void pointers in function signatures in rc.h
2014-12-23 09:05:45 +08:00
Martin Storsjö
bdbda13929 Use the correct types instead of void pointers in function signatures in rc.h 2014-12-22 23:54:06 +02:00
Ethan Hugg
63375de8d7 Merge pull request #1662 from zaheerm/makefileversion
Update version in Makefile.
2014-12-22 09:59:38 -08:00
Zaheer Abbas Merali
09f6eeb940 Update version in Makefile. 2014-12-22 13:05:08 +00:00
sijchen
692614b057 Merge pull request #1660 from ruil2/frame_rate
using function pointer to make different branch for different rc
2014-12-22 15:55:46 +08:00
sijchen
ca36fe5128 Merge pull request #1661 from sijchen/docx
update the version header file to 1.3
2014-12-22 14:15:45 +08:00
Sijia Chen
eb8e25a038 update the version header file for 1.3 2014-12-22 14:13:30 +08:00
ruil2
e3bf63db59 using function pointer to make different branch for different rc 2014-12-22 12:00:39 +08:00
lingzhu
83b502b3f6 Delete \ 2014-12-22 11:12:05 +08:00
zhuling13
1699775cbb support scaling list
astyle

change bugs

fix security issue

fix the issue pps sps order

change according to wayne's suggestion

change according to wayne's
2014-12-21 19:00:28 -08:00
sijchen
9a602cac1b Merge pull request #1657 from mstorsjo/clip-bitrate
Make sure the random test bitrate is high enough
2014-12-21 18:49:26 -08:00
sijchen
c1752e2818 Merge pull request #1657 from mstorsjo/clip-bitrate
Make sure the random test bitrate is high enough
2014-12-22 10:37:43 +08:00
ruil2
397c7caa56 Merge pull request #1656 from mstorsjo/avoid-warning-unused
Avoid a warning about an unused static variable
2014-12-22 09:04:45 +08:00
Martin Storsjö
887b4f47fc Make sure the random test bitrate is high enough
This is the same fix as in 47df41 (for the ForceIntraFrame
test) applied to the ForceIntraFrameWithTemporal test.
2014-12-20 00:35:13 +02:00
Martin Storsjö
7411469e1d Avoid a warning about an unused static variable 2014-12-19 11:06:51 +02:00
sijchen
ef5f1c46b9 Merge pull request #1655 from sijchen/docx
add release note for preparation of v1.3.0
2014-12-19 14:43:59 +08:00
Sijia Chen
7d8bb6f290 add release note for preparation of v1.3.0 2014-12-19 14:10:39 +08:00
dongzha
809adc4129 Merge pull request #1654 from syureyi/newest
maintain codec demo
2014-12-19 14:05:07 +08:00
zhuiling
f0934c7bf3 maintain codec demo 2014-12-19 13:53:29 +08:00
sijchen
c3de0f99c5 Merge pull request #1653 from ruil2/framerate
remove macro definition to the header file
2014-12-19 13:27:52 +08:00
ruil2
3ae2507c99 remove macro definition to the header file 2014-12-19 10:53:06 +08:00
HaiboZhu
afd82b2cfa Merge pull request #1652 from huili2/newseq_bugfix
use picture-level new seq begin detection for output functions
2014-12-19 09:55:26 +08:00
sijchen
0dc461541a Merge pull request #1651 from mstorsjo/improve-version-header
Improve version header
2014-12-19 09:32:48 +08:00
Martin Storsjö
8bfeae27a4 Add a public function for getting the codec version
If the codec library is loaded dynamically, it may be necessary that
the loaded library actually matches the version that was used when
it was built, to avoid issues due to ABI differences. Therefore add
a public function to allow getting the version of the currently
loaded library.
2014-12-18 13:20:33 +02:00
Martin Storsjö
4fb442a983 Captizalize OpenH264 correctly in the version header 2014-12-18 13:18:30 +02:00
ruil2
91574afca4 Merge pull request #1603 from sijchen/add_ver1
add generating script and the first version of codec_ver.h
2014-12-18 17:33:29 +08:00
huili2
b8ce2eb40e use picture-level new seq begin detection for output functions 2014-12-18 01:19:33 -08:00
Sijia Chen
e6134b5972 skip the git version hash in the header 2014-12-18 16:07:37 +08:00
sijchen
5b2469c0b5 Merge pull request #1642 from mstorsjo/avoid-rebuilds
Avoid rebuilds if the version header hasn't changed
2014-12-18 15:51:07 +08:00
sijchen
4db34bdf43 Merge pull request #1634 from ruil2/trace
use WELS_LOG_ERROR as default trace level in console app
2014-12-18 10:11:38 +08:00
sijchen
b208cac1c5 Merge pull request #1638 from ruil2/default_trace
modify WELS_LOG_WARNING as the default trace level
2014-12-18 10:11:19 +08:00
huili2
916d24d99e Merge pull request #1650 from huili2/bugfix_cabac_mbqpdelta
unify spsid for pic and add check for mb_qp_delta
2014-12-18 10:01:37 +08:00
HaiboZhu
7f27198c68 Merge pull request #1648 from huili2/bugfix_cabacinitidc
add check for cabac_init_idc range in parsing
2014-12-18 09:07:17 +08:00
huili2
208400eeb4 unify spsid for pic and add check for mb_qp_delta 2014-12-17 00:31:20 -08:00
ruil2
ab480fe387 Merge pull request #1649 from sijchen/fix_trace
[Encoder] fix a potential problem of trace
2014-12-17 16:05:32 +08:00
ruil2
58e868c074 Merge pull request #1643 from mstorsjo/check-num-refs
If lowering the maximum number of ref frames, check iNumRefFrames as well
2014-12-17 15:51:52 +08:00
sijchen
8dbdb418ca Merge pull request #1641 from mstorsjo/test-min-bitrate
Make sure the random test bitrate is high enough
2014-12-17 15:50:13 +08:00
Sijia Chen
1b26bd4b88 put this file into good format 2014-12-17 14:15:10 +08:00
Sijia Chen
3c08f04993 add fix for protection of wrong reading if input is invalid 2014-12-17 14:14:23 +08:00
huili2
030d320e43 Merge pull request #1646 from dongzha/cabacfix
cabac fix
2014-12-17 11:18:23 +08:00
huili2
182ae421a1 Merge pull request #1647 from HaiboZhu/Debug_Check_Ref_Picture_Complete
Change the name and call logic of CheckRefPicturesComplete function
2014-12-17 11:18:11 +08:00
huili2
9f0ed3fc4b add check for cabac_init_idc range in parsing 2014-12-16 18:13:21 -08:00
ruil2
ac992acaa9 Merge pull request #1640 from mstorsjo/fix-tests
Fix occasional failures in some tests
2014-12-17 09:29:36 +08:00
dong zhang
490a3e5562 cabac fix 2014-12-17 09:27:41 +08:00
Haibo Zhu
590eef6059 Change the name and call logic of CheckRefPicturesComplete function. 2014-12-16 17:26:13 -08:00
ruil2
affa753d5d Merge pull request #1645 from mstorsjo/type-signatures
Use the correct types instead of void pointers in function signatures
2014-12-17 09:21:11 +08:00
Martin Storsjö
f89780ddd8 Use the correct types instead of void pointers in function signatures
This gets rid of 50 lines of code with just casts of void pointers,
making the code shorter and clearer.
2014-12-16 22:13:38 +02:00
Ethan Hugg
6f876d79a6 Merge pull request #1644 from mstorsjo/fix-script-typos
Fix a number of typos in run_SafeDelete.sh
2014-12-16 09:26:23 -08:00
Martin Storsjö
ee5896e4a1 Fix a number of typos in run_SafeDelete.sh 2014-12-16 16:28:45 +02:00
Martin Storsjö
4746ce8fd4 If lowering the maximum number of ref frames, check iNumRefFrames as well
Make sure we don't set iMaxNumRefFrames lower than iNumRefFrames.

This fixes occasional test failures in
EncodeDecodeTestAPI.SetOptionEncParamExt.
2014-12-16 13:56:50 +02:00
Martin Storsjö
f90cd367d2 Avoid rebuilds if the version header hasn't changed
When generating the version header, don't overwrite it if the
new version is identical to the old one.
2014-12-16 12:23:50 +02:00
Martin Storsjö
47df411b1a Make sure the random test bitrate is high enough
The ForceIntraFrame test will fail (giving up after 100 skipped
frames) if the bitrate is not set high enough.

Set the minimum bitrate to w*h/50, which is a very low value,
but which still should allow getting a non-skipped frame within
a few attempts.
2014-12-16 11:56:48 +02:00
lyao2
9692f6cb20 Merge pull request #1639 from ruil2/qp_trace
fix error output info
2014-12-16 17:32:00 +08:00
Martin Storsjö
f4b3724976 Increase the minimum frame size in a test with multiple spatial layers
Make sure the input frame size is large enough that the downsampled
layers also have a nonzero resolution.
2014-12-16 11:13:22 +02:00
Martin Storsjö
59fefbe7c7 Use an inline function instead of a macro for clipping which contains rand()
When using a macro, the macro parameters get evaluated
multiple times, which means that the rand() value compared
actually isn't the same that is used as return value.

This makes sure that clipping works as intended for the
random tests.
2014-12-16 11:13:22 +02:00
Martin Storsjö
a9c2e1b431 Use the common WELS_CLIP3 macro instead of a custom reimplementation 2014-12-16 11:13:22 +02:00
dongzha
a4370b8ca8 Merge pull request #1637 from dongzha/SpeedUpSkipMode
astyle and speed up decoding by removing unnessary memset
2014-12-16 16:31:10 +08:00
ruil2
0612b07a6f fix error output info 2014-12-16 16:10:52 +08:00
lyao2
6a10553dce Merge pull request #1636 from ruil2/qp_trace
astyle two files
2014-12-16 16:04:50 +08:00
ruil2
f132745882 Merge pull request #1635 from mstorsjo/binary-comparison-ignore
Add a gitignore entry for another file created by the binary comparison scripts
2014-12-16 15:40:23 +08:00
dong zhang
89f78e9211 astyle and speed up decoding by removing unnessary memset 2014-12-16 15:30:09 +08:00
ruil2
fdb938a2c2 modify WELS_LOG_WARNING as the default trace level 2014-12-16 15:29:56 +08:00
ruil2
b932547fe8 astyle two files 2014-12-16 15:16:09 +08:00
Martin Storsjö
d387ebc358 Add a gitignore entry for another file created by the binary comparison scripts 2014-12-16 09:06:10 +02:00
ruil2
026ce4030a use WELS_LOG_ERROR as default trace level in console app 2014-12-16 13:14:53 +08:00
sijchen
2c69638773 Merge pull request #1633 from lyao2/avg_qp2
add average QP in statistics
2014-12-16 11:51:18 +08:00
ruil2
812b57c704 Merge pull request #1628 from mstorsjo/fix-tests
Fix binary comparison scripts and tables
2014-12-16 10:54:41 +08:00
ruil2
173ec608ff use the same complexity computation branch for screen and camera 2014-12-16 10:42:36 +08:00
lyao2
ca2436bb5e add average QP in statistics 2014-12-16 10:32:44 +08:00
ruil2
827c7b2aef Merge pull request #1629 from mstorsjo/msvc-casts
Cast a float to integer
2014-12-16 09:09:53 +08:00
ruil2
d87663b913 Merge pull request #1630 from zaheerm/fixcomments
Fix comments to be up to date with current API.
2014-12-16 09:09:44 +08:00
Martin Storsjö
c0633a147e Readd and update the accidentally cleared SHA1 test tables
These were accidentally cleared in 5ab5fe15, when the script
for updating them was broken.
2014-12-15 23:33:16 +02:00
Zaheer Abbas Merali
91736e85e8 Fix comments to be up to date with current API. 2014-12-15 11:37:32 -08:00
Martin Storsjö
54cc3daaa7 Cast a float to integer
This fixes warnings with MSVC.
2014-12-15 17:38:22 +02:00
Martin Storsjö
8a2237751a Fix a check in the binary comparison scripts 2014-12-15 17:28:10 +02:00
Martin Storsjö
3aac5e0fae Properly update hashes 2014-12-15 17:26:23 +02:00
huili2
8fb4048241 Merge pull request #1627 from HaiboZhu/Debug_potential_out_of_memory
Reset parameter set status and clear AU list when out of memory
2014-12-15 17:39:36 +08:00
Haibo Zhu
57043d16ad (1) Reset parameter set status and clear AU list when out of memory
(2) Free un-complete malloc memory, keep the original state, special when increase memory
2014-12-15 00:53:40 -08:00
huili2
d422ee59ad Merge pull request #1626 from dongzha/testcrash1
add protection
2014-12-15 15:39:46 +08:00
dongzha
ac061fe635 add protection 2014-12-15 14:47:55 +08:00
dongzha
091e5cba0a Merge pull request #1624 from huili2/au_data_check
change au_ready status and check au number
2014-12-15 13:46:27 +08:00
dongzha
eeee1a2e95 Merge pull request #1622 from dongzha/setunuse
add set unused in dpb
2014-12-15 13:35:36 +08:00
huili2
c20e1c6795 change au_ready status and check au number 2014-12-14 20:46:14 -08:00
sijchen
509727e225 Merge pull request #1623 from ruil2/level_5
keep the consistency between sps level and parameter level
2014-12-15 11:55:30 +08:00
ruil2
5ab5fe155b keep the consistency between sps level and parameter level 2014-12-15 09:56:54 +08:00
sijchen
7dcaaf5328 Merge pull request #1618 from huili2/modify_freeze_pos
modify freeze output to proper location
2014-12-12 17:50:02 +08:00
dong zhang
ad38cfe46c add set unused in dpb 2014-12-12 16:53:13 +08:00
sijchen
cc1f3ade3a Merge pull request #1617 from ruil2/bits_update
fix a typo
2014-12-12 16:25:48 +08:00
huili2
984497cc09 modify freeze output to proper location 2014-12-11 23:42:04 -08:00
ruil2
06c251fa48 fix a typo 2014-12-12 14:29:45 +08:00
sijchen
93265d7a44 Merge pull request #1616 from dongzha/testcrash
fix two continus IDR, with same sps/pps id, but different resolution
2014-12-12 10:43:32 +08:00
dongzha
1bdf00ddf4 fix two continus IDR, with same sps/pps id, but different resolution 2014-12-12 09:38:44 +08:00
ruil2
41339f3023 Merge pull request #1615 from lyao2/ut_idr3
refine the UT case for checking IDR request
2014-12-12 09:13:29 +08:00
sijchen
0ff1eb482f Merge pull request #1612 from huili2/log_add_this_codec
add this log for codec
2014-12-11 17:01:38 +08:00
ruil2
ec99819ce8 Merge pull request #1614 from sijchen/fix_idr_id1
[Encoder] fix idr_id: idr_id should be adding regardless of the sps strategy
2014-12-11 16:41:59 +08:00
ruil2
3be8ae7a4e Merge pull request #1613 from sijchen/fix_ut2
[UT] encoder log level adjustment
2014-12-11 16:29:34 +08:00
lyao2
2e85e3c7d9 refine the UT case for checking IDR request 2014-12-11 14:32:26 +08:00
Sijia Chen
f1a7a1a966 encoder log level adjustment in UT to avoid too many output and some formatting 2014-12-11 14:31:32 +08:00
huili2
3e57fdc448 add this log for codec 2014-12-10 22:15:32 -08:00
sijchen
5ff55a6ec2 Merge pull request #1608 from ruil2/bits_update
update maxbitrate to control bitrate vary range
2014-12-11 13:46:07 +08:00
dongzha
44e4531897 Merge pull request #1609 from dongzha/NewFixEcRatioCalc
New fix ec ratio calc
2014-12-11 13:08:01 +08:00
dongzha
44bd61683a Merge pull request #1606 from huili2/log_for_memory_realloc
add log for ref pic buffer memory alloc
2014-12-11 13:07:43 +08:00
dong zhang
d20a3bdb28 fix typo bug 2014-12-11 12:28:32 +08:00
Sijia Chen
32d6193f97 fix idr_id: idr_id should be adding regardless of the sps strategy 2014-12-11 10:58:27 +08:00
ruil2
5ba9e409ba update maxbitrate to control bitrate vary range 2014-12-11 10:56:58 +08:00
dong zhang
2c468b96a9 add flag to count EC Mbs due to ref error
add UT
2014-12-11 10:49:55 +08:00
dong zhang
ecc8ae6ebb fix decodestatus uiEcRatio calc bug 2014-12-11 10:39:44 +08:00
sijchen
065c3a7769 Merge pull request #1607 from mstorsjo/encoder-init-log
Log the encoder version later in the initialization
2014-12-11 10:28:24 +08:00
Martin Storsjö
7da17b5abd Log the encoder version later in the initialization
Previously, the encoder logging was done in InitEncoder(),
which is called from the constructor. Therefore, it was impossible
to override the log level, to silence this message.
2014-12-10 14:39:08 +02:00
dongzha
af97f2d4bb Merge pull request #1605 from sijchen/fix_ut1
fix a UT function
2014-12-10 11:18:08 +08:00
sijchen
4e88de1755 Merge pull request #1600 from shihuade/UpdateSHA1
update SHA1 table which have been broken by previous update
2014-12-10 11:09:11 +08:00
Sijia Chen
87c83c0d36 fix a UT function 2014-12-10 10:49:58 +08:00
dongzha
44017193ed Merge pull request #1601 from dongzha/FixDecodeStatusFps
add a decoder status: float fActualAverageFrameSpeedInMs
2014-12-10 10:40:08 +08:00
Sijia Chen
b65410ebdb add generating script and the first version of codec_ver.h 2014-12-10 10:10:23 +08:00
dong zhang
354eee3e2b add a decoder status: float fActualAverageFrameSpeedInMs; ///< actual average_Decoding_Time, includeing freezed picture 2014-12-10 10:00:34 +08:00
huili2
155a91406c Merge pull request #1599 from HaiboZhu/Debug_Add_subSPS_check
Add subSPS pre-active check in CheckActiveSPS
2014-12-09 17:11:06 +08:00
Haibo Zhu
e47a3638af Add subSPS pre-active check in CheckActiveSPS 2014-12-09 00:06:19 -08:00
huade
944a041066 1 update SHA1 table which have been broken by previous update; 2 enhance script to support more case(multi layer etc.) 2014-12-09 15:59:07 +08:00
huili2
14eeaf2278 add log for ref pic buffer memory alloc 2014-12-08 22:35:07 -08:00
sijchen
e041bc6938 Merge pull request #1597 from mstorsjo/msvc-casts
Add casts when converting from int64_t or double to int32_t
2014-12-09 10:03:03 +08:00
Martin Storsjö
901a599b36 Add casts when converting from int64_t or double to int32_t
This fixes warnings when building with MSVC.
2014-12-08 11:48:31 +02:00
sijchen
cc5978b252 Merge pull request #1594 from lyao2/RC_maxBr_commit5
Rate control refine to fit MAX bitrate requirement
2014-12-08 11:03:43 +08:00
sijchen
c2d585761a Merge pull request #1595 from ruil2/update_2
should not set WELS_LOG_ERROR level in encoder initilization.
2014-12-08 11:01:19 +08:00
ruil2
317ac1ca85 change info level as default level 2014-12-05 17:36:03 +08:00
ruil2
56c895ffb4 1. should not set WELS_LOG_ERROR level in encoder initilization.
2.fix UT bug
2014-12-05 17:08:00 +08:00
lyao2
c01606c28a Rate control refine to fit MAX bitrate requirement 2014-12-05 12:09:08 +08:00
ruil2
ea93f3943e Merge pull request #1593 from ethanhugg/gmpapiversion
Switch to use stable branch of gmp-api
2014-12-05 09:40:05 +08:00
Ethan Hugg
a8159c89d1 Switch to use stable branch of gmp-api 2014-12-04 10:24:36 -08:00
HaiboZhu
befd5bdd56 Merge pull request #1592 from dongzha/FixGreyPic
fix grey picture when resolution is the same
2014-12-04 18:11:07 +08:00
dongzha
fc895c13ce fix grey picture when resolution is the same 2014-12-04 17:22:27 +08:00
HaiboZhu
054b8eeb3a Merge pull request #1588 from huili2/dec_stat_accumulate
accumulate dec stat
2014-12-04 15:37:10 +08:00
HaiboZhu
60b6ce1454 Merge pull request #1589 from huili2/fix_fmo_sliceskip
fix crash issue of sliceskip and inf-loop in fmo
2014-12-04 15:36:51 +08:00
huili2
928a7eac2a fix crash issue of sliceskip and inf-loop in fmo 2014-12-03 20:26:00 -08:00
sijchen
a5cabf0be4 Merge pull request #1582 from mstorsjo/lib-install-fixes
Fix/clean up building and installing shared libraries
2014-12-02 11:48:22 -08:00
ruil2
91ae2dab7a Merge pull request #1587 from mstorsjo/msvc-warnings
Don't implicitly convert int to bool
2014-12-02 15:54:35 +08:00
ruil2
dd24edc8ff Merge pull request #1585 from dongzha/issue1535New
fix issue #1535 new
2014-12-02 15:54:26 +08:00
Martin Storsjö
5d4eb63d52 Don't implicitly convert int to bool
This avoids warnings with MSVC.
2014-12-02 09:35:05 +02:00
ruil2
f4af5d2fda Merge pull request #1586 from ganyangbbl/fix_character
fix chinese character
2014-12-02 15:10:55 +08:00
ganyangbbl
6981aec743 fix chinese character 2014-12-02 14:30:31 +08:00
huili2
8b9be2b3dc accumulate dec stat 2014-12-01 19:01:06 -08:00
dong zhang
f668e1be98 fix issue 1535 2014-12-02 09:35:39 +08:00
sijchen
607d814e0f Merge pull request #1577 from ruil2/set_param
modify log info(remove unuseful log and add some new logs)
2014-12-01 11:36:24 -08:00
Martin Storsjö
3d263d1087 Set a default SHAREDLIB_DIR in the main Makefile
Only override it in the ones where the default isn't desired.
2014-12-01 15:44:27 +02:00
Martin Storsjö
9b59e50292 Simplify creating output directories for the install-shared rule 2014-12-01 15:44:27 +02:00
Martin Storsjö
a48b632aed Actually install the shared library into $(SHAREDLIB_DIR) as intended 2014-12-01 15:44:27 +02:00
Martin Storsjö
e132658346 Set SHAREDLIB_DIR for msvc as well 2014-12-01 15:44:27 +02:00
Martin Storsjö
59c30f8952 Handle generating the versionless library via make rules
This makes sure both "make libopenh264.so" and "make libopenh264.so.0"
work as intended.

Use the versionless name as dependency for the install rule,
to make sure both (if possible) are created.
2014-12-01 15:43:35 +02:00
Martin Storsjö
575b6fb570 Check the suffix instead of checking whether a file is a link
This feels more straightforward - some file systems/environments
(such as MSys) implement symlinks as plain file copies, where
distinguishing whether a file is a link might be hard.
2014-12-01 15:40:25 +02:00
Martin Storsjö
2c9b5b98c0 Actually install the versioned shared library file as well 2014-12-01 15:40:25 +02:00
Martin Storsjö
8e419e41d3 Simplify setting the shlib flags for msvc 2014-12-01 15:40:25 +02:00
Martin Storsjö
80beaed5c6 Fix the dependencies of the install-shared target
Previously calling "make install" failed unless the target
actually already was built, for platforms where the shared
libraries are versioned.
2014-12-01 15:40:25 +02:00
Martin Storsjö
8f7e10ab12 Honor the silent build flag when adding the shared library symlink 2014-12-01 15:40:25 +02:00
Martin Storsjö
a7d8142a44 Set the right SHAREDLIBSUFFIXVER for msvc 2014-12-01 15:40:25 +02:00
Martin Storsjö
397e20b0f3 Install the import library via the EXTRA_LIB mechanism on mingw as well
Prior to 3f69873c99, there already was a mechanism for installing
the import library, used for the MSVC builds. Use that for mingw
as well, instead of adding more hardcoded rules.
2014-12-01 15:40:25 +02:00
zhilwang
852ed8a2d0 Merge pull request #1578 from ruil2/rc
use existed assembly function in cabac encoder
2014-12-01 17:12:52 +08:00
ruil2
2e15351d6d Merge pull request #1567 from dongzha/FixMvCpBug
avoid using the same picture buff for prev pic and curr pic
2014-12-01 14:53:17 +08:00
ruil2
b1dccaa627 use existed assembly function in cabac encoder 2014-12-01 14:45:04 +08:00
sijchen
8c7aaa8421 Merge pull request #1568 from ruil2/cleanup
add iBitsVaryPercentage parameters to control bitrate
2014-11-30 21:39:39 -08:00
ruil2
9a08b7f97c Merge pull request #1574 from huili2/dec_stat_add_freeze
add dec status for freezing
2014-12-01 12:43:22 +08:00
ruil2
a100fb8031 modify log info(remove unuseful log and add some new logs) 2014-12-01 12:13:58 +08:00
sijchen
8e39cb3a3a Merge pull request #1575 from ruil2/set_param
add SetOption(ENCODER_OPTION_SVC_ENCODE_PARAM_BASE,&base) for encoder
2014-11-30 19:39:18 -08:00
dongzha
d58f90947c avoid using the same picture buff for prev pic and curr pic 2014-12-01 10:52:37 +08:00
ruil2
8028fe7130 add SetOption(ENCODER_OPTION_SVC_ENCODE_PARAM_BASE,&base) for encoder 2014-12-01 10:35:32 +08:00
ruil2
c592d18dfd Merge pull request #1573 from sijchen/after_review1
[Encoder] remove a too-tight checking of bit rate
2014-12-01 10:31:47 +08:00
ruil2
30820fd8b5 use iBitsVaryPercentage passed by the app instead of the macro 2014-12-01 09:16:35 +08:00
Sijia Chen
7cea82bdf8 remove a too-tight checking of bit rate 2014-11-28 16:15:49 -08:00
sijchen
e7debe7351 Merge pull request #1571 from mstorsjo/silence-intentional-errors
Silence logging in a test which intentionally can trigger errors
2014-11-28 10:28:05 -08:00
sijchen
59e782a8a5 Merge pull request #1572 from mstorsjo/loopfilter-opts
Fixes relating to the loopfilter parameter
2014-11-28 10:27:14 -08:00
Ethan Hugg
1526de3ae5 Merge pull request #1566 from nirbheek/master
Makefile: Fix shared library building on various OSes
2014-11-28 08:49:25 -08:00
Martin Storsjö
0bae0f869a Validate that iLoopFilterDisableIdc is set to a sensible value in ParamValidationExt
In WelsEncoderParamAdjust it is already clipped in the
same way, but here we should probably rather error out
than to silently clip it to the right range.
2014-11-28 13:08:52 +02:00
Martin Storsjö
24cd934ba9 Log what uiDisableDeblockingFilterIdc was set to when printing an error message 2014-11-28 13:06:12 +02:00
Martin Storsjö
90eee67eb7 Don't set invalid iLoopFilterDisableIdc in RandomParamExtCombination 2014-11-28 13:05:32 +02:00
Martin Storsjö
b9dc310857 Silence logging in a test which intentionally can trigger errors 2014-11-28 11:04:03 +02:00
huili2
504cabf106 add dec status for freezing 2014-11-28 00:05:36 -08:00
ruil2
7c0369da23 add iBitsVaryPercentage parameters to control bitrate 2014-11-27 15:55:48 +08:00
Nirbheek Chauhan
3f69873c99 Makefile: Fix shared library building on various OSes
Versioned for OS not in (Windows, Android), and create a .dll.a implib on Windows
2014-11-27 02:04:06 +05:30
477 changed files with 50867 additions and 34586 deletions

6
.gitignore vendored
View File

@ -1,6 +1,7 @@
# Object files
*.o
*.obj
*.res
# Dependency files
*.d
@ -29,6 +30,7 @@ codec_unittest
# Other files generated by the MSVC compiler
*.exp
*.pdb
*.map
# Executables built by the MSVC project files
bin
@ -45,6 +47,10 @@ testbin/test_vd_rc.yuv
testbin/test.264
testbin/test.yuv
# iOS output files
codec/build/iOS/common/build/
codec/build/iOS/dec/welsdec/build/
# pkg-config file
*.pc

View File

@ -1,4 +1,5 @@
language: cpp
dist: trusty
compiler:
- g++
@ -6,7 +7,7 @@ compiler:
before_install:
- sudo apt-get update -qq
- sudo apt-get install -qq nasm g++-4.6-multilib gcc-multilib libc6-dev-i386
- sudo apt-get install -qq nasm g++-multilib gcc-multilib libc6-dev-i386
install:
- make gmp-bootstrap
@ -21,15 +22,12 @@ before_script:
env:
- TASK=UnitTest; TestParameter=""
- TASK=BinaryCompare; TestParameter=BA_MW_D.264
- TASK=BinaryCompare; TestParameter=LS_SVA_D.264
- TASK=BinaryCompare; TestParameter=CVPCMNL1_SVA_C.264
matrix:
exclude:
- compiler: clang
env: TASK=BinaryCompare; TestParameter=BA_MW_D.264
- compiler: clang
env: TASK=BinaryCompare; TestParameter=LS_SVA_D.264
- compiler: clang
env: TASK=BinaryCompare; TestParameter=CVPCMNL1_SVA_C.264
script:

View File

@ -1,4 +1,4 @@
# Contributors to the OpenH264 project
# Contributors to the OpenH264 project
Patrick Ai
Sijia Chen
@ -30,10 +30,12 @@ Adam Roach
Sawyer Shan
Siping Tao
Martin Storsjö
Brion Vibber
James Wang
Juanny Wang
Zhiliang Wang
Hervé Willems
Gregory J Wolfe
Katherine Wu
Guang Xu
Jeffery Xu

251
Makefile
View File

@ -4,8 +4,10 @@ vpath %.cc $(SRC_PATH)
vpath %.cpp $(SRC_PATH)
vpath %.asm $(SRC_PATH)
vpath %.S $(SRC_PATH)
vpath %.rc $(SRC_PATH)
vpath %.pc.in $(SRC_PATH)
OS=$(shell uname | tr A-Z a-z | tr -d \\-[:digit:].)
OS=$(shell uname | tr A-Z a-z | tr -d \\-[:digit:]. | sed -E 's/^(net|open|free)bsd/bsd/')
ARCH=$(shell uname -m)
LIBPREFIX=lib
LIBSUFFIX=a
@ -22,11 +24,17 @@ V=Yes
PREFIX=/usr/local
SHARED=-shared
OBJ=o
DESTDIR=
LIBDIR_NAME=lib
SHAREDLIB_DIR=$(PREFIX)/lib
PROJECT_NAME=openh264
MODULE_NAME=gmpopenh264
GMP_API_BRANCH=master
GMP_API_BRANCH=Firefox39
CCASFLAGS=$(CFLAGS)
VERSION=1.2
STATIC_LDFLAGS=-lstdc++
VERSION=1.6
SHAREDLIBVERSION=3
ifeq (,$(wildcard $(SRC_PATH)gmp-api))
HAVE_GMP_API=No
@ -43,9 +51,16 @@ endif
# Configurations
ifeq ($(BUILDTYPE), Release)
CFLAGS += $(CFLAGS_OPT)
CFLAGS += -DNDEBUG
USE_ASM = Yes
ifeq ($(DEBUGSYMBOLS), True)
CFLAGS += -g
CXXFLAGS += -g
DEBUGSYMBOLS_TAG := _debug_symbols
PROCESS_FILES := True
endif
else
CFLAGS = $(CFLAGS_DEBUG)
CFLAGS += $(CFLAGS_DEBUG)
USE_ASM = No
endif
@ -54,10 +69,19 @@ CFLAGS += -fsanitize=address
LDFLAGS += -fsanitize=address
endif
STRIP_FLAGS := -S
ifeq (linux, $((OS)))
STRIP_FLAGS := -g
endif
# Make sure the all target is the first one
all: libraries binaries
include $(SRC_PATH)build/platform-$(OS).mk
MODULE := $(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIX)
CFLAGS +=
CFLAGS += -DGENERATED_VERSION_HEADER
LDFLAGS +=
ifeq (Yes, $(GCOV))
@ -67,16 +91,17 @@ endif
#### No user-serviceable parts below this line
ifneq ($(V),Yes)
QUIET_CXX = @printf "CXX\t$@\n";
QUIET_CC = @printf "CC\t$@\n";
QUIET_CXX = @printf "CXX\t$@\n";
QUIET_CC = @printf "CC\t$@\n";
QUIET_CCAS = @printf "CCAS\t$@\n";
QUIET_ASM = @printf "ASM\t$@\n";
QUIET_AR = @printf "AR\t$@\n";
QUIET = @
QUIET_ASM = @printf "ASM\t$@\n";
QUIET_AR = @printf "AR\t$@\n";
QUIET_RC = @printf "RC\t$@\n";
QUIET = @
endif
INCLUDES += -I$(SRC_PATH)codec/api/svc -I$(SRC_PATH)codec/common/inc
INCLUDES += -I$(SRC_PATH)codec/api/svc -I$(SRC_PATH)codec/common/inc -Icodec/common/inc
DECODER_INCLUDES += \
-I$(SRC_PATH)codec/decoder/core/inc \
@ -96,12 +121,13 @@ PROCESSING_INCLUDES += \
-I$(SRC_PATH)codec/processing/src/vaacalc
GTEST_INCLUDES += \
-I$(SRC_PATH)gtest \
-I$(SRC_PATH)gtest/include
-I$(SRC_PATH)gtest/googletest \
-I$(SRC_PATH)gtest/googletest/include
CODEC_UNITTEST_INCLUDES += \
-I$(SRC_PATH)gtest/include \
-I$(SRC_PATH)gtest/googletest/include \
-I$(SRC_PATH)codec/common/inc \
-I$(SRC_PATH)test
CONSOLE_COMMON_INCLUDES += \
-I$(SRC_PATH)codec/console/common/inc
@ -116,19 +142,23 @@ H264ENC_DEPS = $(LIBPREFIX)encoder.$(LIBSUFFIX) $(LIBPREFIX)processing.$(LIBSUFF
CODEC_UNITTEST_LDFLAGS = $(LINK_LOCAL_DIR) $(call LINK_LIB,gtest) $(call LINK_LIB,decoder) $(call LINK_LIB,encoder) $(call LINK_LIB,processing) $(call LINK_LIB,common) $(CODEC_UNITTEST_LDFLAGS_SUFFIX)
CODEC_UNITTEST_DEPS = $(LIBPREFIX)gtest.$(LIBSUFFIX) $(LIBPREFIX)decoder.$(LIBSUFFIX) $(LIBPREFIX)encoder.$(LIBSUFFIX) $(LIBPREFIX)processing.$(LIBSUFFIX) $(LIBPREFIX)common.$(LIBSUFFIX)
DECODER_UNITTEST_INCLUDES += $(CODEC_UNITTEST_INCLUDES) $(DECODER_INCLUDES) -I$(SRC_PATH)test -I$(SRC_PATH)test/decoder
ENCODER_UNITTEST_INCLUDES += $(CODEC_UNITTEST_INCLUDES) $(ENCODER_INCLUDES) -I$(SRC_PATH)test -I$(SRC_PATH)test/encoder
PROCESSING_UNITTEST_INCLUDES += $(CODEC_UNITTEST_INCLUDES) $(PROCESSING_INCLUDES) -I$(SRC_PATH)test -I$(SRC_PATH)test/processing
API_TEST_INCLUDES += $(CODEC_UNITTEST_INCLUDES) -I$(SRC_PATH)test -I$(SRC_PATH)test/api
COMMON_UNITTEST_INCLUDES += $(CODEC_UNITTEST_INCLUDES) $(DECODER_INCLUDES) -I$(SRC_PATH)test -I$(SRC_PATH)test/common
DECODER_UNITTEST_INCLUDES += $(CODEC_UNITTEST_INCLUDES) $(DECODER_INCLUDES)
ENCODER_UNITTEST_INCLUDES += $(CODEC_UNITTEST_INCLUDES) $(ENCODER_INCLUDES)
PROCESSING_UNITTEST_INCLUDES += $(CODEC_UNITTEST_INCLUDES) $(PROCESSING_INCLUDES)
API_TEST_INCLUDES += $(CODEC_UNITTEST_INCLUDES)
COMMON_UNITTEST_INCLUDES += $(CODEC_UNITTEST_INCLUDES)
MODULE_INCLUDES += -I$(SRC_PATH)gmp-api
.PHONY: test gtest-bootstrap clean $(PROJECT_NAME).pc
DECODER_UNITTEST_CFLAGS += $(CODEC_UNITTEST_CFLAGS)
ENCODER_UNITTEST_CFLAGS += $(CODEC_UNITTEST_CFLAGS)
PROCESSING_UNITTEST_CFLAGS += $(CODEC_UNITTEST_CFLAGS)
API_TEST_CFLAGS += $(CODEC_UNITTEST_CFLAGS)
COMMON_UNITTEST_CFLAGS += $(CODEC_UNITTEST_CFLAGS)
all: libraries binaries
.PHONY: test gtest-bootstrap clean $(PROJECT_NAME).pc $(PROJECT_NAME)-static.pc
generate-version:
$(QUIET)cd $(SRC_PATH) && sh ./codec/common/generate_version.sh
$(QUIET)sh $(SRC_PATH)codec/common/generate_version.sh $(SRC_PATH)
codec/decoder/plus/src/welsDecoderExt.$(OBJ): | generate-version
codec/encoder/plus/src/welsEncoderExt.$(OBJ): | generate-version
@ -137,27 +167,33 @@ clean:
ifeq (android,$(OS))
clean: clean_Android
endif
$(QUIET)rm -f $(OBJS) $(OBJS:.$(OBJ)=.d) $(OBJS:.$(OBJ)=.obj) $(LIBRARIES) $(BINARIES) *.lib *.a *.dylib *.dll *.so
$(QUIET)rm -f $(OBJS) $(OBJS:.$(OBJ)=.d) $(OBJS:.$(OBJ)=.obj) $(LIBRARIES) $(BINARIES) *.lib *.a *.dylib *.dll *.so *.exe *.pdb *.exp *.pc *.res *.map
gmp-bootstrap:
if [ ! -d gmp-api ] ; then git clone https://github.com/mozilla/gmp-api gmp-api ; fi
cd gmp-api && git fetch origin && git checkout $(GMP_API_BRANCH)
gtest-bootstrap:
svn co https://googletest.googlecode.com/svn/trunk/ gtest
git clone https://github.com/google/googletest.git gtest
ifeq ($(HAVE_GTEST),Yes)
test: codec_unittest$(EXEEXT)
ifneq (android,$(OS))
ifneq (ios,$(OS))
./codec_unittest
ifneq (msvc-wp,$(OS))
BUILD_UT_EXE=Yes
endif
endif
endif
test: codec_unittest$(EXEEXT)
ifeq ($(BUILD_UT_EXE), Yes)
./codec_unittest
endif
else
test:
@echo "./gtest : No such file or directory."
@echo "./gtest: No such file or directory."
@echo "You do not have gtest. Run make gtest-bootstrap to get gtest"
endif
@ -172,65 +208,112 @@ endif
ifneq (android, $(OS))
ifneq (ios, $(OS))
ifneq (msvc-wp, $(OS))
include $(SRC_PATH)codec/console/dec/targets.mk
include $(SRC_PATH)codec/console/enc/targets.mk
include $(SRC_PATH)codec/console/common/targets.mk
endif
endif
ifneq (ios, $(OS))
libraries: $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX)
else
libraries: $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX)
endif
LIBRARIES += $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX)
libraries: $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX)
# No point in building dylib for ios
ifneq (ios, $(OS))
libraries: $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX)
endif
LIBRARIES += $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER)
$(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX): $(ENCODER_OBJS) $(DECODER_OBJS) $(PROCESSING_OBJS) $(COMMON_OBJS)
$(QUIET)rm -f $@
$(QUIET_AR)$(AR) $(AR_OPTS) $+
ifeq (True, $(PROCESS_FILES))
cp $@ $(LIBPREFIX)$(PROJECT_NAME)$(DEBUGSYMBOLS_TAG).$(LIBSUFFIX)
strip $(STRIP_FLAGS) $@ -o $@
endif
$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX): $(ENCODER_OBJS) $(DECODER_OBJS) $(PROCESSING_OBJS) $(COMMON_OBJS)
$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER): $(ENCODER_OBJS) $(DECODER_OBJS) $(PROCESSING_OBJS) $(COMMON_OBJS)
$(QUIET)rm -f $@
$(QUIET_CXX)$(CXX) $(SHARED) $(CXX_LINK_O) $+ $(LDFLAGS) $(SHLDFLAGS)
ifeq (True, $(PROCESS_FILES))
cp $@ $(LIBPREFIX)$(PROJECT_NAME)$(DEBUGSYMBOLS_TAG).$(SHAREDLIBSUFFIXVER)
strip $(STRIP_FLAGS) $@ -o $@
endif
ifneq ($(SHAREDLIBSUFFIXVER),$(SHAREDLIBSUFFIX))
$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX): $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER)
$(QUIET)ln -sfn $+ $@
ifeq (True, $(PROCESS_FILES))
$(QUIET)ln -sfn $(LIBPREFIX)$(PROJECT_NAME)$(DEBUGSYMBOLS_TAG).$(SHAREDLIBSUFFIXVER) $(LIBPREFIX)$(PROJECT_NAME)$(DEBUGSYMBOLS_TAG).$(SHAREDLIBSUFFIX)
endif
endif
ifeq ($(HAVE_GMP_API),Yes)
plugin: $(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIX)
LIBRARIES += $(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIX)
plugin: $(MODULE)
LIBRARIES += $(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIXVER)
else
plugin:
@echo "./gmp-api : No such file or directory."
@echo "./gmp-api: No such file or directory."
@echo "You do not have gmp-api. Run make gmp-bootstrap to get the gmp-api headers."
endif
$(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIX): $(MODULE_OBJS) $(ENCODER_OBJS) $(DECODER_OBJS) $(PROCESSING_OBJS) $(COMMON_OBJS)
echo-plugin-name:
@echo $(MODULE)
$(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIXVER): $(MODULE_OBJS) $(ENCODER_OBJS) $(DECODER_OBJS) $(PROCESSING_OBJS) $(COMMON_OBJS)
$(QUIET)rm -f $@
$(QUIET_CXX)$(CXX) $(SHARED) $(CXX_LINK_O) $+ $(LDFLAGS) $(SHLDFLAGS) $(MODULE_LDFLAGS)
$(PROJECT_NAME).pc: $(PROJECT_NAME).pc.in
@sed -e 's;@prefix@;$(PREFIX);' -e 's;@VERSION@;$(VERSION);' < $(PROJECT_NAME).pc.in > $(PROJECT_NAME).pc
install-headers:
mkdir -p $(PREFIX)/include/wels
install -m 644 codec/api/svc/codec*.h $(PREFIX)/include/wels
install-static: $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) install-headers
mkdir -p $(PREFIX)/lib
install -m 644 $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) $(PREFIX)/lib
install-shared: $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX) install-headers $(PROJECT_NAME).pc
mkdir -p $(PREFIX)/lib
install -m 755 $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX) $(PREFIX)/lib
mkdir -p $(PREFIX)/lib/pkgconfig
install -m 444 $(PROJECT_NAME).pc $(PREFIX)/lib/pkgconfig
ifneq ($(EXTRA_LIBRARY),)
install -m 644 $(EXTRA_LIBRARY) $(PREFIX)/lib
ifeq (True, $(PROCESS_FILES))
cp $@ $(LIBPREFIX)$(MODULE_NAME)$(DEBUGSYMBOLS_TAG).$(SHAREDLIBSUFFIXVER)
strip $(STRIP_FLAGS) $@ -o $@
endif
install: install-static install-shared
ifneq ($(SHAREDLIBSUFFIXVER),$(SHAREDLIBSUFFIX))
$(MODULE): $(LIBPREFIX)$(MODULE_NAME).$(SHAREDLIBSUFFIXVER)
$(QUIET)ln -sfn $+ $@
ifeq (True, $(PROCESS_FILES))
$(QUIET)ln -sfn $(LIBPREFIX)$(MODULE_NAME)$(DEBUGSYMBOLS_TAG).$(SHAREDLIBSUFFIXVER) $(LIBPREFIX)$(MODULE_NAME)$(DEBUGSYMBOLS_TAG).$(SHAREDLIBSUFFIX)
endif
endif
$(PROJECT_NAME).pc: $(PROJECT_NAME).pc.in
@sed -e 's;@prefix@;$(PREFIX);' -e 's;@VERSION@;$(VERSION);' -e 's;@LIBS@;;' -e 's;@LIBS_PRIVATE@;$(STATIC_LDFLAGS);' < $< > $@
$(PROJECT_NAME)-static.pc: $(PROJECT_NAME).pc.in
@sed -e 's;@prefix@;$(PREFIX);' -e 's;@VERSION@;$(VERSION);' -e 's;@LIBS@;$(STATIC_LDFLAGS);' -e 's;@LIBS_PRIVATE@;;' < $< > $@
install-headers:
mkdir -p $(DESTDIR)$(PREFIX)/include/wels
install -m 644 $(SRC_PATH)/codec/api/svc/codec*.h $(DESTDIR)$(PREFIX)/include/wels
install-static-lib: $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) install-headers
mkdir -p $(DESTDIR)$(PREFIX)/$(LIBDIR_NAME)
install -m 644 $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX) $(DESTDIR)$(PREFIX)/$(LIBDIR_NAME)
install-static: install-static-lib $(PROJECT_NAME)-static.pc
mkdir -p $(DESTDIR)$(PREFIX)/$(LIBDIR_NAME)/pkgconfig
install -m 644 $(PROJECT_NAME)-static.pc $(DESTDIR)$(PREFIX)/$(LIBDIR_NAME)/pkgconfig/$(PROJECT_NAME).pc
install-shared: $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX) install-headers $(PROJECT_NAME).pc
mkdir -p $(DESTDIR)$(SHAREDLIB_DIR)
install -m 755 $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER) $(DESTDIR)$(SHAREDLIB_DIR)
if [ "$(SHAREDLIBSUFFIXVER)" != "$(SHAREDLIBSUFFIX)" ]; then \
cp -a $(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIX) $(DESTDIR)$(SHAREDLIB_DIR); \
fi
mkdir -p $(DESTDIR)$(PREFIX)/$(LIBDIR_NAME)/pkgconfig
install -m 644 $(PROJECT_NAME).pc $(DESTDIR)$(PREFIX)/$(LIBDIR_NAME)/pkgconfig
ifneq ($(EXTRA_LIBRARY),)
install -m 644 $(EXTRA_LIBRARY) $(DESTDIR)$(PREFIX)/$(LIBDIR_NAME)
endif
install: install-static-lib install-shared
@:
ifeq ($(HAVE_GTEST),Yes)
ifneq ($(HAVE_GTEST),Yes)
binaries:
@:
else
include $(SRC_PATH)build/gtest-targets.mk
include $(SRC_PATH)test/api/targets.mk
include $(SRC_PATH)test/decoder/targets.mk
@ -245,44 +328,42 @@ $(LIBPREFIX)ut.$(LIBSUFFIX): $(DECODER_UNITTEST_OBJS) $(ENCODER_UNITTEST_OBJS) $
LIBRARIES +=$(LIBPREFIX)ut.$(SHAREDLIBSUFFIX)
$(LIBPREFIX)ut.$(SHAREDLIBSUFFIX): $(DECODER_UNITTEST_OBJS) $(ENCODER_UNITTEST_OBJS) $(PROCESSING_UNITTEST_OBJS) $(API_TEST_OBJS) $(COMMON_UNITTEST_OBJS) $(CODEC_UNITTEST_DEPS)
$(LIBPREFIX)ut.$(SHAREDLIBSUFFIX): $(DECODER_UNITTEST_OBJS) $(ENCODER_UNITTEST_OBJS) $(PROCESSING_UNITTEST_OBJS) $(API_TEST_OBJS) $(COMMON_UNITTEST_OBJS) $(CODEC_UNITTEST_DEPS)
$(QUIET)rm -f $@
$(QUIET_CXX)$(CXX) $(SHARED) $(CXX_LINK_O) $+ $(LDFLAGS) $(CODEC_UNITTEST_LDFLAGS)
$(QUIET_CXX)$(CXX) $(SHARED) $(CXX_LINK_O) $+ $(LDFLAGS) $(UTSHLDFLAGS) $(CODEC_UNITTEST_LDFLAGS)
binaries: codec_unittest$(EXEEXT)
BINARIES += codec_unittest$(EXEEXT)
ifeq (ios,$(OS))
codec_unittest$(EXEEXT): $(LIBPREFIX)ut.$(LIBSUFFIX) $(LIBPREFIX)gtest.$(LIBSUFFIX) $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX)
else
ifeq (android,$(OS))
ifeq (./,$(SRC_PATH))
codec_unittest$(EXEEXT): $(LIBPREFIX)ut.$(SHAREDLIBSUFFIX)
cd ./test/build/android && $(NDKROOT)/ndk-build -B APP_ABI=$(APP_ABI) && android update project -t $(TARGET) -p . && ant debug
clean_Android: clean_Android_ut
clean_Android_ut:
-cd ./test/build/android && $(NDKROOT)/ndk-build APP_ABI=$(APP_ABI) clean && ant clean
else
codec_unittest$(EXEEXT):
@:
endif
else
ifeq ($(BUILD_UT_EXE), Yes)
# Build a normal command line executable
codec_unittest$(EXEEXT): $(DECODER_UNITTEST_OBJS) $(ENCODER_UNITTEST_OBJS) $(PROCESSING_UNITTEST_OBJS) $(API_TEST_OBJS) $(COMMON_UNITTEST_OBJS) $(CODEC_UNITTEST_DEPS) | res
$(QUIET)rm -f $@
$(QUIET_CXX)$(CXX) $(CXX_LINK_O) $+ $(CODEC_UNITTEST_LDFLAGS) $(LDFLAGS)
res:
$(QUIET)if [ ! -e res ]; then ln -s $(SRC_PATH)res .; fi
endif
endif
else
binaries:
@:
# Build the unit test suite into a library that is included in a project file
ifeq (ios,$(OS))
codec_unittest$(EXEEXT): $(LIBPREFIX)ut.$(LIBSUFFIX) $(LIBPREFIX)gtest.$(LIBSUFFIX) $(LIBPREFIX)$(PROJECT_NAME).$(LIBSUFFIX)
else
codec_unittest$(EXEEXT): $(LIBPREFIX)ut.$(SHAREDLIBSUFFIX)
endif
ifeq (android,$(OS))
ifeq (./,$(SRC_PATH))
codec_unittest$(EXEEXT):
cd ./test/build/android && $(NDKROOT)/ndk-build -B APP_ABI=$(APP_ABI) && android update project -t $(TARGET) -p . && ant debug
clean_Android: clean_Android_ut
clean_Android_ut:
-cd ./test/build/android && $(NDKROOT)/ndk-build APP_ABI=$(APP_ABI) clean && ant clean
endif
endif
endif
endif
-include $(OBJS:.$(OBJ)=.d)

Binary file not shown.

View File

@ -4,12 +4,13 @@ OpenH264 is a codec library which supports H.264 encoding and decoding. It is su
Encoder Features
----------------
- Constrained Baseline Profile up to Level 5.2 (4096x2304)
- Constrained Baseline Profile up to Level 5.2 (Max frame size is 36864 macro-blocks)
- Arbitrary resolution, not constrained to multiples of 16x16
- Rate control with adaptive quantization, or constant quantization
- Slice options: 1 slice per frame, N slices per frame, N macroblocks per slice, or N bytes per slice
- Multiple threads automatically used for multiple slices
- Temporal scalability up to 4 layers in a dyadic hierarchy
- Simulcast AVC up to 4 resolutions from a single input
- Spatial simulcast up to 4 resolutions from a single input
- Long Term Reference (LTR) frames
- Memory Management Control Operation (MMCO)
@ -23,7 +24,7 @@ Encoder Features
Decoder Features
----------------
- Constrained Baseline Profile up to Level 5.2 (4096x2304)
- Constrained Baseline Profile up to Level 5.2 (Max frame size is 36864 macro-blocks)
- Arbitrary resolution, not constrained to multiples of 16x16
- Single thread for all slices
- Long Term Reference (LTR) frames
@ -38,55 +39,57 @@ OS Support
- Windows 64-bit and 32-bit
- Mac OS X 64-bit and 32-bit
- Linux 64-bit and 32-bit
- Android 32-bit
- Android 64-bit and 32-bit
- iOS 64-bit and 32-bit
- Windows Phone 32-bit
Processor Support
-----------------
- Intel x86 optionally with MMX/SSE (no AVX yet, help is welcome)
- ARMv7 optionally with NEON
- ARMv7 optionally with NEON, AArch64 optionally with NEON
- Any architecture using C/C++ fallback functions
Building the Library
--------------------
NASM needed to be installed for assembly code: workable version 2.07 or above, nasm can downloaded from http://www.nasm.us/
NASM needed to be installed for assembly code: workable version 2.10.06 or above, nasm can downloaded from http://www.nasm.us/
For Mac OSX 64-bit NASM needed to be below version 2.11.08 as nasm 2.11.08 will introduce error when using RIP-relative addresses in Mac OSX 64-bit
To build the arm assembly for Windows Phone, gas-preprocessor is required. It can be downloaded from git://git.libav.org/gas-preprocessor.git
For Android Builds
------------------
To build for android platform, You need to install android sdk and ndk. You also need to export **ANDROID_SDK**/tools to PATH. On Linux, this can be done by
To build for android platform, You need to install android sdk and ndk. You also need to export `**ANDROID_SDK**/tools` to PATH. On Linux, this can be done by
'export PATH=**ANDROID_SDK**/tools:$PATH'
export PATH=**ANDROID_SDK**/tools:$PATH
The codec and demo can be built by
'make OS=android NDKROOT=**ANDROID_NDK** TARGET= **ANDROID_TARGET**'
make OS=android NDKROOT=**ANDROID_NDK** TARGET=**ANDROID_TARGET**
Valid **ANDROID_TARGET** can be found in **ANDROID_SDK**/platforms, such as android-12.
You can also set ARCH, NDKLEVEL according to your device and NDK version.
ARCH specifies the architecture of android device. Currently only arm and x86 are supported, the default is arm.
NDKLEVEL specifies android api level, the api level can be 12-19, the default is 12.
Valid `**ANDROID_TARGET**` can be found in `**ANDROID_SDK**/platforms`, such as `android-12`.
You can also set `ARCH`, `NDKLEVEL` according to your device and NDK version.
`ARCH` specifies the architecture of android device. Currently `arm`, `arm64`, `x86` and `x86_64` are supported, the default is `arm`. (`mips` and `mips64` can also be used, but there's no specific optimization for those architectures.)
`NDKLEVEL` specifies android api level, the default is 12. Available possibilities can be found in `**ANDROID_NDK**/platforms`, such as `android-21` (strip away the `android-` prefix).
By default these commands build for the armeabi-v7a ABI. To build for the other android
ABIs, add "ARCH=arm64", "ARCH=x86", "ARCH=x86_64", "ARCH=mips" or "ARCH=mips64".
To build for the older armeabi ABI (which has armv5te as baseline), add "APP_ABI=armeabi" (ARCH=arm is implicit).
By default these commands build for the `armeabi-v7a` ABI. To build for the other android
ABIs, add `ARCH=arm64`, `ARCH=x86`, `ARCH=x86_64`, `ARCH=mips` or `ARCH=mips64`.
To build for the older `armeabi` ABI (which has armv5te as baseline), add `APP_ABI=armeabi` (`ARCH=arm` is implicit).
To build for 64-bit ABI, such as `arm64`, explicitly set `NDKLEVEL` to 21 or higher.
For iOS Builds
--------------
You can build the libraries and demo applications using xcode project files
located in codec/build/iOS/dec and codec/build/iOS/enc.
located in `codec/build/iOS/dec` and `codec/build/iOS/enc`.
You can also build the libraries (but not the demo applications) using the
make based build system from the command line. Build with
'make OS=ios ARCH=**ARCH**'
make OS=ios ARCH=**ARCH**
Valid values for **ARCH** are the normal iOS architecture names such as
armv7, armv7s, arm64, and i386 and x86_64 for the simulator. Additionally,
one might need to add 'SDK=X.Y' to the make command line in case the default
SDK version isn't available. Another settable iOS specific parameter
is SDK_MIN, specifying the minimum deployment target for the built library.
Valid values for `**ARCH**` are the normal iOS architecture names such as
`armv7`, `armv7s`, `arm64`, and `i386` and `x86_64` for the simulator.
Another settable iOS specific parameter
is `SDK_MIN`, specifying the minimum deployment target for the built library.
For other details on building using make on the command line, see
'For All Platforms' below.
@ -95,40 +98,54 @@ For Windows Builds
Our Windows builds use MinGW which can be found here - http://www.mingw.org/
To build with gcc, add the MinGW bin directory (e.g. /c/MinGW/bin) to your path and follow the 'For All Platforms' instructions below.
To build with gcc, add the MinGW bin directory (e.g. `/c/MinGW/bin`) to your path and follow the 'For All Platforms' instructions below.
To build with Visual Studio you will need to set up your path to run cl.exe. The easiest way is to start MSYS from a developer command line session - http://msdn.microsoft.com/en-us/library/ms229859(v=vs.110).aspx If you need to do it by hand here is an example from a Windows 64bit install of VS2012:
export PATH="$PATH:/c/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin:/c/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE"
export PATH="$PATH:/c/Program Files (x86)/Microsoft Visual Studio 11.0/VC/bin:/c/Program Files (x86)/Microsoft Visual Studio 11.0/Common7/IDE"
You will also need to set your INCLUDE and LIB paths to point to your VS and SDK installs. Something like this, again from Win64 with VS2012 (note the use of Windows-style paths here).
export INCLUDE="C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include;C:\Program Files (x86)\Windows Kits\8.0\Include\um;C:\Program Files (x86)\Windows Kits\8.0\Include\shared"
export LIB="C:\Program Files (x86)\Windows Kits\8.0\Lib\Win8\um\x86;C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib"
export INCLUDE="C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\include;C:\Program Files (x86)\Windows Kits\8.0\Include\um;C:\Program Files (x86)\Windows Kits\8.0\Include\shared"
export LIB="C:\Program Files (x86)\Windows Kits\8.0\Lib\Win8\um\x86;C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC\lib"
Then add 'OS=msvc' to the make line of the 'For All Platforms' instructions.
Then add `OS=msvc` to the make line of the 'For All Platforms' instructions.
For Windows Phone builds
------------------------
Follow the instructions above for normal Windows builds, but use `OS=msvc-wp`
instead of `OS=msvc`. You will also need gas-preprocessor (as mentioned below
"Building the Library").
If building for Windows Phone with MSVC 2013, there's no included bat file that sets the lib paths to the Windows Phone kit, but that can be done with a command like this:
export LIB="c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\store\arm;c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\arm;c:\Program Files (x86)\Windows Phone Kits\8.1\lib\arm"
This is only necessary for building the DLL; the static library can be built without setting this.
For All Platforms
-------------------
From the main project directory:
'make' for automatically detecting 32/64bit and building accordingly
'make ENABLE64BIT=No' for 32bit builds
'make ENABLE64BIT=Yes' for 64bit builds
'make V=No' for a silent build (not showing the actual compiler commands)
- `make` for automatically detecting architecture and building accordingly
- `make ARCH=i386` for x86 32bit builds
- `make ARCH=x86_64` for x86 64bit builds
- `make V=No` for a silent build (not showing the actual compiler commands)
- `make DEBUGSYMBOLS=True` for two libraries, one is normal libraries, another one is removed the debugging symbol table entries (those created by the -g option )
The command line programs h264enc and h264dec will appear in the main project directory.
The command line programs `h264enc` and `h264dec` will appear in the main project directory.
A shell script to run the command-line apps is in testbin/CmdLineExample.sh
A shell script to run the command-line apps is in `testbin/CmdLineExample.sh`
Usage information can be found in testbin/CmdLineReadMe
Usage information can be found in `testbin/CmdLineReadMe`
Using the Source
----------------
codec - encoder, decoder, console (test app), build (makefile, vcproj)
build - scripts for Makefile build system.
test - GTest unittest files.
testbin - autobuild scripts, test app config files
res - yuv and bitstream test files
- `codec` - encoder, decoder, console (test app), build (makefile, vcproj)
- `build` - scripts for Makefile build system.
- `test` - GTest unittest files.
- `testbin` - autobuild scripts, test app config files
- `res` - yuv and bitstream test files
Known Issues
------------
@ -141,4 +158,4 @@ See the issue tracker on https://github.com/cisco/openh264/issues
License
-------
BSD, see LICENSE file for details.
BSD, see `LICENSE` file for details.

150
RELEASES
View File

@ -1,5 +1,103 @@
Releases
-----------
v1.6.0
------
- Adjusted the encoder API structures
- Removed the unused data format in decoder API
- Encoder support of simulcast AVC
- Added support of video signal type present information
- Added support of encoder load-balancing
- Improved encoder multi-threads, rate control and down-sampling
- Fixed the frame size constraint in encoder
- Bug fixes for rate control, multi-threading, simulcasting in encoder
- Bug fixes for interface call, return value check, memory leak in decoder
- Bug fixes for UT and statistic information
- Bug fixes for assembly code
- Remove the unused and redundant code
- Improvements on UT, memory allocation failed protection, error-protection in decoder, input parameters checking in encoder, assembly for AVX2 support, assembly code performance, logging and documentation
- Correct some typos in source code and documents
v1.5.3
------
- Bug fixes for GMP Plugin
v1.5.2
------
- Fix GMP Plugin causing the Browser crash on Android
v1.5.1
------
- Bug fixes for GMP Plugin
v1.5.0
------
- Correct a typo in codec return value (github issue#2046, cmUnkonwReason -> cmUnknownReason)
- Added Codec demo and auto build script for WP8
- Decoder support of 'Constrained High Profile' of H.264
- Encoder support of CABAC of H.264
- Encoder support of input frame rate 60
- Improved syntax of gaps_in_frame_num_value_allowed_flag in encoder
- Improved memory usage for multi-threading in encoder
- Added VUI info for base layer in encoder
- Added encoder interface to get external setting of iMaxQp and iMinQp for rate control
- Bug fixes for Rate Control, multi-threading and simulcasting in encoder
- Bug fixes for NoDelay API, ParseOnly functions, error-concealment off functiond and error-detection in decoder
- Bug fixes for UT
- Fixes to avoid valgrind warnings, potential crash and calculation overflow
- Merged files for decoder/encoder and remove unused files
- Improvements on build scripts, UT, error-protection in decoder, input param checking in encoder, assembly for 64bit support, downsampling, logging and documentation
Note:
'Constrained High Profile' = 'Constrained Baseline Profile' plus:
- CABAC
- Intra 8x8 mode support
- 8x8 transform
- QP scaling matrices
- QP per chroma component
- Mono 4:0:0 (experimental)
- Weighted prediction
v1.4.0
------
- Decoder new interface of DecodeFrameNoDelay
- Added new encoder and decoder statistics
- Added option for generating pdb in windows builds
- Added new rate control mode (RC_TIMESTAMP_MODE) for inconstant frame rate input
- Added new Sps/Pps strategies for real-time video
— Added support for simulcast avc
- Improvements in code structure, assembly, input parameter checking, logging, UT and comments
- In gmp-openh264, return decoder error correctly and other fixes
- Decoder bug fixes when for Error Concealment disabled
- Bug fixes for ParseOnly functions
- Bug fixes for encoding large frame size (>32767MBs)
- Fixes to avoid valgrind warnings, potential crash and calculation overflow
-----------
v1.3.1
------
- Fixed and enhanced protection to avoid crash when reading lossy bitstreams
- Adjust the default mode of Error Concealment used by gmp-openh264
-----------
v1.3.0
------
- Removed manual API document, now using wiki: https://github.com/cisco/openh264/wiki (0af48e5 for v1.3.0)
- Added API version in API header files
- Added pkg-config file
- Added decoder support of parsing only (bParseOnly) for only parsing bit stream but not decoding
- Added timestamp and max nal size in gmp-openh264.cpp when calling encoding
- Added timestamp info in decoder input and return structure
- Added support of level 9 in decoder
- Added total length of the encoded frame in encoder return structure
- Added SetOption(ENCODER_OPTION_SVC_ENCODE_PARAM_BASE,&base) for encoder
- Set constraint set 0 and 1 flags for non-scalable
- Improved error concealment algorithms and provide more modes of error-concealment
- Improved rate control algorithms and reference selection algorithms for screen content encoding
- Added encoder and decoder statistics interface
- Improved input parameter checking and logging
- Bug fixes, warning reductions, and test improvements
-----------
v1.2.0
------
@ -26,6 +124,58 @@ Binaries
These binary releases are distributed under this license:
http://www.openh264.org/BINARY_LICENSE.txt
v1.6.0
------
http://ciscobinary.openh264.org/libopenh264-1.6.0-android19.so.bz2
http://ciscobinary.openh264.org/libopenh264-1.6.0-ios.a.bz2
http://ciscobinary.openh264.org/libopenh264-1.6.0-linux32.3.so.bz2
http://ciscobinary.openh264.org/libopenh264-1.6.0-linux64.3.so.bz2
http://ciscobinary.openh264.org/libopenh264-1.6.0-osx32.3.dylib.bz2
http://ciscobinary.openh264.org/libopenh264-1.6.0-osx64.3.dylib.bz2
http://ciscobinary.openh264.org/openh264-1.6.0-win32msvc.dll.bz2
http://ciscobinary.openh264.org/openh264-1.6.0-win64msvc.dll.bz2
v1.5.0
------
http://ciscobinary.openh264.org/libopenh264-1.5.0-android19.so.bz2
http://ciscobinary.openh264.org/libopenh264-1.5.0-ios.a.bz2
http://ciscobinary.openh264.org/libopenh264-1.5.0-linux32.so.bz2
http://ciscobinary.openh264.org/libopenh264-1.5.0-linux64.so.bz2
http://ciscobinary.openh264.org/libopenh264-1.5.0-osx32.dylib.bz2
http://ciscobinary.openh264.org/libopenh264-1.5.0-osx64.dylib.bz2
http://ciscobinary.openh264.org/openh264-1.5.0-win32msvc.dll.bz2
http://ciscobinary.openh264.org/openh264-1.5.0-win64msvc.dll.bz2
v1.4.0
------
http://ciscobinary.openh264.org/libopenh264-1.4.0-android19.so.bz2
http://ciscobinary.openh264.org/libopenh264-1.4.0-linux32.so.bz2
http://ciscobinary.openh264.org/libopenh264-1.4.0-linux64.so.bz2
http://ciscobinary.openh264.org/libopenh264-1.4.0-osx32.dylib.bz2
http://ciscobinary.openh264.org/libopenh264-1.4.0-osx64.dylib.bz2
http://ciscobinary.openh264.org/openh264-1.4.0-win32msvc.dll.bz2
http://ciscobinary.openh264.org/openh264-1.4.0-win64msvc.dll.bz2
v1.3.1
------
http://ciscobinary.openh264.org/libopenh264-1.3.1-android19.so.bz2
http://ciscobinary.openh264.org/libopenh264-1.3.1-linux32.so.bz2
http://ciscobinary.openh264.org/libopenh264-1.3.1-linux64.so.bz2
http://ciscobinary.openh264.org/libopenh264-1.3.1-osx32.dylib.bz2
http://ciscobinary.openh264.org/libopenh264-1.3.1-osx64.dylib.bz2
http://ciscobinary.openh264.org/openh264-1.3.1-win32msvc.dll.bz2
http://ciscobinary.openh264.org/openh264-1.3.1-win64msvc.dll.bz2
v1.3.0
------
http://ciscobinary.openh264.org/libopenh264-1.3.0-android19.so.bz2
http://ciscobinary.openh264.org/libopenh264-1.3.0-linux32.so.bz2
http://ciscobinary.openh264.org/libopenh264-1.3.0-linux64.so.bz2
http://ciscobinary.openh264.org/libopenh264-1.3.0-osx32.dylib.bz2
http://ciscobinary.openh264.org/libopenh264-1.3.0-osx64.dylib.bz2
http://ciscobinary.openh264.org/openh264-1.3.0-win32msvc.dll.bz2
http://ciscobinary.openh264.org/openh264-1.3.0-win64msvc.dll.bz2
v1.2.0
------
http://ciscobinary.openh264.org/libopenh264-1.2.0-android19.so.bz2

View File

@ -0,0 +1,431 @@
#!/bin/bash
#*******************************************************************
# brief: multi-encoders comparision for openh264
# (one given sequence only)
# comparision almong encoders in \$TestEncoderList
#
# more detail, please refer to runUsage() and runBrief()
#
# date: 2015-12-16
#*******************************************************************
runUsage()
{
echo -e "\033[32m ********************************************************************* \033[0m"
echo " Usage: "
echo " --$0 \$TestPicW \$TestPicH \$TestEncoderList"
echo ""
echo " --example:"
echo " $0 1280 720 h264enc_master h264enc_target1 h264enc_target2 "
echo ""
echo " Pre-test:"
echo " --1) copy welsenc.cfg from ./openh264/testbin/ to current dir"
echo " --2) set test YUV path in welsenc.cfg "
echo " --3) copy layer0.cfg from ./openh264/testbin/layer2.cfg to current dir"
echo " --4) copy layer1.cfg from ./openh264/testbin/layer2.cfg to current dir"
echo " --5) copy layer2.cfg from ./openh264/testbin/layer2.cfg to current dir"
echo " --6) copy layer3.cfg from ./openh264/testbin/layer2.cfg to current dir"
echo " layer0.cfg~layer3.cfg are used for multi-layers test cases"
echo ""
echo " --7) generate at least one encoder, "
echo " eg. h264enc_master----master branch as benchmark codec"
echo " h264enc_target----your branch CodecChanged as target codec"
echo ""
echo " --8) copy all tests codec to folder ./Encoder"
echo " --9) run below command line:"
echo " $0 \$TestPicW \$TestPicH \$TestEncoderList"
echo ""
echo " Post-test:"
echo " --1) temp cases log will be output in ./Trace-AllTestData"
echo " --2) all comparision data parsed from log files will be output to "
echo " related .csv file under ./Trace-AllTestData "
echo ""
echo " example:"
echo " --comparison almong h264enc_master h264enc_target1 h264enc_target2"
echo " for Zhuling_1280x720.yuv"
echo ""
echo " --run command as below:"
echo " $0 1280 720 h264enc_master h264enc_target1 h264enc_target2 "
echo ""
echo " --get final result files(.csv) under ./Trace-AllTestData"
echo ""
echo -e "\033[32m ********************************************************************* \033[0m"
}
runBrief()
{
echo -e "\033[32m ********************************************************************* \033[0m"
echo " brief:"
echo ""
echo " encoder veision comparision "
echo " --comparision almong encoders in \$TestEncoderList"
echo " --please generate at least one encoder and copy to folder ./Encoder"
echo " --script will run all test cases for each test encoder"
echo " and generate related trace log files for each encoder"
echo " --script will parse and extact data based on keyword from trace log file"
echo " and output to related .csv files for all encoder"
echo " --the test outout file will be put under ./Trace-AllTestData"
echo ""
echo " test cases:"
echo " --add more cases in function runGlobleInit()"
echo " --add new argument with for loop like rc. etc in function "
echo " runAllEncodeCasesAndGenerateLog()"
echo ""
echo " new data:"
echo " --currently only memory usage, you can add new data for your comparision"
echo " --need to add related data parse in function runParseTraceLog()"
echo ""
echo -e "\033[32m ********************************************************************* \033[0m"
}
runPrompt()
{
echo -e "\033[32m ********************************************************************* \033[0m"
echo ""
echo " ------Test completed!--------"
echo ""
echo -e "\033[32m ********************************************************************* \033[0m"
echo " "
echo " --Total ${iTotalCaseNum} cases run for encoders: ${aEncoderList[@]}"
echo ""
echo " --Statistic files for comparision are list as below:"
echo " ${MemoryUsageStatic}"
echo ""
echo " --trace log files can be found under:"
echo " ${LogDir}"
echo ""
echo -e "\033[32m ********************************************************************* \033[0m"
}
runGlobleInit()
{
CurrenDir=`pwd`
LogDir="${CurrenDir}/Trace-AllTestData"
EncoderDir="${CurrenDir}/Encoder"
if [ ! -d ${LogDir} ]
then
mkdir ${LogDir}
fi
LogFile="Log_EncTraceInfo.log"
MemoryUsageStatic="${LogDir}/MemoryUsage.csv"
TempEncoderList=""
for((i=0; i<${#aEncoderList[@]}; i++))
do
if [ -z "${TempEncoderList}" ]
then
TempEncoderList="${aEncoderList[$i]},"
else
TempEncoderList="${TempEncoderList} ${aEncoderList[$i]},"
fi
done
let "iTotalCaseNum=0"
let "MemoryUsage = 0"
echo "LogDir is ${LogDir}"
echo "MemoryUsageStatic file is ${MemoryUsageStatic}"
echo "SpatialLayerNum, ThreadNum, SliceMode, SliceNum, SlicMbNum, ${TempEncoderList}" >${MemoryUsageStatic}
echo "LogDir is ${LogDir}"
echo "MemoryUsageStatic file is ${MemoryUsageStatic}"
let "iTraceLevel=4"
let "iFrameToBeEncoded = 32"
let "iMaxNalSize=0"
#you can add more test case like rc, gop size, et.
#and add "for loop" in function runAllEncodeCasesAndGenerateLog()
aSpatialLayerNum=(1 2 3 4 )
aThreadIdc=(1 4)
aSliceMode=(0 1 2 3)
aSliceNum=(0 8 16 32)
aSliceMbNum=(0 960)
Encoder=""
sEncoderCommand=""
}
runCheck()
{
if [ ! -d ${EncoderDir} ]
then
echo "encoder folder does not exist, please following below command to copy encoder to test folder--./Encoder"
echo " mkdir Encoder"
echo " cp \${AllVersionEncoders} ./Encoder "
exit 1
fi
let "bEncoderFlag = 0"
echo "aEncoderList is ${aEncoderList[@]} "
for file in ${aEncoderList[@]}
do
if [ -x ${EncoderDir}/${file} ]
then
let "bEncoderFlag = 1"
fi
done
if [ ${bEncoderFlag} -eq 0 ]
then
echo "no encoder under test folder, please following below command to copy encoder to test folder--./Encoder"
echo " cp \${AllVersionEncoders} ./Encoder "
echo " chmod u+x ./Encoder/* "
exit 1
fi
}
runGenerateSpatialLayerResolution()
{
SpatialLayerNum=$1
if [ -z "${SpatialLayerNum}" ]
then
let "SpatialLayerNum =1"
fi
let "PicW_L0= PicW / 8"
let "PicW_L1= PicW / 4"
let "PicW_L2= PicW / 2"
let "PicW_L3= PicW"
let "PicH_L0= PicH / 8"
let "PicH_L1= PicH / 4"
let "PicH_L2= PicH / 2"
let "PicH_L3= PicH"
if [ ${SpatialLayerNum} -eq 1 ]
then
aPicW=( ${PicW_L3} 0 0 0 )
aPicH=( ${PicH_L3} 0 0 0 )
elif [ ${SpatialLayerNum} -eq 2 ]
then
aPicW=( ${PicW_L2} ${PicW_L3} 0 0 )
aPicH=( ${PicH_L2} ${PicH_L3} 0 0 )
elif [ ${SpatialLayerNum} -eq 3 ]
then
aPicW=( ${PicW_L1} ${PicW_L2} ${PicW_L3} 0 )
aPicH=( ${PicH_L1} ${PicH_L2} ${PicH_L3} 0 )
elif [ ${SpatialLayerNum} -eq 4 ]
then
aPicW=( ${PicW_L0} ${PicW_L1} ${PicW_L2} ${PicW_L3} )
aPicH=( ${PicH_L0} ${PicH_L1} ${PicH_L2} ${PicH_L3} )
fi
echo "*************************************************************************"
echo " ${SpatialLayerNum} layers spactial resolution for ${PicW}x${PicH} are:"
echo ""
echo " aPicW is ${aPicW[@]}"
echo " aPicH is ${aPicH[@]}"
echo "*************************************************************************"
}
#parse data from encoder trace log
#you can add more key word to extract data from log file
runParseTraceLog()
{
TempLogFile=$1
let "MemoryUsage = 0"
echo "*****************************************"
echo "parsing trace log file"
echo "log file name is ${TempLogFile}"
echo "*****************************************"
if [ ! -e ${TempLogFile} ]
then
echo "LogFile ${TempLogFile} does not exist, please double check!"
return 1
fi
MemUsageInLog=""
while read line
do
if [[ "${line}" =~ "overall memory usage" ]]
then
#[OpenH264] this = 0x0x7fa4d2c04c30, Info:WelsInitEncoderExt() exit, overall memory usage: 40907254 bytes
MemUsageInLog=(`echo $line | awk 'BEGIN {FS="usage:"} {print $2}' `)
fi
# you can add more key word to extract data from log file
# e.g.: bit rate, fps, encoder time, psnr etc.
# add script block like:
# ****************************************************
# if [[ "${line}" =~ "KeyWordYouWantToSearch" ]]
# then
# $line in log file which contain data you want
# DataYouWant=(`echo $line | awk 'BEGIN {FS="keywordYourSearch"} {print $2}' `)
# fi
# ****************************************************
done < ${TempLogFile}
let "MemoryUsage = ${MemUsageInLog}"
echo "MemoryUsage is ${MemoryUsage}"
}
runEncodeOneCase()
{
#encoding process
echo "------------------------------------------------------"
echo "${Encoder} welsenc.cfg ${sEncoderCommand}" >${LogFile}
${Encoder} welsenc.cfg ${sEncoderCommand} 2>>${LogFile}
${Encoder} welsenc.cfg ${sEncoderCommand} >>${LogFile}
echo "------------------------------------------------------"
}
runAllEncodeCasesAndGenerateLog()
{
echo "aSpatialLayerNum is ${aSpatialLayerNum[@]}"
echo "aThreadIdc is ${aThreadIdc[@]}"
echo "aSliceMode is ${aSliceMode[@]}"
echo "aSliceNum is ${aSliceNum[@]}"
echo "aSliceMbNum is ${aSliceMbNum[@]}"
sEncoderCommand1="-lconfig 0 layer0.cfg -lconfig 1 layer1.cfg -lconfig 2 layer2.cfg -lconfig 3 layer3.cfg"
TempMemoryUsage=""
OtherDataYouWant=""
TempTestCase=""
let "CaseNum=1"
for iSLayerNum in ${aSpatialLayerNum[@]}
do
for iThreadNum in ${aThreadIdc[@]}
do
for iSliceMode in ${aSliceMode[@]}
do
for iSliceNum in ${aSliceNum[@]}
do
#raster slice mb mode, slice-mb-num =0, switch to row-mb-mode
if [ ${iSliceMode} -eq 2 ]
then
aSliceMbNum=(0 960)
else
aSliceMbNum=(960)
fi
for iSlicMbNum in ${aSliceMbNum[@]}
do
TempMemoryUsage=""
#for cases output to statistic file
TempTestCase="${iSLayerNum}, ${iThreadNum}, ${iSliceMode}, ${iSliceNum}, ${iSlicMbNum}"
for eEncoder in ${aEncoderList[@]}
do
Encoder=${EncoderDir}/${eEncoder}
if [ -x ${Encoder} ]
then
if [ ${iSliceMode} -eq 3 ]
then
iMaxNalSize=1000
else
iMaxNalSize=0
fi
runGenerateSpatialLayerResolution ${iSLayerNum}
sEncoderCommand2="-slcmd 0 ${iSliceMode} -slcmd 1 ${iSliceMode} -slcmd 2 ${iSliceMode} -slcmd 3 ${iSliceMode}"
sEncoderCommand3="-slcnum 0 ${iSliceNum} -slcnum 1 ${iSliceNum} -slcnum 2 ${iSliceNum} -slcnum 3 ${iSliceNum}"
sEncoderCommand4="-slcmbnum 0 ${iSlicMbNum} -slcmbnum 1 ${iSlicMbNum} -slcmbnum 2 ${iSlicMbNum} -slcmbnum 3 ${iSlicMbNum} "
sEncoderCommand5="-trace ${iTraceLevel} -numl ${iSLayerNum} -thread ${iThreadNum} -nalsize ${iMaxNalSize}"
sEncoderCommand6="-dw 0 ${aPicW[0]} -dw 1 ${aPicW[1]} -dw 2 ${aPicW[2]} -dw 3 ${aPicW[3]}"
sEncoderCommand7="-dh 0 ${aPicH[0]} -dh 1 ${aPicH[1]} -dh 2 ${aPicH[2]} -dh 3 ${aPicH[3]}"
sEncoderCommand="-frms ${iFrameToBeEncoded} ${sEncoderCommand1} ${sEncoderCommand2} ${sEncoderCommand3} ${sEncoderCommand4} ${sEncoderCommand5} ${sEncoderCommand6} ${sEncoderCommand7}"
LogFile="${LogDir}/${CaseNum}_LogInfo_iSLNum_${iSLayerNum}_ThrNum_${iThreadNum}_SlcM_${iSliceMode}_SlcN_${iSliceNum}_${eEncoder}.log"
echo "Encode command is: "
echo "${Encoder} welsenc.cfg ${sEncoderCommand}"
echo ""
echo "log file is ${LogFile}"
#encode one case
runEncodeOneCase
#parse trace log
runParseTraceLog ${LogFile}
#data extracted from log
#you can add new data here like rc, fps , etc.
echo "memory usage is ${MemoryUsage}"
if [ -z ${TempMemoryUsage} ]
then
TempMemoryUsage="${MemoryUsage},"
else
TempMemoryUsage="${TempMemoryUsage} ${MemoryUsage},"
fi
echo "TempMemoryUsage is ${TempMemoryUsage}"
fi
done
#output memory usage for all encoders
echo "${TempTestCase}, ${TempMemoryUsage}, ${OtherDataYouWant}" >>${MemoryUsageStatic}
let " CaseNum ++"
let "iTotalCaseNum ++"
done
done
done
done
done
}
runMain()
{
runGlobleInit
runCheck
runAllEncodeCasesAndGenerateLog
runPrompt
}
#*************************************************************
if [ $# -lt 3 ]
then
runUsage
runBrief
exit 1
fi
declare -a aEncoderList
declare -a aParamList
aParamList=( $@ )
ParamNum=$#
PicW=${aParamList[0]}
PicH=${aParamList[1]}
for((i=2;i<$#;i++))
do
echo "encoder is ${aParamList[$i]}"
aEncoderList="${aEncoderList} ${aParamList[$i]}"
done
aEncoderList=(${aEncoderList})
echo -e "\033[32m ********************************* \033[0m"
echo ""
echo " --num parameters is ${ParamNum} "
echo " --input parameters are:"
echo " $0 $@"
echo ""
echo -e "\033[32m ********************************* \033[0m"
runMain
#*************************************************************

View File

@ -4,30 +4,30 @@
runGetPerformanceInfo_openh264()
{
if [ ! $# -eq 2 ]
then
echo "not enough parameters!"
echo "usage: ${0} [android/ios] ${PerformanceLogFile}"
return 1
fi
if [ ! $# -eq 2 ]
then
echo "not enough parameters!"
echo "usage: ${0} [android/ios] ${PerformanceLogFile}"
return 1
fi
local PerformanceLogFile=$2
local PerformanceLogFile=$2
local FileName=""
local Width=""
local Height=""
local Frames=""
local FPS=""
local EncodeTime=""
local Width=""
local Height=""
local Frames=""
local FPS=""
local EncodeTime=""
if [ $1 = "android" ]
then seperatorNum=3
else
seperatorNum=2
fi
while read line
do
if [[ $line =~ "enc yuv file" ]]
then
while read line
do
if [[ $line =~ "enc yuv file" ]]
then
FileName=`echo $line | awk 'BEGIN {FS="enc yuv file"} {print $2}'`
FileName=`echo $FileName | awk 'BEGIN {FS=":"} {print $2}'`
fi
@ -51,9 +51,9 @@ runGetPerformanceInfo_openh264()
fi
if [[ $line =~ "encode time" ]]
then
EncodeTime=`echo $line | awk 'BEGIN {FS=":"} {print $'${seperatorNum}'}'`
fi
then
EncodeTime=`echo $line | awk 'BEGIN {FS=":"} {print $'${seperatorNum}'}'`
fi
if [[ $line =~ "height" ]]
then
Height=`echo $line | awk 'BEGIN {FS=":"} {print $'${seperatorNum}'}'`
@ -70,7 +70,7 @@ runGetPerformanceInfo_openh264()
fi
fi
done <${PerformanceLogFile}
done <${PerformanceLogFile}
}

View File

@ -19,7 +19,7 @@ ANDROID_SDK_PATH=${ANDROID_HOME}
ANDROID_NDK_PATH=${ANDROID_NDK_HOME}
if [ "#${ANDROID_SDK_PATH}" = "#" ]
then
echo Please set ANDROID_HOME with the path of Android SDK
echo Please set ANDROID_HOME with the path of Android SDK
exit 1
fi
if [ "#${ANDROID_NDK_PATH}" = "#" ]

View File

@ -0,0 +1,439 @@
@echo off
rem *************************************************************************************************
rem usage:
rem AutoBuildForWPAndWindows.bat % Configuration %
rem --For debug version:
rem Win32-C-Only: AutoBuildForWPAndWindows.bat Win32-Debug-C
rem Win32-ASM: AutoBuildForWPAndWindows.bat Win32-Debug-ASM
rem Win64-C-Only: AutoBuildForWPAndWindows.bat Win64-Debug-C
rem Win64-ASM: AutoBuildForWPAndWindows.bat Win64-Debug-ASM
rem ARM-C-Only(WP8): AutoBuildForWPAndWindows.bat ARM-Debug-C
rem ARM-ASM(WP8): AutoBuildForWPAndWindows.bat ARM-Debug-ASM
rem --For release version:
rem Win32-C-Only: AutoBuildForWPAndWindows.bat Win32-Release-C
rem Win32-ASM: AutoBuildForWPAndWindows.bat Win32-Release-ASM
rem Win64-C-Only: AutoBuildForWPAndWindows.bat Win64-Release-C
rem Win64-ASM(WP8): AutoBuildForWPAndWindows.bat Win64-Release-ASM
rem ARM-C-Only(WP8): AutoBuildForWPAndWindows.bat ARM-Release-C
rem ARM-ASM(WP8): AutoBuildForWPAndWindows.bat ARM-Release-ASM
rem --For debug and release version:
rem Win32-C-Only: AutoBuildForWPAndWindows.bat Win32-All-C
rem Win32-ASM: AutoBuildForWPAndWindows.bat Win32-All-ASM
rem Win64-C-Only: AutoBuildForWPAndWindows.bat Win64-All-C
rem Win64-ASM: AutoBuildForWPAndWindows.bat Win64-All-ASM
rem ARM-C-Only(WP8): AutoBuildForWPAndWindows.bat ARM-All-C
rem ARM-ASM(WP8): AutoBuildForWPAndWindows.bat ARM-All-ASM
rem --For default:
rem AutoBuildForWPAndWindows.bat
rem ARM-All-ASM(WP8)
rem
rem --lib/dll files will be copied to folder .\bin
rem --win32 folder bin\i386*
rem --win64 folder bin\x86_64*
rem --arm folder bin\arm*
rem
rem Environment:
rem ----for windows phone, Visual studio with update 3 or later is needed
rem ----gas-preprocessor(windows phone build only)
rem --you can clone it from git://git.libav.org/gas-preprocessor.git
rem --for more detail, please refer to https://git.libav.org/?p=gas-preprocessor.git
rem -- and then set gas-preprocessor path to the %GasScriptPath% variable in this script
rem or just copy to VC2013 bin's path,you can refer to variable %VC12Path%
rem
rem ----MinGW
rem --install MinGW tools
rem --more detail, please refer to http://www.mingw.org/
rem
rem 2015/03/15 huashi@cisco.com
rem *************************************************************************************************
set WP8Flag=0
call :BasicSetting
call :PathSetting
call :SetBuildOption %1
if not %ERRORLEVEL%==0 (
echo not suppot option!
goto :ErrorReturn
)
call :EnvSetting %1
call :BuildResultInit
call :RunBuild
call :OutputBuildResult
call :GetFinalReturnCode
echo ReturnCode is %ReturnCode%
cd %WorkingDir%
goto :End
:RunBuild
for %%j in ( %aConfigurationList% ) do (
set BuildFlag=0
call :Build %%j
call :BuildCheck %%j
call :CopyDll %%j
)
goto :EOF
rem function for setting
rem ***********************************************
:BasicSetting
set DllFile=openh264.dll
set LibFile=openh264.lib
set PDBFile=openh264.pdb
set UTDllFile=ut.dll
set UTBinFile=codec_unittest.exe
set EncBinFile=h264enc.exe
set DecBinFile=h264dec.exe
goto :EOF
:PathSetting
set WorkingDir=%cd%
cd ..
set RootDir=%cd%
set BinDir=%RootDir%\bin
cd %WorkingDir%
goto :EOF
:EnvSetting
set MinGWPath=C:\MinGW\bin
set MsysPath=C:\MinGW\msys\1.0\bin
set GitPath=C:\Program Files (x86)\Git\bin
set VC14Path=C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC
set VC12Path=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC
set VC11Path=C:\Program Files (x86)\Microsoft Visual Studio 11.0\VC
set VC10Path=C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC
set VC9Path=C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC
set VC12ArmLib01=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\store\arm
set VC12ArmLib02=C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\lib\arm
set WP8KitLib=C:\Program Files (x86)\Windows Phone Kits\8.1\lib\arm
if exist "%VC9Path%" set VCPATH=%VC9Path%
if exist "%VC10Path%" set VCPATH=%VC10Path%
if exist "%VC11Path%" set VCPATH=%VC11Path%
if exist "%VC12Path%" set VCPATH=%VC12Path%
if exist "%VC14Path%" set VCPATH=%VC14Path%
if %WP8Flag%==1 set VCPATH=%VC12Path%
set GasScriptPath=%VCPATH%\bin
if "%vArcType%" =="i386" set PATH=%MinGWPath%;%MsysPath%;%VCPATH%\bin;%GitPath%;%PATH%
if "%vArcType%" =="x86_64" set PATH=%MinGWPath%;%MsysPath%;%VCPATH%\bin;%GitPath%;%PATH%
if "%vArcType%" =="arm" set PATH=%MinGWPath%;%MsysPath%;%VCPATH%\bin;%GitPath%;%PATH%
rem if "%vArcType%" =="arm" set PATH=C:\MinGW\bin;C:\MinGW\msys\1.0\bin;C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\bin;C:\Program Files (x86)\Git\bin;%PATH%
if "%vArcType%" =="i386" call "%VCPATH%\vcvarsall.bat" x86
if "%vArcType%" =="x86_64" call "%VCPATH%\vcvarsall.bat" x64
if "%vArcType%" =="arm" call "%VCPATH%\vcvarsall.bat" x86_arm
if %WP8Flag%==1 call :WPSetting
echo PATH is %PATH%
echo LIB is %LIB%
goto :EOF
:WPSetting
set LIB=%VC12ArmLib01%;%VC12ArmLib02%;%WP8KitLib%
echo LIB setting for wp8 is:
echo %LIB%
if not exist "%VC12Path%" (
echo VC12 does not exist,
echo ******************************************
echo VC12 does not exist,
echo which is needed for windows phone
echo ******************************************
goto :ErrorReturn
)
goto :EOF
:SetBuildOption
if "aaa%1"=="aaa" (
set aConfigurationList=Debug Release
set vArcType=arm
set vOSType=msvc-wp
set vEnable64BitFlag=No
set vASMFlag=Yes
set WP8Flag=1
echo default setting
) else if "%1"=="Win32-Debug-C" (
set aConfigurationList=Debug
set vArcType=i386
set vOSType=msvc
set vEnable64BitFlag=No
set vASMFlag=No
echo Win32-Debug-C setting
) else if "%1"=="Win32-Release-C" (
set aConfigurationList=Release
set vArcType=i386
set vOSType=msvc
set vEnable64BitFlag=No
set vASMFlag=No
echo Win32-Release-C setting
) else if "%1"=="Win64-Debug-C" (
set aConfigurationList=Debug
set vArcType=x86_64
set vOSType=msvc
set vEnable64BitFlag=Yes
set vASMFlag=No
echo All-C setting
) else if "%1"=="Win64-Release-C" (
set aConfigurationList=Release
set vArcType=x86_64
set vOSType=msvc
set vEnable64BitFlag=Yes
set vASMFlag=No
echo Win64-Release-C setting
) else if "%1"=="ARM-Debug-C" (
set aConfigurationList=Debug
set vArcType=arm
set vOSType=msvc-wp
set vEnable64BitFlag=No
set vASMFlag=No
set WP8Flag=1
echo ARM-Debug-C setting
) else if "%1"=="ARM-Release-C" (
set aConfigurationList=Debug Release
set vArcType=arm
set vOSType=msvc-wp
set vEnable64BitFlag=No
set vASMFlag=No
set WP8Flag=1
echo ARM-Release-C setting
) else if "%1"=="Win32-All-C" (
set aConfigurationList=Debug Release
set vArcType=i386
set vOSType=msvc
set vEnable64BitFlag=No
set vASMFlag=No
echo Win32-All-C setting
) else if "%1"=="Win64-All-C" (
set aConfigurationList=Debug Release
set vArcType=x86_64
set vOSType=msvc
set vEnable64BitFlag=Yes
set vASMFlag=No
echo All-C setting
) else if "%1"=="ARM-All-C" (
set aConfigurationList=Debug Release
set vArcType=arm
set vOSType=msvc-wp
set vEnable64BitFlag=No
set vASMFlag=No
set WP8Flag=1
echo ARM-All-C setting
) else if "%1"=="Win32-Debug-ASM" (
set aConfigurationList=Debug
set vArcType=i386
set vOSType=msvc
set vEnable64BitFlag=No
set vASMFlag=Yes
echo Win32-Debug-ASM setting
) else if "%1"=="Win32-Release-ASM" (
set aConfigurationList=Release
set vArcType=i386
set vOSType=msvc
set vEnable64BitFlag=No
set vASMFlag=Yes
echo Win32-Release-ASM setting
) else if "%1"=="Win64-Debug-ASM" (
set aConfigurationList=Debug
set vArcType=x86_64
set vOSType=msvc
set vEnable64BitFlag=Yes
set vASMFlag=Yes
echo All-ASM setting
) else if "%1"=="Win64-Release-ASM" (
set aConfigurationList=Release
set vArcType=x86_64
set vOSType=msvc
set vEnable64BitFlag=Yes
set vASMFlag=Yes
echo Win64-Release-ASM setting
) else if "%1"=="ARM-Debug-ASM" (
set aConfigurationList=Debug
set vArcType=arm
set vOSType=msvc-wp
set vEnable64BitFlag=No
set vASMFlag=Yes
set WP8Flag=1
echo ARM-Debug-ASM setting
) else if "%1"=="ARM-Release-ASM" (
set aConfigurationList=Release
set vArcType=arm
set vOSType=msvc-wp
set vEnable64BitFlag=No
set vASMFlag=Yes
set WP8Flag=1
echo ARM-Release-ASM setting
) else if "%1"=="Win32-All-ASM" (
set aConfigurationList=Debug Release
set vArcType=i386
set vOSType=msvc
set vEnable64BitFlag=No
set vASMFlag=Yes
echo Win32-All-ASM setting
) else if "%1"=="Win64-All-ASM" (
set aConfigurationList=Debug Release
set vArcType=x86_64
set vOSType=msvc
set vEnable64BitFlag=Yes
set vASMFlag=Yes
echo All-ASM setting
) else if "%1"=="ARM-All-ASM" (
set aConfigurationList=Debug Release
set vArcType=arm
set vOSType=msvc-wp
set vEnable64BitFlag=No
set vASMFlag=Yes
set WP8Flag=1
echo ARM-All-ASM setting
) else (
call :help
goto :ErrorReturn
)
echo aConfigurationList is %aConfigurationList%
echo vArcType is %vArcType%
echo vOSType is %vOSType%
echo vEnable64BitFlag is %vEnable64BitFlag%
echo vASMFlag is %vASMFlag%
goto :EOF
rem function for build result
rem ***********************************************
:BuildResultInit
set BuildDebugFlag=0
set BuildReleaseFlag=0
set BuildDebugInfo=NULL
set BuildReleaseInfo=NULL
goto :EOF
:OutputBuildResult
echo BuildDebugFlag =%BuildDebugFlag%
echo BuildReleaseFlag =%BuildReleaseFlag%
echo BuildDebugInfo =%BuildDebugInfo%
echo BuildReleaseInfo =%BuildReleaseInfo%
goto :EOF
:BuildCheck
set vConfiguration=%1
if not %BuildFlag%==0 (
if "%vConfiguration%"=="Debug" (
set BuildDebugFlag=1
set BuildDebugInfo="build debug--failed"
) else (
set BuildReleaseFlag=1
set BuildReleaseInfo="build release--failed"
)
) else (
if "%vConfiguration%"=="Debug" (
set BuildDebugFlag=0
set BuildDebugInfo="build debug--succeed"
) else (
set BuildReleaseFlag=0
set BuildReleaseInfo="build release--succeed"
)
)
goto :EOF
:GetFinalReturnCode
set aBuildFlagList=%BuildDebugFlag% %BuildReleaseFlag%
echo aBuildFlagList is %aBuildFlagList%
set ReturnCode=0
for %%k in (%aBuildFlagList%) do (
if not %%k == 0 (
set ReturnCode=1
)
)
goto :EOF
rem function for help
rem ***********************************************
:help
echo *******************************************************************************
echo usage:
echo AutoBuildForWPAndWindows.bat % Configuration %
echo --For debug version:
echo Win32-C-Only: AutoBuildForWPAndWindows.bat Win32-Debug-C
echo Win32-ASM: AutoBuildForWPAndWindows.bat Win32-Debug-ASM
echo Win64-C-Only: AutoBuildForWPAndWindows.bat Win64-Debug-C
echo Win64-ASM: AutoBuildForWPAndWindows.bat Win64-Debug-ASM
echo ARM-C-Only(WP8): AutoBuildForWPAndWindows.bat ARM-Debug-C
echo ARM-ASM(WP8): AutoBuildForWPAndWindows.bat ARM-Debug-ASM
echo --For release version:
echo Win32-C-Only: AutoBuildForWPAndWindows.bat Win32-Release-C
echo Win32-ASM: AutoBuildForWPAndWindows.bat Win32-Release-ASM
echo Win64-C-Only: AutoBuildForWPAndWindows.bat Win64-Release-C
echo Win64-ASM: AutoBuildForWPAndWindows.bat Win64-Release-ASM
echo ARM-C-Only(WP8): AutoBuildForWPAndWindows.bat ARM-Release-C
echo ARM-ASM(WP8): AutoBuildForWPAndWindows.bat ARM-Release-ASM
echo --For debug and release version:
echo Win32-C-Only: AutoBuildForWPAndWindows.bat Win32-All-C
echo Win32-ASM: AutoBuildForWPAndWindows.bat Win32-All-ASM
echo Win64-C-Only: AutoBuildForWPAndWindows.bat Win64-All-C
echo Win64-ASM: AutoBuildForWPAndWindows.bat Win64-All-ASM
echo ARM-C-Only(WP8): AutoBuildForWPAndWindows.bat ARM-All-C
echo ARM-ASM(WP8): AutoBuildForWPAndWindows.bat ARM-All-ASM
echo --For default:
echo AutoBuildForWPAndWindows.bat
echo ARM-All-ASM(WP8)
echo *******************************************************************************
goto :EOF
rem function for build
rem ***********************************************
:Build
set vConfiguration=%1
cd %RootDir%
echo bash -c "make OS=%vOSType% ARCH=%vArcType% USE_ASM=%vASMFlag% BUILDTYPE=%vConfiguration% clean"
echo bash -c "make OS=%vOSType% ARCH=%vArcType% USE_ASM=%vASMFlag% BUILDTYPE=%vConfiguration%"
bash -c "make OS=%vOSType% ARCH=%vArcType% USE_ASM=%vASMFlag% BUILDTYPE=%vConfiguration% clean"
bash -c "make OS=%vOSType% ARCH=%vArcType% USE_ASM=%vASMFlag% BUILDTYPE=%vConfiguration%"
if not %ERRORLEVEL%==0 (
set BuildFlag=1
)
cd %WorkingDir%
goto :EOF
:CopyDll
set vConfiguration=%1
set vBuildOption=%2
cd %RootDir%
if "%vArcType%"=="arm" (
set vBinDirName=ARM
) else if "%vArcType%"=="i386" (
set vBinDirName=Win32
) else (
set vBinDirName=x64
)
set ArchDestDir=%BinDir%\%vBinDirName%
set FullDestDir=%BinDir%\%vBinDirName%\%vConfiguration%
echo copying dll files to destination folder...
echo FullDestDir is %FullDestDir%
if not exist %ArchDestDir% md %ArchDestDir%
if exist %FullDestDir% (
rd /s /q %FullDestDir%
)
md %FullDestDir%
echo current dir is:
cd
set DestDir=bin/%vBinDirName%/%vConfiguration%
echo DestDir is %DestDir%
if "%vOSType%"=="msvc-wp" (
set aFileList=%DllFile% %LibFile% %PDBFile% %UTDllFile%
) else (
set aFileList=%DllFile% %LibFile% %PDBFile% %UTBinFile% %EncBinFile% %DecBinFile%
)
for %%k in (%aFileList%) do (
bash -c "cp -f %%k %DestDir%"
)
cd %WorkingDir%
goto :EOF
:ErrorReturn
endlocal
exit /b 2
:End
endlocal
exit /b %ReturnCode%

View File

@ -1,6 +1,18 @@
#for x86
HAVE_AVX2 := true
ifneq ($(filter %86 x86_64, $(ARCH)),)
include $(SRC_PATH)build/x86-common.mk
ifeq ($(USE_ASM), Yes)
ifeq ($(HAVE_AVX2), true)
CFLAGS += -DHAVE_AVX2
CXXFLAGS += -DHAVE_AVX2
ASMFLAGS += -DHAVE_AVX2
endif
endif
endif
#for arm
ifneq ($(filter-out arm64, $(filter arm%, $(ARCH))),)
ifeq ($(USE_ASM), Yes)
ASM_ARCH = arm
@ -8,6 +20,8 @@ ASMFLAGS += -I$(SRC_PATH)codec/common/arm/
CFLAGS += -DHAVE_NEON
endif
endif
#for arm64
ifneq ($(filter arm64 aarch64, $(ARCH)),)
ifeq ($(USE_ASM), Yes)
ASM_ARCH = arm64

View File

@ -7,3 +7,4 @@
--unpad-paren
--pad-first-paren-out
--lineend=linux
--convert-tabs

View File

@ -1,4 +1,4 @@
GTEST_SRCDIR=gtest
GTEST_SRCDIR=gtest/googletest
GTEST_CPP_SRCS=\
$(GTEST_SRCDIR)/src/gtest-all.cc\

View File

@ -14,4 +14,4 @@ python build/mktargets.py --directory test/processing --prefix processing_unitte
python build/mktargets.py --directory test/api --prefix api_test
python build/mktargets.py --directory test/common --prefix common_unittest
python build/mktargets.py --directory module --prefix module
python build/mktargets.py --directory gtest --library gtest --out build/gtest-targets.mk --cpp-suffix .cc --include gtest-all.cc
python build/mktargets.py --directory gtest/googletest --library gtest --out build/gtest-targets.mk --cpp-suffix .cc --include gtest-all.cc

15
build/msvc-app.mk Normal file
View File

@ -0,0 +1,15 @@
include $(SRC_PATH)build/msvc-common.mk
CFLAGS_OPT += -MD
CFLAGS_DEBUG += -MDd
CFLAGS += -DUNICODE
# Ignore warnings about the main function prototype when building with -ZW
CXXFLAGS += -ZW -wd4447
# Ignore warnings about code built with -ZW in .lib files
AR_OPTS += -ignore:4264
# WelsThreadLib requires building with -ZW, since it uses new Windows Runtime
# classes for creating threads.
# If linking an .exe that contains Windows Runtime code, the first object
# file linked into the exe also needs to be built with -ZW (otherwise the build
# fails with "vccorlib_lib_should_be_specified_before_msvcrt_lib_to_linker",
# so set it on all files.

View File

@ -1,6 +1,6 @@
include $(SRC_PATH)build/arch.mk
ifeq ($(ASM_ARCH), x86)
ifeq ($(ENABLE64BIT), Yes)
ifeq ($(ARCH), x86_64)
ASMFLAGS += -f win64
ASMFLAGS_PLATFORM = -DWIN64
else
@ -10,7 +10,7 @@ else
endif
ifeq ($(ASM_ARCH), arm)
CCAS = gas-preprocessor.pl -as-type armasm -force-thumb -- armasm
CCASFLAGS = -nologo -DHAVE_NEON
CCASFLAGS = -nologo -DHAVE_NEON -ignore 4509
endif
CC=cl
@ -35,7 +35,15 @@ LIBSUFFIX=lib
LIBPREFIX=
EXEEXT=.exe
OBJ=obj
SHAREDLIB_DIR = $(PREFIX)/bin
SHAREDLIBSUFFIX=dll
SHAREDLIBSUFFIXVER=$(SHAREDLIBSUFFIX)
SHARED=-LD
SHLDFLAGS=-link -def:openh264.def -implib:$(PROJECT_NAME)_dll.lib
EXTRA_LIBRARY=$(PROJECT_NAME)_dll.lib
LDFLAGS += -link
SHLDFLAGS=-debug -map -opt:ref -opt:icf -def:$(SRC_PATH)openh264.def -implib:$(EXTRA_LIBRARY)
STATIC_LDFLAGS=
CODEC_UNITTEST_CFLAGS=-D_CRT_SECURE_NO_WARNINGS
%.res: %.rc
$(QUIET_RC)rc -fo $@ $<

View File

@ -1,6 +1,9 @@
ARCH = arm
include $(SRC_PATH)build/arch.mk
SHAREDLIBSUFFIX = so
# Android APK/JARs expect libraries to be unversioned
SHAREDLIBSUFFIXVER=$(SHAREDLIBSUFFIX)
SHLDFLAGS =
NDKLEVEL = 12
ifeq ($(ARCH), arm)
ifneq ($(APP_ABI), armeabi)
@ -9,9 +12,6 @@ ifeq ($(ARCH), arm)
LDFLAGS += -march=armv7-a -Wl,--fix-cortex-a8
APP_ABI = armeabi-v7a
endif
ifeq (Yes, $(USE_ASM))
ASMFLAGS += -march=armv7-a -mfpu=neon
endif
else ifeq ($(ARCH), arm64)
APP_ABI = arm64-v8a
else ifeq ($(ARCH), x86)
@ -64,7 +64,7 @@ MODULE_INCLUDES = $(STL_INCLUDES)
MODULE_LDFLAGS = $(STL_LIB)
ifeq (./,$(SRC_PATH))
binaries : decdemo encdemo
binaries: decdemo encdemo
decdemo: libraries
cd ./codec/build/android/dec && $(NDKROOT)/ndk-build -B APP_ABI=$(APP_ABI) && android update project -t $(TARGET) -p . && ant debug
@ -79,8 +79,6 @@ clean_Android_dec:
clean_Android_enc:
-cd ./codec/build/android/enc && $(NDKROOT)/ndk-build APP_ABI=$(APP_ABI) clean && ant clean
else
all:
@:
clean_Android:
@:
endif

View File

@ -1,9 +1,11 @@
include $(SRC_PATH)build/arch.mk
SHAREDLIBSUFFIX = so
SHAREDLIBSUFFIXVER=$(SHAREDLIBSUFFIX).$(SHAREDLIBVERSION)
SHLDFLAGS = -Wl,-soname,$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER)
CFLAGS += -fPIC
LDFLAGS += -lpthread
ifeq ($(ASM_ARCH), x86)
ifeq ($(ENABLE64BIT), Yes)
ifeq ($(ARCH), x86_64)
ASMFLAGS += -f elf64
else
ASMFLAGS += -f elf

View File

@ -1,11 +1,16 @@
include $(SRC_PATH)build/arch.mk
SHAREDLIB_DIR = $(PREFIX)/lib
SHAREDLIBSUFFIX = dylib
SHAREDLIBSUFFIXVER=$(SHAREDLIBVERSION).$(SHAREDLIBSUFFIX)
SHLDFLAGS = -dynamiclib -twolevel_namespace -undefined dynamic_lookup \
-fno-common -headerpad_max_install_names -install_name \
$(SHAREDLIB_DIR)/$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER)
SHARED = -dynamiclib
CFLAGS += -Wall -fPIC -MMD -MP
LDFLAGS += -lpthread
ifeq ($(ASM_ARCH), x86)
ASMFLAGS += -DPREFIX
ifeq ($(ENABLE64BIT), Yes)
ifeq ($(ARCH), x86_64)
ASMFLAGS += -f macho64
else
ASMFLAGS += -f macho

View File

@ -12,6 +12,6 @@ SDK_MIN = 5.1
XCODE=$(shell xcode-select -p)
SDKROOT = $(XCODE)/Platforms/$(SDKTYPE).platform/Developer/SDKs/$(SDKTYPE)$(SDK).sdk
CFLAGS += -arch $(ARCH) -isysroot $(SDKROOT) -miphoneos-version-min=$(SDK_MIN) -DAPPLE_IOS
CFLAGS += -arch $(ARCH) -isysroot $(SDKROOT) -miphoneos-version-min=$(SDK_MIN) -DAPPLE_IOS -fembed-bitcode
LDFLAGS += -arch $(ARCH) -isysroot $(SDKROOT) -miphoneos-version-min=$(SDK_MIN)

View File

@ -1,9 +1,12 @@
include $(SRC_PATH)build/arch.mk
SHAREDLIBSUFFIX = so
SHAREDLIBSUFFIXVER=$(SHAREDLIBSUFFIX).$(SHAREDLIBVERSION)
SHLDFLAGS = -Wl,-soname,$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER)
CFLAGS += -Wall -fno-strict-aliasing -fPIC -MMD -MP
LDFLAGS += -lpthread
AR_OPTS = crD $@
ifeq ($(ASM_ARCH), x86)
ifeq ($(ENABLE64BIT), Yes)
ifeq ($(ARCH), x86_64)
ASMFLAGS += -f elf64
else
ASMFLAGS += -f elf
@ -13,3 +16,7 @@ ifeq ($(ASM_ARCH), arm)
ASMFLAGS += -march=armv7-a -mfpu=neon
endif
ifeq ($(CXX), clang++)
CXXFLAGS += -Wc++11-compat-reserved-user-defined-literal
endif

View File

@ -1,8 +1,12 @@
include $(SRC_PATH)build/x86-common.mk
SHAREDLIB_DIR = $(PREFIX)/bin
SHAREDLIBSUFFIX = dll
SHAREDLIBSUFFIXVER=$(SHAREDLIBSUFFIX)
EXTRA_LIBRARY=$(LIBPREFIX)$(PROJECT_NAME).dll.a
SHLDFLAGS = -Wl,--out-implib,$(EXTRA_LIBRARY)
CFLAGS += -MMD -MP
LDFLAGS +=
ifeq ($(ENABLE64BIT), Yes)
ifeq ($(ARCH), x86_64)
ASMFLAGS += -f win64
ASMFLAGS_PLATFORM = -DWIN64
CC = x86_64-w64-mingw32-gcc

View File

@ -0,0 +1,3 @@
include $(SRC_PATH)build/msvc-app.mk
CFLAGS += -DWINAPI_FAMILY=WINAPI_FAMILY_APP

View File

@ -1,10 +1,6 @@
ARCH = arm
include $(SRC_PATH)build/msvc-common.mk
CFLAGS_OPT += -MD
CFLAGS_DEBUG += -MDd
CFLAGS += -DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP
CXXFLAGS +=
LDFLAGS +=
codec/common/src/WelsThreadLib.$(OBJ): CXXFLAGS += -ZW
include $(SRC_PATH)build/msvc-app.mk
CFLAGS += -DWINAPI_FAMILY=WINAPI_FAMILY_PHONE_APP -DWINDOWS_PHONE
LDFLAGS += -nodefaultlib:kernel32.lib -nodefaultlib:ole32.lib WindowsPhoneCore.lib
UTSHLDFLAGS = -def:$(SRC_PATH)ut.def

View File

@ -3,3 +3,4 @@ LDFLAGS += user32.lib
CFLAGS_OPT += -MT
CFLAGS_DEBUG += -MTd -Gm
$(LIBPREFIX)$(PROJECT_NAME).$(SHAREDLIBSUFFIXVER): openh264.res

View File

@ -1,12 +1,14 @@
CFLAGS_M32=-m32
CFLAGS_M64=-m64
ASM_INCLUDES = -I$(SRC_PATH)codec/common/x86/
ifeq (, $(ENABLE64BIT))
ifeq ($(ARCH), x86_64)
ENABLE64BIT=Yes
endif
endif
ifneq ($(ENABLE64BIT),)
ifeq ($(ENABLE64BIT), Yes)
ARCH = x86_64
else
ARCH = x86
endif
endif
ifeq ($(ARCH), x86_64)
CFLAGS += $(CFLAGS_M64)
LDFLAGS += $(CFLAGS_M64)
ASMFLAGS_PLATFORM = -DUNIX64
@ -17,6 +19,9 @@ ASMFLAGS_PLATFORM = -DX86_32
endif
ifeq ($(USE_ASM),Yes)
CFLAGS += -DX86_ASM
ifneq ($(ARCH), x86_64)
CFLAGS += -DX86_32_ASM
endif
ASM_ARCH = x86
endif
ASM = nasm

View File

@ -36,7 +36,7 @@
#define WELS_VIDEO_CODEC_SVC_API_H__
#ifndef __cplusplus
#ifdef _MSC_VER
#if defined(_MSC_VER) && (_MSC_VER < 1800)
typedef unsigned char bool;
#else
#include <stdbool.h>
@ -77,69 +77,72 @@ typedef unsigned char bool;
* //decoder declaration
* ISVCDecoder *pSvcDecoder;
* //input: encoded bitstream start position; should include start code prefix
* unsigned char *pBuf =...;
* unsigned char *pBuf =...;
* //input: encoded bit stream length; should include the size of start code prefix
* int iSize =...;
* int iSize =...;
* //output: [0~2] for Y,U,V buffer for Decoding only
* unsigned char *pData[3] =...;
* unsigned char *pData[3] =...;
* //in-out: for Decoding only: declare and initialize the output buffer info, this should never co-exist with Parsing only
* SBufferInfo sDstBufInfo;
* memset(&sDstBufInfo, 0, sizeof(SBufferInfo));
* memset(&sDstBufInfo, 0, sizeof(SBufferInfo));
* //in-out: for Parsing only: declare and initialize the output bitstream buffer info for parse only, this should never co-exist with Decoding only
* SParserBsInfo sDstParseInfo;
* memset(&sDstParseInfo, 0, sizeof(SParserBsInfo));
* sDstParseInfo.pDstBuff = new unsigned char[PARSE_SIZE]; //In Parsing only, allocate enough buffer to save transcoded bitstream for a frame
* memset(&sDstParseInfo, 0, sizeof(SParserBsInfo));
* sDstParseInfo.pDstBuff = new unsigned char[PARSE_SIZE]; //In Parsing only, allocate enough buffer to save transcoded bitstream for a frame
*
* @endcode
*
* Step 2:decoder creation
* Step 2:decoder creation
* @code
* CreateDecoder(pSvcDecoder);
* @endcode
*
* Step 3:declare required parameter, used to differentiate Decoding only and Parsing only
* Step 3:declare required parameter, used to differentiate Decoding only and Parsing only
* @code
* SDecodingParam sDecParam = {0};
* sDecParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_AVC;
* sDecParam.sVideoProperty.eVideoBsType = VIDEO_BITSTREAM_AVC;
* //for Parsing only, the assignment is mandatory
* sDecParam.bParseOnly = true;
* @endcode
*
* Step 4:initialize the parameter and decoder context, allocate memory
* Step 4:initialize the parameter and decoder context, allocate memory
* @code
* Initialize(&sDecParam);
* @endcode
*
* Step 5:do actual decoding process in slice level;
* Step 5:do actual decoding process in slice level;
* this can be done in a loop until data ends
* @code
* //for Decoding only
* iRet = DecodeFrameNoDelay(pBuf, iSize, pData, &sDstBufInfo);
* //or
* iRet = DecodeFrame2(pBuf, iSize, pData, &sDstBufInfo);
* //for Parsing only
* iRet = DecodeParser(pBuf, iSize, &sDstParseInfo);
* //decode failed
* If (iRet != 0){
* RequestIDR or something like that.
* If (iRet != 0){
* RequestIDR or something like that.
* }
* //for Decoding only, pData can be used for render.
* if (sDstBufInfo.iBufferStatus==1){
* output pData[0], pData[1], pData[2];
* }
* //for Parsing only, sDstParseInfo can be used for, e.g., HW decoding
* if (sDstBufInfo.iBufferStatus==1){
* if (sDstBufInfo.iNalNum > 0){
* Hardware decoding sDstParseInfo;
* }
* //no-delay decoding can be realized by directly calling decoder again with NULL input, as in the following. In this case, decoder would immediately reconstruct the input data. This can also be used similarly for Parsing only. Consequent decoding error and output indication should also be considered as above.
* //no-delay decoding can be realized by directly calling DecodeFrameNoDelay(), which is the recommended usage.
* //no-delay decoding can also be realized by directly calling DecodeFrame2() again with NULL input, as in the following. In this case, decoder would immediately reconstruct the input data. This can also be used similarly for Parsing only. Consequent decoding error and output indication should also be considered as above.
* iRet = DecodeFrame2(NULL, 0, pData, &sDstBufInfo);
* judge iRet, sDstBufInfo.iBufferStatus ...
* @endcode
*
* Step 6:uninitialize the decoder and memory free
* Step 6:uninitialize the decoder and memory free
* @code
* Uninitialize();
* @endcode
*
* Step 7:destroy the decoder
* Step 7:destroy the decoder
* @code
* DestroyDecoder();
* @endcode
@ -168,13 +171,14 @@ typedef unsigned char bool;
* param.iPicWidth = width;
* param.iPicHeight = height;
* param.iTargetBitrate = 5000000;
* param.iInputCsp = videoFormatI420;
* encoder_->Initialize (&param);
* @endcode
*
* Step3:set option, set option during encoding process
* @code
* encoder_->SetOption (ENCODER_OPTION_TRACE_LEVEL, &g_LevelSetting);
* int videoFormat = videoFormatI420;
* encoder_->SetOption (ENCODER_OPTION_DATAFORMAT, &videoFormat);
* @endcode
*
* Step4: encode and store ouput bistream
@ -231,7 +235,6 @@ typedef unsigned char bool;
* param.iPicWidth = width;
* param.iPicHeight = height;
* param.iTargetBitrate = 5000000;
* param.iInputCsp = videoFormatI420;
* param.bEnableDenoise = denoise;
* param.iSpatialLayerNum = layers;
* //SM_DYN_SLICE don't support multi-thread now
@ -252,6 +255,8 @@ typedef unsigned char bool;
* }
* param.iTargetBitrate *= param.iSpatialLayerNum;
* encoder_->InitializeExt (&param);
* int videoFormat = videoFormatI420;
* encoder_->SetOption (ENCODER_OPTION_DATAFORMAT, &videoFormat);
*
* @endcode
*/
@ -367,6 +372,23 @@ class ISVCDecoder {
int& iWidth,
int& iHeight) = 0;
/**
* @brief For slice level DecodeFrameNoDelay() (4 parameters input),
* whatever the function return value is, the output data
* of I420 format will only be available when pDstInfo->iBufferStatus == 1,.
* This function will parse and reconstruct the input frame immediately if it is complete
* It is recommended as the main decoding function for H.264/AVC format input
* @param pSrc the h264 stream to be decoded
* @param iSrcLen the length of h264 stream
* @param ppDst buffer pointer of decoded data (YUV)
* @param pDstInfo information provided to API(width, height, etc.)
* @return 0 - success; otherwise -failed;
*/
virtual DECODING_STATE EXTAPI DecodeFrameNoDelay (const unsigned char* pSrc,
const int iSrcLen,
unsigned char** ppDst,
SBufferInfo* pDstInfo) = 0;
/**
* @brief For slice level DecodeFrame2() (4 parameters input),
* whatever the function return value is, the output data
@ -470,6 +492,11 @@ DECODING_STATE (*DecodeFrame) (ISVCDecoder*, const unsigned char* pSrc,
int* iWidth,
int* iHeight);
DECODING_STATE (*DecodeFrameNoDelay) (ISVCDecoder*, const unsigned char* pSrc,
const int iSrcLen,
unsigned char** ppDst,
SBufferInfo* pDstInfo);
DECODING_STATE (*DecodeFrame2) (ISVCDecoder*, const unsigned char* pSrc,
const int iSrcLen,
unsigned char** ppDst,
@ -529,6 +556,19 @@ long WelsCreateDecoder (ISVCDecoder** ppDecoder);
*/
void WelsDestroyDecoder (ISVCDecoder* pDecoder);
/** @brief Get codec version
* Note, old versions of Mingw (GCC < 4.7) are buggy and use an
* incorrect/different ABI for calling this function, making it
* incompatible with MSVC builds.
* @return The linked codec version
*/
OpenH264Version WelsGetCodecVersion (void);
/** @brief Get codec version
* @param pVersion struct to fill in with the version
*/
void WelsGetCodecVersionEx (OpenH264Version *pVersion);
#ifdef __cplusplus
}
#endif

View File

@ -41,24 +41,36 @@
#include "codec_def.h"
/* Constants */
#define MAX_TEMPORAL_LAYER_NUM 4
#define MAX_SPATIAL_LAYER_NUM 4
#define MAX_QUALITY_LAYER_NUM 4
#define MAX_TEMPORAL_LAYER_NUM 4
#define MAX_SPATIAL_LAYER_NUM 4
#define MAX_QUALITY_LAYER_NUM 4
#define MAX_LAYER_NUM_OF_FRAME 128
#define MAX_NAL_UNITS_IN_LAYER 128 ///< predetermined here, adjust it later if need
#define MAX_LAYER_NUM_OF_FRAME 128
#define MAX_NAL_UNITS_IN_LAYER 128 ///< predetermined here, adjust it later if need
#define MAX_RTP_PAYLOAD_LEN 1000
#define AVERAGE_RTP_PAYLOAD_LEN 800
#define MAX_RTP_PAYLOAD_LEN 1000
#define AVERAGE_RTP_PAYLOAD_LEN 800
#define SAVED_NALUNIT_NUM_TMP ( (MAX_SPATIAL_LAYER_NUM*MAX_QUALITY_LAYER_NUM) + 1 + MAX_SPATIAL_LAYER_NUM ) ///< SPS/PPS + SEI/SSEI + PADDING_NAL
#define MAX_SLICES_NUM_TMP ( ( MAX_NAL_UNITS_IN_LAYER - SAVED_NALUNIT_NUM_TMP ) / 3 )
#define SAVED_NALUNIT_NUM_TMP ( (MAX_SPATIAL_LAYER_NUM*MAX_QUALITY_LAYER_NUM) + 1 + MAX_SPATIAL_LAYER_NUM ) ///< SPS/PPS + SEI/SSEI + PADDING_NAL
#define MAX_SLICES_NUM_TMP ( ( MAX_NAL_UNITS_IN_LAYER - SAVED_NALUNIT_NUM_TMP ) / 3 )
#define AUTO_REF_PIC_COUNT -1 ///< encoder selects the number of reference frame automatically
#define UNSPECIFIED_BIT_RATE 0 ///< to do: add detail comment
/**
* @brief Struct of OpenH264 version
*/
///
/// E.g. SDK version is 1.2.0.0, major version number is 1, minor version number is 2, and revision number is 0.
typedef struct _tagVersion {
unsigned int uMajor; ///< The major version number
unsigned int uMinor; ///< The minor version number
unsigned int uRevision; ///< The revision number
unsigned int uReserved; ///< The reserved number, it should be 0.
} OpenH264Version;
/**
* @brief Decoding status
*/
@ -100,6 +112,7 @@ typedef enum {
ENCODER_OPTION_MAX_BITRATE,
ENCODER_OPTION_INTER_SPATIAL_PRED,
ENCODER_OPTION_RC_MODE,
ENCODER_OPTION_RC_FRAME_SKIP,
ENCODER_PADDING_PADDING, ///< 0:disable padding;1:padding
ENCODER_OPTION_PROFILE, ///< assgin the profile for each layer
@ -126,22 +139,23 @@ typedef enum {
ENCODER_OPTION_GET_STATISTICS, ///< read only
ENCODER_OPTION_STATISTICS_LOG_INTERVAL, ///< log interval in millisecond
ENCODER_OPTION_IS_LOSSLESS_LINK ///< advanced algorithmetic settings
ENCODER_OPTION_IS_LOSSLESS_LINK, ///< advanced algorithmetic settings
ENCODER_OPTION_BITS_VARY_PERCENTAGE ///< bit vary percentage
} ENCODER_OPTION;
/**
* @brief Option types introduced in decoder application
*/
typedef enum {
DECODER_OPTION_DATAFORMAT = 0, ///< color format, now supports 23 only (I420)
DECODER_OPTION_END_OF_STREAM, ///< end of stream flag
DECODER_OPTION_END_OF_STREAM = 1, ///< end of stream flag
DECODER_OPTION_VCL_NAL, ///< feedback whether or not have VCL NAL in current AU for application layer
DECODER_OPTION_TEMPORAL_ID, ///< feedback temporal id for application layer
DECODER_OPTION_FRAME_NUM, ///< feedback current decoded frame number
DECODER_OPTION_IDR_PIC_ID, ///< feedback current frame belong to which IDR period
DECODER_OPTION_LTR_MARKING_FLAG, ///< feedback wether current frame mark a LTR
DECODER_OPTION_LTR_MARKED_FRAME_NUM, ///< feedback frame num marked by current Frame
DECODER_OPTION_ERROR_CON_IDC, ///< not finished yet, indicate decoder error concealment status, in progress
DECODER_OPTION_IDR_PIC_ID, ///< feedback current frame belong to which IDR period
DECODER_OPTION_LTR_MARKING_FLAG, ///< feedback wether current frame mark a LTR
DECODER_OPTION_LTR_MARKED_FRAME_NUM, ///< feedback frame num marked by current Frame
DECODER_OPTION_ERROR_CON_IDC, ///< indicate decoder error concealment method
DECODER_OPTION_TRACE_LEVEL,
DECODER_OPTION_TRACE_CALLBACK, ///< a void (*)(void* context, int level, const char* message) function which receives log messages
DECODER_OPTION_TRACE_CALLBACK_CONTEXT,///< context info of trace callbac
@ -239,29 +253,6 @@ typedef struct {
int iLTRRefNum; ///< TODO: not supported to set it arbitrary yet
} SLTRConfig;
/**
* @brief Structure for slice argument
*/
typedef struct {
unsigned int
uiSliceMbNum[MAX_SLICES_NUM_TMP]; ///< only used when uiSliceMode=2;here we use a tmp fixed value since MAX_SLICES_NUM is not defined here and its definition may be changed;
unsigned int uiSliceNum; ///< only used when uiSliceMode=1
unsigned int uiSliceSizeConstraint; ///< only used when uiSliceMode=4
} SSliceArgument; ///< not all the elements in this argument will be used, how it will be used depends on uiSliceMode; please refer to SliceModeEnum
/**
* @brief Enumerate the type of slice mode
*/
typedef enum {
SM_SINGLE_SLICE = 0, ///< | SliceNum==1
SM_FIXEDSLCNUM_SLICE = 1, ///< | according to SliceNum | enabled dynamic slicing for multi-thread
SM_RASTER_SLICE = 2, ///< | according to SlicesAssign | need input of MB numbers each slice. In addition, if other constraint in SSliceArgument is presented, need to follow the constraints. Typically if MB num and slice size are both constrained, re-encoding may be involved.
SM_ROWMB_SLICE = 3, ///< | according to PictureMBHeight | typical of single row of mbs each slice + slice size constraint which including re-encoding
SM_DYN_SLICE = 4, ///< | according to SliceSize | dynamic slicing (have no idea about slice_nums until encoding current frame)
SM_AUTO_SLICE = 5, ///< | according to thread number
SM_RESERVED = 6
} SliceModeEnum;
/**
* @brief Enumerate the type of rate control mode
*/
@ -269,7 +260,9 @@ typedef enum {
RC_QUALITY_MODE = 0, ///< quality mode
RC_BITRATE_MODE = 1, ///< bitrate mode
RC_BUFFERBASED_MODE = 2, ///< no bitrate control,only using buffer status,adjust the video quality
RC_OFF_MODE = -1 ///< rate control off mode
RC_TIMESTAMP_MODE = 3, //rate control based timestamp
RC_BITRATE_MODE_POST_SKIP = 4, ///< this is in-building RC MODE, WILL BE DELETED after algorithm tuning!
RC_OFF_MODE = -1, ///< rate control off mode
} RC_MODES;
/**
@ -277,17 +270,17 @@ typedef enum {
*/
typedef enum {
PRO_UNKNOWN = 0,
PRO_BASELINE = 66,
PRO_MAIN = 77,
PRO_EXTENDED = 88,
PRO_HIGH = 100,
PRO_HIGH10 = 110,
PRO_HIGH422 = 122,
PRO_BASELINE = 66,
PRO_MAIN = 77,
PRO_EXTENDED = 88,
PRO_HIGH = 100,
PRO_HIGH10 = 110,
PRO_HIGH422 = 122,
PRO_HIGH444 = 144,
PRO_CAVLC444 = 244,
PRO_CAVLC444 = 244,
PRO_SCALABLE_BASELINE = 83,
PRO_SCALABLE_HIGH = 86
PRO_SCALABLE_BASELINE = 83,
PRO_SCALABLE_HIGH = 86
} EProfileIdc;
/**
@ -326,38 +319,136 @@ enum {
WELS_LOG_DETAIL = 1 << 4, ///< per packet/frame log
WELS_LOG_RESV = 1 << 5, ///< resversed log iLevel
WELS_LOG_LEVEL_COUNT = 6,
WELS_LOG_DEFAULT = WELS_LOG_DEBUG ///< default log iLevel in Wels codec
WELS_LOG_DEFAULT = WELS_LOG_WARNING ///< default log iLevel in Wels codec
};
/**
* @brief Structure for slice configuration
*/
* @brief Enumerate the type of slice mode
*/
typedef enum {
SM_SINGLE_SLICE = 0, ///< | SliceNum==1
SM_FIXEDSLCNUM_SLICE = 1, ///< | according to SliceNum | enabled dynamic slicing for multi-thread
SM_RASTER_SLICE = 2, ///< | according to SlicesAssign | need input of MB numbers each slice. In addition, if other constraint in SSliceArgument is presented, need to follow the constraints. Typically if MB num and slice size are both constrained, re-encoding may be involved.
SM_SIZELIMITED_SLICE = 3, ///< | according to SliceSize | slicing according to size, the slicing will be dynamic(have no idea about slice_nums until encoding current frame)
SM_RESERVED = 4
} SliceModeEnum;
/**
* @brief Structure for slice argument
*/
typedef struct {
SliceModeEnum uiSliceMode; ///< by default, uiSliceMode will be SM_SINGLE_SLICE
SSliceArgument sSliceArgument;
} SSliceConfig;
unsigned int uiSliceNum; ///< only used when uiSliceMode=1, when uiSliceNum=0 means auto design it with cpu core number
unsigned int uiSliceMbNum[MAX_SLICES_NUM_TMP]; ///< only used when uiSliceMode=2; when =0 means setting one MB row a slice
unsigned int uiSliceSizeConstraint; ///< now only used when uiSliceMode=4
} SSliceArgument;
/**
* @brief Enumerate the type of video format
*/
typedef enum {
VF_COMPONENT,
VF_PAL,
VF_NTSC,
VF_SECAM,
VF_MAC,
VF_UNDEF,
VF_NUM_ENUM
} EVideoFormatSPS; // EVideoFormat is already defined/used elsewhere!
/**
* @brief Enumerate the type of color primaries
*/
typedef enum {
CP_RESERVED0,
CP_BT709,
CP_UNDEF,
CP_RESERVED3,
CP_BT470M,
CP_BT470BG,
CP_SMPTE170M,
CP_SMPTE240M,
CP_FILM,
CP_BT2020,
CP_NUM_ENUM
} EColorPrimaries;
/**
* @brief Enumerate the type of transfer characteristics
*/
typedef enum {
TRC_RESERVED0,
TRC_BT709,
TRC_UNDEF,
TRC_RESERVED3,
TRC_BT470M,
TRC_BT470BG,
TRC_SMPTE170M,
TRC_SMPTE240M,
TRC_LINEAR,
TRC_LOG100,
TRC_LOG316,
TRC_IEC61966_2_4,
TRC_BT1361E,
TRC_IEC61966_2_1,
TRC_BT2020_10,
TRC_BT2020_12,
TRC_NUM_ENUM
} ETransferCharacteristics;
/**
* @brief Enumerate the type of color matrix
*/
typedef enum {
CM_GBR,
CM_BT709,
CM_UNDEF,
CM_RESERVED3,
CM_FCC,
CM_BT470BG,
CM_SMPTE170M,
CM_SMPTE240M,
CM_YCGCO,
CM_BT2020NC,
CM_BT2020C,
CM_NUM_ENUM
} EColorMatrix;
/**
* @brief Structure for spatial layer configuration
*/
typedef struct {
int iVideoWidth; ///< width of picture in luminance samples of a layer
int iVideoHeight; ///< height of picture in luminance samples of a layer
float fFrameRate; ///< frame rate specified for a layer
int iSpatialBitrate; ///< target bitrate for a spatial layer
int iMaxSpatialBitrate; ///< maximum bitrate for a spatial layer
int iVideoWidth; ///< width of picture in luminance samples of a layer
int iVideoHeight; ///< height of picture in luminance samples of a layer
float fFrameRate; ///< frame rate specified for a layer
int iSpatialBitrate; ///< target bitrate for a spatial layer, in unit of bps
int iMaxSpatialBitrate; ///< maximum bitrate for a spatial layer, in unit of bps
EProfileIdc uiProfileIdc; ///< value of profile IDC (PRO_UNKNOWN for auto-detection)
ELevelIdc uiLevelIdc; ///< value of profile IDC (0 for auto-detection)
int iDLayerQp; ///< value of level IDC (0 for auto-detection)
SSliceConfig sSliceCfg; ///< slice configuration for a layer
SSliceArgument sSliceArgument;
// Note: members bVideoSignalTypePresent through uiColorMatrix below are also defined in SWelsSPS in parameter_sets.h.
bool bVideoSignalTypePresent; // false => do not write any of the following information to the header
unsigned char uiVideoFormat; // EVideoFormatSPS; 3 bits in header; 0-5 => component, kpal, ntsc, secam, mac, undef
bool bFullRange; // false => analog video data range [16, 235]; true => full data range [0,255]
bool bColorDescriptionPresent; // false => do not write any of the following three items to the header
unsigned char uiColorPrimaries; // EColorPrimaries; 8 bits in header; 0 - 9 => ???, bt709, undef, ???, bt470m, bt470bg,
// smpte170m, smpte240m, film, bt2020
unsigned char uiTransferCharacteristics; // ETransferCharacteristics; 8 bits in header; 0 - 15 => ???, bt709, undef, ???, bt470m, bt470bg, smpte170m,
// smpte240m, linear, log100, log316, iec61966-2-4, bt1361e, iec61966-2-1, bt2020-10, bt2020-12
unsigned char uiColorMatrix; // EColorMatrix; 8 bits in header (corresponds to FFmpeg "colorspace"); 0 - 10 => GBR, bt709,
// undef, ???, fcc, bt470bg, smpte170m, smpte240m, YCgCo, bt2020nc, bt2020c
} SSpatialLayerConfig;
/**
* @brief Encoder usage type
*/
typedef enum {
CAMERA_VIDEO_REAL_TIME, ///< camera video signal
SCREEN_CONTENT_REAL_TIME ///< screen content signal
CAMERA_VIDEO_REAL_TIME, ///< camera video for real-time communication
SCREEN_CONTENT_REAL_TIME, ///< screen content signal
CAMERA_VIDEO_NON_REAL_TIME
} EUsageType;
/**
@ -369,6 +460,17 @@ typedef enum {
HIGH_COMPLEXITY ///< high complexity, lowest speed, high quality
} ECOMPLEXITY_MODE;
/**
* @brief Enumulate for the stategy of SPS/PPS strategy
*/
typedef enum {
CONSTANT_ID = 0, ///< constant id in SPS/PPS
INCREASING_ID = 0x01, ///< SPS/PPS id increases at each IDR
SPS_LISTING = 0x02, ///< using SPS in the existing list if possible
SPS_LISTING_AND_PPS_INCREASING = 0x03,
SPS_PPS_LISTING = 0x06,
} EParameterSetStrategy;
// TODO: Refine the parameters definition.
/**
* @brief SVC Encoding Parameters
@ -379,7 +481,7 @@ typedef struct TagEncParamBase {
int iPicWidth; ///< width of picture in luminance samples (the maximum of all layers if multiple spatial layers presents)
int iPicHeight; ///< height of picture in luminance samples((the maximum of all layers if multiple spatial layers presents)
int iTargetBitrate; ///< target bitrate desired
int iTargetBitrate; ///< target bitrate desired, in unit of bps
RC_MODES iRCMode; ///< rate control mode
float fMaxFrameRate; ///< maximal input frame rate
@ -393,8 +495,8 @@ typedef struct TagEncParamExt {
iUsageType; ///< application type;1.CAMERA_VIDEO_REAL_TIME:camera video signal;2.SCREEN_CONTENT_REAL_TIME:screen content signal;
int iPicWidth; ///< width of picture in luminance samples (the maximum of all layers if multiple spatial layers presents)
int iPicHeight; ///< height of picture in luminance samples((the maximum of all layers if multiple spatial layers presents)
int iTargetBitrate; ///< target bitrate desired
int iPicHeight; ///< height of picture in luminance samples((the maximum of all layers if multiple spatial layers presents)
int iTargetBitrate; ///< target bitrate desired, in unit of bps
RC_MODES iRCMode; ///< rate control mode
float fMaxFrameRate; ///< maximal input frame rate
@ -405,15 +507,17 @@ typedef struct TagEncParamExt {
ECOMPLEXITY_MODE iComplexityMode;
unsigned int uiIntraPeriod; ///< period of Intra frame
int iNumRefFrame; ///< number of reference frame used
bool bEnableSpsPpsIdAddition; ///< false:not adjust ID in SPS/PPS; true: adjust ID in SPS/PPS
EParameterSetStrategy
eSpsPpsIdStrategy; ///< different stategy in adjust ID in SPS/PPS: 0- constant ID, 1-additional ID, 6-mapping and additional
bool bPrefixNalAddingCtrl; ///< false:not use Prefix NAL; true: use Prefix NAL
bool bEnableSSEI; ///< false:not use SSEI; true: use SSEI
bool bEnableSSEI; ///< false:not use SSEI; true: use SSEI -- TODO: planning to remove the interface of SSEI
bool bSimulcastAVC; ///< (when encoding more than 1 spatial layer) false: use SVC syntax for higher layers; true: use Simulcast AVC
int iPaddingFlag; ///< 0:disable padding;1:padding
int iEntropyCodingModeFlag; ///< 0:CAVLC 1:CABAC.
/* rc control */
bool bEnableFrameSkip; ///< False: don't skip frame even if VBV buffer overflow.True: allow skipping frames to keep the bitrate within limits
int iMaxBitrate; ///< the maximum bitrate
int iMaxBitrate; ///< the maximum bitrate, in unit of bps, set it to UNSPECIFIED_BIT_RATE if not needed
int iMaxQp; ///< the maximum QP encoder supports
int iMinQp; ///< the minmum QP encoder supports
unsigned int uiMaxNalSize; ///< the maximum NAL size. This value should be not 0 for dynamic slice mode
@ -425,11 +529,12 @@ typedef struct TagEncParamExt {
/* multi-thread settings*/
unsigned short
iMultipleThreadIdc; ///< 1 # 0: auto(dynamic imp. internal encoder); 1: multiple threads imp. disabled; lager than 1: count number of threads;
bool bUseLoadBalancing; ///< only used when uiSliceMode=1 or 3, will change slicing of a picture during the run-time of multi-thread encoding, so the result of each run may be different
/* Deblocking loop filter */
int iLoopFilterDisableIdc; ///< 0: on, 1: off, 2: on except for slice boundaries
int iLoopFilterAlphaC0Offset; ///< AlphaOffset: valid range [-6, 6], default 0
int iLoopFilterBetaOffset; ///< BetaOffset: valid range [-6, 6], default 0
int iLoopFilterBetaOffset; ///< BetaOffset: valid range [-6, 6], default 0
/*pre-processing feature*/
bool bEnableDenoise; ///< denoise control
bool bEnableBackgroundDetection; ///< background detection control //VAA_BACKGROUND_DETECTION //BGD cmd
@ -452,11 +557,10 @@ typedef struct {
* @brief SVC Decoding Parameters, reserved here and potential applicable in the future
*/
typedef struct TagSVCDecodingParam {
char* pFileNameRestructed; ///< file name of reconstructed frame used for PSNR calculation based debug
char* pFileNameRestructed; ///< file name of reconstructed frame used for PSNR calculation based debug
EVideoFormatType eOutputColorFormat; ///< color space format to be outputed, EVideoFormatType specified in codec_def.h
unsigned int uiCpuLoad; ///< CPU load
unsigned char uiTargetDqLayer; ///< setting target dq layer id
unsigned int uiCpuLoad; ///< CPU load
unsigned char uiTargetDqLayer; ///< setting target dq layer id
ERROR_CON_IDC eEcActiveIdc; ///< whether active error concealment feature in decoder
bool bParseOnly; ///< decoder for parse only, no reconstruction. When it is true, SPS/PPS size should not exceed SPS_PPS_BS_SIZE (128). Otherwise, it will return error info
@ -471,31 +575,28 @@ typedef struct {
unsigned char uiTemporalId;
unsigned char uiSpatialId;
unsigned char uiQualityId;
EVideoFrameType eFrameType;
unsigned char uiLayerType;
/**
* The sub sequence layers are ordered hierarchically based on their dependency on each other so that any picture in a layer shall not be
* predicted from any picture on any higher layer.
*/
int iSubSeqId; ///< refer to D.2.11 Sub-sequence information SEI message semantics
int iNalCount; ///< count number of NAL coded already
int* pNalLengthInByte; ///< length of NAL size in byte from 0 to iNalCount-1
unsigned char* pBsBuf; ///< buffer of bitstream contained
int* pNalLengthInByte; ///< length of NAL size in byte from 0 to iNalCount-1
unsigned char* pBsBuf; ///< buffer of bitstream contained
} SLayerBSInfo, *PLayerBSInfo;
/**
* @brief Frame bit stream info
*/
typedef struct {
int iTemporalId; ///< temporal ID
/**
* The sub sequence layers are ordered hierarchically based on their dependency on each other so that any picture in a layer shall not be
* predicted from any picture on any higher layer.
*/
int iSubSeqId; ///< refer to D.2.11 Sub-sequence information SEI message semantics
int iLayerNum;
SLayerBSInfo sLayerInfo[MAX_LAYER_NUM_OF_FRAME];
int iLayerNum;
SLayerBSInfo sLayerInfo[MAX_LAYER_NUM_OF_FRAME];
EVideoFrameType eFrameType;
int iFrameSizeInBytes;
int iFrameSizeInBytes;
long long uiTimeStamp;
} SFrameBSInfo, *PFrameBSInfo;
@ -503,12 +604,12 @@ typedef struct {
* @brief Structure for source picture
*/
typedef struct Source_Picture_s {
int iColorFormat; ///< color space type
int iStride[4]; ///< stride for each plane pData
unsigned char* pData[4]; ///< plane pData
int iColorFormat; ///< color space type
int iStride[4]; ///< stride for each plane pData
unsigned char* pData[4]; ///< plane pData
int iPicWidth; ///< luma picture width in x coordinate
int iPicHeight; ///< luma picture height in y coordinate
long long uiTimeStamp;
long long uiTimeStamp; ///< timestamp of the source picture, unit: millisecond
} SSourcePicture;
/**
* @brief Structure for bit rate info
@ -594,6 +695,7 @@ typedef struct TagVideoEncoderStatistics {
float fAverageFrameRate; ///< the average frame rate in, calculate since encoding starts, supposed that the input timestamp is in unit of ms
float fLatestFrameRate; ///< the frame rate in, in the last second, supposed that the input timestamp is in unit of ms (? useful for checking BR, but is it easy to calculate?
unsigned int uiBitRate; ///< sendrate in Bits per second, calculated within the set time-window
unsigned int uiAverageFrameQP; ///< the average QP of last encoded frame
unsigned int uiInputFrameCount; ///< number of frames
unsigned int uiSkippedFrameCount; ///< number of frames
@ -602,24 +704,38 @@ typedef struct TagVideoEncoderStatistics {
unsigned int uiIDRReqNum; ///< number of IDR requests
unsigned int uiIDRSentNum; ///< number of actual IDRs sent
unsigned int uiLTRSentNum; ///< number of LTR sent/marked
long long iStatisticsTs; ///< Timestamp of updating the statistics
} SEncoderStatistics; // in building, coming soon
/**
* @brief Structure for decoder statistics
*/
typedef struct TagVideoDecoderStatistics {
unsigned int uiWidth; ///< the width of encode/decode frame
unsigned int uiWidth; ///< the width of encode/decode frame
unsigned int uiHeight; ///< the height of encode/decode frame
float fAverageFrameSpeedInMs; ///< average_Decoding_Time
float fActualAverageFrameSpeedInMs; ///< actual average_Decoding_Time, including freezing pictures
unsigned int uiDecodedFrameCount; ///< number of frames
unsigned int uiResolutionChangeTimes; ///< uiResolutionChangeTimes
unsigned int uiIDRRecvNum; ///< number of actual IDR received
unsigned int uiIDRCorrectNum; ///< number of correct IDR received
//EC on related
unsigned int
uiAvgEcRatio; ///< when EC is on, the average ratio of correct or EC areas, can be an indicator of reconstruction quality
uiAvgEcRatio; ///< when EC is on, the average ratio of total EC areas, can be an indicator of reconstruction quality
unsigned int
uiAvgEcPropRatio; ///< when EC is on, the rough average ratio of propogate EC areas, can be an indicator of reconstruction quality
unsigned int uiEcIDRNum; ///< number of actual unintegrity IDR or not received but eced
unsigned int uiEcFrameNum; ///<
unsigned int uiIDRLostNum; ///< decoder detect the number of lost IDR
unsigned int uiIDRLostNum; ///< number of whole lost IDR
unsigned int uiFreezingIDRNum; ///< number of freezing IDR with error (partly received), under resolution change
unsigned int uiFreezingNonIDRNum; ///< number of freezing non-IDR with error
int iAvgLumaQp; ///< average luma QP. default: -1, no correct frame outputted
int iSpsReportErrorNum; ///< number of Sps Invalid report
int iSubSpsReportErrorNum; ///< number of SubSps Invalid report
int iPpsReportErrorNum; ///< number of Pps Invalid report
int iSpsNoExistNalNum; ///< number of Sps NoExist Nal
int iSubSpsNoExistNalNum; ///< number of SubSps NoExist Nal
int iPpsNoExistNalNum; ///< number of Pps NoExist Nal
} SDecoderStatistics; // in building, coming soon
#endif//WELS_VIDEO_CODEC_APPLICATION_DEFINITION_H__

View File

@ -80,7 +80,7 @@ typedef enum {
typedef enum {
cmResultSuccess, ///< successful
cmInitParaError, ///< parameters are invalid
cmUnkonwReason,
cmUnknownReason,
cmMallocMemeError, ///< malloc a memory error
cmInitExpected, ///< initial action is expected
cmUnsupportedData
@ -118,8 +118,19 @@ enum ENalPriority {
#define IS_IDR_NAL(eNalRefIdc, eNalType) \
( (eNalRefIdc == NAL_PRIORITY_HIGHEST) && (eNalType == NAL_SLICE_IDR) )
#define FRAME_NUM_PARAM_SET (-1)
#define FRAME_NUM_IDR 0
#define FRAME_NUM_PARAM_SET (-1)
#define FRAME_NUM_IDR 0
/**
* @brief eDeblockingIdc
*/
enum {
DEBLOCKING_IDC_0 = 0,
DEBLOCKING_IDC_1 = 1,
DEBLOCKING_IDC_2 = 2
};
#define DEBLOCKING_OFFSET (6)
#define DEBLOCKING_OFFSET_MINUS (-6)
/* Error Tools definition */
typedef unsigned short ERR_TOOL;
@ -135,7 +146,7 @@ enum {
ET_IR_R2 = 0x08, ///< Intra Refresh in predifined 5% MB
ET_IR_R3 = 0x10, ///< Intra Refresh in predifined 10% MB
ET_FEC_HALF = 0x20, ///< Forward Error Correction in 50% redundency mode
ET_FEC_FULL = 0x40, ///< Forward Error Correction in 100% redundency mode
ET_FEC_FULL = 0x40, ///< Forward Error Correction in 100% redundency mode
ET_RFS = 0x80 ///< Reference Frame Selection
};
@ -143,15 +154,15 @@ enum {
* @brief Information of coded Slice(=NAL)(s)
*/
typedef struct SliceInformation {
unsigned char* pBufferOfSlices; ///< base buffer of coded slice(s)
unsigned char* pBufferOfSlices; ///< base buffer of coded slice(s)
int iCodedSliceCount; ///< number of coded slices
unsigned int* pLengthOfSlices; ///< array of slices length accordingly by number of slice
unsigned int* pLengthOfSlices; ///< array of slices length accordingly by number of slice
int iFecType; ///< FEC type[0, 50%FEC, 100%FEC]
unsigned char uiSliceIdx; ///< index of slice in frame [FMO: 0,..,uiSliceCount-1; No FMO: 0]
unsigned char uiSliceCount; ///< count number of slice in frame [FMO: 2-8; No FMO: 1]
unsigned char uiSliceIdx; ///< index of slice in frame [FMO: 0,..,uiSliceCount-1; No FMO: 0]
unsigned char uiSliceCount; ///< count number of slice in frame [FMO: 2-8; No FMO: 1]
char iFrameIndex; ///< index of frame[-1, .., idr_interval-1]
unsigned char uiNalRefIdc; ///< NRI, priority level of slice(NAL)
unsigned char uiNalType; ///< NAL type
unsigned char uiNalRefIdc; ///< NRI, priority level of slice(NAL)
unsigned char uiNalType; ///< NAL type
unsigned char
uiContainingFinalNal; ///< whether final NAL is involved in buffer of coded slices, flag used in Pause feature in T27
} SliceInfo, *PSliceInfo;

15
codec/api/svc/codec_ver.h Normal file
View File

@ -0,0 +1,15 @@
//The current file is auto-generated by script: generate_codec_ver.sh
#ifndef CODEC_VER_H
#define CODEC_VER_H
#include "codec_app_def.h"
static const OpenH264Version g_stCodecVersion = {1, 6, 0, 0};
static const char* const g_strCodecVer = "OpenH264 version:1.6.0.0";
#define OPENH264_MAJOR (1)
#define OPENH264_MINOR (6)
#define OPENH264_REVISION (0)
#define OPENH264_RESERVED (0)
#endif // CODEC_VER_H

View File

@ -11,21 +11,21 @@ extern "C"
JNIEXPORT void JNICALL Java_com_wels_enc_WelsEncTest_DoEncoderAutoTest
(JNIEnv* env, jobject thiz, jstring jsIncfgName, jstring jsInlayerName, jstring jsInyuvName, jstring jsOutbitName) {
/**************** Add the native codes/API *****************/
const char* argv[]={
(char*)("encConsole.exe"),
(char*) ((*env).GetStringUTFChars (jsIncfgName, NULL)),
(char*)("-org"),
(char*) ((*env).GetStringUTFChars (jsInyuvName, NULL)),
(char*)("-bf"),
(char*) ((*env).GetStringUTFChars (jsOutbitName, NULL)),
(char*)("-numl"),
(char*)("1"),
(char*)("-lconfig"),
(char*)("0"),
(char*) ((*env).GetStringUTFChars (jsInlayerName, NULL))
const char* argv[] = {
(char*) ("encConsole.exe"),
(char*) ((*env).GetStringUTFChars (jsIncfgName, NULL)),
(char*) ("-org"),
(char*) ((*env).GetStringUTFChars (jsInyuvName, NULL)),
(char*) ("-bf"),
(char*) ((*env).GetStringUTFChars (jsOutbitName, NULL)),
(char*) ("-numl"),
(char*) ("1"),
(char*) ("-lconfig"),
(char*) ("0"),
(char*) ((*env).GetStringUTFChars (jsInlayerName, NULL))
};
LOGI ("Start to run JNI module!+++");
EncMain(sizeof(argv)/sizeof(argv[0]),(char**)&argv[0]);
EncMain (sizeof (argv) / sizeof (argv[0]), (char**)&argv[0]);
LOGI ("End to run JNI module!+++");
}
@ -34,7 +34,7 @@ JNIEXPORT void JNICALL Java_com_wels_enc_WelsEncTest_DoEncoderTest
/**************** Add the native codes/API *****************/
char* argv[2];
int argc = 2;
argv[0] = (char*) ("decConsole.exe");
argv[0] = (char*) ("encConsole.exe");
argv[1] = (char*) ((*env).GetStringUTFChars (jsFileNameIn, NULL));
LOGI ("Start to run JNI module!+++");
EncMain (argc, argv);

View File

@ -0,0 +1,62 @@
# Run this to update the codec_ver.h at changes of api
#!/bin/sh
#
if [ "$1"x = ""x ]; then
echo "Please input the version number as: major_ver.minor_ver.patch.reserve"
exit 127
fi
codec_ver=`echo "$1" | egrep "^([0-9]+[.]){3}[0-9]+$"`
if [ $? -ne 0 ]; then
echo "Please input the version number as: major_ver.minor_ver.patch.reserve"
exit 127
fi
revision=`git show | head -n 1`
revision=`echo $revision|cut -d' ' -f2|sed -e 's#[ ]*\(.*\)[ ]*#\1#'`
revision=${revision:0:7}
echo "//The current file is auto-generated by script: generate_codec_ver.sh" >>codec_ver.h
echo "#ifndef CODEC_VER_H" >>codec_ver.h
echo "#define CODEC_VER_H" >>codec_ver.h
echo "" >>codec_ver.h
echo "#include \"codec_app_def.h\"" >>codec_ver.h
echo "" >>codec_ver.h
fullver="$1"
major="${1%%.*}"
tmp=${1#*.}
minor="${tmp%%.*}"
tmp=${tmp#*.}
revnr="${tmp%%.*}"
tmp=${tmp#*.}
resnr="${tmp%%.*}"
echo "static const OpenH264Version g_stCodecVersion = {$major, $minor, $revnr, $resnr};" >>codec_ver.h
echo "static const char* const g_strCodecVer = \"OpenH264 version:$fullver\";" >>codec_ver.h
#if [ "$2"x = ""x ]; then
#echo "static const char* const g_strCodecBuildNum = \"OpenH264 revision:$revision\";" >> codec_ver.h
#else
#echo "static const char* const g_strCodecBuildNum = \"OpenH264 build:$2, OpenH264 revision:$revision\";" >> codec_ver.h
#fi
echo "" >>codec_ver.h
#define OPENH264_MAJOR 1, #define OPENH264_MINOR 2 #define OPENH264_REVISION 3 #define OPENH264_RESERVED 0
echo "#define OPENH264_MAJOR ($major)" >>codec_ver.h
echo "#define OPENH264_MINOR ($minor)" >>codec_ver.h
echo "#define OPENH264_REVISION ($revnr)" >>codec_ver.h
echo "#define OPENH264_RESERVED ($resnr)" >>codec_ver.h
echo "" >>codec_ver.h
echo "#endif // CODEC_VER_H" >>codec_ver.h
mv -f codec_ver.h ../api/svc/codec_ver.h
# Ignore non-utf8 chars in the input
export LC_ALL=C
cat ../../openh264.rc.template | sed "s/\$MAJOR/$major/g" | sed "s/\$MINOR/$minor/g" | sed "s/\$REVISION/$revnr/g" | sed "s/\$RESERVED/$resnr/g" > openh264.rc.tmp
mv openh264.rc.tmp ../../openh264.rc

View File

@ -7,6 +7,9 @@
objects = {
/* Begin PBXBuildFile section */
0DD32A861B467902009181A1 /* WelsThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0DD32A851B467902009181A1 /* WelsThread.cpp */; };
0DD32A881B467911009181A1 /* WelsTaskThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0DD32A871B467911009181A1 /* WelsTaskThread.cpp */; };
0DD32A941B468F77009181A1 /* WelsThreadPool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0DD32A931B468F77009181A1 /* WelsThreadPool.cpp */; };
4C3406C918D96EA600DFA14A /* arm_arch_common_macro.S in Sources */ = {isa = PBXBuildFile; fileRef = 4C3406B218D96EA600DFA14A /* arm_arch_common_macro.S */; };
4C3406CA18D96EA600DFA14A /* deblocking_neon.S in Sources */ = {isa = PBXBuildFile; fileRef = 4C3406B318D96EA600DFA14A /* deblocking_neon.S */; };
4C3406CB18D96EA600DFA14A /* expand_picture_neon.S in Sources */ = {isa = PBXBuildFile; fileRef = 4C3406B418D96EA600DFA14A /* expand_picture_neon.S */; };
@ -19,6 +22,8 @@
4CE443D918B722CD0017DF25 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4CE443D818B722CD0017DF25 /* Foundation.framework */; };
53C1C9BC193F0FB000404D8F /* expand_pic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 53C1C9BB193F0FB000404D8F /* expand_pic.cpp */; };
5BA8F2C019603F5F00011CE4 /* common_tables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5BA8F2BF19603F5F00011CE4 /* common_tables.cpp */; };
5BD896BA1A7B839B00D32B7D /* memory_align.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5BD896B91A7B839B00D32B7D /* memory_align.cpp */; };
5BDD15ED1A79027600B6CA2E /* mc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5BDD15EC1A79027600B6CA2E /* mc.cpp */; };
F0B204F918FD23BF005DA23F /* copy_mb.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F0B204F818FD23BF005DA23F /* copy_mb.cpp */; };
F556A8241906673900E156A8 /* arm_arch64_common_macro.S in Sources */ = {isa = PBXBuildFile; fileRef = F556A8221906673900E156A8 /* arm_arch64_common_macro.S */; };
F556A8251906673900E156A8 /* expand_picture_aarch64_neon.S in Sources */ = {isa = PBXBuildFile; fileRef = F556A8231906673900E156A8 /* expand_picture_aarch64_neon.S */; };
@ -44,6 +49,16 @@
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
0DB71EF31BAB273500EABC51 /* WelsCircleQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WelsCircleQueue.h; sourceTree = "<group>"; };
0DD32A851B467902009181A1 /* WelsThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WelsThread.cpp; sourceTree = "<group>"; };
0DD32A871B467911009181A1 /* WelsTaskThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WelsTaskThread.cpp; sourceTree = "<group>"; };
0DD32A8E1B467B83009181A1 /* WelsLock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WelsLock.h; sourceTree = "<group>"; };
0DD32A8F1B467C73009181A1 /* WelsTask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WelsTask.h; sourceTree = "<group>"; };
0DD32A901B467C73009181A1 /* WelsTaskThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WelsTaskThread.h; sourceTree = "<group>"; };
0DD32A911B467C73009181A1 /* WelsThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WelsThread.h; sourceTree = "<group>"; };
0DD32A921B467C73009181A1 /* WelsThreadPool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WelsThreadPool.h; sourceTree = "<group>"; };
0DD32A931B468F77009181A1 /* WelsThreadPool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WelsThreadPool.cpp; sourceTree = "<group>"; };
0DEA477E1BB36FE100ADD134 /* WelsList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WelsList.h; sourceTree = "<group>"; };
4C3406B218D96EA600DFA14A /* arm_arch_common_macro.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = arm_arch_common_macro.S; sourceTree = "<group>"; };
4C3406B318D96EA600DFA14A /* deblocking_neon.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = deblocking_neon.S; sourceTree = "<group>"; };
4C3406B418D96EA600DFA14A /* expand_picture_neon.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = expand_picture_neon.S; sourceTree = "<group>"; };
@ -54,7 +69,6 @@
4C3406BA18D96EA600DFA14A /* deblocking_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = deblocking_common.h; sourceTree = "<group>"; };
4C3406BD18D96EA600DFA14A /* ls_defines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ls_defines.h; sourceTree = "<group>"; };
4C3406BE18D96EA600DFA14A /* macros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = macros.h; sourceTree = "<group>"; };
4C3406BF18D96EA600DFA14A /* mc_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mc_common.h; sourceTree = "<group>"; };
4C3406C018D96EA600DFA14A /* measure_time.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = measure_time.h; sourceTree = "<group>"; };
4C3406C118D96EA600DFA14A /* typedefs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = typedefs.h; sourceTree = "<group>"; };
4C3406C218D96EA600DFA14A /* WelsThreadLib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WelsThreadLib.h; sourceTree = "<group>"; };
@ -68,8 +82,13 @@
4CE443E918B722CD0017DF25 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; };
53C1C9BA193F0F9E00404D8F /* expand_pic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = expand_pic.h; sourceTree = "<group>"; };
53C1C9BB193F0FB000404D8F /* expand_pic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = expand_pic.cpp; sourceTree = "<group>"; };
5B9196F91A7F8BA40075D641 /* wels_const_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wels_const_common.h; sourceTree = "<group>"; };
5BA8F2BE19603F3500011CE4 /* wels_common_defs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wels_common_defs.h; sourceTree = "<group>"; };
5BA8F2BF19603F5F00011CE4 /* common_tables.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = common_tables.cpp; sourceTree = "<group>"; };
5BD896B81A7B837700D32B7D /* memory_align.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = memory_align.h; sourceTree = "<group>"; };
5BD896B91A7B839B00D32B7D /* memory_align.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = memory_align.cpp; sourceTree = "<group>"; };
5BDD15EB1A79026A00B6CA2E /* mc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mc.h; sourceTree = "<group>"; };
5BDD15EC1A79027600B6CA2E /* mc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mc.cpp; sourceTree = "<group>"; };
F0B204F718FD23B6005DA23F /* copy_mb.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = copy_mb.h; sourceTree = "<group>"; };
F0B204F818FD23BF005DA23F /* copy_mb.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = copy_mb.cpp; sourceTree = "<group>"; };
F556A8221906673900E156A8 /* arm_arch64_common_macro.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; name = arm_arch64_common_macro.S; path = arm64/arm_arch64_common_macro.S; sourceTree = "<group>"; };
@ -123,10 +142,19 @@
4C3406BA18D96EA600DFA14A /* deblocking_common.h */,
4C3406BD18D96EA600DFA14A /* ls_defines.h */,
4C3406BE18D96EA600DFA14A /* macros.h */,
4C3406BF18D96EA600DFA14A /* mc_common.h */,
5BDD15EB1A79026A00B6CA2E /* mc.h */,
4C3406C018D96EA600DFA14A /* measure_time.h */,
5BD896B81A7B837700D32B7D /* memory_align.h */,
4C3406C118D96EA600DFA14A /* typedefs.h */,
5BA8F2BE19603F3500011CE4 /* wels_common_defs.h */,
0DB71EF31BAB273500EABC51 /* WelsCircleQueue.h */,
0DEA477E1BB36FE100ADD134 /* WelsList.h */,
0DD32A8E1B467B83009181A1 /* WelsLock.h */,
0DD32A8F1B467C73009181A1 /* WelsTask.h */,
0DD32A901B467C73009181A1 /* WelsTaskThread.h */,
0DD32A911B467C73009181A1 /* WelsThread.h */,
0DD32A921B467C73009181A1 /* WelsThreadPool.h */,
5B9196F91A7F8BA40075D641 /* wels_const_common.h */,
4C3406C218D96EA600DFA14A /* WelsThreadLib.h */,
);
path = inc;
@ -143,6 +171,11 @@
4C3406C518D96EA600DFA14A /* crt_util_safe_x.cpp */,
53C1C9BB193F0FB000404D8F /* expand_pic.cpp */,
4C3406C618D96EA600DFA14A /* deblocking_common.cpp */,
5BDD15EC1A79027600B6CA2E /* mc.cpp */,
5BD896B91A7B839B00D32B7D /* memory_align.cpp */,
0DD32A871B467911009181A1 /* WelsTaskThread.cpp */,
0DD32A931B468F77009181A1 /* WelsThreadPool.cpp */,
0DD32A851B467902009181A1 /* WelsThread.cpp */,
4C3406C818D96EA600DFA14A /* WelsThreadLib.cpp */,
);
path = src;
@ -250,14 +283,19 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
0DD32A941B468F77009181A1 /* WelsThreadPool.cpp in Sources */,
F5B8D82D190757290037849A /* mc_aarch64_neon.S in Sources */,
4C3406C918D96EA600DFA14A /* arm_arch_common_macro.S in Sources */,
F556A8241906673900E156A8 /* arm_arch64_common_macro.S in Sources */,
5BDD15ED1A79027600B6CA2E /* mc.cpp in Sources */,
F5AC94FF193EB7D800F58154 /* deblocking_aarch64_neon.S in Sources */,
4C3406CE18D96EA600DFA14A /* crt_util_safe_x.cpp in Sources */,
F791965919D3BE2200F60C6B /* intra_pred_common.cpp in Sources */,
5BD896BA1A7B839B00D32B7D /* memory_align.cpp in Sources */,
0DD32A881B467911009181A1 /* WelsTaskThread.cpp in Sources */,
4C3406CF18D96EA600DFA14A /* deblocking_common.cpp in Sources */,
5BA8F2C019603F5F00011CE4 /* common_tables.cpp in Sources */,
0DD32A861B467902009181A1 /* WelsThread.cpp in Sources */,
F791965419D3B89D00F60C6B /* intra_pred_common_aarch64_neon.S in Sources */,
4C3406D118D96EA600DFA14A /* WelsThreadLib.cpp in Sources */,
4C3406CC18D96EA600DFA14A /* mc_neon.S in Sources */,
@ -368,6 +406,11 @@
HAVE_NEON,
);
"GCC_PREPROCESSOR_DEFINITIONS[sdk=iphonesimulator*]" = APPLE_IOS;
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/../../../api/svc",
);
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
@ -395,6 +438,11 @@
HAVE_NEON,
);
"GCC_PREPROCESSOR_DEFINITIONS[sdk=iphonesimulator*]" = APPLE_IOS;
HEADER_SEARCH_PATHS = (
"$(inherited)",
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include,
"$(SRCROOT)/../../../api/svc",
);
OTHER_LDFLAGS = "-ObjC";
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;

View File

@ -47,7 +47,7 @@ extern int DecMain(int argc, char * argv[]);
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
// Do any additional setup after loading the view, typically from a nib.
//Add the testing codes
self.resFileArray = [[NSMutableArray alloc] init];
self.selectedRow = 0;

View File

@ -20,8 +20,6 @@
4CE4469318BC5EAB0017DF25 /* fmo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE4467018BC5EAA0017DF25 /* fmo.cpp */; };
4CE4469418BC5EAB0017DF25 /* get_intra_predictor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE4467118BC5EAA0017DF25 /* get_intra_predictor.cpp */; };
4CE4469518BC5EAB0017DF25 /* manage_dec_ref.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE4467218BC5EAA0017DF25 /* manage_dec_ref.cpp */; };
4CE4469618BC5EAB0017DF25 /* mc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE4467318BC5EAA0017DF25 /* mc.cpp */; };
4CE4469718BC5EAB0017DF25 /* mem_align.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE4467418BC5EAA0017DF25 /* mem_align.cpp */; };
4CE4469818BC5EAB0017DF25 /* memmgr_nal_unit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE4467518BC5EAA0017DF25 /* memmgr_nal_unit.cpp */; };
4CE4469918BC5EAB0017DF25 /* mv_pred.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE4467618BC5EAA0017DF25 /* mv_pred.cpp */; };
4CE4469A18BC5EAB0017DF25 /* parse_mb_syn_cavlc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE4467718BC5EAA0017DF25 /* parse_mb_syn_cavlc.cpp */; };
@ -33,7 +31,6 @@
6A3E814219D79AE900C19C1F /* cabac_decoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6A3E814119D79AE900C19C1F /* cabac_decoder.cpp */; };
6A3E814419D7A40600C19C1F /* parse_mb_syn_cabac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 6A3E814319D7A40600C19C1F /* parse_mb_syn_cabac.cpp */; };
6C749B6A197CC6E600A111F9 /* block_add_aarch64_neon.S in Sources */ = {isa = PBXBuildFile; fileRef = 6C749B69197CC6E600A111F9 /* block_add_aarch64_neon.S */; };
9ABF4382193EB60900A6BD61 /* expand_pic.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9ABF4381193EB60900A6BD61 /* expand_pic.cpp */; };
9AED66561946A1DE009A3567 /* welsCodecTrace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AED66551946A1DE009A3567 /* welsCodecTrace.cpp */; };
9AED66591946A203009A3567 /* utils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AED66581946A203009A3567 /* utils.cpp */; };
F0B204FC18FD23D8005DA23F /* error_concealment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F0B204FB18FD23D8005DA23F /* error_concealment.cpp */; };
@ -57,7 +54,6 @@
4CE4427918B6FC360017DF25 /* libwelsdec.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libwelsdec.a; sourceTree = BUILT_PRODUCTS_DIR; };
4CE4427C18B6FC360017DF25 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
4CE4428D18B6FC360017DF25 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; };
4CE4464518BC5EAA0017DF25 /* as264_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = as264_common.h; sourceTree = "<group>"; };
4CE4464618BC5EAA0017DF25 /* au_parser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = au_parser.h; sourceTree = "<group>"; };
4CE4464718BC5EAA0017DF25 /* bit_stream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bit_stream.h; sourceTree = "<group>"; };
4CE4464818BC5EAA0017DF25 /* deblocking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = deblocking.h; sourceTree = "<group>"; };
@ -73,8 +69,6 @@
4CE4465318BC5EAA0017DF25 /* get_intra_predictor.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = get_intra_predictor.h; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
4CE4465418BC5EAA0017DF25 /* manage_dec_ref.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = manage_dec_ref.h; sourceTree = "<group>"; };
4CE4465518BC5EAA0017DF25 /* mb_cache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mb_cache.h; sourceTree = "<group>"; };
4CE4465618BC5EAA0017DF25 /* mc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mc.h; sourceTree = "<group>"; };
4CE4465718BC5EAA0017DF25 /* mem_align.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mem_align.h; sourceTree = "<group>"; };
4CE4465818BC5EAA0017DF25 /* memmgr_nal_unit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = memmgr_nal_unit.h; sourceTree = "<group>"; };
4CE4465918BC5EAA0017DF25 /* mv_pred.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mv_pred.h; sourceTree = "<group>"; };
4CE4465A18BC5EAA0017DF25 /* nal_prefix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nal_prefix.h; sourceTree = "<group>"; };
@ -99,8 +93,6 @@
4CE4467018BC5EAA0017DF25 /* fmo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = fmo.cpp; sourceTree = "<group>"; };
4CE4467118BC5EAA0017DF25 /* get_intra_predictor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = get_intra_predictor.cpp; sourceTree = "<group>"; };
4CE4467218BC5EAA0017DF25 /* manage_dec_ref.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = manage_dec_ref.cpp; sourceTree = "<group>"; };
4CE4467318BC5EAA0017DF25 /* mc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mc.cpp; sourceTree = "<group>"; tabWidth = 1; usesTabs = 0; wrapsLines = 1; };
4CE4467418BC5EAA0017DF25 /* mem_align.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mem_align.cpp; sourceTree = "<group>"; };
4CE4467518BC5EAA0017DF25 /* memmgr_nal_unit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = memmgr_nal_unit.cpp; sourceTree = "<group>"; };
4CE4467618BC5EAA0017DF25 /* mv_pred.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mv_pred.cpp; sourceTree = "<group>"; };
4CE4467718BC5EAA0017DF25 /* parse_mb_syn_cavlc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = parse_mb_syn_cavlc.cpp; sourceTree = "<group>"; };
@ -116,8 +108,6 @@
6A3E814319D7A40600C19C1F /* parse_mb_syn_cabac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = parse_mb_syn_cabac.cpp; sourceTree = "<group>"; };
6A3E814519D7A40D00C19C1F /* parse_mb_syn_cabac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = parse_mb_syn_cabac.h; sourceTree = "<group>"; };
6C749B69197CC6E600A111F9 /* block_add_aarch64_neon.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; name = block_add_aarch64_neon.S; path = arm64/block_add_aarch64_neon.S; sourceTree = "<group>"; };
9ABF4380193EB5F700A6BD61 /* expand_pic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = expand_pic.h; path = ../../../common/inc/expand_pic.h; sourceTree = "<group>"; };
9ABF4381193EB60900A6BD61 /* expand_pic.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = expand_pic.cpp; path = ../../../common/src/expand_pic.cpp; sourceTree = "<group>"; };
9AED66551946A1DE009A3567 /* welsCodecTrace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = welsCodecTrace.cpp; path = ../../../common/src/welsCodecTrace.cpp; sourceTree = "<group>"; };
9AED66571946A1EB009A3567 /* welsCodecTrace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = welsCodecTrace.h; path = ../../../common/inc/welsCodecTrace.h; sourceTree = "<group>"; };
9AED66581946A203009A3567 /* utils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = utils.cpp; path = ../../../common/src/utils.cpp; sourceTree = "<group>"; };
@ -200,9 +190,7 @@
6A3E814519D7A40D00C19C1F /* parse_mb_syn_cabac.h */,
6A3E814019D79AD900C19C1F /* cabac_decoder.h */,
9AED665A1946A21D009A3567 /* utils.h */,
9ABF4380193EB5F700A6BD61 /* expand_pic.h */,
F0B204FA18FD23CF005DA23F /* error_concealment.h */,
4CE4464518BC5EAA0017DF25 /* as264_common.h */,
4CE4464618BC5EAA0017DF25 /* au_parser.h */,
4CE4464718BC5EAA0017DF25 /* bit_stream.h */,
4CE4464818BC5EAA0017DF25 /* deblocking.h */,
@ -218,8 +206,6 @@
4CE4465318BC5EAA0017DF25 /* get_intra_predictor.h */,
4CE4465418BC5EAA0017DF25 /* manage_dec_ref.h */,
4CE4465518BC5EAA0017DF25 /* mb_cache.h */,
4CE4465618BC5EAA0017DF25 /* mc.h */,
4CE4465718BC5EAA0017DF25 /* mem_align.h */,
4CE4465818BC5EAA0017DF25 /* memmgr_nal_unit.h */,
4CE4465918BC5EAA0017DF25 /* mv_pred.h */,
4CE4465A18BC5EAA0017DF25 /* nal_prefix.h */,
@ -243,7 +229,6 @@
6A3E814319D7A40600C19C1F /* parse_mb_syn_cabac.cpp */,
6A3E814119D79AE900C19C1F /* cabac_decoder.cpp */,
9AED66581946A203009A3567 /* utils.cpp */,
9ABF4381193EB60900A6BD61 /* expand_pic.cpp */,
F0B204FB18FD23D8005DA23F /* error_concealment.cpp */,
4CE4466718BC5EAA0017DF25 /* au_parser.cpp */,
4CE4466818BC5EAA0017DF25 /* bit_stream.cpp */,
@ -256,8 +241,6 @@
4CE4467018BC5EAA0017DF25 /* fmo.cpp */,
4CE4467118BC5EAA0017DF25 /* get_intra_predictor.cpp */,
4CE4467218BC5EAA0017DF25 /* manage_dec_ref.cpp */,
4CE4467318BC5EAA0017DF25 /* mc.cpp */,
4CE4467418BC5EAA0017DF25 /* mem_align.cpp */,
4CE4467518BC5EAA0017DF25 /* memmgr_nal_unit.cpp */,
4CE4467618BC5EAA0017DF25 /* mv_pred.cpp */,
4CE4467718BC5EAA0017DF25 /* parse_mb_syn_cavlc.cpp */,
@ -361,8 +344,6 @@
4CE4469F18BC5EAB0017DF25 /* welsDecoderExt.cpp in Sources */,
4CE4469318BC5EAB0017DF25 /* fmo.cpp in Sources */,
4CE4469118BC5EAB0017DF25 /* decoder_data_tables.cpp in Sources */,
4CE4469718BC5EAB0017DF25 /* mem_align.cpp in Sources */,
9ABF4382193EB60900A6BD61 /* expand_pic.cpp in Sources */,
4CE4469518BC5EAB0017DF25 /* manage_dec_ref.cpp in Sources */,
4CE4468A18BC5EAB0017DF25 /* au_parser.cpp in Sources */,
4CE4469918BC5EAB0017DF25 /* mv_pred.cpp in Sources */,
@ -375,7 +356,6 @@
4CBC1B81194AC4E100214D9E /* intra_pred_aarch64_neon.S in Sources */,
4CE4469018BC5EAB0017DF25 /* decoder_core.cpp in Sources */,
4CE447AE18BC6BE90017DF25 /* intra_pred_neon.S in Sources */,
4CE4469618BC5EAB0017DF25 /* mc.cpp in Sources */,
4CE4469C18BC5EAB0017DF25 /* rec_mb.cpp in Sources */,
4CE4468B18BC5EAB0017DF25 /* bit_stream.cpp in Sources */,
4CE4468D18BC5EAB0017DF25 /* decode_mb_aux.cpp in Sources */,

View File

@ -7,6 +7,10 @@
objects = {
/* Begin PBXBuildFile section */
0D6970BE1CA5BCFB001D88F8 /* paraset_strategy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0D6970BC1CA5BCFB001D88F8 /* paraset_strategy.cpp */; };
0DD32A961B4A478B009181A1 /* wels_task_base.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0DD32A951B4A478B009181A1 /* wels_task_base.cpp */; };
0DD32A991B4A4997009181A1 /* wels_task_management.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0DD32A981B4A4997009181A1 /* wels_task_management.cpp */; };
0DD32A9C1B4A4E8F009181A1 /* wels_task_encoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0DD32A9B1B4A4E8F009181A1 /* wels_task_encoder.cpp */; };
4C23BC60195A77E0003B81FC /* intra_pred_sad_3_opt_aarch64_neon.S in Sources */ = {isa = PBXBuildFile; fileRef = 4C23BC5F195A77E0003B81FC /* intra_pred_sad_3_opt_aarch64_neon.S */; };
4C34066D18C57D0400DFA14A /* intra_pred_neon.S in Sources */ = {isa = PBXBuildFile; fileRef = 4C34066618C57D0400DFA14A /* intra_pred_neon.S */; };
4C34066E18C57D0400DFA14A /* intra_pred_sad_3_opt_neon.S in Sources */ = {isa = PBXBuildFile; fileRef = 4C34066718C57D0400DFA14A /* intra_pred_sad_3_opt_neon.S */; };
@ -24,13 +28,10 @@
4CE4471318BC605C0017DF25 /* encoder_data_tables.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE446E218BC605C0017DF25 /* encoder_data_tables.cpp */; };
4CE4471418BC605C0017DF25 /* encoder_ext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE446E318BC605C0017DF25 /* encoder_ext.cpp */; };
4CE4471618BC605C0017DF25 /* get_intra_predictor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE446E518BC605C0017DF25 /* get_intra_predictor.cpp */; };
4CE4471718BC605C0017DF25 /* mc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE446E618BC605C0017DF25 /* mc.cpp */; };
4CE4471818BC605C0017DF25 /* md.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE446E718BC605C0017DF25 /* md.cpp */; };
4CE4471918BC605C0017DF25 /* memory_align.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE446E818BC605C0017DF25 /* memory_align.cpp */; };
4CE4471A18BC605C0017DF25 /* mv_pred.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE446E918BC605C0017DF25 /* mv_pred.cpp */; };
4CE4471B18BC605C0017DF25 /* nal_encap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE446EA18BC605C0017DF25 /* nal_encap.cpp */; };
4CE4471C18BC605C0017DF25 /* picture_handle.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE446EB18BC605C0017DF25 /* picture_handle.cpp */; };
4CE4471D18BC605C0017DF25 /* property.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE446EC18BC605C0017DF25 /* property.cpp */; };
4CE4471E18BC605C0017DF25 /* ratectl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE446ED18BC605C0017DF25 /* ratectl.cpp */; };
4CE4471F18BC605C0017DF25 /* ref_list_mgr_svc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE446EE18BC605C0017DF25 /* ref_list_mgr_svc.cpp */; };
4CE4472018BC605C0017DF25 /* sample.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4CE446EF18BC605C0017DF25 /* sample.cpp */; };
@ -69,6 +70,14 @@
/* Begin PBXFileReference section */
04FE0684196FD9370004D7CE /* version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = version.h; path = ../../../common/inc/version.h; sourceTree = "<group>"; };
0D6970BC1CA5BCFB001D88F8 /* paraset_strategy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = paraset_strategy.cpp; sourceTree = "<group>"; };
0D6970BF1CA5BD26001D88F8 /* paraset_strategy.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = paraset_strategy.h; sourceTree = "<group>"; };
0DD32A951B4A478B009181A1 /* wels_task_base.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wels_task_base.cpp; sourceTree = "<group>"; };
0DD32A971B4A47D0009181A1 /* wels_task_base.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wels_task_base.h; sourceTree = "<group>"; };
0DD32A981B4A4997009181A1 /* wels_task_management.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wels_task_management.cpp; sourceTree = "<group>"; };
0DD32A9A1B4A49AC009181A1 /* wels_task_management.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wels_task_management.h; sourceTree = "<group>"; };
0DD32A9B1B4A4E8F009181A1 /* wels_task_encoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wels_task_encoder.cpp; sourceTree = "<group>"; };
0DD32A9D1B4A4E9C009181A1 /* wels_task_encoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wels_task_encoder.h; sourceTree = "<group>"; };
4C23BC5F195A77E0003B81FC /* intra_pred_sad_3_opt_aarch64_neon.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; name = intra_pred_sad_3_opt_aarch64_neon.S; path = arm64/intra_pred_sad_3_opt_aarch64_neon.S; sourceTree = "<group>"; };
4C34066618C57D0400DFA14A /* intra_pred_neon.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = intra_pred_neon.S; sourceTree = "<group>"; };
4C34066718C57D0400DFA14A /* intra_pred_sad_3_opt_neon.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = intra_pred_sad_3_opt_neon.S; sourceTree = "<group>"; };
@ -83,7 +92,6 @@
4CE4432518B6FFA00017DF25 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; };
4CE446AA18BC605C0017DF25 /* as264_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = as264_common.h; sourceTree = "<group>"; };
4CE446AB18BC605C0017DF25 /* au_set.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = au_set.h; sourceTree = "<group>"; };
4CE446AC18BC605C0017DF25 /* bit_stream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bit_stream.h; sourceTree = "<group>"; };
4CE446AE18BC605C0017DF25 /* deblocking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = deblocking.h; sourceTree = "<group>"; };
4CE446AF18BC605C0017DF25 /* decode_mb_aux.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = decode_mb_aux.h; sourceTree = "<group>"; };
4CE446B018BC605C0017DF25 /* dq_map.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = dq_map.h; sourceTree = "<group>"; };
@ -93,18 +101,14 @@
4CE446B518BC605C0017DF25 /* extern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = extern.h; sourceTree = "<group>"; };
4CE446B618BC605C0017DF25 /* get_intra_predictor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = get_intra_predictor.h; sourceTree = "<group>"; };
4CE446B718BC605C0017DF25 /* mb_cache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mb_cache.h; sourceTree = "<group>"; };
4CE446B818BC605C0017DF25 /* mc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mc.h; sourceTree = "<group>"; };
4CE446B918BC605C0017DF25 /* md.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = md.h; sourceTree = "<group>"; };
4CE446BA18BC605C0017DF25 /* memory_align.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = memory_align.h; sourceTree = "<group>"; };
4CE446BB18BC605C0017DF25 /* mt_defs.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mt_defs.h; sourceTree = "<group>"; };
4CE446BC18BC605C0017DF25 /* mv_pred.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = mv_pred.h; sourceTree = "<group>"; };
4CE446BD18BC605C0017DF25 /* nal_encap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nal_encap.h; sourceTree = "<group>"; };
4CE446BE18BC605C0017DF25 /* nal_prefix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = nal_prefix.h; sourceTree = "<group>"; };
4CE446BF18BC605C0017DF25 /* param_svc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = param_svc.h; sourceTree = "<group>"; };
4CE446C018BC605C0017DF25 /* parameter_sets.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = parameter_sets.h; sourceTree = "<group>"; };
4CE446C118BC605C0017DF25 /* picture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = picture.h; sourceTree = "<group>"; };
4CE446C218BC605C0017DF25 /* picture_handle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = picture_handle.h; sourceTree = "<group>"; };
4CE446C318BC605C0017DF25 /* property.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = property.h; sourceTree = "<group>"; };
4CE446C418BC605C0017DF25 /* rc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = rc.h; sourceTree = "<group>"; };
4CE446C518BC605C0017DF25 /* ref_list_mgr_svc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ref_list_mgr_svc.h; sourceTree = "<group>"; };
4CE446C618BC605C0017DF25 /* sample.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sample.h; sourceTree = "<group>"; };
@ -135,13 +139,10 @@
4CE446E218BC605C0017DF25 /* encoder_data_tables.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = encoder_data_tables.cpp; sourceTree = "<group>"; };
4CE446E318BC605C0017DF25 /* encoder_ext.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = encoder_ext.cpp; sourceTree = "<group>"; };
4CE446E518BC605C0017DF25 /* get_intra_predictor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = get_intra_predictor.cpp; sourceTree = "<group>"; };
4CE446E618BC605C0017DF25 /* mc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mc.cpp; sourceTree = "<group>"; };
4CE446E718BC605C0017DF25 /* md.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = md.cpp; sourceTree = "<group>"; };
4CE446E818BC605C0017DF25 /* memory_align.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = memory_align.cpp; sourceTree = "<group>"; };
4CE446E918BC605C0017DF25 /* mv_pred.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = mv_pred.cpp; sourceTree = "<group>"; };
4CE446EA18BC605C0017DF25 /* nal_encap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = nal_encap.cpp; sourceTree = "<group>"; };
4CE446EB18BC605C0017DF25 /* picture_handle.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = picture_handle.cpp; sourceTree = "<group>"; };
4CE446EC18BC605C0017DF25 /* property.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = property.cpp; sourceTree = "<group>"; };
4CE446ED18BC605C0017DF25 /* ratectl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ratectl.cpp; sourceTree = "<group>"; };
4CE446EE18BC605C0017DF25 /* ref_list_mgr_svc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ref_list_mgr_svc.cpp; sourceTree = "<group>"; };
4CE446EF18BC605C0017DF25 /* sample.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = sample.cpp; sourceTree = "<group>"; };
@ -160,6 +161,7 @@
4CE4470618BC605C0017DF25 /* welsEncoderExt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = welsEncoderExt.cpp; sourceTree = "<group>"; };
6CA38DA21991CACE003EAAE0 /* svc_motion_estimation.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; path = svc_motion_estimation.S; sourceTree = "<group>"; };
6CA38DA41991D31A003EAAE0 /* svc_motion_estimation_aarch64_neon.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; name = svc_motion_estimation_aarch64_neon.S; path = arm64/svc_motion_estimation_aarch64_neon.S; sourceTree = "<group>"; };
98FE4C1A1AB0200C0031E2B4 /* golomb_common.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = golomb_common.h; path = ../../../common/inc/golomb_common.h; sourceTree = "<group>"; };
9AED664819469FAF009A3567 /* welsCodecTrace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = welsCodecTrace.h; path = ../../../common/inc/welsCodecTrace.h; sourceTree = "<group>"; };
9AED664C19469FC1009A3567 /* welsCodecTrace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = welsCodecTrace.cpp; path = ../../../common/src/welsCodecTrace.cpp; sourceTree = "<group>"; };
9AED66651946A2B3009A3567 /* utils.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = utils.cpp; path = ../../../common/src/utils.cpp; sourceTree = "<group>"; };
@ -260,13 +262,13 @@
4CE446A918BC605C0017DF25 /* inc */ = {
isa = PBXGroup;
children = (
98FE4C1A1AB0200C0031E2B4 /* golomb_common.h */,
F7E9997F19EBD3CE009B1021 /* svc_set_mb_syn.h */,
F7E9997E19EBD3C6009B1021 /* set_mb_syn_cabac.h */,
9AED66671946A2C4009A3567 /* utils.h */,
4CDBFB9D18E5068D0025A767 /* wels_transpose_matrix.h */,
4CE446AA18BC605C0017DF25 /* as264_common.h */,
4CE446AB18BC605C0017DF25 /* au_set.h */,
4CE446AC18BC605C0017DF25 /* bit_stream.h */,
4CE446AE18BC605C0017DF25 /* deblocking.h */,
4CE446AF18BC605C0017DF25 /* decode_mb_aux.h */,
4CE446B018BC605C0017DF25 /* dq_map.h */,
@ -276,18 +278,15 @@
4CE446B518BC605C0017DF25 /* extern.h */,
4CE446B618BC605C0017DF25 /* get_intra_predictor.h */,
4CE446B718BC605C0017DF25 /* mb_cache.h */,
4CE446B818BC605C0017DF25 /* mc.h */,
4CE446B918BC605C0017DF25 /* md.h */,
4CE446BA18BC605C0017DF25 /* memory_align.h */,
4CE446BB18BC605C0017DF25 /* mt_defs.h */,
4CE446BC18BC605C0017DF25 /* mv_pred.h */,
4CE446BD18BC605C0017DF25 /* nal_encap.h */,
4CE446BE18BC605C0017DF25 /* nal_prefix.h */,
4CE446BF18BC605C0017DF25 /* param_svc.h */,
4CE446C018BC605C0017DF25 /* parameter_sets.h */,
0D6970BF1CA5BD26001D88F8 /* paraset_strategy.h */,
4CE446C118BC605C0017DF25 /* picture.h */,
4CE446C218BC605C0017DF25 /* picture_handle.h */,
4CE446C318BC605C0017DF25 /* property.h */,
4CE446C418BC605C0017DF25 /* rc.h */,
4CE446C518BC605C0017DF25 /* ref_list_mgr_svc.h */,
4CE446C618BC605C0017DF25 /* sample.h */,
@ -310,6 +309,9 @@
4CE446D918BC605C0017DF25 /* wels_const.h */,
4CE446DA18BC605C0017DF25 /* wels_func_ptr_def.h */,
4CE446DB18BC605C0017DF25 /* wels_preprocess.h */,
0DD32A971B4A47D0009181A1 /* wels_task_base.h */,
0DD32A9D1B4A4E9C009181A1 /* wels_task_encoder.h */,
0DD32A9A1B4A49AC009181A1 /* wels_task_management.h */,
);
path = inc;
sourceTree = "<group>";
@ -328,13 +330,11 @@
4CE446E218BC605C0017DF25 /* encoder_data_tables.cpp */,
4CE446E318BC605C0017DF25 /* encoder_ext.cpp */,
4CE446E518BC605C0017DF25 /* get_intra_predictor.cpp */,
4CE446E618BC605C0017DF25 /* mc.cpp */,
4CE446E718BC605C0017DF25 /* md.cpp */,
4CE446E818BC605C0017DF25 /* memory_align.cpp */,
4CE446E918BC605C0017DF25 /* mv_pred.cpp */,
4CE446EA18BC605C0017DF25 /* nal_encap.cpp */,
0D6970BC1CA5BCFB001D88F8 /* paraset_strategy.cpp */,
4CE446EB18BC605C0017DF25 /* picture_handle.cpp */,
4CE446EC18BC605C0017DF25 /* property.cpp */,
4CE446ED18BC605C0017DF25 /* ratectl.cpp */,
4CE446EE18BC605C0017DF25 /* ref_list_mgr_svc.cpp */,
4CE446EF18BC605C0017DF25 /* sample.cpp */,
@ -348,6 +348,9 @@
4CE446F718BC605C0017DF25 /* svc_motion_estimate.cpp */,
4CE446F818BC605C0017DF25 /* svc_set_mb_syn_cavlc.cpp */,
4CE446FA18BC605C0017DF25 /* wels_preprocess.cpp */,
0DD32A951B4A478B009181A1 /* wels_task_base.cpp */,
0DD32A9B1B4A4E8F009181A1 /* wels_task_encoder.cpp */,
0DD32A981B4A4997009181A1 /* wels_task_management.cpp */,
);
path = src;
sourceTree = "<group>";
@ -436,10 +439,10 @@
4CE4471118BC605C0017DF25 /* encode_mb_aux.cpp in Sources */,
4CE4472718BC605C0017DF25 /* svc_mode_decision.cpp in Sources */,
4CE4472818BC605C0017DF25 /* svc_motion_estimate.cpp in Sources */,
4CE4471D18BC605C0017DF25 /* property.cpp in Sources */,
4CE4471018BC605C0017DF25 /* decode_mb_aux.cpp in Sources */,
4CE4472018BC605C0017DF25 /* sample.cpp in Sources */,
6CA38DA31991CACE003EAAE0 /* svc_motion_estimation.S in Sources */,
0DD32A9C1B4A4E8F009181A1 /* wels_task_encoder.cpp in Sources */,
4CE4471318BC605C0017DF25 /* encoder_data_tables.cpp in Sources */,
4C34067118C57D0400DFA14A /* pixel_neon.S in Sources */,
9AED665019469FC1009A3567 /* welsCodecTrace.cpp in Sources */,
@ -455,13 +458,11 @@
4CE4470E18BC605C0017DF25 /* au_set.cpp in Sources */,
F5BE8005196B913200ED02ED /* memory_aarch64_neon.S in Sources */,
4CBC1B83194ACBB400214D9E /* intra_pred_aarch64_neon.S in Sources */,
4CE4471718BC605C0017DF25 /* mc.cpp in Sources */,
F7E9994519EBD1E9009B1021 /* svc_set_mb_syn_cabac.cpp in Sources */,
F5617A50196A833A006E2B20 /* reconstruct_aarch64_neon.S in Sources */,
4CE4472918BC605C0017DF25 /* svc_set_mb_syn_cavlc.cpp in Sources */,
4CE4471818BC605C0017DF25 /* md.cpp in Sources */,
4CE4471B18BC605C0017DF25 /* nal_encap.cpp in Sources */,
4CE4471918BC605C0017DF25 /* memory_align.cpp in Sources */,
4CE4472418BC605C0017DF25 /* svc_enc_slice_segment.cpp in Sources */,
4CE4472318BC605C0017DF25 /* svc_base_layer_md.cpp in Sources */,
4CB8F2B419235FC5005D6386 /* pixel_aarch64_neon.S in Sources */,
@ -474,9 +475,12 @@
4CE4471618BC605C0017DF25 /* get_intra_predictor.cpp in Sources */,
4CE4472E18BC605C0017DF25 /* welsEncoderExt.cpp in Sources */,
6CA38DA51991D31A003EAAE0 /* svc_motion_estimation_aarch64_neon.S in Sources */,
0DD32A991B4A4997009181A1 /* wels_task_management.cpp in Sources */,
4CE4471418BC605C0017DF25 /* encoder_ext.cpp in Sources */,
4C34067218C57D0400DFA14A /* reconstruct_neon.S in Sources */,
0DD32A961B4A478B009181A1 /* wels_task_base.cpp in Sources */,
F7E9994919EBD1F8009B1021 /* set_mb_syn_cabac.cpp in Sources */,
0D6970BE1CA5BCFB001D88F8 /* paraset_strategy.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

File diff suppressed because it is too large Load Diff

View File

@ -351,51 +351,43 @@
</References>
<Files>
<Filter
Name="SW"
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
<File
RelativePath="..\..\..\common\inc\welsCodecTrace.h"
>
<File
RelativePath="..\..\..\decoder\plus\res\welsdec.rc"
>
</File>
</Filter>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
</File>
<File
RelativePath="..\..\..\decoder\plus\inc\welsDecoderExt.h"
>
<File
RelativePath="..\..\..\decoder\plus\src\wels_dec_export.def"
>
</File>
<File
RelativePath="..\..\..\common\src\welsCodecTrace.cpp"
>
</File>
<File
RelativePath="..\..\..\decoder\plus\src\welsDecoderExt.cpp"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
>
<File
RelativePath="..\..\..\..\openh264.rc"
>
<File
RelativePath="..\..\..\decoder\core\inc\mem_align.h"
>
</File>
<File
RelativePath="..\..\..\common\inc\welsCodecTrace.h"
>
</File>
<File
RelativePath="..\..\..\decoder\plus\inc\welsDecoderExt.h"
>
</File>
</Filter>
</File>
</Filter>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<File
RelativePath="..\..\..\decoder\plus\src\wels_dec_export.def"
>
</File>
<File
RelativePath="..\..\..\common\src\welsCodecTrace.cpp"
>
</File>
<File
RelativePath="..\..\..\decoder\plus\src\welsDecoderExt.cpp"
>
</File>
</Filter>
</Files>
<Globals>

View File

@ -386,7 +386,7 @@
>
</File>
<File
RelativePath="..\..\..\encoder\core\src\mc.cpp"
RelativePath="..\..\..\common\src\mc.cpp"
>
</File>
<File
@ -394,7 +394,7 @@
>
</File>
<File
RelativePath="..\..\..\encoder\core\src\memory_align.cpp"
RelativePath="..\..\..\common\src\memory_align.cpp"
>
</File>
<File
@ -406,11 +406,11 @@
>
</File>
<File
RelativePath="..\..\..\encoder\core\src\picture_handle.cpp"
RelativePath="..\..\..\encoder\core\src\paraset_strategy.cpp"
>
</File>
<File
RelativePath="..\..\..\encoder\core\src\property.cpp"
RelativePath="..\..\..\encoder\core\src\picture_handle.cpp"
>
</File>
<File
@ -477,10 +477,34 @@
RelativePath="..\..\..\common\src\utils.cpp"
>
</File>
<File
RelativePath="..\..\..\encoder\core\src\wels_task_base.cpp"
>
</File>
<File
RelativePath="..\..\..\encoder\core\src\wels_task_encoder.cpp"
>
</File>
<File
RelativePath="..\..\..\encoder\core\src\wels_task_management.cpp"
>
</File>
<File
RelativePath="..\..\..\common\src\WelsTaskThread.cpp"
>
</File>
<File
RelativePath="..\..\..\common\src\WelsThread.cpp"
>
</File>
<File
RelativePath="..\..\..\common\src\WelsThreadLib.cpp"
>
</File>
<File
RelativePath="..\..\..\common\src\WelsThreadPool.cpp"
>
</File>
</Filter>
<Filter
Name="Header Files"
@ -494,10 +518,6 @@
RelativePath="..\..\..\encoder\core\inc\au_set.h"
>
</File>
<File
RelativePath="..\..\..\encoder\core\inc\bit_stream.h"
>
</File>
<File
RelativePath="..\..\..\common\inc\copy_mb.h"
>
@ -550,6 +570,10 @@
RelativePath="..\..\..\encoder\core\inc\get_intra_predictor.h"
>
</File>
<File
RelativePath="..\..\..\common\inc\golomb_common.h"
>
</File>
<File
RelativePath="..\..\..\common\inc\ls_defines.h"
>
@ -563,11 +587,7 @@
>
</File>
<File
RelativePath="..\..\..\encoder\core\inc\mc.h"
>
</File>
<File
RelativePath="..\..\..\common\inc\mc_common.h"
RelativePath="..\..\..\common\inc\mc.h"
>
</File>
<File
@ -579,7 +599,7 @@
>
</File>
<File
RelativePath="..\..\..\encoder\core\inc\memory_align.h"
RelativePath="..\..\..\common\inc\memory_align.h"
>
</File>
<File
@ -594,10 +614,6 @@
RelativePath="..\..\..\encoder\core\inc\nal_encap.h"
>
</File>
<File
RelativePath="..\..\..\encoder\core\inc\nal_prefix.h"
>
</File>
<File
RelativePath="..\..\..\encoder\core\inc\param_svc.h"
>
@ -606,6 +622,10 @@
RelativePath="..\..\..\encoder\core\inc\parameter_sets.h"
>
</File>
<File
RelativePath="..\..\..\encoder\core\inc\paraset_strategy.h"
>
</File>
<File
RelativePath="..\..\..\encoder\core\inc\picture.h"
>
@ -614,10 +634,6 @@
RelativePath="..\..\..\encoder\core\inc\picture_handle.h"
>
</File>
<File
RelativePath="..\..\..\encoder\core\inc\property.h"
>
</File>
<File
RelativePath="..\..\..\encoder\core\inc\rc.h"
>
@ -698,10 +714,6 @@
RelativePath="..\..\..\encoder\core\inc\svc_set_mb_syn_cavlc.h"
>
</File>
<File
RelativePath="..\..\..\encoder\core\inc\trace.h"
>
</File>
<File
RelativePath="..\..\..\common\inc\typedefs.h"
>
@ -719,13 +731,17 @@
>
</File>
<File
RelativePath="..\..\..\encoder\core\inc\wels_common_defs.h"
RelativePath="..\..\..\common\inc\wels_common_defs.h"
>
</File>
<File
RelativePath="..\..\..\encoder\core\inc\wels_const.h"
>
</File>
<File
RelativePath="..\..\..\common\inc\wels_const_common.h"
>
</File>
<File
RelativePath="..\..\..\encoder\core\inc\wels_func_ptr_def.h"
>
@ -819,6 +835,46 @@
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\..\common\x86\dct.asm"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName)_common.obj $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName)_common.obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|x64"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName)_common.obj $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName)_common.obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName)_common.obj $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName)_common.obj"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|x64"
>
<Tool
Name="VCCustomBuildTool"
CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName)_common.obj $(InputPath)&#x0D;&#x0A;"
Outputs="$(IntDir)\$(InputName)_common.obj"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\..\encoder\core\x86\dct.asm"
>

View File

@ -395,7 +395,7 @@
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
>
<File
RelativePath="..\..\..\encoder\plus\res\welsenc.rc"
RelativePath="..\..\..\..\openh264.rc"
>
</File>
</Filter>

29
codec/build/windowsphone/.gitignore vendored Normal file
View File

@ -0,0 +1,29 @@
# Files generated by Visual Studio 2008
*.user
*.ncb
*.suo
*.opensdf
Win32
x64
ARM
Debug
Release
# Files generated by upgrading the project files
Backup
Generated Files
UpgradeLog.htm
# Files generated by Visual Studio 2013
*.sdf
ipch
Draft
# Files used in App
Bin
obj
res
*.dll
*.yuv
*.264

View File

@ -0,0 +1,76 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CodecApp", "CodecApp\CodecApp.csproj", "{5424CF29-908E-417E-93F3-F1CD81E5372C}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CodecRTComponent", "CodecRTComponent.vcxproj", "{FE5BF241-F4EA-4B94-B36A-23511E5908EC}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|ARM = Debug|ARM
Debug|Mixed Platforms = Debug|Mixed Platforms
Debug|Win32 = Debug|Win32
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|ARM = Release|ARM
Release|Mixed Platforms = Release|Mixed Platforms
Release|Win32 = Release|Win32
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|Any CPU.Deploy.0 = Debug|Any CPU
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|ARM.ActiveCfg = Debug|ARM
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|ARM.Build.0 = Debug|ARM
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|ARM.Deploy.0 = Debug|ARM
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|Mixed Platforms.Build.0 = Debug|x86
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|Mixed Platforms.Deploy.0 = Debug|x86
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|Win32.ActiveCfg = Debug|x86
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|Win32.Build.0 = Debug|x86
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|Win32.Deploy.0 = Debug|x86
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|x86.ActiveCfg = Debug|x86
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|x86.Build.0 = Debug|x86
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Debug|x86.Deploy.0 = Debug|x86
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|Any CPU.Build.0 = Release|Any CPU
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|Any CPU.Deploy.0 = Release|Any CPU
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|ARM.ActiveCfg = Release|ARM
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|ARM.Build.0 = Release|ARM
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|ARM.Deploy.0 = Release|ARM
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|Mixed Platforms.ActiveCfg = Release|x86
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|Mixed Platforms.Build.0 = Release|x86
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|Mixed Platforms.Deploy.0 = Release|x86
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|Win32.ActiveCfg = Release|x86
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|Win32.Build.0 = Release|x86
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|Win32.Deploy.0 = Release|x86
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|x86.ActiveCfg = Release|x86
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|x86.Build.0 = Release|x86
{5424CF29-908E-417E-93F3-F1CD81E5372C}.Release|x86.Deploy.0 = Release|x86
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Debug|Any CPU.ActiveCfg = Debug|Win32
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Debug|ARM.ActiveCfg = Debug|ARM
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Debug|ARM.Build.0 = Debug|ARM
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Debug|Mixed Platforms.ActiveCfg = Debug|Win32
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Debug|Mixed Platforms.Build.0 = Debug|Win32
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Debug|Win32.ActiveCfg = Debug|Win32
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Debug|Win32.Build.0 = Debug|Win32
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Debug|x86.ActiveCfg = Debug|Win32
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Debug|x86.Build.0 = Debug|Win32
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Release|Any CPU.ActiveCfg = Release|Win32
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Release|ARM.ActiveCfg = Release|ARM
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Release|ARM.Build.0 = Release|ARM
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Release|Mixed Platforms.ActiveCfg = Release|Win32
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Release|Mixed Platforms.Build.0 = Release|Win32
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Release|Win32.ActiveCfg = Release|Win32
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Release|Win32.Build.0 = Release|Win32
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Release|x86.ActiveCfg = Release|Win32
{FE5BF241-F4EA-4B94-B36A-23511E5908EC}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,20 @@
<Application
x:Class="CodecApp.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone">
<!--Application Resources-->
<Application.Resources>
<local:LocalizedStrings xmlns:local="clr-namespace:CodecApp" x:Key="LocalizedStrings"/>
</Application.Resources>
<Application.ApplicationLifetimeObjects>
<!--Required object that handles lifetime events for the application-->
<shell:PhoneApplicationService
Launching="Application_Launching" Closing="Application_Closing"
Activated="Application_Activated" Deactivated="Application_Deactivated"/>
</Application.ApplicationLifetimeObjects>
</Application>

View File

@ -0,0 +1,223 @@
using System;
using System.Diagnostics;
using System.Resources;
using System.Windows;
using System.Windows.Markup;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using CodecApp.Resources;
namespace CodecApp
{
public partial class App : Application
{
/// <summary>
/// Provides easy access to the root frame of the Phone Application.
/// </summary>
/// <returns>The root frame of the Phone Application.</returns>
public static PhoneApplicationFrame RootFrame { get; private set; }
/// <summary>
/// Constructor for the Application object.
/// </summary>
public App()
{
// Global handler for uncaught exceptions.
UnhandledException += Application_UnhandledException;
// Standard XAML initialization
InitializeComponent();
// Phone-specific initialization
InitializePhoneApplication();
// Language display initialization
InitializeLanguage();
// Show graphics profiling information while debugging.
if (Debugger.IsAttached)
{
// Display the current frame rate counters.
Application.Current.Host.Settings.EnableFrameRateCounter = true;
// Show the areas of the app that are being redrawn in each frame.
//Application.Current.Host.Settings.EnableRedrawRegions = true;
// Enable non-production analysis visualization mode,
// which shows areas of a page that are handed off to GPU with a colored overlay.
//Application.Current.Host.Settings.EnableCacheVisualization = true;
// Prevent the screen from turning off while under the debugger by disabling
// the application's idle detection.
// Caution:- Use this under debug mode only. Application that disables user idle detection will continue to run
// and consume battery power when the user is not using the phone.
PhoneApplicationService.Current.UserIdleDetectionMode = IdleDetectionMode.Disabled;
}
}
// Code to execute when the application is launching (eg, from Start)
// This code will not execute when the application is reactivated
private void Application_Launching(object sender, LaunchingEventArgs e)
{
}
// Code to execute when the application is activated (brought to foreground)
// This code will not execute when the application is first launched
private void Application_Activated(object sender, ActivatedEventArgs e)
{
}
// Code to execute when the application is deactivated (sent to background)
// This code will not execute when the application is closing
private void Application_Deactivated(object sender, DeactivatedEventArgs e)
{
}
// Code to execute when the application is closing (eg, user hit Back)
// This code will not execute when the application is deactivated
private void Application_Closing(object sender, ClosingEventArgs e)
{
}
// Code to execute if a navigation fails
private void RootFrame_NavigationFailed(object sender, NavigationFailedEventArgs e)
{
if (Debugger.IsAttached)
{
// A navigation has failed; break into the debugger
Debugger.Break();
}
}
// Code to execute on Unhandled Exceptions
private void Application_UnhandledException(object sender, ApplicationUnhandledExceptionEventArgs e)
{
if (Debugger.IsAttached)
{
// An unhandled exception has occurred; break into the debugger
Debugger.Break();
}
}
#region Phone application initialization
// Avoid double-initialization
private bool phoneApplicationInitialized = false;
// Do not add any additional code to this method
private void InitializePhoneApplication()
{
if (phoneApplicationInitialized)
return;
// Create the frame but don't set it as RootVisual yet; this allows the splash
// screen to remain active until the application is ready to render.
RootFrame = new PhoneApplicationFrame();
RootFrame.Navigated += CompleteInitializePhoneApplication;
// Handle navigation failures
RootFrame.NavigationFailed += RootFrame_NavigationFailed;
// Handle reset requests for clearing the backstack
RootFrame.Navigated += CheckForResetNavigation;
// Ensure we don't initialize again
phoneApplicationInitialized = true;
}
// Do not add any additional code to this method
private void CompleteInitializePhoneApplication(object sender, NavigationEventArgs e)
{
// Set the root visual to allow the application to render
if (RootVisual != RootFrame)
RootVisual = RootFrame;
// Remove this handler since it is no longer needed
RootFrame.Navigated -= CompleteInitializePhoneApplication;
}
private void CheckForResetNavigation(object sender, NavigationEventArgs e)
{
// If the app has received a 'reset' navigation, then we need to check
// on the next navigation to see if the page stack should be reset
if (e.NavigationMode == NavigationMode.Reset)
RootFrame.Navigated += ClearBackStackAfterReset;
}
private void ClearBackStackAfterReset(object sender, NavigationEventArgs e)
{
// Unregister the event so it doesn't get called again
RootFrame.Navigated -= ClearBackStackAfterReset;
// Only clear the stack for 'new' (forward) and 'refresh' navigations
if (e.NavigationMode != NavigationMode.New && e.NavigationMode != NavigationMode.Refresh)
return;
// For UI consistency, clear the entire page stack
while (RootFrame.RemoveBackEntry() != null)
{
; // do nothing
}
}
#endregion
// Initialize the app's font and flow direction as defined in its localized resource strings.
//
// To ensure that the font of your application is aligned with its supported languages and that the
// FlowDirection for each of those languages follows its traditional direction, ResourceLanguage
// and ResourceFlowDirection should be initialized in each resx file to match these values with that
// file's culture. For example:
//
// AppResources.es-ES.resx
// ResourceLanguage's value should be "es-ES"
// ResourceFlowDirection's value should be "LeftToRight"
//
// AppResources.ar-SA.resx
// ResourceLanguage's value should be "ar-SA"
// ResourceFlowDirection's value should be "RightToLeft"
//
// For more info on localizing Windows Phone apps see http://go.microsoft.com/fwlink/?LinkId=262072.
//
private void InitializeLanguage()
{
try
{
// Set the font to match the display language defined by the
// ResourceLanguage resource string for each supported language.
//
// Fall back to the font of the neutral language if the Display
// language of the phone is not supported.
//
// If a compiler error is hit then ResourceLanguage is missing from
// the resource file.
RootFrame.Language = XmlLanguage.GetLanguage(AppResources.ResourceLanguage);
// Set the FlowDirection of all elements under the root frame based
// on the ResourceFlowDirection resource string for each
// supported language.
//
// If a compiler error is hit then ResourceFlowDirection is missing from
// the resource file.
FlowDirection flow = (FlowDirection)Enum.Parse(typeof(FlowDirection), AppResources.ResourceFlowDirection);
RootFrame.FlowDirection = flow;
}
catch
{
// If an exception is caught here it is most likely due to either
// ResourceLangauge not being correctly set to a supported language
// code or ResourceFlowDirection is set to a value other than LeftToRight
// or RightToLeft.
if (Debugger.IsAttached)
{
Debugger.Break();
}
throw;
}
}
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 845 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

View File

@ -0,0 +1,210 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="12.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>10.0.20506</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{5424CF29-908E-417E-93F3-F1CD81E5372C}</ProjectGuid>
<ProjectTypeGuids>{C089C8C0-30E0-4E22-80C0-CE093F111A43};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>CodecApp</RootNamespace>
<AssemblyName>CodecApp</AssemblyName>
<TargetFrameworkIdentifier>WindowsPhone</TargetFrameworkIdentifier>
<TargetFrameworkVersion>v8.1</TargetFrameworkVersion>
<SilverlightVersion>
</SilverlightVersion>
<SilverlightApplication>true</SilverlightApplication>
<SupportedCultures>
</SupportedCultures>
<XapOutputs>true</XapOutputs>
<GenerateSilverlightManifest>true</GenerateSilverlightManifest>
<XapFilename>CodecApp_$(Configuration)_$(Platform).xap</XapFilename>
<SilverlightManifestTemplate>Properties\AppManifest.xml</SilverlightManifestTemplate>
<SilverlightAppEntry>CodecApp.App</SilverlightAppEntry>
<ValidateXaml>true</ValidateXaml>
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
<ThrowErrorsInValidation>true</ThrowErrorsInValidation>
<TargetFrameworkProfile />
<DefaultLanguage>en-US</DefaultLanguage>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Bin\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Bin\Release</OutputPath>
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Bin\x86\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Bin\x86\Release</OutputPath>
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|ARM' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>Bin\ARM\Debug</OutputPath>
<DefineConstants>DEBUG;TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|ARM' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>Bin\ARM\Release</OutputPath>
<DefineConstants>TRACE;SILVERLIGHT;WINDOWS_PHONE</DefineConstants>
<NoStdLib>true</NoStdLib>
<NoConfig>true</NoConfig>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget />
</PropertyGroup>
<ItemGroup>
<Compile Include="App.xaml.cs">
<DependentUpon>App.xaml</DependentUpon>
</Compile>
<Compile Include="LocalizedStrings.cs" />
<Compile Include="MainPage.xaml.cs">
<DependentUpon>MainPage.xaml</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Resources\AppResources.Designer.cs">
<AutoGen>True</AutoGen>
<DesignTime>True</DesignTime>
<DependentUpon>AppResources.resx</DependentUpon>
</Compile>
</ItemGroup>
<ItemGroup>
<ApplicationDefinition Include="App.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</ApplicationDefinition>
<Page Include="MainPage.xaml">
<SubType>Designer</SubType>
<Generator>MSBuild:Compile</Generator>
</Page>
</ItemGroup>
<ItemGroup>
<Content Include="Assets\BadgeLogo.png" />
<Content Include="Assets\Logo.png" />
<Content Include="Assets\SplashScreen.png" />
<Content Include="Assets\SquareTile150x150.png" />
<Content Include="Assets\SquareTile71x71.png" />
<Content Include="Assets\StoreLogo.png" />
<Content Include="Assets\WideLogo.png" />
<Content Include="BAMQ1_JVC_C.264">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="BA1_FT_C.264">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="BA_MW_D.264">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<None Include="CiscoVT2people_160x96_6fps.yuv">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="layer2.cfg">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<AppxManifest Include="Package.appxmanifest">
<SubType>Designer</SubType>
</AppxManifest>
<None Include="Properties\AppManifest.xml" />
<None Include="Properties\WMAppManifest.xml">
<SubType>Designer</SubType>
</None>
<Content Include="openh264.dll">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<Content Include="welsenc.cfg">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<Content Include="Assets\AlignmentGrid.png" />
<Content Include="Assets\ApplicationIcon.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\Tiles\FlipCycleTileLarge.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\Tiles\FlipCycleTileMedium.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\Tiles\FlipCycleTileSmall.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\Tiles\IconicTileMediumLarge.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Assets\Tiles\IconicTileSmall.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\AppResources.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>AppResources.Designer.cs</LastGenOutput>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\CodecRTComponent.vcxproj">
<Project>{fe5bf241-f4ea-4b94-b36a-23511e5908ec}</Project>
<Name>CodecRTComponent</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).$(TargetFrameworkVersion).Overrides.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\$(TargetFrameworkIdentifier)\$(TargetFrameworkVersion)\Microsoft.$(TargetFrameworkIdentifier).CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
<ProjectExtensions />
<PropertyGroup>
<PreBuildEvent>copy /y ..\..\..\..\..\..\..\..\bin\$(Platform)\$(Configuration)\openh264.dll ..\..\..\
copy /y ..\..\..\..\..\..\..\..\res\*.yuv ..\..\..\
copy /y ..\..\..\..\..\..\..\..\res\B*.264 ..\..\..\
</PreBuildEvent>
</PropertyGroup>
</Project>

View File

@ -0,0 +1,14 @@
using CodecApp.Resources;
namespace CodecApp
{
/// <summary>
/// Provides access to string resources.
/// </summary>
public class LocalizedStrings
{
private static AppResources _localizedResources = new AppResources();
public AppResources LocalizedResources { get { return _localizedResources; } }
}
}

View File

@ -0,0 +1,66 @@
<phone:PhoneApplicationPage
x:Class="CodecApp.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"
FontFamily="{StaticResource PhoneFontFamilyNormal}"
FontSize="{StaticResource PhoneFontSizeNormal}"
Foreground="{StaticResource PhoneForegroundBrush}"
SupportedOrientations="Portrait" Orientation="Portrait"
shell:SystemTray.IsVisible="True">
<!--LayoutRoot is the root grid where all page content is placed-->
<Grid x:Name="LayoutRoot" Background="Transparent">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<!-- LOCALIZATION NOTE:
To localize the displayed strings copy their values to appropriately named
keys in the app's neutral language resource file (AppResources.resx) then
replace the hard-coded text value between the attributes' quotation marks
with the binding clause whose path points to that string name.
For example:
Text="{Binding Path=LocalizedResources.ApplicationTitle, Source={StaticResource LocalizedStrings}}"
This binding points to the template's string resource named "ApplicationTitle".
Adding supported languages in the Project Properties tab will create a
new resx file per language that can carry the translated values of your
UI strings. The binding in these examples will cause the value of the
attributes to be drawn from the .resx file that matches the
CurrentUICulture of the app at run time.
-->
<!--TitlePanel contains the name of the application and page title-->
<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
<TextBlock Text="MY APPLICATION" Style="{StaticResource PhoneTextNormalStyle}" Margin="12,0"/>
<TextBlock Text="page name" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
</StackPanel>
<!--ContentPanel - place additional content here-->
<Grid x:Name="ContentPanel" Grid.Row="1" Margin="14,10,10,-10">
<Button Content="CallEncoder" HorizontalAlignment="Left" Margin="49,10,0,0" VerticalAlignment="Top" Width="340" Click="Button_Click_CallEncoder"/>
<Button Content="CallDecoder" HorizontalAlignment="Left" Margin="63,297,0,0" VerticalAlignment="Top" Width="326" Click="Button_Click__CallDecoder"/>
<TextBox x:Name="DecoderInfo" HorizontalAlignment="Left" Height="183" Margin="37,374,0,0" TextWrapping="Wrap" Text="Decoder info" VerticalAlignment="Top" Width="397"/>
<TextBox x:Name="EncoderInfo" HorizontalAlignment="Left" Height="191" Margin="37,82,0,0" TextWrapping="Wrap" Text="Encoder info" VerticalAlignment="Top" Width="397"/>
</Grid>
<!--Uncomment to see an alignment grid to help ensure your controls are
aligned on common boundaries. The image has a top margin of -32px to
account for the System Tray. Set this to 0 (or remove the margin altogether)
if the System Tray is hidden.
Before shipping remove this XAML and the image itself.-->
<!--<Image Source="/Assets/AlignmentGrid.png" VerticalAlignment="Top" Height="800" Width="480" Margin="0,-32,0,0" Grid.Row="0" Grid.RowSpan="2" IsHitTestVisible="False" />-->
</Grid>
</phone:PhoneApplicationPage>

View File

@ -0,0 +1,86 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Navigation;
using Microsoft.Phone.Controls;
using Microsoft.Phone.Shell;
using CodecApp.Resources;
using CodecRTComponent;
namespace CodecApp {
public partial class MainPage : PhoneApplicationPage {
// Constructor
private CodecRunTimeComponent vRTCCodec;
// Constructor
public MainPage() {
InitializeComponent();
vRTCCodec = new CodecRunTimeComponent();
// Sample code to localize the ApplicationBar
//BuildLocalizedApplicationBar();
}
private void Button_Click_CallEncoder (object sender, RoutedEventArgs e) {
int iRetVal = 0;
float fFPS = 0.0F;
double dEncoderTime = 0.0;
int iEncodedFrame = 0;
string sEncoderInfo = "Encoder performance: \n";
iRetVal = vRTCCodec.Encode();
if (0 == iRetVal) {
fFPS = vRTCCodec.GetEncFPS();
dEncoderTime = vRTCCodec.GetEncTime();
iEncodedFrame = vRTCCodec.GetEncodedFrameNum();
sEncoderInfo += "FPS : " + fFPS.ToString() + "\n";
sEncoderInfo += "EncTime(sec): " + dEncoderTime.ToString() + "\n";
sEncoderInfo += "EncodedNum : " + iEncodedFrame.ToString() + "\n";
EncoderInfo.Text = sEncoderInfo;
} else {
EncoderInfo.Text = "ebcoded failed!...";
}
}
private void Button_Click__CallDecoder (object sender, RoutedEventArgs e) {
int iRetVal = 0;
float fFPS = 0.0F;
double dDecoderTime = 0.0;
int iDecodedFrame = 0;
string sDecoderInfo = "Decoder performance: \n";
iRetVal = vRTCCodec.Decode();
if (0 == iRetVal) {
fFPS = vRTCCodec.GetDecFPS();
dDecoderTime = vRTCCodec.GetDecTime();
iDecodedFrame = vRTCCodec.GetDecodedFrameNum();
sDecoderInfo += "FPS : " + fFPS.ToString() + "\n";
sDecoderInfo += "DecTime(sec): " + dDecoderTime.ToString() + "\n";
sDecoderInfo += "DecodedNum : " + iDecodedFrame.ToString() + "\n";
DecoderInfo.Text = sDecoderInfo;
} else {
DecoderInfo.Text = "decoded failed!...";
}
}
// Sample code for building a localized ApplicationBar
//private void BuildLocalizedApplicationBar()
//{
// // Set the page's ApplicationBar to a new instance of ApplicationBar.
// ApplicationBar = new ApplicationBar();
// // Create a new button and set the text value to the localized string from AppResources.
// ApplicationBarIconButton appBarButton = new ApplicationBarIconButton(new Uri("/Assets/AppBar/appbar.add.rest.png", UriKind.Relative));
// appBarButton.Text = AppResources.AppBarButtonText;
// ApplicationBar.Buttons.Add(appBarButton);
// // Create a new menu item with the localized string from AppResources.
// ApplicationBarMenuItem appBarMenuItem = new ApplicationBarMenuItem(AppResources.AppBarMenuItemText);
// ApplicationBar.MenuItems.Add(appBarMenuItem);
//}
}
}

View File

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="utf-8"?>
<Package xmlns="http://schemas.microsoft.com/appx/2010/manifest" xmlns:m2="http://schemas.microsoft.com/appx/2013/manifest" xmlns:m3="http://schemas.microsoft.com/appx/2014/manifest" xmlns:mp="http://schemas.microsoft.com/appx/2014/phone/manifest">
<Identity Name="f99aa5a5-a6ee-47ec-a093-390b78afba3c"
Publisher="CN=Openh264"
Version="1.0.0.0" />
<mp:PhoneIdentity PhoneProductId="5424cf29-908e-417e-93f3-f1cd81e5372c" PhonePublisherId="cb9bed24-05fd-451a-8736-6dad92946a6e"/>
<Properties>
<DisplayName>CodecApp</DisplayName>
<PublisherDisplayName>Openh264</PublisherDisplayName>
<Logo>Assets\StoreLogo.png</Logo>
</Properties>
<Prerequisites>
<OSMinVersion>6.3.1</OSMinVersion>
<OSMaxVersionTested>6.3.1</OSMaxVersionTested>
</Prerequisites>
<Resources>
<Resource Language="x-generate"/>
</Resources>
<Applications>
<Application Id="x5424cf29y908ey417ey93f3yf1cd81e5372cx"
Executable="AGHost.exe"
EntryPoint="MainPage.xaml">
<m3:VisualElements
DisplayName="CodecApp"
Square150x150Logo="Assets\SquareTile150x150.png"
Square44x44Logo="Assets\Logo.png"
Description="CodecApp"
ForegroundText="light"
BackgroundColor="#464646">
<m3:DefaultTile Square71x71Logo="Assets\SquareTile71x71.png"/>
<m3:SplashScreen Image="Assets\Splashscreen.png" />
</m3:VisualElements>
<Extensions>
<Extension Category="windows.backgroundTasks" EntryPoint="AgHost.BackgroundTask">
<BackgroundTasks>
<Task Type="systemEvent" />
</BackgroundTasks>
</Extension>
</Extensions>
</Application>
</Applications>
<Capabilities>
</Capabilities>
<Extensions>
<Extension Category="windows.activatableClass.inProcessServer">
<InProcessServer>
<Path>AgHostSvcs.dll</Path>
<ActivatableClass ActivatableClassId="AgHost.BackgroundTask" ThreadingModel="both" />
</InProcessServer>
</Extension>
</Extensions>
</Package>

View File

@ -0,0 +1,6 @@
<Deployment xmlns="http://schemas.microsoft.com/client/2007/deployment"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
>
<Deployment.Parts>
</Deployment.Parts>
</Deployment>

View File

@ -0,0 +1,37 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Resources;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle ("CodecApp")]
[assembly: AssemblyDescription ("")]
[assembly: AssemblyConfiguration ("")]
[assembly: AssemblyCompany ("")]
[assembly: AssemblyProduct ("CodecApp")]
[assembly: AssemblyCopyright ("Copyright © 2015")]
[assembly: AssemblyTrademark ("")]
[assembly: AssemblyCulture ("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible (false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid ("2bac46db-63e8-4c33-9be3-8e6b4638045c")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Revision and Build Numbers
// by using the '*' as shown below:
[assembly: AssemblyVersion ("1.0.0.0")]
[assembly: AssemblyFileVersion ("1.0.0.0")]
[assembly: NeutralResourcesLanguageAttribute ("en-US")]

View File

@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<Deployment xmlns="http://schemas.microsoft.com/windowsphone/2014/deployment" AppPlatformVersion="8.1">
<DefaultLanguage xmlns="" code="en-US" />
<App xmlns="" ProductID="{5424cf29-908e-417e-93f3-f1cd81e5372c}" Title="CodecApp" RuntimeType="Silverlight" Version="1.0.0.0" Genre="apps.normal" Author="CodecApp author" Description="Sample description" Publisher="CodecApp" PublisherID="{cb9bed24-05fd-451a-8736-6dad92946a6e}">
<IconPath IsRelative="true" IsResource="false">Assets\ApplicationIcon.png</IconPath>
<Capabilities>
<Capability Name="ID_CAP_NETWORKING" />
<Capability Name="ID_CAP_MEDIALIB_AUDIO" />
<Capability Name="ID_CAP_MEDIALIB_PLAYBACK" />
<Capability Name="ID_CAP_SENSORS" />
<Capability Name="ID_CAP_WEBBROWSERCOMPONENT" />
</Capabilities>
<Tasks>
<DefaultTask Name="_default" NavigationPage="MainPage.xaml" />
</Tasks>
<Tokens>
<PrimaryToken TokenID="CodecAppToken" TaskName="_default">
<TemplateFlip>
<SmallImageURI IsRelative="true" IsResource="false">Assets\Tiles\FlipCycleTileSmall.png</SmallImageURI>
<Count>0</Count>
<BackgroundImageURI IsRelative="true" IsResource="false">Assets\Tiles\FlipCycleTileMedium.png</BackgroundImageURI>
<Title>CodecApp</Title>
<BackContent></BackContent>
<BackBackgroundImageURI></BackBackgroundImageURI>
<BackTitle></BackTitle>
<DeviceLockImageURI></DeviceLockImageURI>
<HasLarge></HasLarge>
</TemplateFlip>
</PrimaryToken>
</Tokens>
<ScreenResolutions>
<ScreenResolution Name="ID_RESOLUTION_WVGA" />
<ScreenResolution Name="ID_RESOLUTION_WXGA" />
<ScreenResolution Name="ID_RESOLUTION_HD720P" />
</ScreenResolutions>
</App>
</Deployment>

View File

@ -0,0 +1,110 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.34014
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace CodecApp.Resources {
using System;
/// <summary>
/// A strongly-typed resource class, for looking up localized strings, etc.
/// </summary>
// This class was auto-generated by the StronglyTypedResourceBuilder
// class via a tool like ResGen or Visual Studio.
// To add or remove a member, edit your .ResX file then rerun ResGen
// with the /str option, or rebuild your VS project.
[global::System.CodeDom.Compiler.GeneratedCodeAttribute ("System.Resources.Tools.StronglyTypedResourceBuilder",
"4.0.0.0")]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
public class AppResources {
private static global::System.Resources.ResourceManager resourceMan;
private static global::System.Globalization.CultureInfo resourceCulture;
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute ("Microsoft.Performance",
"CA1811:AvoidUncalledPrivateCode")]
internal AppResources() {
}
/// <summary>
/// Returns the cached ResourceManager instance used by this class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute (global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Resources.ResourceManager ResourceManager {
get {
if (object.ReferenceEquals (resourceMan, null)) {
global::System.Resources.ResourceManager temp = new
global::System.Resources.ResourceManager ("CodecApp.Resources.AppResources", typeof (AppResources).Assembly);
resourceMan = temp;
}
return resourceMan;
}
}
/// <summary>
/// Overrides the current thread's CurrentUICulture property for all
/// resource lookups using this strongly typed resource class.
/// </summary>
[global::System.ComponentModel.EditorBrowsableAttribute (global::System.ComponentModel.EditorBrowsableState.Advanced)]
public static global::System.Globalization.CultureInfo Culture {
get {
return resourceCulture;
} set {
resourceCulture = value;
}
}
/// <summary>
/// Looks up a localized string similar to add.
/// </summary>
public static string AppBarButtonText {
get {
return ResourceManager.GetString ("AppBarButtonText", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Menu Item.
/// </summary>
public static string AppBarMenuItemText {
get {
return ResourceManager.GetString ("AppBarMenuItemText", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to MY APPLICATION.
/// </summary>
public static string ApplicationTitle {
get {
return ResourceManager.GetString ("ApplicationTitle", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to LeftToRight.
/// </summary>
public static string ResourceFlowDirection {
get {
return ResourceManager.GetString ("ResourceFlowDirection", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to en-US.
/// </summary>
public static string ResourceLanguage {
get {
return ResourceManager.GetString ("ResourceLanguage", resourceCulture);
}
}
}
}

View File

@ -0,0 +1,137 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="ResourceFlowDirection" xml:space="preserve">
<value>LeftToRight</value>
<comment>Controls the FlowDirection for all elements in the RootFrame. Set to the traditional direction of this resource file's language</comment>
</data>
<data name="ResourceLanguage" xml:space="preserve">
<value>en-US</value>
<comment>Controls the Language and ensures that the font for all elements in the RootFrame aligns with the app's language. Set to the language code of this resource file's language.</comment>
</data>
<data name="ApplicationTitle" xml:space="preserve">
<value>MY APPLICATION</value>
</data>
<data name="AppBarButtonText" xml:space="preserve">
<value>add</value>
</data>
<data name="AppBarMenuItemText" xml:space="preserve">
<value>Menu Item</value>
</data>
</root>

View File

@ -0,0 +1,39 @@
# Layer Configuration File
#============================== INPUT / OUTPUT ==============================
FrameWidth 160 # Input frame width
FrameHeight 96 # Input frame height
FrameRateOut 12 # Output frame rate [Hz]
ReconFile rec_layer2.yuv # Reconstructed file
#============================== CODING ==============================
ProfileIdc 66 # value of profile_idc (or 0 for auto detection)
InitialQP 24 # Quantization parameters for base quality layer
#================================ RATE CONTROL ===============================
SpatialBitrate 600 # Unit: kbps, controled by DisableRC also
MaxSpatialBitrate 800 # Unit: kbps, max bitrate for current layer
#============================== MultiSlice Slice Argument ==============================
# for S/M Slice(s) mode settings
SliceMode 0 # 0: sigle slice mode; >0: multiple slices mode, see below;
SliceSize 1500
SliceNum 1 # multiple slices number specified
SlicesAssign0 960 # count number of MBs in slice #0
SlicesAssign1 0 # count number of MBs in slice #1
SlicesAssign2 0 # count number of MBs in slice #2
SlicesAssign3 0 # count number of MBs in slice #3 -- seting here is for better testing
SlicesAssign4 0 # count number of MBs in slice #4
SlicesAssign5 0 # count number of MBs in slice #5
SlicesAssign6 0 # count number of MBs in slice #6
SlicesAssign7 0 # count number of MBs in slice #7
### DESIGN OF SLICE MODE ####
# 0 SM_SINGLE_SLICE | SliceNum==1
# 1 SM_FIXEDSLCNUM_SLICE | according to SliceNum | Enabled dynamic slicing for multi-thread
# 2 SM_RASTER_SLICE | according to SlicesAssign | Need input of MB numbers each slice. In addition, if other constraint in slice_argument is presented, need to follow the constraints. Typically if MB num and slice size are both constrained, re-encoding may be involved.
# 3 SM_ROWMB_SLICE | according to PictureMBHeight | Typical of single row of mbs each slice?+ slice size constraint which including re-encoding
# 4 SM_DYN_SLICE | according to SliceSize | Dynamic slicing (have no idea about slice_nums until encoding current frame)
# 5 SM_AUTO_SLICE | according to thread number | the number of slices is decided by the number of threads,SliceNum is ignored

View File

@ -0,0 +1,62 @@
# Cisco Scalable H.264/AVC Extension Encoder Configuration File
#============================== GENERAL ==============================
UsageType 0 #0: camera video 1:screen content
SourceWidth 160 #input video width
SourceHeight 96 #input video height
InputFile CiscoVT2people_160x96_6fps.yuv # Input file
OutputFile test.264 # Bitstream file
MaxFrameRate 30 # Maximum frame rate [Hz]
FramesToBeEncoded - 1 # Number of frames (at input frame rate)
TemporalLayerNum 2 # temporal layer number(1--4)
IntraPeriod 0 # Intra Period ( multipler of GoP size or -1)
EnableSpsPpsIDAddition 1
EnableFrameCropping 1 # enable frame cropping flag
EntropyCodingModeFlag 0 #0:cavlc 1:cabac
MaxNalSize 0 # Unit:Byte, Maximum Nal size
#============================== LOOP FILTER ==============================
LoopFilterDisableIDC 0 # Loop filter idc (0: on, 1: off,
# 2: on except for slice boundaries,
# 3: two stage. slice boundries on in second stage
# 4: Luma on but Chroma off (w.r.t. idc=0)
# 5: Luma on except on slice boundaries, but Chroma off in enh. layer (w.r.t. idc=2)
# 6: Luma on in two stage. slice boundries on in second stage, but Chroma off (w.r.t. idc=3)
LoopFilterAlphaC0Offset 0 # AlphaOffset(-6..+6): valid range
LoopFilterBetaOffset 0 # BetaOffset (-6..+6): valid range
#============================== SOFTWARE IMPLEMENTATION ==============================
MultipleThreadIdc 1
# 0: auto(dynamic imp. internal encoder); 1: multiple threads imp. disabled; > 1: count number of threads;
#============================== RATE CONTROL ==============================
RCMode 0
# 0: quality mode; 1: bitrate mode; # 2: buffer based mode,can't control bitrate; -1: rc off mode;
TargetBitrate 5000 # Unit: kbps, controled by EnableRC also
MaxOverallBitrate 6000 # Unit: kbps, max bitrate overall
EnableFrameSkip 1 #Enable Frame Skip
#============================== DENOISE CONTROL ==============================
EnableDenoise 0 # Enable Denoise (1: enable, 0: disable)
#============================== SCENE CHANGE DETECTION CONTROL =======================
EnableSceneChangeDetection 1 # Enable Scene Change Detection (1: enable, 0: disable)
#============================== BACKGROUND DETECTION CONTROL ==============================
EnableBackgroundDetection 1 # BGD control(1: enable, 0: disable)
#============================== ADAPTIVE QUANTIZATION CONTROL =======================
EnableAdaptiveQuantization 1 # Enable Adaptive Quantization (1: enable, 0: disable)
#============================== LONG TERM REFERENCE CONTROL ==============================
EnableLongTermReference 1 # Enable Long Term Reference (1: enable, 0: disable)
LtrMarkPeriod 30 # Long Term Reference Marking Period
#============================== LAYER DEFINITION ==============================
PrefixNALAddingCtrl 0 # Control flag of adding prefix unit (0: off, 1: on)
# It shall always be on in SVC contexts (i.e. when there are CGS/MGS/spatial enhancement layers)
# Can be disabled when no inter spatial layer prediction in case of its value as 0
NumLayers 1 # Number of layers
//LayerCfg layer0.cfg # Layer 0 configuration file
//LayerCfg layer1.cfg # Layer 1 configuration file
LayerCfg layer2.cfg # Layer 2 configuration file

View File

@ -0,0 +1,181 @@
// CodecRTComponent.cpp
#include <string.h>
#include <iostream>
#include "typedefs.h"
#include "CodecRTComponent.h"
using namespace CodecRTComponent;
using namespace Platform;
using namespace Windows::Storage;
extern "C" int EncMain (int argc, char** argv);
extern int32_t DecMain (int32_t iArgC, char* pArgV[]);
//encoder info
extern float g_fFPS;
extern double g_dEncoderTime;
extern int g_iEncodedFrame;
//decoder info
extern double g_dDecTime;
extern float g_fDecFPS;
extern int g_iDecodedFrameNum;
CodecRunTimeComponent::CodecRunTimeComponent() {
}
float CodecRunTimeComponent::GetEncFPS() {
return g_fFPS;
}
double CodecRunTimeComponent::GetEncTime() {
return g_dEncoderTime;
}
int CodecRunTimeComponent::GetEncodedFrameNum() {
return g_iEncodedFrame;
}
int CodecRunTimeComponent::Encode() {
int iRet = 0;
int argc = 6;
char* argv[6];
int iSize = 0;
//App test data files' path
char InputPath[256] = { 0 };
char InputWelsEncCfgPath[256] = { 0 };
char InputCfgPath[256] = { 0 };
char InputYUVPath[256] = { 0 };
char OutputPath[256] = { 0 };
char Output264Path[256] = { 0 };
//App data location
Windows::Storage::StorageFolder^ InputLocation;
Platform::String^ InputLocationPath;
Windows::Storage::StorageFolder^ OutputLocation;
Platform::String^ OutputLocationPath;
//set input file path
InputLocation = Windows::ApplicationModel::Package::Current->InstalledLocation;
InputLocationPath = Platform::String::Concat (InputLocation->Path, "\\");
const wchar_t* pWcharInputFile = InputLocationPath->Data();
iSize = wcslen (pWcharInputFile);
InputPath[iSize] = 0;
for (int y = 0; y < iSize; y++) {
InputPath[y] = (char)pWcharInputFile[y];
}
//set output file path
OutputLocation = ApplicationData::Current->LocalFolder;
OutputLocationPath = Platform::String::Concat (OutputLocation->Path, "\\");
const wchar_t* pWcharOutputFile = OutputLocationPath->Data();
iSize = wcslen (pWcharOutputFile);
OutputPath[iSize] = 0;
for (int y = 0; y < iSize; y++) {
OutputPath[y] = (char)pWcharOutputFile[y];
}
//App
strcpy (InputWelsEncCfgPath, InputPath);
strcat (InputWelsEncCfgPath, "welsenc.cfg");
strcpy (InputYUVPath, InputPath);
strcat (InputYUVPath, "CiscoVT2people_160x96_6fps.yuv");
// single layer only
strcpy (InputCfgPath, InputPath);
strcat (InputCfgPath, "layer2.cfg");
// for multiple layers
/*
strcpy(InputCfg0Path, InputPath);
strcat(InputCfg0Path, "layer0.cfg");
strcpy(InputCfg1Path, InputPath);
strcat(InputCfg1Path, "layer1.cfg");
...
*/
strcpy (Output264Path, OutputPath);
strcat (Output264Path, "WP8_Test_CiscoVT2people_160x96_6fps.264");
argv[0] = (char*) ("EncoderApp");
argv[1] = InputWelsEncCfgPath;
argv[2] = (char*) ("-org");
argv[3] = InputYUVPath;
argv[4] = (char*) ("-bf");
argv[5] = Output264Path;
argc = 6;
iRet = EncMain (argc, argv);
return iRet;
}
float CodecRunTimeComponent::GetDecFPS() {
return g_fDecFPS;
}
double CodecRunTimeComponent::GetDecTime() {
return g_dDecTime;
}
int CodecRunTimeComponent::GetDecodedFrameNum() {
return g_iDecodedFrameNum;
}
int CodecRunTimeComponent::Decode() {
int iRet = 0;
int argc = 3;
char* argv[3];
int size = 0;
//App data files' path
char InputPath[256] = { 0 };
char OutputPath[256] = { 0 };
char InputBitstreamPath[256] = { 0 };
char OutputYUVPath[256] = { 0 };
//App data location
Windows::Storage::StorageFolder^ InputLocation;
Platform::String^ InputLocationPath;
Windows::Storage::StorageFolder^ OutputLocation;
Platform::String^ OutputLocationPath;
//set input file path
InputLocation = Windows::ApplicationModel::Package::Current->InstalledLocation;
InputLocationPath = Platform::String::Concat (InputLocation->Path, "\\");
const wchar_t* pWcharInputFile = InputLocationPath->Data();
size = wcslen (pWcharInputFile);
InputPath[size] = 0;
for (int y = 0; y < size; y++) {
InputPath[y] = (char)pWcharInputFile[y];
}
//set output file path
OutputLocation = ApplicationData::Current->LocalFolder;
OutputLocationPath = Platform::String::Concat (OutputLocation->Path, "\\");
const wchar_t* pWcharOutputFile = OutputLocationPath->Data();
size = wcslen (pWcharOutputFile);
OutputPath[size] = 0;
for (int y = 0; y < size; y++) {
OutputPath[y] = (char)pWcharOutputFile[y];
}
//App test setting
strcpy_s (InputBitstreamPath, InputPath);
strcat_s (InputBitstreamPath, "BA_MW_D.264");
strcpy_s (OutputYUVPath, OutputPath);
strcat_s (OutputYUVPath, "WP8_Dec_BA_MW_D.yuv");
argv[0] = (char*) ("DecoderApp");
argv[1] = InputBitstreamPath;
argv[2] = OutputYUVPath;
argc = 3;
iRet = DecMain (argc, argv);
return iRet;
}

View File

@ -0,0 +1,22 @@
#pragma once
namespace CodecRTComponent {
// public ref class WindowsPhoneRuntimeComponent sealed
public ref class CodecRunTimeComponent sealed {
public:
CodecRunTimeComponent();
int Encode();
int Decode();
//Get encoder info
float GetEncFPS();
double GetEncTime();
int GetEncodedFrameNum();
//get decoder info
float GetDecFPS();
double GetDecTime();
int GetDecodedFrameNum();
};
}

View File

@ -0,0 +1,154 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{fe5bf241-f4ea-4b94-b36a-23511e5908ec}</ProjectGuid>
<RootNamespace>CodecRTComponent</RootNamespace>
<DefaultLanguage>en-US</DefaultLanguage>
<MinimumVisualStudioVersion>12.0</MinimumVisualStudioVersion>
<WinMDAssembly>true</WinMDAssembly>
<ApplicationType>Windows Phone Silverlight</ApplicationType>
<ApplicationTypeRevision>8.1</ApplicationTypeRevision>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v120</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<GenerateManifest>false</GenerateManifest>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<OutDir>..\..\..\..\bin\$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<OutDir>..\..\..\..\bin\$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PreprocessorDefinitions>_WINRT_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<CompileAsWinRT>true</CompileAsWinRT>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateWindowsMetadata>true</GenerateWindowsMetadata>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>_WINRT_DLL;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>Use</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<CompileAsWinRT>true</CompileAsWinRT>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateWindowsMetadata>true</GenerateWindowsMetadata>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM'">
<ClCompile>
<PreprocessorDefinitions>_WINRT_DLL;WINDOWS_PHONE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<CompileAsWinRT>true</CompileAsWinRT>
<AdditionalIncludeDirectories>..\..\..\console\dec\inc;..\..\..\console\common\inc;..\..\..\api\svc;..\..\..\common\inc;..\..\..\console\enc\inc;..\..\..\encoder\core\inc;..\..\..\processing\interface</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateWindowsMetadata>true</GenerateWindowsMetadata>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>openh264.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM'">
<ClCompile>
<PreprocessorDefinitions>_WINRT_DLL;WINDOWS_PHONE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
<AdditionalUsingDirectories>$(WindowsSDK_MetadataPath);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<CompileAsWinRT>true</CompileAsWinRT>
<AdditionalIncludeDirectories>..\..\..\console\dec\inc;..\..\..\console\common\inc;..\..\..\api\svc;..\..\..\common\inc;..\..\..\console\enc\inc;..\..\..\encoder\core\inc;..\..\..\processing\interface</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
<IgnoreSpecificDefaultLibraries>ole32.lib;%(IgnoreSpecificDefaultLibraries)</IgnoreSpecificDefaultLibraries>
<GenerateWindowsMetadata>true</GenerateWindowsMetadata>
<AdditionalLibraryDirectories>$(OutDir);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>openh264.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<Reference Include="platform.winmd">
<IsWinMDFile>true</IsWinMDFile>
<Private>false</Private>
</Reference>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\console\common\inc\read_config.h" />
<ClInclude Include="CodecRTComponent.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\..\console\common\src\read_config.cpp" />
<ClCompile Include="..\..\..\console\dec\src\d3d9_utils.cpp" />
<ClCompile Include="..\..\..\console\dec\src\h264dec.cpp" />
<ClCompile Include="..\..\..\console\enc\src\welsenc.cpp" />
<ClCompile Include="CodecRTComponent.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsPhone\v$(TargetPlatformVersion)\Microsoft.Cpp.WindowsPhone.$(TargetPlatformVersion).targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Encoder">
<UniqueIdentifier>{c79b8670-dc32-4fcc-9e17-780c1ba6e72e}</UniqueIdentifier>
</Filter>
<Filter Include="Decoder">
<UniqueIdentifier>{798a0155-92f2-4321-9d5f-47ddb62db8c7}</UniqueIdentifier>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="CodecRTComponent.cpp" />
<ClCompile Include="..\..\..\console\enc\src\welsenc.cpp">
<Filter>Encoder</Filter>
</ClCompile>
<ClCompile Include="..\..\..\console\common\src\read_config.cpp" />
<ClCompile Include="..\..\..\console\dec\src\d3d9_utils.cpp">
<Filter>Decoder</Filter>
</ClCompile>
<ClCompile Include="..\..\..\console\dec\src\h264dec.cpp">
<Filter>Decoder</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="CodecRTComponent.h" />
<ClInclude Include="..\..\..\console\common\inc\read_config.h" />
</ItemGroup>
</Project>

View File

@ -36,6 +36,8 @@
#ifdef __APPLE__
.text
.macro WELS_ASM_FUNC_BEGIN
.align 2
.arm
@ -50,6 +52,8 @@ mov pc, lr
.section .note.GNU-stack,"",%progbits // Mark stack as non-executable
.text
.arch armv7-a
.fpu neon
.macro WELS_ASM_FUNC_BEGIN funcName
.align 2

View File

@ -30,47 +30,9 @@
*
*/
#ifdef HAVE_NEON
.text
#ifdef HAVE_NEON
#include "arm_arch_common_macro.S"
#ifdef __APPLE__
.macro LOAD_ALIGNED_DATA_WITH_STRIDE
// { // input: $0~$3, src*, src_stride
vld1.64 {$0}, [$4,:128], $5
vld1.64 {$1}, [$4,:128], $5
vld1.64 {$2}, [$4,:128], $5
vld1.64 {$3}, [$4,:128], $5
// }
.endm
.macro STORE_ALIGNED_DATA_WITH_STRIDE
// { // input: $0~$3, dst*, dst_stride
vst1.64 {$0}, [$4,:128], $5
vst1.64 {$1}, [$4,:128], $5
vst1.64 {$2}, [$4,:128], $5
vst1.64 {$3}, [$4,:128], $5
// }
.endm
.macro LOAD_UNALIGNED_DATA_WITH_STRIDE
// { // input: $0~$3, src*, src_stride
vld1.64 {$0}, [$4], $5
vld1.64 {$1}, [$4], $5
vld1.64 {$2}, [$4], $5
vld1.64 {$3}, [$4], $5
// }
.endm
.macro STORE_UNALIGNED_DATA_WITH_STRIDE
// { // input: $0~$3, dst*, dst_stride
vst1.64 {$0}, [$4], $5
vst1.64 {$1}, [$4], $5
vst1.64 {$2}, [$4], $5
vst1.64 {$3}, [$4], $5
// }
.endm
#else
.macro LOAD_ALIGNED_DATA_WITH_STRIDE arg0, arg1, arg2, arg3, arg4, arg5
// { // input: \arg0~\arg3, src*, src_stride
vld1.64 {\arg0}, [\arg4,:128], \arg5
@ -107,8 +69,6 @@
// }
.endm
#endif
WELS_ASM_FUNC_BEGIN WelsCopy8x8_neon

View File

@ -31,129 +31,9 @@
*/
#ifdef HAVE_NEON
.text
#include "arm_arch_common_macro.S"
#ifdef __APPLE__
.macro JMP_IF_128BITS_IS_ZERO
vorr.s16 $2, $0, $1
vmov r3, r2, $2
orr r3, r3, r2
cmp r3, #0
.endm
.macro MASK_MATRIX
vabd.u8 $6, $1, $2
vcgt.u8 $6, $4, $6
vabd.u8 $4, $0, $1
vclt.u8 $4, $4, $5
vand.u8 $6, $6, $4
vabd.u8 $4, $3, $2
vclt.u8 $4, $4, $5
vand.u8 $6, $6, $4
.endm
.macro DIFF_LUMA_LT4_P1_Q1
vmov.i8 $9, #128
vrhadd.u8 $8, $2, $3
vhadd.u8 $8, $0, $8
vsub.s8 $8, $8, $9
vsub.s8 $9, $1, $9
vqsub.s8 $8, $8, $9
vmax.s8 $8, $8, $5
vmin.s8 $8, $8, $6
vabd.u8 $9, $0, $2
vclt.u8 $9, $9, $4
vand.s8 $8, $8, $9
vand.s8 $8, $8, $7
vadd.u8 $8, $1, $8
vabs.s8 $9, $9
.endm
.macro DIFF_LUMA_LT4_P0_Q0
vsubl.u8 $5, $0, $3
vsubl.u8 $6, $2, $1
vshl.s16 $6, $6, #2
vadd.s16 $5, $5, $6
vqrshrn.s16 $4, $5, #3
.endm
.macro DIFF_LUMA_EQ4_P2P1P0
vaddl.u8 q4, $1, $2
vaddl.u8 q5, $3, $4
vadd.u16 q5, q4, q5
vaddl.u8 q4, $0, $1
vshl.u16 q4, q4, #1
vadd.u16 q4, q5, q4
vrshrn.u16 $0, q5, #2
vrshrn.u16 $7, q4, #3
vshl.u16 q5, q5, #1
vsubl.u8 q4, $5, $1
vadd.u16 q5, q4,q5
vaddl.u8 q4, $2, $5
vaddw.u8 q4, q4, $2
vaddw.u8 q4, q4, $3
vrshrn.u16 d10,q5, #3
vrshrn.u16 d8, q4, #2
vbsl.u8 $6, d10, d8
.endm
.macro DIFF_LUMA_EQ4_MASK
vmov $3, $2
vbsl.u8 $3, $0, $1
.endm
.macro DIFF_CHROMA_EQ4_P0Q0
vaddl.u8 $4, $0, $3
vaddw.u8 $5, $4, $1
vaddw.u8 $6, $4, $2
vaddw.u8 $5, $5, $0
vaddw.u8 $6, $6, $3
vrshrn.u16 $7, $5, #2
vrshrn.u16 $8, $6, #2
.endm
.macro LOAD_CHROMA_DATA_4
vld4.u8 {$0[$8],$1[$8],$2[$8],$3[$8]}, [r0], r2
vld4.u8 {$4[$8],$5[$8],$6[$8],$7[$8]}, [r1], r2
.endm
.macro STORE_CHROMA_DATA_4
vst4.u8 {$0[$8],$1[$8],$2[$8],$3[$8]}, [r0], r2
vst4.u8 {$4[$8],$5[$8],$6[$8],$7[$8]}, [r1], r2
.endm
.macro LOAD_LUMA_DATA_3
vld3.u8 {$0[$6],$1[$6],$2[$6]}, [r2], r1
vld3.u8 {$3[$6],$4[$6],$5[$6]}, [r0], r1
.endm
.macro STORE_LUMA_DATA_4
vst4.u8 {$0[$4],$1[$4],$2[$4],$3[$4]}, [r0], r1
vst4.u8 {$0[$5],$1[$5],$2[$5],$3[$5]}, [r2], r1
.endm
.macro STORE_LUMA_DATA_3
vst3.u8 {$0[$6],$1[$6],$2[$6]}, [r3], r1
vst3.u8 {$3[$6],$4[$6],$5[$6]}, [r0], r1
.endm
.macro EXTRACT_DELTA_INTO_TWO_PART
vcge.s8 $1, $0, #0
vand $1, $0, $1
vsub.s8 $0, $1, $0
.endm
#else
.macro JMP_IF_128BITS_IS_ZERO arg0, arg1, arg2
vorr.s16 \arg2, \arg0, \arg1
vmov r3, r2, \arg2
@ -270,7 +150,6 @@
vand \arg1, \arg0, \arg1
vsub.s8 \arg0, \arg1, \arg0
.endm
#endif
WELS_ASM_FUNC_BEGIN DeblockLumaLt4V_neon
vpush {q4-q7}
@ -834,113 +713,14 @@ WELS_ASM_FUNC_END
WELS_ASM_FUNC_BEGIN WelsNonZeroCount_neon
vld1.64 {d0-d2}, [r0]
vceq.s8 q0, q0, #0
vceq.s8 d2, d2, #0
vmvn q0, q0
vmvn d2, d2
vabs.s8 q0, q0
vabs.s8 d2, d2
vst1.64 {d0-d2}, [r0]
mov r1, #1
vdup.8 q2, r1
vld1.64 {d0,d1,d2}, [r0]
vmin.s8 q0, q0, q2
vmin.s8 d2, d2, d4
vst1.64 {d0,d1,d2}, [r0]
WELS_ASM_FUNC_END
#ifdef __APPLE__
.macro BS_NZC_CHECK
vld1.8 {d0,d1}, [$0]
/* Arrenge the input data --- TOP */
ands r6, $1, #2
beq bs_nzc_check_jump0
sub r6, $0, $2, lsl #4
sub r6, r6, $2, lsl #3
add r6, #12
vld1.32 d3[1], [r6]
bs_nzc_check_jump0:
vext.8 q1, q1, q0, #12
vadd.u8 $3, q0, q1
/* Arrenge the input data --- LEFT */
ands r6, $1, #1
beq bs_nzc_check_jump1
sub r6, $0, #21
add r7, r6, #4
vld1.8 d3[4], [r6]
add r6, r7, #4
vld1.8 d3[5], [r7]
add r7, r6, #4
vld1.8 d3[6], [r6]
vld1.8 d3[7], [r7]
bs_nzc_check_jump1:
vzip.8 d0, d1
vzip.8 d0, d1
vext.8 q1, q1, q0, #12
vadd.u8 $4, q0, q1
.endm
.macro BS_COMPARE_MV //in: $0,$1(const),$2(const),$3(const),$4(const); out:$5, $6
mov r6, #4
vabd.s16 q8, $0, $1
vabd.s16 q9, $1, $2
vdup.s16 $0, r6
vabd.s16 q10, $2, $3
vabd.s16 q11, $3, $4
vcge.s16 q8, $0
vcge.s16 q9, $0
vcge.s16 q10, $0
vcge.s16 q11, $0
vpadd.i16 d16, d16, d17
vpadd.i16 d17, d18, d19
vpadd.i16 d18, d20, d21
vpadd.i16 d19, d22, d23
vaddhn.i16 $5, q8, q8
vaddhn.i16 $6, q9, q9
.endm
.macro BS_MV_CHECK
vldm $0, {q0,q1,q2,q3}
/* Arrenge the input data --- TOP */
ands r6, $1, #2
beq bs_mv_check_jump0
sub r6, $0, $2, lsl #6
add r6, #48
vld1.8 {d8, d9}, [r6]
bs_mv_check_jump0:
BS_COMPARE_MV q4, q0, q1, q2, q3, $3, $4
/* Arrenge the input data --- LEFT */
ands r6, $1, #1
beq bs_mv_check_jump1
sub r6, $0, #52
add r7, r6, #16
vld1.32 d8[0], [r6]
add r6, r7, #16
vld1.32 d8[1], [r7]
add r7, r6, #16
vld1.32 d9[0], [r6]
vld1.32 d9[1], [r7]
bs_mv_check_jump1:
vzip.32 q0, q2
vzip.32 q1, q3
vzip.32 q0, q1
vzip.32 q2, q3
BS_COMPARE_MV q4, q0, q1, q2, q3, $5, $6
.endm
#else
.macro BS_NZC_CHECK arg0, arg1, arg2, arg3, arg4
vld1.8 {d0,d1}, [\arg0]
/* Arrenge the input data --- TOP */
@ -1033,7 +813,6 @@ bs_mv_check_jump1:
vzip.32 q2, q3
BS_COMPARE_MV q4, q0, q1, q2, q3, \arg5, \arg6
.endm
#endif
WELS_ASM_FUNC_BEGIN DeblockingBSCalcEnc_neon

View File

@ -31,7 +31,6 @@
*/
#ifdef HAVE_NEON
.text
#include "arm_arch_common_macro.S"

View File

@ -31,8 +31,7 @@
*/
#ifdef HAVE_NEON
.text
#ifdef HAVE_NEON
#include "arm_arch_common_macro.S"
WELS_ASM_FUNC_BEGIN WelsI16x16LumaPredV_neon

View File

@ -30,121 +30,9 @@
*
*/
#ifdef HAVE_NEON
.text
#ifdef HAVE_NEON
#include "arm_arch_common_macro.S"
#ifdef __APPLE__
.macro AVERAGE_TWO_8BITS
// { // input:dst_d, src_d A and B; working: q13
vaddl.u8 q13, $2, $1
vrshrn.u16 $0, q13, #1
// }
.endm
.macro FILTER_6TAG_8BITS
// { // input:src[-2], src[-1], src[0], src[1], src[2], src[3], dst_d, multiplier a/b; working: q12, q13
vaddl.u8 q12, $0, $5 //q12=src[-2]+src[3]
vaddl.u8 q13, $2, $3 //src[0]+src[1]
vmla.u16 q12, q13, $7 //q12 += 20*(src[0]+src[1]), 2 cycles
vaddl.u8 q13, $1, $4 //src[-1]+src[2]
vmls.s16 q12, q13, $8 //q12 -= 5*(src[-1]+src[2]), 2 cycles
vqrshrun.s16 $6, q12, #5
// }
.endm
.macro FILTER_SINGLE_TAG_8BITS // when width=17/9, used
// { // input: src_d{Y[0][1][2][3][4][5]X, the even of working_q2},
vrev64.8 $2, $0 // X[5][4][3][2][1][0]O
vaddl.u8 $3, $0, $2 // each 16bits, *[50][41][32][23][14][05]*
vmul.s16 $0, $2, $1 // 0+1*[50]-5*[41]+20[32]
vpadd.s16 $0, $0, $0
vpadd.s16 $0, $0, $0
vqrshrun.s16 $0, $4, #5
// }
.endm
.macro FILTER_6TAG_8BITS_AVERAGE_WITH_0
// { // input:src[-2], src[-1], src[0], src[1], src[2], src[3], dst_d, multiplier a/b; working: q12, q13
vaddl.u8 q12, $0, $5 //q12=src[-2]+src[3]
vaddl.u8 q13, $2, $3 //src[0]+src[1]
vmla.u16 q12, q13, $7 //q12 += 20*(src[0]+src[1]), 2 cycles
vaddl.u8 q13, $1, $4 //src[-1]+src[2]
vmls.s16 q12, q13, $8 //q12 -= 5*(src[-1]+src[2]), 2 cycles
vqrshrun.s16 $6, q12, #5
vaddl.u8 q13, $2, $6
vrshrn.u16 $6, q13, #1
// }
.endm
.macro FILTER_6TAG_8BITS_AVERAGE_WITH_1
// { // input:src[-2], src[-1], src[0], src[1], src[2], src[3], dst_d, multiplier a/b; working: q12, q13
vaddl.u8 q12, $0, $5 //q12=src[-2]+src[3]
vaddl.u8 q13, $2, $3 //src[0]+src[1]
vmla.u16 q12, q13, $7 //q12 += 20*(src[0]+src[1]), 2 cycles
vaddl.u8 q13, $1, $4 //src[-1]+src[2]
vmls.s16 q12, q13, $8 //q12 -= 5*(src[-1]+src[2]), 2 cycles
vqrshrun.s16 $6, q12, #5
vaddl.u8 q13, $3, $6
vrshrn.u16 $6, q13, #1
// }
.endm
.macro FILTER_6TAG_8BITS_TO_16BITS
// { // input:d_src[-2], d_src[-1], d_src[0], d_src[1], d_src[2], d_src[3], dst_q, multiplier a/b; working:q13
vaddl.u8 $6, $0, $5 //dst_q=src[-2]+src[3]
vaddl.u8 q13, $2, $3 //src[0]+src[1]
vmla.u16 $6, q13, $7 //dst_q += 20*(src[0]+src[1]), 2 cycles
vaddl.u8 q13, $1, $4 //src[-1]+src[2]
vmls.s16 $6, q13, $8 //dst_q -= 5*(src[-1]+src[2]), 2 cycles
// }
.endm
.macro FILTER_3_IN_16BITS_TO_8BITS
// { // input:a, b, c, dst_d;
vsub.s16 $0, $0, $1 //a-b
vshr.s16 $0, $0, #2 //(a-b)/4
vsub.s16 $0, $0, $1 //(a-b)/4-b
vadd.s16 $0, $0, $2 //(a-b)/4-b+c
vshr.s16 $0, $0, #2 //((a-b)/4-b+c)/4
vadd.s16 $0, $0, $2 //((a-b)/4-b+c)/4+c = (a-5*b+20*c)/16
vqrshrun.s16 $3, $0, #6 //(+32)>>6
// }
.endm
.macro UNPACK_2_16BITS_TO_ABC
// { // input:q_src[-2:5], q_src[6:13](avail 8+5)/q_src[6:**](avail 4+5), dst_a, dst_b, dst_c;
vext.16 $4, $0, $1, #2 //src[0]
vext.16 $3, $0, $1, #3 //src[1]
vadd.s16 $4, $3 //c=src[0]+src[1]
vext.16 $3, $0, $1, #1 //src[-1]
vext.16 $2, $0, $1, #4 //src[2]
vadd.s16 $3, $2 //b=src[-1]+src[2]
vext.16 $2, $0, $1, #5 //src[3]
vadd.s16 $2, $0 //a=src[-2]+src[3]
// }
.endm
.macro UNPACK_1_IN_8x16BITS_TO_8BITS
// { // each 16bits; input: d_dst, d_src[0:3] (even), d_src[4:5]+%% (odd)
vext.16 $3, $3, $3, #7 // 0x????, [0][1][2][3][4][5],
vrev64.16 $1, $1
vadd.u16 $2, $1 // C[2+3],B[1+4],A[0+5],
vshr.s64 $1, $2, #16
vshr.s64 $0, $2, #32 // Output: C $2, B $1, A $0
vsub.s16 $0, $0, $1 //a-b
vshr.s16 $0, $0, #2 //(a-b)/4
vsub.s16 $0, $0, $1 //(a-b)/4-b
vadd.s16 $0, $0, $2 //(a-b)/4-b+c
vshr.s16 $0, $0, #2 //((a-b)/4-b+c)/4
vadd.s16 $1, $0, $2 //((a-b)/4-b+c)/4+c = (a-5*b+20*c)/16
vqrshrun.s16 $0, $3, #6 //(+32)>>6
// }
.endm
#else
.macro AVERAGE_TWO_8BITS arg0, arg1, arg2
// { // input:dst_d, src_d A and B; working: q13
vaddl.u8 q13, \arg2, \arg1
@ -163,7 +51,7 @@
// }
.endm
.macro FILTER_SINGLE_TAG_8BITS arg0, arg1,arg2, arg3, arg4,arg5 // when width=17/9, used
.macro FILTER_SINGLE_TAG_8BITS arg0, arg1,arg2, arg3, arg4 // when width=17/9, used
// { // input: src_d{Y[0][1][2][3][4][5]X, the even of working_q2}
vrev64.8 \arg2, \arg0 // X[5][4][3][2][1][0]O
vaddl.u8 \arg3, \arg0, \arg2 // each 16bits, *[50][41][32][23][14][05]*
@ -254,7 +142,6 @@
vqrshrun.s16 \arg0, \arg3, #6 //(+32)>>6
// }
.endm
#endif
WELS_ASM_FUNC_BEGIN McHorVer20WidthEq16_neon
push {r4}
@ -1748,6 +1635,36 @@ w9_h_mc_luma_loop:
WELS_ASM_FUNC_END
WELS_ASM_FUNC_BEGIN McHorVer20Width5_neon
push {r4}
sub r3, #4
sub r0, #2
ldr r4, [sp, #4]
vmov.u16 q14, #0x0014 // 20
vshr.u16 q15, q14, #2 // 5
w5_h_mc_luma_loop:
vld1.u8 {d0,d1}, [r0], r1 //only use 10(5+5); q0=src[-2]
pld [r0]
vext.8 d2, d0, d1, #1 //d2=src[-1]
vext.8 d3, d0, d1, #2 //d3=src[0]
vext.8 d4, d0, d1, #3 //d4=src[1]
vext.8 d5, d0, d1, #4 //d5=src[2]
vext.8 d6, d0, d1, #5 //d6=src[3]
FILTER_6TAG_8BITS d0, d2, d3, d4, d5, d6, d16, q14, q15
sub r4, #1
vst1.u32 {d16[0]}, [r2]! //write [0:3] Byte
vst1.u8 {d16[4]}, [r2], r3 //write 5th Byte
cmp r4, #0
bne w5_h_mc_luma_loop
pop {r4}
WELS_ASM_FUNC_END
WELS_ASM_FUNC_BEGIN McHorVer02Height17_neon
push {r4}
ldr r4, [sp, #4]
@ -1893,6 +1810,63 @@ w9_v_mc_luma_loop:
WELS_ASM_FUNC_END
WELS_ASM_FUNC_BEGIN McHorVer02Height5_neon
push {r4}
ldr r4, [sp, #4]
sub r0, r0, r1, lsl #1 //src[-2*src_stride]
pld [r0]
pld [r0, r1]
vmov.u16 q14, #0x0014 // 20
vld1.u8 {d0}, [r0], r1 //d0=src[-2]
vld1.u8 {d1}, [r0], r1 //d1=src[-1]
pld [r0]
pld [r0, r1]
vshr.u16 q15, q14, #2 // 5
vld1.u8 {d2}, [r0], r1 //d2=src[0]
vld1.u8 {d3}, [r0], r1 //d3=src[1]
vld1.u8 {d4}, [r0], r1 //d4=src[2]
vld1.u8 {d5}, [r0], r1 //d5=src[3]
w5_v_mc_luma_loop:
pld [r0]
FILTER_6TAG_8BITS d0, d1, d2, d3, d4, d5, d16, q14, q15
vld1.u8 {d0}, [r0], r1 //read 2nd row
vst1.u32 {d16[0]}, [r2], r3 //write 1st 4Byte
pld [r0]
FILTER_6TAG_8BITS d1, d2, d3, d4, d5, d0, d16, q14, q15
vld1.u8 {d1}, [r0], r1 //read 3rd row
vst1.u32 {d16[0]}, [r2], r3 //write 2nd 4Byte
pld [r0]
FILTER_6TAG_8BITS d2, d3, d4, d5, d0, d1, d16, q14, q15
vld1.u8 {d2}, [r0], r1 //read 4th row
vst1.u32 {d16[0]}, [r2], r3 //write 3rd 4Byte
pld [r0]
FILTER_6TAG_8BITS d3, d4, d5, d0, d1, d2, d16, q14, q15
vld1.u8 {d3}, [r0], r1 //read 5th row
vst1.u32 {d16[0]}, [r2], r3 //write 4th 8Byte
//d4, d5, d0, d1, d2, d3 --> d0, d1, d2, d3, d4, d5
vswp q0, q2
vswp q1, q2
sub r4, #4
cmp r4, #1
bne w5_v_mc_luma_loop
FILTER_6TAG_8BITS d0, d1, d2, d3, d4, d5, d16, q14, q15
vst1.u32 {d16[0]}, [r2], r3 //write last 4Byte
pop {r4}
WELS_ASM_FUNC_END
WELS_ASM_FUNC_BEGIN McHorVer22Width17_neon
push {r4}
vpush {q4-q7}
@ -2132,6 +2106,105 @@ w9_hv_mc_luma_loop:
WELS_ASM_FUNC_END
WELS_ASM_FUNC_BEGIN McHorVer22Width5_neon
push {r4}
vpush {q4}
ldr r4, [sp, #20]
sub r0, #2 //src[-2]
sub r0, r0, r1, lsl #1 //src[-2*src_stride-2]
pld [r0]
pld [r0, r1]
vmov.u16 q14, #0x0014 // 20
vld1.u8 {q0}, [r0], r1 //use 10(5+5), =src[-2]
vld1.u8 {q1}, [r0], r1 //use 10(5+5), =src[-1]
pld [r0]
pld [r0, r1]
vshr.u16 q15, q14, #2 // 5
vld1.u8 {q2}, [r0], r1 //use 10(5+5), =src[0]
vld1.u8 {q3}, [r0], r1 //use 10(5+5), =src[1]
pld [r0]
pld [r0, r1]
vld1.u8 {q4}, [r0], r1 //use 10(5+5), =src[2]
sub r3, #4
w5_hv_mc_luma_loop:
vld1.u8 {q8}, [r0], r1 //use 10(5+5), =src[3]
//the 1st row
pld [r0]
// vertical filtered into q9/q10
FILTER_6TAG_8BITS_TO_16BITS d0, d2, d4, d6, d8, d16, q9, q14, q15
FILTER_6TAG_8BITS_TO_16BITS d1, d3, d5, d7, d9, d17, q10, q14, q15
// horizon filtered
UNPACK_2_16BITS_TO_ABC q9, q10, q11, q12, q13
FILTER_3_IN_16BITS_TO_8BITS q11, q12, q13, d18
vst1.u32 {d18[0]}, [r2]! //write 4Byte
vst1.u8 {d18[4]}, [r2], r3 //write 5th Byte
vld1.u8 {q0}, [r0], r1 //read 2nd row
//the 2nd row
pld [r0]
// vertical filtered into q9/q10
FILTER_6TAG_8BITS_TO_16BITS d2, d4, d6, d8, d16, d0, q9, q14, q15
FILTER_6TAG_8BITS_TO_16BITS d3, d5, d7, d9, d17, d1, q10, q14, q15
// horizon filtered
UNPACK_2_16BITS_TO_ABC q9, q10, q11, q12, q13
FILTER_3_IN_16BITS_TO_8BITS q11, q12, q13, d18
vst1.u32 {d18[0]}, [r2]! //write 4Byte
vst1.u8 {d18[4]}, [r2], r3 //write 5th Byte
vld1.u8 {q1}, [r0], r1 //read 3rd row
//the 3rd row
pld [r0]
// vertical filtered into q9/q10
FILTER_6TAG_8BITS_TO_16BITS d4, d6, d8, d16, d0, d2, q9, q14, q15
FILTER_6TAG_8BITS_TO_16BITS d5, d7, d9, d17, d1, d3, q10, q14, q15
// horizon filtered
UNPACK_2_16BITS_TO_ABC q9, q10, q11, q12, q13
FILTER_3_IN_16BITS_TO_8BITS q11, q12, q13, d18
vst1.u32 {d18[0]}, [r2]! //write 4Byte
vst1.u8 {d18[4]}, [r2], r3 //write 5th Byte
vld1.u8 {q2}, [r0], r1 //read 4th row
//the 4th row
pld [r0]
// vertical filtered into q9/q10
FILTER_6TAG_8BITS_TO_16BITS d6, d8, d16, d0, d2, d4, q9, q14, q15
FILTER_6TAG_8BITS_TO_16BITS d7, d9, d17, d1, d3, d5, q10, q14, q15
// horizon filtered
UNPACK_2_16BITS_TO_ABC q9, q10, q11, q12, q13
FILTER_3_IN_16BITS_TO_8BITS q11, q12, q13, d18
vst1.u32 {d18[0]}, [r2]! //write 4Byte
vst1.u8 {d18[4]}, [r2], r3 //write 5th Byte
//q4~q8, q0~q2, --> q0~q4
vswp q0, q4
vswp q2, q4
vmov q3, q1
vmov q1, q8
sub r4, #4
cmp r4, #1
bne w5_hv_mc_luma_loop
//the last row
vld1.u8 {q8}, [r0], r1 //use 10(5+5), =src[3]
// vertical filtered into q9/q10
FILTER_6TAG_8BITS_TO_16BITS d0, d2, d4, d6, d8, d16, q9, q14, q15
FILTER_6TAG_8BITS_TO_16BITS d1, d3, d5, d7, d9, d17, q10, q14, q15
// horizon filtered
UNPACK_2_16BITS_TO_ABC q9, q10, q11, q12, q13
FILTER_3_IN_16BITS_TO_8BITS q11, q12, q13, d18
vst1.u32 {d18[0]}, [r2]! //write 4Byte
vst1.u8 {d18[4]}, [r2], r3 //write 5th Byte
vpop {q4}
pop {r4}
WELS_ASM_FUNC_END
WELS_ASM_FUNC_BEGIN PixStrideAvgWidthEq16_neon
push {r4, r5, r6}
ldr r4, [sp, #12]

View File

@ -32,6 +32,8 @@
#ifdef __APPLE__
.text
.macro WELS_ASM_AARCH64_FUNC_BEGIN
.align 2
.globl _$0
@ -59,12 +61,8 @@ ret
.endfunc
.endm
.macro mov.16b arg0, arg1
mov \arg0\().16b, \arg1\().16b
.endm
.macro mov.8b arg0, arg1
mov \arg0\().8b, \arg1\().8b
.endm
#endif
.macro SIGN_EXTENSION arg0, arg1
sxtw \arg0, \arg1
.endm

View File

@ -30,84 +30,9 @@
*
*/
#ifdef HAVE_NEON_AARCH64
.text
#ifdef HAVE_NEON_AARCH64
#include "arm_arch64_common_macro.S"
#ifdef __APPLE__
.macro LOAD_ALIGNED_DATA_WITH_STRIDE
// { // input: $0~$3, src*, src_stride
ld1 {$0.d}[0], [$4], $5
ld1 {$1.d}[0], [$4], $5
ld1 {$2.d}[0], [$4], $5
ld1 {$3.d}[0], [$4], $5
// }
.endm
.macro STORE_ALIGNED_DATA_WITH_STRIDE
// { // input: $0~$3, dst*, dst_stride
st1 {$0.d}[0], [$4], $5
st1 {$1.d}[0], [$4], $5
st1 {$2.d}[0], [$4], $5
st1 {$3.d}[0], [$4], $5
// }
.endm
.macro LOAD_UNALIGNED_DATA_WITH_STRIDE
// { // input: $0~$3, src*, src_stride
ld1 {$0.8b}, [$4], $5
ld1 {$1.8b}, [$4], $5
ld1 {$2.8b}, [$4], $5
ld1 {$3.8b}, [$4], $5
// }
.endm
.macro STORE_UNALIGNED_DATA_WITH_STRIDE
// { // input: $0~$3, dst*, dst_stride
st1 {$0.8b}, [$4], $5
st1 {$1.8b}, [$4], $5
st1 {$2.8b}, [$4], $5
st1 {$3.8b}, [$4], $5
// }
.endm
.macro LOAD16_ALIGNED_DATA_WITH_STRIDE
// { // input: $0~$3, src*, src_stride
ld1 {$0.2d}, [$4], $5
ld1 {$1.2d}, [$4], $5
ld1 {$2.2d}, [$4], $5
ld1 {$3.2d}, [$4], $5
// }
.endm
.macro STORE16_ALIGNED_DATA_WITH_STRIDE
// { // input: $0~$3, dst*, dst_stride
st1 {$0.2d}, [$4], $5
st1 {$1.2d}, [$4], $5
st1 {$2.2d}, [$4], $5
st1 {$3.2d}, [$4], $5
// }
.endm
.macro LOAD16_UNALIGNED_DATA_WITH_STRIDE
// { // input: $0~$3, src*, src_stride
ld1 {$0.16b}, [$4], $5
ld1 {$1.16b}, [$4], $5
ld1 {$2.16b}, [$4], $5
ld1 {$3.16b}, [$4], $5
// }
.endm
.macro STORE16_UNALIGNED_DATA_WITH_STRIDE
// { // input: $0~$3, dst*, dst_stride
st1 {$0.16b}, [$4], $5
st1 {$1.16b}, [$4], $5
st1 {$2.16b}, [$4], $5
st1 {$3.16b}, [$4], $5
// }
.endm
#else
.macro LOAD_ALIGNED_DATA_WITH_STRIDE arg0, arg1, arg2, arg3, arg4, arg5
// { // input: $0~$3, src*, src_stride
ld1 {\arg0\().d}[0], [\arg4], \arg5
@ -180,11 +105,10 @@
// }
.endm
#endif
//void WelsCopy8x8_AArch64_neon (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS);
WELS_ASM_AARCH64_FUNC_BEGIN WelsCopy8x8_AArch64_neon
SIGN_EXTENSION x1,w1
SIGN_EXTENSION x3,w3
LOAD_UNALIGNED_DATA_WITH_STRIDE v0, v1, v2, v3, x2, x3
STORE_UNALIGNED_DATA_WITH_STRIDE v0, v1, v2, v3, x0, x1
@ -197,7 +121,8 @@ WELS_ASM_AARCH64_FUNC_END
WELS_ASM_AARCH64_FUNC_BEGIN WelsCopy16x16_AArch64_neon
SIGN_EXTENSION x1,w1
SIGN_EXTENSION x3,w3
LOAD16_ALIGNED_DATA_WITH_STRIDE v0, v1, v2, v3, x2, x3
STORE16_ALIGNED_DATA_WITH_STRIDE v0, v1, v2, v3, x0, x1
@ -218,7 +143,8 @@ WELS_ASM_AARCH64_FUNC_END
WELS_ASM_AARCH64_FUNC_BEGIN WelsCopy16x16NotAligned_AArch64_neon
SIGN_EXTENSION x1,w1
SIGN_EXTENSION x3,w3
LOAD16_UNALIGNED_DATA_WITH_STRIDE v0, v1, v2, v3, x2, x3
STORE16_UNALIGNED_DATA_WITH_STRIDE v0, v1, v2, v3, x0, x1
@ -239,7 +165,8 @@ WELS_ASM_AARCH64_FUNC_END
WELS_ASM_AARCH64_FUNC_BEGIN WelsCopy16x8NotAligned_AArch64_neon
SIGN_EXTENSION x1,w1
SIGN_EXTENSION x3,w3
LOAD16_UNALIGNED_DATA_WITH_STRIDE v0, v1, v2, v3, x2, x3
STORE16_UNALIGNED_DATA_WITH_STRIDE v0, v1, v2, v3, x0, x1
@ -252,7 +179,8 @@ WELS_ASM_AARCH64_FUNC_END
WELS_ASM_AARCH64_FUNC_BEGIN WelsCopy8x16_AArch64_neon
SIGN_EXTENSION x1,w1
SIGN_EXTENSION x3,w3
LOAD_UNALIGNED_DATA_WITH_STRIDE v0, v1, v2, v3, x2, x3
STORE_UNALIGNED_DATA_WITH_STRIDE v0, v1, v2, v3, x0, x1

View File

@ -31,268 +31,8 @@
*/
#ifdef HAVE_NEON_AARCH64
.text
#include "arm_arch64_common_macro.S"
#ifdef __APPLE__
.macro MASK_MATRIX
uabd $6.16b, $1.16b, $2.16b
cmhi $6.16b, $4.16b, $6.16b
uabd $4.16b, $0.16b, $1.16b
cmhi $4.16b, $5.16b, $4.16b
and $6.16b, $6.16b, $4.16b
uabd $4.16b, $3.16b, $2.16b
cmhi $4.16b, $5.16b, $4.16b
and $6.16b, $6.16b, $4.16b
.endm
.macro DIFF_LUMA_LT4_P1_Q1 //(Use Tmp v23, v24)
//v0, v1, v2, v3, v17(beta), v18(-Tc0), v6(Tc0), v7(flag), v19, v20
urhadd $8.16b, $2.16b, $3.16b
uhadd $8.16b, $0.16b, $8.16b
usubl $9.8h, $8.8b, $1.8b
sqxtn $9.8b, $9.8h
usubl2 $8.8h, $8.16b, $1.16b
sqxtn2 $9.16b, $8.8h
smax $8.16b, $9.16b, $5.16b
//
smin $8.16b, $8.16b, $6.16b
uabd $9.16b, $0.16b, $2.16b
cmhi $9.16b, $4.16b, $9.16b
and $8.16b, $8.16b, $9.16b
and $8.16b, $8.16b, $7.16b
add $8.16b, $1.16b, $8.16b
abs $9.16b, $9.16b
.endm
.macro DIFF_LUMA_LT4_P0_Q0_1
usubl $5.8h, $0.8b, $3.8b
usubl $6.8h, $2.8b, $1.8b
shl $6.8h, $6.8h, #2
add $5.8h, $5.8h, $6.8h
sqrshrn $4.8b, $5.8h, #3
.endm
.macro DIFF_LUMA_LT4_P0_Q0_2
usubl2 $5.8h, $0.16b, $3.16b
usubl2 $6.8h, $2.16b, $1.16b
shl $6.8h, $6.8h, #2
add $5.8h, $5.8h, $6.8h
sqrshrn2 $4.16b, $5.8h, #3
.endm
.macro EXTRACT_DELTA_INTO_TWO_PART
cmge $1.16b, $0.16b, #0
and $1.16b, $0.16b, $1.16b
sub $0.16b, $1.16b, $0.16b
.endm
.macro DIFF_LUMA_EQ4_P2P1P0_1
uaddl $8.8h, $1.8b, $2.8b
uaddl $9.8h, $3.8b, $4.8b
add $9.8h, $9.8h, $8.8h
uaddl $8.8h, $0.8b, $1.8b
shl $8.8h, $8.8h, #1
add $8.8h, $9.8h, $8.8h
rshrn $0.8b, $9.8h, #2
rshrn $7.8b, $8.8h, #3
shl $9.8h, $9.8h, #1
usubl $8.8h, $5.8b, $1.8b
add $9.8h, $8.8h, $9.8h
uaddl $8.8h, $2.8b, $5.8b
uaddw $8.8h, $8.8h, $2.8b
uaddw $8.8h, $8.8h, $3.8b
rshrn $9.8b, $9.8h, #3
rshrn $8.8b, $8.8h, #2
bsl $6.8b, $9.8b, $8.8b
.endm
.macro DIFF_LUMA_EQ4_P2P1P0_2
uaddl2 $8.8h, $1.16b, $2.16b
uaddl2 $9.8h, $3.16b, $4.16b
add $9.8h, $9.8h, $8.8h
uaddl2 $8.8h, $0.16b, $1.16b
shl $8.8h, $8.8h, #1
add $8.8h, $9.8h, $8.8h
rshrn2 $0.16b, $9.8h, #2
rshrn2 $7.16b, $8.8h, #3
shl $9.8h, $9.8h, #1
usubl2 $8.8h, $5.16b, $1.16b
add $9.8h, $8.8h, $9.8h
uaddl2 $8.8h, $2.16b, $5.16b
uaddw2 $8.8h, $8.8h, $2.16b
uaddw2 $8.8h, $8.8h, $3.16b
rshrn2 $9.16b, $9.8h, #3
rshrn2 $8.16b, $8.8h, #2
bsl $6.16b, $9.16b, $8.16b
.endm
.macro DIFF_CHROMA_EQ4_P0Q0_1
uaddl $4.8h, $0.8b, $3.8b
shl $4.8h, $4.8h, #1
usubl $5.8h, $1.8b, $3.8b
add $5.8h, $5.8h, $4.8h
rshrn $6.8b, $5.8h, #2
usubl $5.8h, $2.8b, $0.8b
add $5.8h, $5.8h, $4.8h
rshrn $7.8b, $5.8h, #2
.endm
.macro DIFF_CHROMA_EQ4_P0Q0_2
uaddl2 $4.8h, $0.16b, $3.16b
shl $4.8h, $4.8h, #1
usubl2 $5.8h, $1.16b, $3.16b
add $5.8h, $5.8h, $4.8h
rshrn2 $6.16b, $5.8h, #2
usubl2 $5.8h, $2.16b, $0.16b
add $5.8h, $5.8h, $4.8h
rshrn2 $7.16b, $5.8h, #2
.endm
.macro DIFF_LUMA_EQ4_MASK
mov.16b $3, $2
bsl $3.16b, $0.16b, $1.16b
.endm
.macro LOAD_LUMA_DATA_3
ld3 {$0.b, $1.b, $2.b} [$6], [x2], x1
ld3 {$3.b, $4.b, $5.b} [$6], [x0], x1
.endm
.macro LOAD_LUMA_DATA_4
ld4 {$0.b, $1.b, $2.b, $3.b} [$8], [x3], x1
ld4 {$4.b, $5.b, $6.b, $7.b} [$8], [x0], x1
.endm
.macro STORE_LUMA_DATA_4
st4 {$0.b, $1.b, $2.b, $3.b} [$4], [x0], x1
st4 {$0.b, $1.b, $2.b, $3.b} [$5], [x2], x1
.endm
.macro STORE_LUMA_DATA_3
st3 {$0.b, $1.b, $2.b} [$6], [x3], x1
st3 {$3.b, $4.b, $5.b} [$6], [x0], x1
.endm
.macro LOAD_CHROMA_DATA_4
ld4 {$0.b, $1.b, $2.b, $3.b} [$5], [$4], x2
.endm
.macro STORE_CHROMA_DATA_2
st2 {$0.b, $1.b} [$3], [$2], x2
.endm
.macro ZERO_JUMP_END
mov $1, $0.d[0]
mov $2, $0.d[1]
orr $1, $1, $2
cbz $1, $3
.endm
.macro BS_NZC_CHECK
ld1 {v0.16b}, [$0]
//Arrange the input data --- TOP
ands x6, $1, #2
cbz x6, bs_nzc_check_jump0
sub x6, $0, $2, lsl #4
sub x6, x6, $2, lsl #3
add x6, x6, #12
ld1 {v1.s} [3], [x6]
bs_nzc_check_jump0:
ext v1.16b, v1.16b, v0.16b, #12
add $3.16b, v0.16b, v1.16b
// Arrange the input data --- LEFT
ands x6, $1, #1
cbz x6, bs_nzc_check_jump1
sub x6, $0, #21
add x7, x6, #4
ld1 {v1.b} [12], [x6]
add x6, x7, #4
ld1 {v1.b} [13], [x7]
add x7, x6, #4
ld1 {v1.b} [14], [x6]
ld1 {v1.b} [15], [x7]
bs_nzc_check_jump1:
ins v2.d[0], v0.d[1]
zip1 v0.16b, v0.16b, v2.16b
ins v2.d[0], v0.d[1]
zip1 v0.16b, v0.16b, v2.16b
ext v1.16b, v1.16b, v0.16b, #12
add $4.16b, v0.16b, v1.16b
.endm
.macro BS_COMPARE_MV //in: $0,$1(const),$2(const),$3(const),$4(const); out:$5
mov w6, #4
sabd v20.8h, $0.8h, $1.8h
sabd v21.8h, $1.8h, $2.8h
dup $0.8h, w6
sabd v22.8h, $2.8h, $3.8h
sabd v23.8h, $3.8h, $4.8h
cmge v20.8h, v20.8h, $0.8h
cmge v21.8h, v21.8h, $0.8h
cmge v22.8h, v22.8h, $0.8h
cmge v23.8h, v23.8h, $0.8h
addp v20.8h, v20.8h, v21.8h
addp v21.8h, v22.8h, v23.8h
addhn $5.8b, v20.8h, v20.8h
addhn2 $5.16b, v21.8h, v21.8h
.endm
.macro BS_MV_CHECK
ldp q0, q1, [$0], #32
ldp q2, q3, [$0]
sub $0, $0, #32
// Arrenge the input data --- TOP
ands x6, $1, #2
cbz x6, bs_mv_check_jump0
sub x6, $0, $2, lsl #6
add x6, x6, #48
ld1 {v4.16b}, [x6]
bs_mv_check_jump0:
BS_COMPARE_MV v4, v0, v1, v2, v3, $3
// Arrange the input data --- LEFT
ands x6, $1, #1
cbz x6, bs_mv_check_jump1
sub x6, $0, #52
add x7, x6, #16
ld1 {v4.s} [0], [x6]
add x6, x7, #16
ld1 {v4.s} [1], [x7]
add x7, x6, #16
ld1 {v4.s} [2], [x6]
ld1 {v4.s} [3], [x7]
bs_mv_check_jump1:
zip1 $5.4s, v0.4s, v2.4s
zip2 $6.4s, v0.4s, v2.4s
zip1 v0.4s, v1.4s, v3.4s
zip2 v2.4s, v1.4s, v3.4s
zip2 v1.4s, $5.4s, v0.4s
zip1 v0.4s, $5.4s, v0.4s
zip2 v3.4s, $6.4s, v2.4s
zip1 v2.4s, $6.4s, v2.4s
BS_COMPARE_MV v4, v0, v1, v2, v3, $4
.endm
#else
.macro MASK_MATRIX arg0, arg1, arg2, arg3, arg4, arg5, arg6
uabd \arg6\().16b, \arg1\().16b, \arg2\().16b
@ -420,7 +160,7 @@ bs_mv_check_jump1:
.endm
.macro DIFF_LUMA_EQ4_MASK arg0, arg1, arg2, arg3
mov.16b \arg3, \arg2
mov \arg3\().16b, \arg2\().16b
bsl \arg3\().16b, \arg0\().16b, \arg1\().16b
.endm
@ -550,19 +290,14 @@ bs_mv_check_jump1:
zip1 v2.4s, \arg6\().4s, v2.4s
BS_COMPARE_MV v4, v0, v1, v2, v3, \arg4
.endm
#endif
WELS_ASM_AARCH64_FUNC_BEGIN WelsNonZeroCount_AArch64_neon
mov w1, #1
dup v3.8b, w1
ld1 {v0.8b, v1.8b, v2.8b}, [x0]
ins v0.d[1], v1.d[0]
uzp1 v0.2d, v0.2d, v1.2d
cmeq v0.16b, v0.16b, #0
cmeq v2.8b, v2.8b, #0
mvn v0.16b, v0.16b
mvn v2.8b, v2.8b
abs v0.16b, v0.16b
abs v2.8b, v2.8b
ins v1.d[0], v0.d[1]
umin v0.8b, v0.8b, v3.8b
umin v1.8b, v1.8b, v3.8b
umin v2.8b, v2.8b, v3.8b
st1 {v0.8b, v1.8b, v2.8b}, [x0]
WELS_ASM_AARCH64_FUNC_END
@ -570,6 +305,7 @@ WELS_ASM_AARCH64_FUNC_END
WELS_ASM_AARCH64_FUNC_BEGIN DeblockLumaLt4V_AArch64_neon //uint8_t* pPix, int32_t iStride, int32_t iAlpha, int32_t iBeta, int8_t* tc
dup v16.16b, w2 //alpha
dup v17.16b, w3 //beta
SIGN_EXTENSION x1,w1
add x2, x1, x1, lsl #1
sub x2, x0, x2
movi v23.16b, #128
@ -628,8 +364,8 @@ WELS_ASM_AARCH64_FUNC_END
WELS_ASM_AARCH64_FUNC_BEGIN DeblockLumaEq4V_AArch64_neon
dup v16.16b, w2 //alpha
dup v17.16b, w3 //beta
SIGN_EXTENSION x1,w1
sub x3, x0, x1, lsl #2
ld1 {v0.16b}, [x3], x1
ld1 {v4.16b}, [x0], x1
ld1 {v1.16b}, [x3], x1
@ -656,10 +392,10 @@ WELS_ASM_AARCH64_FUNC_BEGIN DeblockLumaEq4V_AArch64_neon
and v22.16b, v22.16b, v20.16b //(iDetaP0Q0 < ((iAlpha >> 2) + 2))&&bDetaQ2Q0
and v20.16b, v20.16b, v18.16b //(iDetaP0Q0 < iAlpha) && bDetaP1P0 && bDetaQ1Q0&&(iDetaP0Q0 < ((iAlpha >> 2) + 2))
mov.16b v23, v21
mov.16b v24, v21
mov v23.16b, v21.16b
mov v24.16b, v21.16b
mov.16b v25, v0
mov v25.16b, v0.16b
DIFF_LUMA_EQ4_P2P1P0_1 v0, v1, v2, v3, v4, v5, v23, v19, v17, v16
DIFF_LUMA_EQ4_P2P1P0_2 v25, v1, v2, v3, v4, v5, v24, v19, v17, v16
ins v0.d[1], v25.d[1]
@ -673,9 +409,9 @@ WELS_ASM_AARCH64_FUNC_BEGIN DeblockLumaEq4V_AArch64_neon
st1 {v17.16b}, [x3], x1
mov.16b v23, v22
mov.16b v24, v22
mov.16b v25, v7
mov v23.16b, v22.16b
mov v24.16b, v22.16b
mov v25.16b, v7.16b
DIFF_LUMA_EQ4_P2P1P0_1 v7, v6, v5, v4, v3, v2, v23, v19, v17, v16
DIFF_LUMA_EQ4_P2P1P0_2 v25, v6, v5, v4, v3, v2, v24, v19, v17, v16
ins v7.d[1], v25.d[1]
@ -696,7 +432,7 @@ WELS_ASM_AARCH64_FUNC_BEGIN DeblockLumaLt4H_AArch64_neon //uint8_t* pPix, int32_
dup v17.16b, w3 //beta
sub x2, x0, #3
movi v23.16b, #128
SIGN_EXTENSION x1,w1
LOAD_LUMA_DATA_3 v0, v1, v2, v3, v4, v5, 0
LOAD_LUMA_DATA_3 v0, v1, v2, v3, v4, v5, 1
LOAD_LUMA_DATA_3 v0, v1, v2, v3, v4, v5, 2
@ -732,7 +468,7 @@ WELS_ASM_AARCH64_FUNC_BEGIN DeblockLumaLt4H_AArch64_neon //uint8_t* pPix, int32_
sub v18.16b, v18.16b, v6.16b // -iTc0: 0000, 1111, 2222, 3333
DIFF_LUMA_LT4_P1_Q1 v0, v1, v2, v3, v17, v18, v6, v7, v19, v20 //Use Tmp v23,v24
mov.16b v25, v19
mov v25.16b, v19.16b
DIFF_LUMA_LT4_P1_Q1 v5, v4, v3, v2, v17, v18, v6, v7, v21, v22 //Use Tmp v23,v24
@ -753,11 +489,11 @@ WELS_ASM_AARCH64_FUNC_BEGIN DeblockLumaLt4H_AArch64_neon //uint8_t* pPix, int32_
EXTRACT_DELTA_INTO_TWO_PART v19, v20
uqadd v2.16b, v2.16b, v20.16b
uqsub v2.16b, v2.16b, v19.16b
mov.16b v26, v2
mov v26.16b, v2.16b
uqsub v3.16b, v3.16b, v20.16b
uqadd v3.16b, v3.16b, v19.16b
mov.16b v27, v3
mov.16b v28, v21
mov v27.16b, v3.16b
mov v28.16b, v21.16b
sub x0, x0, #2
add x2, x0, x1
@ -780,7 +516,7 @@ WELS_ASM_AARCH64_FUNC_BEGIN DeblockLumaEq4H_AArch64_neon
dup v16.16b, w2 //alpha
dup v17.16b, w3 //beta
sub x3, x0, #4
SIGN_EXTENSION x1,w1
LOAD_LUMA_DATA_4 v0, v1, v2, v3, v4, v5, v6, v7, 0
LOAD_LUMA_DATA_4 v0, v1, v2, v3, v4, v5, v6, v7, 1
LOAD_LUMA_DATA_4 v0, v1, v2, v3, v4, v5, v6, v7, 2
@ -820,37 +556,37 @@ WELS_ASM_AARCH64_FUNC_BEGIN DeblockLumaEq4H_AArch64_neon
and v22.16b, v22.16b, v20.16b //(iDetaP0Q0 < ((iAlpha >> 2) + 2))&&bDetaQ2Q0
and v20.16b, v20.16b, v18.16b //(iDetaP0Q0 < iAlpha) && bDetaP1P0 && bDetaQ1Q0&&(iDetaP0Q0 < ((iAlpha >> 2) + 2))
mov.16b v23, v21
mov.16b v24, v21
mov v23.16b, v21.16b
mov v24.16b, v21.16b
mov.16b v25, v0
mov v25.16b, v0.16b
DIFF_LUMA_EQ4_P2P1P0_1 v0, v1, v2, v3, v4, v5, v23, v19, v17, v16
DIFF_LUMA_EQ4_P2P1P0_2 v25, v1, v2, v3, v4, v5, v24, v19, v17, v16
ins v0.d[1], v25.d[1]
ins v23.d[1], v24.d[1]
and v21.16b, v20.16b, v21.16b
DIFF_LUMA_EQ4_MASK v19, v1, v21, v17
mov.16b v26, v17
mov v26.16b, v17.16b
DIFF_LUMA_EQ4_MASK v0, v2, v21, v17
mov.16b v27, v17
mov v27.16b, v17.16b
DIFF_LUMA_EQ4_MASK v23, v3, v18, v17
mov.16b v28, v17
mov v28.16b, v17.16b
mov.16b v23, v22
mov.16b v24, v22
mov.16b v25, v7
mov v23.16b, v22.16b
mov v24.16b, v22.16b
mov v25.16b, v7.16b
DIFF_LUMA_EQ4_P2P1P0_1 v7, v6, v5, v4, v3, v2, v23, v19, v17, v16
DIFF_LUMA_EQ4_P2P1P0_2 v25, v6, v5, v4, v3, v2, v24, v19, v17, v16
ins v7.d[1], v25.d[1]
ins v23.d[1], v24.d[1]
and v22.16b, v20.16b, v22.16b
DIFF_LUMA_EQ4_MASK v23, v4, v18, v17
mov.16b v29, v17
mov v29.16b, v17.16b
DIFF_LUMA_EQ4_MASK v7, v5, v22, v17
mov.16b v30, v17
mov v30.16b, v17.16b
DIFF_LUMA_EQ4_MASK v19, v6, v22, v17
mov.16b v31, v17
mov v31.16b, v17.16b
STORE_LUMA_DATA_3 v26, v27, v28, v29, v30, v31, 0
STORE_LUMA_DATA_3 v26, v27, v28, v29, v30, v31, 1
@ -1017,7 +753,7 @@ WELS_ASM_AARCH64_FUNC_BEGIN DeblockChromaEq4V_AArch64_neon //uint8_t* pPixCb, ui
DIFF_CHROMA_EQ4_P0Q0_1 v0, v1, v2, v3, v18, v19, v20, v21
DIFF_CHROMA_EQ4_P0Q0_2 v0, v1, v2, v3, v18, v19, v20, v21
mov.16b v6, v7
mov v6.16b, v7.16b
bsl v6.16b, v20.16b, v1.16b
bsl v7.16b, v21.16b, v2.16b
@ -1063,7 +799,7 @@ WELS_ASM_AARCH64_FUNC_BEGIN DeblockChromaEq4H_AArch64_neon //uint8_t* pPixCb, ui
DIFF_CHROMA_EQ4_P0Q0_1 v0, v1, v2, v3, v18, v19, v20, v21
DIFF_CHROMA_EQ4_P0Q0_2 v0, v1, v2, v3, v18, v19, v20, v21
mov.16b v6, v7
mov v6.16b, v7.16b
bsl v6.16b, v20.16b, v1.16b
bsl v7.16b, v21.16b, v2.16b

View File

@ -31,10 +31,12 @@
*/
#ifdef HAVE_NEON_AARCH64
.text
#include "arm_arch64_common_macro.S"
//void ExpandPictureLuma_AArch64_neon (uint8_t* pDst, const int32_t kiStride, const int32_t kiPicW, const int32_t kiPicH);
WELS_ASM_AARCH64_FUNC_BEGIN ExpandPictureLuma_AArch64_neon
SIGN_EXTENSION x1,w1
SIGN_EXTENSION x2,w2
SIGN_EXTENSION x3,w3
mov x7, x0
mov x8, x3
add x4, x7, x2
@ -46,8 +48,8 @@ _expand_picture_luma_loop2:
add x6, x4, #1
ld1r {v0.16b}, [x7], x1
ld1r {v2.16b}, [x4], x1
mov.16b v1, v0
mov.16b v3, v2
mov v1.16b, v0.16b
mov v3.16b, v2.16b
st2 {v0.16b, v1.16b}, [x5]
st2 {v2.16b, v3.16b}, [x6]
sub x8, x8, #1
@ -74,8 +76,13 @@ _expand_picture_luma_loop1:
cbnz x2, _expand_picture_luma_loop0
WELS_ASM_AARCH64_FUNC_END
//void ExpandPictureChroma_AArch64_neon (uint8_t* pDst, const int32_t kiStride, const int32_t kiPicW,
// const int32_t kiPicH);
WELS_ASM_AARCH64_FUNC_BEGIN ExpandPictureChroma_AArch64_neon
//Save the dst
SIGN_EXTENSION x1,w1
SIGN_EXTENSION x2,w2
SIGN_EXTENSION x3,w3
mov x7, x0
mov x8, x3
mov x10, #16

View File

@ -30,12 +30,13 @@
*
*/
#ifdef HAVE_NEON_AARCH64
.text
#ifdef HAVE_NEON_AARCH64
#include "arm_arch64_common_macro.S"
//for Luma 16x16
//void WelsI16x16LumaPredV_AArch64_neon (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride);
WELS_ASM_AARCH64_FUNC_BEGIN WelsI16x16LumaPredV_AArch64_neon
SIGN_EXTENSION x2,w2
sub x3, x1, x2
ld1 {v0.16b}, [x3]
.rept 16
@ -43,7 +44,9 @@ WELS_ASM_AARCH64_FUNC_BEGIN WelsI16x16LumaPredV_AArch64_neon
.endr
WELS_ASM_AARCH64_FUNC_END
//void WelsI16x16LumaPredH_AArch64_neon (uint8_t* pPred, uint8_t* pRef, const int32_t kiStride);
WELS_ASM_AARCH64_FUNC_BEGIN WelsI16x16LumaPredH_AArch64_neon
SIGN_EXTENSION x2,w2
sub x3, x1, #1
.rept 16
ld1r {v0.16b}, [x3], x2

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
#!/bin/bash
rm -f codec/common/inc/version.h
git rev-list HEAD | sort > config.git-hash
SRC_PATH=$1
LOCALVER=`wc -l config.git-hash | awk '{print $1}'`
if [ $LOCALVER \> 1 ] ; then
VER="$(git rev-list HEAD -n 1 | cut -c 1-7)"
@ -15,6 +15,14 @@ fi
GIT_VERSION='"'$GIT_VERSION'"'
rm -f config.git-hash
cat codec/common/inc/version.h.template | sed "s/\$FULL_VERSION/$GIT_VERSION/g" > codec/common/inc/version.h
mkdir -p codec/common/inc
cat $SRC_PATH/codec/common/inc/version_gen.h.template | sed "s/\$FULL_VERSION/$GIT_VERSION/g" > codec/common/inc/version_gen.h.new
if cmp codec/common/inc/version_gen.h.new codec/common/inc/version_gen.h > /dev/null 2>&1; then
# Identical to old version, don't touch it (to avoid unnecessary rebuilds)
rm codec/common/inc/version_gen.h.new
echo "Keeping existing codec/common/inc/version_gen.h"
exit 0
fi
mv codec/common/inc/version_gen.h.new codec/common/inc/version_gen.h
echo "Generated codec/common/inc/version.h"
echo "Generated codec/common/inc/version_gen.h"

1
codec/common/inc/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
version_gen.h

View File

@ -0,0 +1,180 @@
/*!
* \copy
* Copyright (c) 2009-2015, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file WelsCircleQueue.h
*
* \brief for the queue function needed in ThreadPool
*
* \date 9/27/2015 Created
*
*************************************************************************************
*/
#ifndef _WELS_CIRCLE_QUEUE_H_
#define _WELS_CIRCLE_QUEUE_H_
#include "typedefs.h"
#include <stdlib.h>
namespace WelsCommon {
template<typename TNodeType>
class CWelsCircleQueue {
public:
CWelsCircleQueue() {
m_iMaxNodeCount = 50;
m_pCurrentQueue = static_cast<TNodeType**> (malloc (m_iMaxNodeCount * sizeof (TNodeType*)));
//here using array to simulate list is to avoid the frequent malloc/free of Nodes which may cause fragmented memory
m_iCurrentListStart = m_iCurrentListEnd = 0;
};
~CWelsCircleQueue() {
free (m_pCurrentQueue);
};
int32_t size() {
return ((m_iCurrentListEnd >= m_iCurrentListStart)
? (m_iCurrentListEnd - m_iCurrentListStart)
: (m_iMaxNodeCount - m_iCurrentListStart + m_iCurrentListEnd));
}
int32_t push_back (TNodeType* pNode) {
if ((NULL != pNode) && (find (pNode))) { //not checking NULL for easier testing
return 1;
}
return InternalPushBack (pNode);
}
bool find (TNodeType* pNode) {
if (size() > 0) {
if (m_iCurrentListEnd > m_iCurrentListStart) {
for (int32_t idx = m_iCurrentListStart; idx < m_iCurrentListEnd; idx++) {
if (pNode == m_pCurrentQueue[idx]) {
return true;
}
}
} else {
for (int32_t idx = m_iCurrentListStart; idx < m_iMaxNodeCount; idx++) {
if (pNode == m_pCurrentQueue[idx]) {
return true;
}
}
for (int32_t idx = 0; idx < m_iCurrentListEnd; idx++) {
if (pNode == m_pCurrentQueue[idx]) {
return true;
}
}
}
}
return false;
}
void pop_front() {
if (size() > 0) {
m_pCurrentQueue[m_iCurrentListStart] = NULL;
m_iCurrentListStart = ((m_iCurrentListStart < (m_iMaxNodeCount - 1))
? (m_iCurrentListStart + 1)
: 0);
}
}
TNodeType* begin() {
if (size() > 0) {
return m_pCurrentQueue[m_iCurrentListStart];
}
return NULL;
}
TNodeType* GetIndexNode (const int32_t iIdx) {
if (size() > 0) {
if ((iIdx + m_iCurrentListStart) < m_iMaxNodeCount) {
return m_pCurrentQueue[m_iCurrentListStart + iIdx];
} else {
return m_pCurrentQueue[m_iCurrentListStart + iIdx - m_iMaxNodeCount];
}
}
return NULL;
}
private:
int32_t InternalPushBack (TNodeType* pNode) {
m_pCurrentQueue[m_iCurrentListEnd] = pNode;
m_iCurrentListEnd ++;
if (m_iCurrentListEnd == m_iMaxNodeCount) {
m_iCurrentListEnd = 0;
}
if (m_iCurrentListEnd == m_iCurrentListStart) {
int32_t ret = ExpandQueue();
if (ret) {
return 1;
}
}
return 0;
}
int32_t ExpandQueue() {
TNodeType** tmpCurrentTaskQueue = static_cast<TNodeType**> (malloc (m_iMaxNodeCount * 2 * sizeof (TNodeType*)));
if (tmpCurrentTaskQueue == NULL) {
return 1;
}
memcpy (tmpCurrentTaskQueue,
(m_pCurrentQueue + m_iCurrentListStart),
(m_iMaxNodeCount - m_iCurrentListStart)*sizeof (TNodeType*));
if (m_iCurrentListEnd > 0) {
memcpy (tmpCurrentTaskQueue + m_iMaxNodeCount - m_iCurrentListStart,
m_pCurrentQueue,
m_iCurrentListEnd * sizeof (TNodeType*));
}
free (m_pCurrentQueue);
m_pCurrentQueue = tmpCurrentTaskQueue;
m_iCurrentListEnd = m_iMaxNodeCount;
m_iCurrentListStart = 0;
m_iMaxNodeCount = m_iMaxNodeCount * 2;
return 0;
}
int32_t m_iCurrentListStart;
int32_t m_iCurrentListEnd;
int32_t m_iMaxNodeCount;
TNodeType** m_pCurrentQueue;
};
}
#endif

233
codec/common/inc/WelsList.h Normal file
View File

@ -0,0 +1,233 @@
/*!
* \copy
* Copyright (c) 2009-2015, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file WelsList
*
* \brief for the list function needed in ThreadPool
*
* \date 9/27/2015 Created
*
*************************************************************************************
*/
#ifndef _WELS_LIST_H_
#define _WELS_LIST_H_
#include "typedefs.h"
namespace WelsCommon {
template<typename TNodeType>
struct SNode {
TNodeType* pPointer;
SNode* pPrevNode;
SNode* pNextNode;
};
template<typename TNodeType>
class CWelsList {
public:
CWelsList() {
m_iCurrentNodeCount = 0;
m_iMaxNodeCount = 50;
m_pCurrentList = static_cast<SNode<TNodeType>*> (malloc (m_iMaxNodeCount * sizeof (SNode<TNodeType>)));
//here using array storage to simulate list is to avoid the frequent malloc/free of Nodes which may cause fragmented memory
ResetStorage();
};
~CWelsList() {
free (m_pCurrentList);
};
int32_t size() {
return m_iCurrentNodeCount;
}
bool push_back (TNodeType* pNode) {
m_pCurrent->pPointer = pNode;
if (0 == m_iCurrentNodeCount) {
m_pFirst = m_pCurrent;
}
m_iCurrentNodeCount++;
if (m_iCurrentNodeCount == m_iMaxNodeCount) {
if (!ExpandList()) {
return false;
}
}
SNode<TNodeType>* pNext = FindNextStorage();
m_pCurrent->pNextNode = pNext;
pNext->pPrevNode = m_pCurrent;
m_pCurrent = pNext;
return true;
}
TNodeType* begin() {
if (m_pFirst) {
return m_pFirst->pPointer;
}
return NULL;
}
void pop_front() {
if (m_iCurrentNodeCount == 0) {
return;
}
SNode<TNodeType>* pTemp = m_pFirst;
if (m_iCurrentNodeCount > 0) {
m_iCurrentNodeCount --;
}
if (0 == m_iCurrentNodeCount) {
ResetStorage();
} else {
m_pFirst = m_pFirst->pNextNode;
m_pFirst->pPrevNode = NULL;
CleanOneNode (pTemp);
}
}
bool erase (TNodeType* pNode) {
if (0 == m_iCurrentNodeCount) {
return false;
}
SNode<TNodeType>* pTemp = m_pFirst;
do {
if (pNode == pTemp->pPointer) {
if (pTemp->pPrevNode) {
pTemp->pPrevNode->pNextNode = pTemp->pNextNode;
} else {
m_pFirst = pTemp->pNextNode;
}
if (pTemp->pNextNode) {
pTemp->pNextNode->pPrevNode = pTemp->pPrevNode;
}
CleanOneNode (pTemp);
m_iCurrentNodeCount --;
return true;
}
if (pTemp->pNextNode) {
pTemp = pTemp->pNextNode;
} else {
break;
}
} while (pTemp->pPointer && pTemp->pNextNode);
return false;
}
private:
bool ExpandList() {
SNode<TNodeType>* tmpCurrentList = static_cast<SNode<TNodeType>*> (malloc (m_iMaxNodeCount * 2 * sizeof (
SNode<TNodeType>)));
if (tmpCurrentList == NULL) {
return false;
}
InitStorage (tmpCurrentList, (m_iMaxNodeCount * 2) - 1);
SNode<TNodeType>* pTemp = m_pFirst;
for (int i = 0; ((i < m_iMaxNodeCount) && pTemp); i++) {
tmpCurrentList[i].pPointer = pTemp->pPointer;
pTemp = pTemp->pNextNode;
}
free (m_pCurrentList);
m_pCurrentList = tmpCurrentList;
m_iCurrentNodeCount = m_iMaxNodeCount;
m_iMaxNodeCount = m_iMaxNodeCount * 2;
m_pFirst = m_pCurrentList;
m_pCurrent = & (m_pCurrentList[m_iCurrentNodeCount - 1]);
return true;
}
void InitStorage (SNode<TNodeType>* pList, const int32_t iMaxIndex) {
pList[0].pPrevNode = NULL;
pList[0].pPointer = NULL;
pList[0].pNextNode = & (pList[1]);
for (int i = 1; i < iMaxIndex; i++) {
pList[i].pPrevNode = & (pList[i - 1]);
pList[i].pPointer = NULL;
pList[i].pNextNode = & (pList[i + 1]);
}
pList[iMaxIndex].pPrevNode = & (pList[iMaxIndex - 1]);
pList[iMaxIndex].pPointer = NULL;
pList[iMaxIndex].pNextNode = NULL;
}
SNode<TNodeType>* FindNextStorage() {
if (NULL != m_pCurrent->pNextNode) {
if (NULL == m_pCurrent->pNextNode->pPointer) {
return (m_pCurrent->pNextNode);
}
}
for (int32_t i = 0; i < m_iMaxNodeCount; i++) {
if (NULL == m_pCurrentList[i].pPointer) {
return (&m_pCurrentList[i]);
}
}
return NULL;
}
void CleanOneNode (SNode<TNodeType>* pSNode) {
pSNode->pPointer = NULL;
pSNode->pPrevNode = NULL;
pSNode->pNextNode = NULL;
}
void ResetStorage() {
m_pFirst = NULL;
m_pCurrent = m_pCurrentList;
InitStorage (m_pCurrentList, m_iMaxNodeCount - 1);
}
int32_t m_iCurrentNodeCount;
int32_t m_iMaxNodeCount;
SNode<TNodeType>* m_pCurrentList;
SNode<TNodeType>* m_pFirst;
SNode<TNodeType>* m_pCurrent;
};
}
#endif

View File

@ -1,6 +1,6 @@
/*!
* \copy
* Copyright (c) 2013, Cisco Systems
* Copyright (c) 2009-2015, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -28,24 +28,70 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file WelsLock.h
*
* \brief class wrapping for locks
*
* \date 5/09/2012 Created
*
*************************************************************************************
*/
//macroblock.h
#ifndef WELS_MC_H__
#define WELS_MC_H__
#ifndef _WELS_LOCK_H_
#define _WELS_LOCK_H_
#include <string.h>
#include "typedefs.h"
#include "wels_const.h"
#include "macros.h"
#include "wels_func_ptr_def.h"
#include "mc_common.h"
#include "typedefs.h"
#include "WelsThreadLib.h"
/////////////////////luma MC//////////////////////////
//x y means dx(mv[0] & 3) and dy(mv[1] & 3)
namespace WelsCommon {
namespace WelsEnc {
void WelsInitMcFuncs (SWelsFuncPtrList* pFuncList, uint32_t uiCpuFlag);
class CWelsLock {
DISALLOW_COPY_AND_ASSIGN (CWelsLock);
public:
CWelsLock() {
WelsMutexInit (&m_cMutex);
}
virtual ~CWelsLock() {
WelsMutexDestroy (&m_cMutex);
}
WELS_THREAD_ERROR_CODE Lock() {
return WelsMutexLock (&m_cMutex);
}
WELS_THREAD_ERROR_CODE Unlock() {
return WelsMutexUnlock (&m_cMutex);
}
private:
WELS_MUTEX m_cMutex;
};
class CWelsAutoLock {
DISALLOW_COPY_AND_ASSIGN (CWelsAutoLock);
public:
CWelsAutoLock (CWelsLock& cLock) : m_cLock (cLock) {
m_cLock.Lock();
}
virtual ~CWelsAutoLock() {
m_cLock.Unlock();
}
private:
CWelsLock& m_cLock;
};
}
#endif//WELS_MC_H__
#endif

View File

@ -1,6 +1,6 @@
/*!
* \copy
* Copyright (c) 2013, Cisco Systems
* Copyright (c) 2009-2015, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -28,23 +28,48 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file WelsTask.h
*
* \brief Interfaces introduced in thread pool
*
* \date 5/09/2012 Created
*
*************************************************************************************
*/
#ifndef WELS_MC_H__
#define WELS_MC_H__
#ifndef _WELS_TASK_H_
#define _WELS_TASK_H_
#include "wels_const.h"
#include "macros.h"
#include "decoder_context.h"
#include "mc_common.h"
#include "codec_def.h"
namespace WelsDec {
namespace WelsCommon {
typedef void (*PMcChromaWidthExtFunc) (const uint8_t* pSrc, int32_t iSrcStride, uint8_t* pDst, int32_t iDstStride,
const uint8_t* kpABCD, int32_t iHeight);
class IWelsTaskSink {
public:
virtual int OnTaskExecuted() = 0;
virtual int OnTaskCancelled() = 0;
};
void InitMcFunc (SMcFunc* pMcFunc, int32_t iCpu);
class IWelsTask {
public:
IWelsTask (IWelsTaskSink* pSink) {
m_pSink = pSink;
};
virtual ~IWelsTask() { }
virtual int Execute() = 0;
IWelsTaskSink* GetSink() {
return m_pSink;
};
protected:
IWelsTaskSink* m_pSink;
};
}
#endif
} // namespace WelsDec
#endif//WELS_MC_H__

View File

@ -1,6 +1,6 @@
/*!
* \copy
* Copyright (c) 2013, Cisco Systems
* Copyright (c) 2009-2015, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -28,48 +28,56 @@
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file WelsTaskThread.h
*
* \brief connecting task and thread
*
* \date 5/09/2012 Created
*
*************************************************************************************
*/
#if !defined(WELS_ENCODER_MEMORY_ALIGN_H__)
#define WELS_ENCODER_MEMORY_ALIGN_H__
#include "typedefs.h"
#include "as264_common.h"
#ifdef MEMORY_CHECK
#include <stdio.h>
#endif//MEMORY_CHECK
#ifndef _WELS_TASK_THREAD_H_
#define _WELS_TASK_THREAD_H_
namespace WelsEnc {
class CMemoryAlign {
#include "WelsTask.h"
#include "WelsThread.h"
namespace WelsCommon {
class CWelsTaskThread;
class IWelsTaskThreadSink {
public:
CMemoryAlign (const uint32_t kuiCacheLineSize);
virtual ~CMemoryAlign();
virtual WELS_THREAD_ERROR_CODE OnTaskStart (CWelsTaskThread* pThread, IWelsTask* pTask) = 0;
virtual WELS_THREAD_ERROR_CODE OnTaskStop (CWelsTaskThread* pThread, IWelsTask* pTask) = 0;
};
void* WelsMallocz (const uint32_t kuiSize, const char* kpTag);
void* WelsMalloc (const uint32_t kuiSize, const char* kpTag);
void WelsFree (void* pPointer, const char* kpTag);
const uint32_t WelsGetCacheLineSize() const;
const uint32_t WelsGetMemoryUsage() const;
class CWelsTaskThread : public CWelsThread {
public:
CWelsTaskThread (IWelsTaskThreadSink* pSink);
virtual ~CWelsTaskThread();
WELS_THREAD_ERROR_CODE SetTask (IWelsTask* pTask);
virtual void ExecuteTask();
uintptr_t GetID() const {
return m_uiID;
}
private:
// private copy & assign constructors adding to fix klocwork scan issues
CMemoryAlign (const CMemoryAlign& kcMa);
CMemoryAlign& operator= (const CMemoryAlign& kcMa);
CWelsLock m_cLockTask;
IWelsTaskThreadSink* m_pSink;
IWelsTask* m_pTask;
uintptr_t m_uiID;
protected:
uint32_t m_nCacheLineSize;
#ifdef MEMORY_MONITOR
uint32_t m_nMemoryUsageInBytes;
#endif//MEMORY_MONITOR
#ifdef MEMORY_CHECK
FILE* m_fpMemChkPoint;
uint32_t m_nCountRequestNum;
#endif//MEMORY_CHECK
DISALLOW_COPY_AND_ASSIGN (CWelsTaskThread);
};
}
#endif//WELS_ENCODER_MEMORY_ALIGN_H__
#endif

View File

@ -1,6 +1,6 @@
/*!
* \copy
* Copyright (c) 2009-2013, Cisco Systems
* Copyright (c) 2009-2015, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@ -29,52 +29,77 @@
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file property.h
* \file WelsThread.h
*
* \brief CODE name, library module and corresponding version are included
* \brief Interfaces introduced in threads
*
* \date 03/10/2009 Created
* \date 5/09/2012 Created
*
*************************************************************************************
*/
#ifndef WELS_DECODER_PROPERTY_H__
#define WELS_DECODER_PROPERTY_H__
#include "typedefs.h"
namespace WelsEnc {
/*!
* \brief get code name
* \param pBuf pBuffer to restore code name
* \param iSize size of pBuffer overall
* \return actual size of pBuffer used; 0 returned in failure
*/
int32_t GetCodeName (char* pBuf, int32_t iSize);
#ifndef _WELS_THREAD_H_
#define _WELS_THREAD_H_
/*!
* \brief get library/module name
* \param pBuf pBuffer to restore module name
* \param iSize size of pBuffer overall
* \return actual size of pBuffer used; 0 returned in failure
*/
int32_t GetLibName (char* pBuf, int32_t iSize);
/*!
* \brief get version number
* \param pBuf pBuffer to restore version number
* \param iSize size of pBuffer overall
* \return actual size of pBuffer used; 0 returned in failure
*/
int32_t GetVerNum (char* pBuf, int32_t iSize);
#include "macros.h"
#include "WelsLock.h"
#include "WelsThreadLib.h"
namespace WelsCommon {
class CWelsThread {
public:
CWelsThread();
virtual ~CWelsThread();
virtual void Thread();
virtual void ExecuteTask() = 0;
virtual WELS_THREAD_ERROR_CODE Start();
virtual void Kill();
protected:
static WELS_THREAD_ROUTINE_TYPE TheThread (void* pParam);
void SetRunning (bool bRunning) {
CWelsAutoLock cLock (m_cLockStatus);
m_bRunning = bRunning;
}
void SetEndFlag (bool bEndFlag) {
CWelsAutoLock cLock (m_cLockStatus);
m_bEndFlag = bEndFlag;
}
bool GetRunning() const {
return m_bRunning;
}
bool GetEndFlag() const {
return m_bEndFlag;
}
void SignalThread() {
WelsEventSignal (&m_hEvent);
}
private:
WELS_THREAD_HANDLE m_hThread;
WELS_EVENT m_hEvent;
CWelsLock m_cLockStatus;
bool m_bRunning;
bool m_bEndFlag;
DISALLOW_COPY_AND_ASSIGN (CWelsThread);
};
/*!
* \brief get identify information
* \param pBuf pBuffer to restore indentify information
* \param iSize size of pBuffer overall
* \return actual size of pBuffer used; 0 returned in failure
*/
int32_t GetIdentInfo (char* pBuf, int32_t iSize);
}
#endif//WELS_DECODER_PROPERTY_H__
#endif

View File

@ -29,11 +29,11 @@
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file WelsThreadLib.h
* \file WelsThreadLib.h
*
* \brief Interfaces introduced in thread programming
* \brief Interfaces introduced in thread programming
*
* \date 11/17/2009 Created
* \date 11/17/2009 Created
*
*************************************************************************************
*/
@ -60,7 +60,7 @@ typedef HANDLE WELS_EVENT;
#define WELS_THREAD_ROUTINE_TYPE DWORD WINAPI
#define WELS_THREAD_ROUTINE_RETURN(rc) return (DWORD)rc;
#else // NON-WINDOWS
#else // NON-WINDOWS
#include <stdlib.h>
#include <unistd.h>
@ -93,19 +93,20 @@ typedef struct _WelsLogicalProcessorInfo {
int32_t ProcessorCount;
} WelsLogicalProcessInfo;
#define WELS_THREAD_ERROR_OK 0
#define WELS_THREAD_ERROR_GENERAL ((uint32_t)(-1))
#define WELS_THREAD_ERROR_WAIT_OBJECT_0 0
#define WELS_THREAD_ERROR_WAIT_TIMEOUT ((uint32_t)0x00000102L)
#define WELS_THREAD_ERROR_WAIT_FAILED WELS_THREAD_ERROR_GENERAL
#define WELS_THREAD_ERROR_OK 0
#define WELS_THREAD_ERROR_GENERAL ((uint32_t)(-1))
#define WELS_THREAD_ERROR_WAIT_OBJECT_0 0
#define WELS_THREAD_ERROR_WAIT_TIMEOUT ((uint32_t)0x00000102L)
#define WELS_THREAD_ERROR_WAIT_FAILED WELS_THREAD_ERROR_GENERAL
WELS_THREAD_ERROR_CODE WelsMutexInit (WELS_MUTEX* mutex);
WELS_THREAD_ERROR_CODE WelsMutexLock (WELS_MUTEX* mutex);
WELS_THREAD_ERROR_CODE WelsMutexUnlock (WELS_MUTEX* mutex);
WELS_THREAD_ERROR_CODE WelsMutexDestroy (WELS_MUTEX* mutex);
WELS_THREAD_ERROR_CODE WelsEventOpen (WELS_EVENT* p_event, const char* event_name);
WELS_THREAD_ERROR_CODE WelsEventClose (WELS_EVENT* event, const char* event_name);
WELS_THREAD_ERROR_CODE WelsEventOpen (WELS_EVENT* p_event, const char* event_name = NULL);
WELS_THREAD_ERROR_CODE WelsEventClose (WELS_EVENT* event, const char* event_name = NULL);
WELS_THREAD_ERROR_CODE WelsEventSignal (WELS_EVENT* event);
WELS_THREAD_ERROR_CODE WelsEventWait (WELS_EVENT* event);
WELS_THREAD_ERROR_CODE WelsEventWaitWithTimeOut (WELS_EVENT* event, uint32_t dwMilliseconds);
@ -125,6 +126,7 @@ WELS_THREAD_HANDLE WelsThreadSelf();
WELS_THREAD_ERROR_CODE WelsQueryLogicalProcessInfo (WelsLogicalProcessInfo* pInfo);
void WelsSleep (uint32_t dwMilliSecond);
#ifdef __cplusplus
}

View File

@ -0,0 +1,125 @@
/*!
* \copy
* Copyright (c) 2009-2015, Cisco Systems
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
* ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file WelsThreadPool.h
*
* \brief Interfaces introduced in thread pool
*
* \date 5/09/2012 Created
*
*************************************************************************************
*/
#ifndef _WELS_THREAD_POOL_H_
#define _WELS_THREAD_POOL_H_
#include <stdio.h>
#include "WelsTask.h"
#include "WelsTaskThread.h"
#include "WelsCircleQueue.h"
#include "WelsList.h"
namespace WelsCommon {
class CWelsThreadPool : public CWelsThread, public IWelsTaskThreadSink {
public:
enum {
DEFAULT_THREAD_NUM = 4,
};
static WELS_THREAD_ERROR_CODE SetThreadNum (int32_t iMaxThreadNum);
static CWelsThreadPool& AddReference();
void RemoveInstance();
static bool IsReferenced();
//IWelsTaskThreadSink
virtual WELS_THREAD_ERROR_CODE OnTaskStart (CWelsTaskThread* pThread, IWelsTask* pTask);
virtual WELS_THREAD_ERROR_CODE OnTaskStop (CWelsTaskThread* pThread, IWelsTask* pTask);
// CWelsThread
virtual void ExecuteTask();
WELS_THREAD_ERROR_CODE QueueTask (IWelsTask* pTask);
int32_t GetThreadNum() const {
return m_iMaxThreadNum;
}
protected:
WELS_THREAD_ERROR_CODE Init();
WELS_THREAD_ERROR_CODE Uninit();
WELS_THREAD_ERROR_CODE CreateIdleThread();
void DestroyThread (CWelsTaskThread* pThread);
WELS_THREAD_ERROR_CODE AddThreadToIdleQueue (CWelsTaskThread* pThread);
WELS_THREAD_ERROR_CODE AddThreadToBusyList (CWelsTaskThread* pThread);
WELS_THREAD_ERROR_CODE RemoveThreadFromBusyList (CWelsTaskThread* pThread);
void AddTaskToWaitedList (IWelsTask* pTask);
CWelsTaskThread* GetIdleThread();
IWelsTask* GetWaitedTask();
int32_t GetIdleThreadNum();
int32_t GetBusyThreadNum();
int32_t GetWaitedTaskNum();
void ClearWaitedTasks();
private:
CWelsThreadPool();
virtual ~CWelsThreadPool();
WELS_THREAD_ERROR_CODE StopAllRunning();
static int32_t m_iRefCount;
static CWelsLock m_cInitLock;
static int32_t m_iMaxThreadNum;
CWelsCircleQueue<IWelsTask>* m_cWaitedTasks;
CWelsCircleQueue<CWelsTaskThread>* m_cIdleThreads;
CWelsList<CWelsTaskThread>* m_cBusyThreads;
CWelsLock m_cLockPool;
CWelsLock m_cLockWaitedTasks;
CWelsLock m_cLockIdleTasks;
CWelsLock m_cLockBusyTasks;
DISALLOW_COPY_AND_ASSIGN (CWelsThreadPool);
};
}
#endif

View File

@ -38,10 +38,12 @@
/****************************************************************************
* Copy functions
****************************************************************************/
void WelsCopy4x4 (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS);
void WelsCopy4x4_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS);
void WelsCopy8x4_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS);
void WelsCopy4x8_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS);
void WelsCopy8x8_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS);
void WelsCopy8x16_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS); //
void WelsCopy16x8_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS); //
void WelsCopy8x16_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS); //
void WelsCopy16x8_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS); //
void WelsCopy16x16_c (uint8_t* pDst, int32_t iStrideD, uint8_t* pSrc, int32_t iStrideS);
#if defined(__cplusplus)

View File

@ -29,11 +29,11 @@
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file cpu.h
* \file cpu.h
*
* \brief CPU feature compatibility detection
* \brief CPU feature compatibility detection
*
* \date 04/29/2009 Created
* \date 04/29/2009 Created
*
*************************************************************************************
*/
@ -50,7 +50,7 @@ extern "C" {
#if defined(X86_ASM)
/*
* cpuid support verify routine
* cpuid support verify routine
* return 0 if cpuid is not supported by cpu
*/
int32_t WelsCPUIdVerify();
@ -63,7 +63,7 @@ int32_t WelsCPUSupportFMA (uint32_t eax, uint32_t ecx);
void WelsEmms();
/*
* clear FPU registers states for potential float based calculation if support
* clear FPU registers states for potential float based calculation if support
*/
void WelsCPURestore (const uint32_t kuiCPU);

View File

@ -29,11 +29,11 @@
* POSSIBILITY OF SUCH DAMAGE.
*
*
* \file cpu_core.h
* \file cpu_core.h
*
* \brief cpu core feature detection
* \brief cpu core feature detection
*
* \date 4/24/2009 Created
* \date 4/24/2009 Created
*
*************************************************************************************
*/
@ -41,7 +41,7 @@
#define WELS_CPU_CORE_FEATURE_DETECTION_H__
/*
* WELS CPU feature flags
* WELS CPU feature flags
*/
#define WELS_CPU_MMX 0x00000001 /* mmx */
#define WELS_CPU_MMXEXT 0x00000002 /* mmx-ext*/
@ -56,17 +56,23 @@
#define WELS_CPU_SSE42 0x00000400 /* sse 4.2 */
/* CPU features application extensive */
#define WELS_CPU_AVX 0x00000800 /* Advanced Vector eXtentions */
#define WELS_CPU_FPU 0x00001000 /* x87-FPU on chip */
#define WELS_CPU_HTT 0x00002000 /* Hyper-Threading Technology (HTT), Multi-threading enabled feature:
physical processor package is capable of supporting more than one logic processor
*/
#define WELS_CPU_CMOV 0x00004000 /* Conditional Move Instructions,
also if x87-FPU is present at indicated by the CPUID.FPU feature bit, then FCOMI and FCMOV are supported
*/
#define WELS_CPU_MOVBE 0x00008000 /* MOVBE instruction */
#define WELS_CPU_AES 0x00010000 /* AES instruction extensions */
#define WELS_CPU_FMA 0x00020000 /* AVX VEX FMA instruction sets */
#define WELS_CPU_FPU 0x00001000 /* x87-FPU on chip */
#define WELS_CPU_HTT 0x00002000 /* Hyper-Threading Technology (HTT), Multi-threading enabled feature:
physical processor package is capable of supporting more than one logic processor
*/
#define WELS_CPU_CMOV 0x00004000 /* Conditional Move Instructions,
also if x87-FPU is present at indicated by the CPUID.FPU feature bit, then FCOMI and FCMOV are supported
*/
#define WELS_CPU_MOVBE 0x00008000 /* MOVBE instruction */
#define WELS_CPU_AES 0x00010000 /* AES instruction extensions */
#define WELS_CPU_FMA 0x00020000 /* AVX VEX FMA instruction sets */
#define WELS_CPU_AVX 0x00000800 /* Advanced Vector eXtentions */
#ifdef HAVE_AVX2
#define WELS_CPU_AVX2 0x00040000 /* AVX2 */
#else
#define WELS_CPU_AVX2 0x00000000 /* !AVX2 */
#endif
#define WELS_CPU_CACHELINE_16 0x10000000 /* CacheLine Size 16 */
#define WELS_CPU_CACHELINE_32 0x20000000 /* CacheLine Size 32 */
@ -79,7 +85,7 @@
#define WELS_CPU_NEON 0x000004 /* NEON */
/*
* Interfaces for CPU core feature detection as below
* Interfaces for CPU core feature detection as below
*/
#endif//WELS_CPU_CORE_FEATURE_DETECTION_H__

Some files were not shown because too many files have changed in this diff Show More