Commit Graph

461 Commits

Author SHA1 Message Date
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
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
fstd
4d063b84cc Build successfully on OpenBSD (which lacks sysctlbyname(3)) 2015-09-12 21:31:39 +02: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
Guangwei Wang
1f8ef8f0a3 Add new x86 assembly functions to support sub8x8 mode 2015-07-10 09:00:05 +08:00
Guangwei Wang
49b569a018 Add new ARM AArch64 assembly functions to support sub8x8 mode 2015-07-08 10:34:49 +08:00
Guangwei Wang
9f0d51d8d2 add new AArch32 asm functions to support sub8x8 mode 2015-07-07 10:13:56 +08: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
huili2
57bd721b2f add sub8x8 mode decision functions 2015-06-30 10:29:49 +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
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
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
Martin Storsjö
78e0ec6130 Convert tabs to spaces before comments 2015-06-10 10:22:29 +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
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
Guangwei Wang
c930424642 modify part of AArch64 LumaMc assembly functions to get improvement 2015-06-05 13:26:00 +08:00
Martin Storsjö
26c1ce2d05 Remove tabs from class constructor member initializer lists 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
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
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
Martin Storsjö
df994fa3f5 Convert tabs to spaces in enums and tables of defines 2015-05-15 11:20:11 +03:00
Martin Storsjö
b05468b5c1 Convert tabs to spaces in multiline comments 2015-05-15 10:50:49 +03:00
Martin Storsjö
0ca7ff49e2 Convert tabs to spaces in assignment of SIMD function pointers 2015-05-14 14:07:49 +03:00
Martin Storsjö
d152c25485 Remove tabs from the copyright/license section in file headers 2015-05-14 13:58:40 +03: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
brly
b7fb9414c5 Add detection of AVX2 2015-05-10 20:27:36 +09:00
Martin Storsjö
613a7a0ead Convert a tab to a space in an #ifndef 2015-05-04 12:46:38 +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
Martin Storsjö
a9c6a9d760 Remove tabs from the end of lines like ") {" 2015-04-29 15:49:28 +03:00
Martin Storsjö
f324c354b1 Remove unnecessary double spaces and tabs in ifdef directives 2015-04-29 15:34:38 +03:00
Martin Storsjö
7d3bb19bed Fix up indentation in some arm assembly files 2015-04-27 14:05:52 +03: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ö
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
huili2
2673f0a579 merge wels_const.h 2015-03-25 17:11:40 +08: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
huili2
403cc57dc6 merge common part of wels_common_basis 2015-03-20 12:44:00 +08: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
huili2
ed1140b846 merge bit_stream.h for encoder&decoder 2015-03-13 16:19:25 +08:00
Martin Storsjö
4f237b51ef Move parts of wels_const.h into a shared header 2015-02-02 12:41:11 +02: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
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
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ö
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
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
Sijia Chen
a4f09f4d76 update the version info to sync with recent change of API 2015-01-29 11:14:08 +08: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ö
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
zhuiling
a45c661525 to support different chroma qp
fix travis ci error
2015-01-23 09:06:09 +08:00
zhiliang wang
01b74ea7c1 Add asm code for NoneZeroCount and refine related code 2015-01-04 16:39:17 +08:00
huili2
2c99f5810e Merge pull request #1659 from syureyi/scalinglist
Scalinglist
2014-12-23 10:50:49 +08:00
Sijia Chen
eb8e25a038 update the version header file for 1.3 2014-12-22 14:13:30 +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
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
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ö
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
ruil2
5ab5fe155b keep the consistency between sps level and parameter level 2014-12-15 09:56:54 +08:00
huili2
3e57fdc448 add this log for codec 2014-12-10 22:15:32 -08:00
ruil2
d543ae89db add maxbitrate verification 2014-11-25 17:12:06 +08:00
Sijia Chen
54c677cdd7 fixing OverallMbMap for slice_idx>255 and some log improvements 2014-11-04 09:19:36 +08:00
ruil2
100de97b49 move cabac table to common 2014-10-30 12:42:09 +08:00
ruil2
c83ab3bca1 Merge pull request #1462 from sijchen/after_review1
updated documents from v1.2
2014-10-29 17:17:38 +08:00
Sijia Chen
4fab8c2ee7 for reference selection under screen:
1, ref_list_mgr_svc.cpp, Ln314: fix a wrong DeleteLTRFromLongList which should not be used under screen strategy
2, ref_list_mgr_svc.cpp, Ln910: remove the frame which is furthest in distance to the current frame in ref list
3, wels_preprocess.cpp: use scene LTR ref list when the current frame is scene LTR
-, ref_list_mgr_svc.cpp, Ln811: add DEBUG trace
reviewed at: https://rbcommons.com/s/OpenH264/r/870/
2014-10-28 16:58:59 +08:00
Sijia Chen
4292f91ae5 add updated documents from v1.2 2014-10-28 13:55:37 +08:00
dong zhang
d3c8ade8d0 fix Rc int32_t bitrate overflow 2014-10-27 09:54:44 +08:00
sijchen
43c62d06eb Merge pull request #1439 from sijchen/for_format
[Reformat] format cpp files for next release
2014-10-24 09:00:36 +08:00
Martin Storsjö
0a3d4c4ebc Only use pthread_setname_np on Android >= 9 (2.3)
Older versions of Android don't have this function.
2014-10-23 15:36:40 +03:00
Sijia Chen
97298de90a reformat cpp files for next release 2014-10-23 17:50:50 +08:00
Sijia Chen
41720f8df5 add a thread name for easier profiling 2014-10-23 16:38:05 +08:00
Daniel J. Hofmann
39d725c113 Wnewline-eof 2014-10-14 23:23:50 +02:00
Daniel J. Hofmann
2ff61475d6 Wc++11-extra-semi 2014-10-14 22:21:06 +02:00
zhiliang wang
19c02bdfa8 Fix crash issue due to commit 8945348. 2014-09-26 11:16:13 +08:00
ruil2
ed341048de refine common moudle for part of intra prediction function 2014-09-25 14:03:11 +08:00
dongzha
c213c6ba30 1. add Tid API UT
2. add Trace UT
3. Fix a crash issue when set NULL trace
2014-09-17 09:26:54 +08:00
zhuiling
0fe477625c improve py, and change mk according to mk 2014-09-12 10:25:46 +08:00
ruil2
40e952f981 remove "\n" which shoudl be added by the trace sink 2014-08-27 14:34:05 +08:00
Martin Storsjö
81ac3d2a9b Fix building svc_motion_estimation.S for android
The .align directive takes an argument in number of bits, i.e. the
actual alignment is 2^n. Previously building with binutils failed,
since 16 isn't a valid parameter to .align, the maximum is 15.

