Commit Graph

393 Commits

Author SHA1 Message Date
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
ruil2
e58de20f3a add encoder interface ut 2014-07-25 16:40:14 +08:00
Martin Storsjö
d5a45ec513 Mark the x86 assembly object files as not requiring an executable stack
This avoids having to add extra linker flags in order to specify this.

This is similar to how this already is handled for the arm assembly.
2014-07-25 00:56:39 +03:00
zhilwang
811e20f0d9 Merge pull request #1185 from mstorsjo/android-l-preview
Fix building for the Android L preview release, add support for new 64 bit Android ABIs
2014-07-18 16:56:22 +08:00
ruil2
ef7cce3d14 modify trace output 2014-07-17 10:09:52 +08:00
Martin Storsjö
9aaeef9264 Manually define the SWelsTime struct on unix, don't rely on struct timeb
We don't use the ftime function on unix for filling SWelsTime anyway,
we fill the time and millitm fields manually.

On android, the sys/timeb.h header has been removed in the next
platform version (currently available in NDK r10 in the "L preview"
release), since this header and the ftime function have been removed
from the POSIX 2008 specification.

This fixes compilation when targeting the Android "L preview" release,
even when targeting the 32 bit ABIs.
2014-07-16 21:32:18 +03:00
Martin Storsjö
6966679f33 Remove unused includes of sys/timeb.h
This header is included by crt_util_safe_x.h whenever necessary (it's
all hidden in the SWelsTime struct) - code which does not explicitly
use things from sys/timeb.h shouldn't include it.
2014-07-16 21:31:07 +03:00
ruil2
b9058e4987 add trace tag 2014-07-16 16:49:53 +08:00
ruil2
29bb1df645 Merge pull request #1177 from huili2/version_all
version-generate
2014-07-16 10:35:20 +08:00
huili2
333cf6aa97 version-generate 2014-07-14 23:39:31 -07:00
Martin Storsjö
d5c71dbe2f Use the correct syntax for the aarch64 ext instructions
Since Xcode 5.1, the apple tools actually support using the
official, correct syntax for the ext instructions. This syntax
is already used in a number of places already - use it consistently,
and get rid of the compatibility hacks.
2014-07-10 08:53:41 +03:00
dongzhang
beaf7c1893 speed up memory loading in arm64 MC 2014-07-09 18:22:42 +08:00
huili2
adb0fa498f astyle all cpp files 2014-07-08 20:01:42 -07:00
dongzhang
249b8a0aa6 add arm64 MB COPY code and UT 2014-07-08 14:22:14 +08:00
ruil2
325c63d0ca Merge pull request #1047 from mstorsjo/cpufeatures-armv8
Update the generic 32 bit arm linux cpu feature detection to support 64 bit kernels
2014-07-01 14:53:52 +08:00
Martin Storsjö
04c6c95577 Update the generic 32 bit arm linux cpu feature detection to support 64 bit kernels
On 64 bit kernels, /proc/cpuinfo doesn't list the same old features
as on 32 bit kernels, since most of them are mandatory on 64 bit arm
systems, see [1] for details.

If running a 32 bit arm binary on such a kernel, we need to detect
the features slightly differently, either by using other names
listed in the Features field on these devices, by checking the
"CPU architecture" field and always enabling these if the architecture
is >= 8, or by parsing /proc/self/auxv or using the getauxval function.

[1] http://marc.info/?l=linux-arm-kernel&m=139087240101974
2014-06-30 09:51:49 +03:00
Martin Storsjö
4af37a7d21 Move common tables and definitions into the common library 2014-06-30 09:03:10 +03:00
zhilwang
2b038fa73b Merge pull request #1037 from mstorsjo/unify-align-macros
Unify macros for alignment
2014-06-30 10:09:05 +08:00
zhilwang
1780a81a1d Merge pull request #1042 from mstorsjo/avoid-ios-build-warnings
Avoid warnings when building for iOS
2014-06-30 10:06:52 +08:00
zhilwang
eb221eb3d1 Merge pull request #1030 from mstorsjo/cpuid-32bit-param
Don't load undefined bits into rcx before calling the cpuid instruction
2014-06-30 10:05:26 +08:00
zhilwang
58349156b1 Merge pull request #1035 from mstorsjo/aarch64-cpufeatures
Implement WelsCPUFeatureDetect for AArch64
2014-06-30 10:04:03 +08:00
Martin Storsjö
68b4b09ae6 Don't load undefined bits into rcx before calling the cpuid instruction
The pFeatureC pointer is an uint32_t pointer, therefore only
load 32 bits into ecx.