Thus, this makes the code try to align to 16 bytes, instead of aligning
to 65536 bytes.

This fixes building for android.

This also clears up the same mistake in the aarch64 code, even though
that one built just fine.
2014-08-15 09:53:42 +03:00
Martin Storsjö
f69c9074e7 Add ifdef HAVE_NEON around the contents of arm_arch_common_macro.S
This file is built on its own from within the xcode projects,
even though it isn't necessary. Previously its contents was just
empty, but now a .syntax unified was added, which failed the build
when building for arm64.

Make this file a no-op, just like the other arm assembly source files,
unless HAVE_NEON is defined.
2014-08-15 08:49:31 +03:00
ruil2
493d254a4a merge level table 2014-08-12 09:28:40 +08:00
Martin Storsjö
38d2d64ede Explicitly add .syntax unified when building for iOS
This is the default when building with the clang built-in assembler,
but not if using the external assembler - thus always specify it,
for clarity.

Also use the three-operand for of a sub instruction in BS_NZC_CHECK.
The same is already done in the gnu version of the macro.

This fixes building most of the arm assembly with Apple's external
assembler. While this isn't a necessary goal in itself, there's no
harm in doing this either.
2014-08-08 14:09:37 +03:00
Martin Storsjö
5f0ef6a5a9 Add attributes incidating intentional data type aliasing
Interpreting data of one type via a pointer of a different type is an
aliasing violating. This means that a compiler optimizer's analyzer
can assume that data loaded into an array as uint32_t isn't related
to data read out from the same array as uint64_t, and e.g. reorder
loads/stores.

Since these structs are intentionally used to load data via pointers
of a wrong size, tell the compiler that these accesses may alias
other reads.

This fixes the GetIntraPredictorTest tests of WelsI4x4LumaPredV_c
and WelsI4x4LumaPredH_c. (The compiler optimizer did the wrong thing
as long as WelsFillingPred8to16_c or WelsFillingPred8x2to16_c were
inlined into the calling function.)
2014-08-08 11:34:45 +03:00