This avoids loading potentially uninitialized data into the upper
half of the rcx register, fixing valgrind warnings in some build
setups (depending on how the compiler chooses to layout the stack
in the calling function).
2014-06-29 20:46:55 +03:00
Martin Storsjö
b5407915cc Avoid warnings when building for iOS
Get rid of warnings by avoiding mixing data types unnecessarily,
and by adding casts.
2014-06-29 16:03:34 +03:00
Martin Storsjö
263833b3bf Remove the now unused macros __align16, ALIGNED_DECLARE_MATRIX_1D and ALIGNED_DECLARE_MATRIX_2D 2014-06-29 00:36:29 +03:00
Martin Storsjö
66deed24b8 Implement WelsCPUFeatureDetect for AArch64
Previously it actually didn't return any cpu flags at all.
2014-06-27 23:57:42 +03:00
Martin Storsjö
b406f4471a Fix a typo in arm64 assembly macros, ARCH64 -> AARCH64 2014-06-27 23:52:20 +03:00
ruil2
1ffcd36c70 change void* to explicit type definition 2014-06-27 11:34:47 +08:00
huili2
dc3fae4477 astyle all 2014-06-25 18:50:41 -07:00
Haibo Zhu
daf67d607f add win 64 warnings remove 2014-06-19 18:31:39 -07:00
Martin Storsjö
720f8dcc52 Fix building the deblocking aarch64 assembly with gnu binutils 2014-06-17 10:10:50 +03:00
Martin Storsjö
b9477cdb94 Unify the copyright header in the aarch64 deblocking assembly
This file was the only one that had a differently formatted
copyright header.
2014-06-17 10:02:57 +03:00
Martin Storsjö
062937ac5a Unify the indentation of the new aarch64 assembly 2014-06-17 10:01:23 +03:00
Martin Storsjö
d15534ecb8 Get rid of mixed tabs and spaces in the aarch64 assembly 2014-06-17 10:00:07 +03:00
ruil2
1111757977 Merge pull request #967 from dongzha/Deblock_AArch64
add arm 64 deblock code and Unit Test code
2014-06-16 17:19:25 +08:00
huili2
91cd93e5d0 Merge pull request #962 from dongzha/UseIntInRC
Use Int instead of Double in Rate Control and Modify anchor SHA1 value
2014-06-13 10:59:50 +08:00
dongzha
f6ce43f83b Use Int instead of Double in Rate Control and Modify anchor SHA1 value 2014-06-12 17:30:13 +08:00
ruil2
44b048edd6 move trace related info to interface header 2014-06-11 17:05:40 +08:00
Martin Storsjö
dc91e0958b Integrate the lone function from logging.cpp into welsCodecTrace.cpp 2014-06-11 08:08:56 +03:00
Martin Storsjö
6e5f31214a Add a method for overriding the logging function in welsCodecTrace 2014-06-11 08:08:56 +03:00
Martin Storsjö
ce8065fe68 Don't use global variables in welsCodecTrace
This allows actually honoring the requested log level
properly if there are multiple codec instances within
the same process.
2014-06-11 08:08:56 +03:00
Martin Storsjö
cb5ee6c239 Remove the global log callback function
Now all logging should use a non-null log context, allowing to
pass the messages to the right recipient.
2014-06-11 08:08:56 +03:00
Martin Storsjö
8bac9315e6 Expose a SLogContext from welsCodecTrace 2014-06-11 08:08:29 +03:00
Martin Storsjö
4e428ab020 Add a log context to the encoder and decoder contexts
This will allow setting non-global logging callbacks, that
are different for each encoder or decoder instance.
2014-06-11 08:08:29 +03:00
Martin Storsjö
c8b81b4239 Only keep one single trace function pointer in welsCodecTrace 2014-06-11 08:08:29 +03:00
Martin Storsjö
20e889fadb Change CM_WELS_TRACE to take a plain string, not a format and variadic arguments
The format string was always "%s" anyway.
2014-06-11 08:08:29 +03:00
Martin Storsjö
5e22d5366e Remove the unused level parameter to welsStderrLevelTrace 2014-06-11 08:08:29 +03:00
Martin Storsjö
cfc9367610 Remove WelsStderrSetTraceLevel
The logging level is checked in welsCodecTrace anyway.

Previously, error logging wasn't ever shown if the trace
level was set to WELS_LOG_ERROR (as it was by default),
since welsStderrLevelTrace required the message level to
be strictly lower than the trace level.
2014-06-11 08:08:29 +03:00
Martin Storsjö
90be3d8215 Don't treat log levels as a bitmask
All use of log levels in the library just do a numerical
greater-than comparison between the set log level and the
level of the current message.
2014-06-11 08:08:29 +03:00
Martin Storsjö
4f1ea1c4f8 Remove some unused typedefs 2014-06-11 08:08:29 +03:00
Martin Storsjö
cc65a1d76c Don't include a [ENCODER]: prefix in all logging
The same trace module is used for the decoder now as well.
2014-06-10 10:52:26 +03:00
Martin Storsjö
17fc6bd66e Remove the unnecessary method WelsTraceModuleIsExist(), which always returned true 2014-06-10 10:52:26 +03:00
Martin Storsjö
d93488448e Remove some commented out lines 2014-06-10 10:52:26 +03:00
Martin Storsjö
968d87045d Remove an unnecessary local function 2014-06-10 10:52:26 +03:00
Martin Storsjö
40af75c19d Remove the unnecessary WelsSet/GetLogLevel functions
Nothing actually used the variable that these functions
handled.
2014-06-10 10:52:06 +03:00
Martin Storsjö
ba1de16ac2 Make internal logging variables static
This avoids polluting the global namespace.
2014-06-10 09:28:45 +03:00
Martin Storsjö
ab4fe3fdf4 Remove an unused variable 2014-06-10 09:27:54 +03:00
dongzhang
0e0c8b5569 add arm 64 deblock code and Unit Test code 2014-06-10 11:23:51 +08:00
ruil2
4c12f8970c cleanup trace module 2014-06-10 10:24:45 +08:00
Martin Storsjö
7bc3e944ad Get rid of uneven spacing after WELS_EXTERN 2014-06-09 11:03:25 +03:00
Martin Storsjö
57f6bcc4b0 Convert all tabs to spaces in assembly sources, unify indentation
Previously the assembly sources had mixed indentation consisting
of both spaces and tabs, making it quite hard to read unless
the right tab size was used in the editor.

Tabs have been interpreted as 4 spaces in most cases, matching
the surrounding code.
2014-06-01 01:35:43 +03:00
Martin Storsjö
faaf62afad Get rid of double spaces in macro declarations 2014-06-01 01:13:01 +03:00
Martin Storsjö
ac03b8b503 Avoid unnecessary tabs in macro declarations 2014-06-01 01:13:01 +03:00
Martin Storsjö
932a38abc0 Reformat the copyright header of deblocking_neon.S
This makes it identical to the ones in the other files.
2014-05-31 13:44:21 +03:00
ruil2
14e5d740cd clean up expand picture. 2014-05-30 11:05:31 +08:00
dongzha
80fdf09b26 Merge pull request #903 from zhilwang/arm64-sad
Add Arm64 sad code
2014-05-30 09:26:04 +08:00
Sijia Chen
7413032185 using WelsRound for all the double-int32_t conversion 2014-05-20 14:06:31 +08:00
zhiliang wang
e6c9eb9824 Add Sad arm64 code 2014-05-14 17:06:48 +08:00
Martin Storsjö
3cc01c6239 Use CCASFLAGS when assembling .S sources
This allows overriding whether all of CFLAGS should be passed
when assembling.
2014-05-13 19:39:26 +03:00
sijchen
31a4d2aa3e Merge pull request #829 from dongzha/FixBugforDeblocking
Fix a bug in deblocking for neon 32 bit arm implementation for master
2014-05-13 17:21:48 +08:00