Commit Graph

139 Commits

Author SHA1 Message Date
Licai Guo
f5d086eba1 merge the calculate 2014-02-17 22:16:51 -08:00
Licai Guo
a810408cdc negative data with left shift, use cast or multiplication instead 2014-02-17 19:13:41 -08:00
Licai Guo
7bace8406e remain size to prvent MB residual reading overflow 2014-02-17 00:47:41 -08:00
Licai Guo
0d1deb578e fix level_prefix too large in residual decoding 2014-02-13 22:51:45 -08:00
Martin Storsjö
55d7491f3d Remove stub interfaces for hw decoding
There is no implementation available for actually doing decoding
in HW.
2014-02-13 14:21:38 +02:00
Ethan Hugg
8b8e0d4b3e Merge pull request #274 from mstorsjo/typedef-cleanup
Remove typedefs for standard C++ types
2014-02-10 10:46:12 -08:00
Ethan Hugg
1e549e6f9a Merge pull request #271 from mstorsjo/merge-asm-headers
Merge declarations of shared asm functions into the comon library
2014-02-10 10:40:34 -08:00
Ethan Hugg
007f5ba773 Merge pull request #258 from mstorsjo/endian-cleanup
Avoid endian-specific code
2014-02-10 10:36:05 -08:00
Martin Storsjö
80862eec77 Use the C++ constants true/false instead of defining our own
TRUE/FALSE has intentionally been left in use for the few
platform specific APIs that define these constants themselves
and expect them to be used, for consistency.
2014-02-10 08:06:37 +02:00
Martin Storsjö
f2bd22acd5 Use char instead of str_t 2014-02-10 08:06:37 +02:00
Martin Storsjö
7b96c6756e Use void instead of void_t
There's really no reason for adding a typedef for void.
2014-02-10 08:06:33 +02:00
Martin Storsjö
2b77fe7f49 Use bool instead of bool_t
bool is one of the built in, standard types in C++, there's no need
for a typedef for it.
2014-02-10 08:05:09 +02:00
Martin Storsjö
17d7b5d72e Use bool_t instead of BOOL_T
One bool typedef is already more than enough, two is too many.
2014-02-10 08:05:09 +02:00
Martin Storsjö
0f7a958ce3 Move declarations of functions in mc_chroma/luma.asm into a header in common 2014-02-10 08:05:02 +02:00
Martin Storsjö
ad209c2d14 Move declarations of functions in expand_picture.asm into a header in common 2014-02-10 08:05:02 +02:00
Martin Storsjö
a532c1233b Take the missed WelsDecoderI4x4LumaPredH_sse2 function into use
Previously this function was never used.
2014-02-08 23:09:16 +02:00
Martin Storsjö
0a14d4c79b Make the deblocking handling endian independent
This avoids having to set a define indicating the endianness.

This doesn't incur any significant measurable slowdown.
2014-01-30 10:33:21 +02:00
Ethan Hugg
1e744b1933 Merge pull request #257 from mstorsjo/simplify-endian-func
Simplify the implementation of GetValueOf4Bytes
2014-01-29 15:25:30 -08:00
Ethan Hugg
fbcd962169 Merge pull request #256 from mstorsjo/bigendian
Make the library work on big endian
2014-01-29 15:24:32 -08:00
Martin Storsjö
1d2c37f7de Simplify the implementation of GetValueOf4Bytes
What the two different implementations currently do is simply
to write a 32 bit number, in the native endianness, into the
given buffer.

The actual purpose of this function is still unknown though,
it can be removed completely without breaking decoding - it
is possibly a remnant from earlier functionality in the
decoder.
2014-01-29 22:44:42 +02:00
Martin Storsjö
cadbec75d8 Fix shifting tricks in deblocking for big endian
The code interprets an array of 4 uint8_t values as one uint32_t
and does shifts on the value. The same optimization can be
kept in big endian as well, but the shift has to be done in the
other direction.

This code could be made truly independent of endianness, but
that could cause some minimal performance degradaion, at least
in theory.

This makes "make test" pass on big endian, assuming that
WORDS_BIGENDIAN is defined while building.
2014-01-29 22:30:33 +02:00
Martin Storsjö
47ec78843a Don't read an uint8_t array as an uint32_t
This makes the code work properly on big endian.

The MC case is similar to how it's done in the encoder.

Neither of these should have any significant performance
impact.
2014-01-29 22:27:55 +02:00
Martin Storsjö
66c39a4fd4 Remove the array_stack_align.h header from the encoder lib
All of these macros are already available in the common
macros.h header. Unify all the macros to be named ENFORCE_*
instead of mixed FORCE/ENFORCE.
2014-01-29 22:07:52 +02:00
Martin Storsjö
e306888d0c Unify the codepaths for WELS_GET_PERFIX_BITS at the second place
This changes a second use of the macro which was missed in
60e0255677.

This avoids warnings about unused local variables in 64 bit
builds in MSVC.
2014-01-28 11:00:20 +02:00
Ethan Hugg
4334812eee Merge pull request #235 from mstorsjo/merge-ls-defines
Merge the ls_defines.h headers into the common sub-library
2014-01-27 14:10:00 -08:00
Ethan Hugg
d9cbe19110 Merge pull request #240 from mstorsjo/simplify-inline-asm
Unify the fallback codepath for getting prefix bits into a macro
2014-01-27 13:07:38 -08:00
Ethan Hugg
5616ddb3a5 Merge pull request #242 from mstorsjo/simplify-debug-file-locations
Simplify debugging code by always writing trace files to the current directory
2014-01-27 13:04:29 -08:00
Martin Storsjö
771ff739b6 Simplify debugging code - always write debug trace files to the cur directory
This reduces the amount of platform ifdefs.
2014-01-27 22:36:50 +02:00
Martin Storsjö
60e0255677 Unify the fallback codepath for getting prefix bits into a macro
This avoids having to know the details about when the optimized
codepath is available at the place where it's used.
2014-01-27 22:30:00 +02:00
Martin Storsjö
55717d3fb8 Remove an unused function for byte order swapping 2014-01-27 22:18:23 +02:00
Martin Storsjö
a44808e276 Merge the ls_defines.h headers into the common sub-library 2014-01-27 14:14:41 +02:00
Martin Storsjö
11bdd8adad Move the measure_time.h header to the common library
Both encoder and decoder versions were functionally equivalent,
but I picked the decoder version (but added the static inline
keywords to it) since the encoder one was quite messy with a lot
of commented out code.
2014-01-27 12:58:23 +02:00
volvet
33fe2b5883 Merge pull request #225 from mstorsjo/simplify-ifdefs
Simplify ifdefs in measure_time.h
2014-01-27 00:14:44 -08:00
Martin Storsjö
30bcfea6b8 Simplify ifdefs in measure_time.h
Instead of using "defined(MSC_VER) || defined(__MINGW32__)" to
indicate the windows platform, just check for the _WIN32 define
instead.

Also remove an unused codepath - the removed codepath would
only be used under the condition
"(defined(MSC_VER) || defined(__MINGW32__)) && !defined(_WIN32)",
and I'm not aware of any environment with MSVC or MinGW that
doesn't define _WIN32, thus this codepath never was used.
2014-01-27 08:08:23 +02:00
Martin Storsjö
2f5f25b7e3 Merge the encoder/decoder crt_util_safe_x.h into the common lib 2014-01-27 08:03:03 +02:00
Ethan Hugg
627c1558ae Merge pull request #215 from varunbpatil/dec_core_cleanup
Removed unused headers in decoder core
2014-01-26 20:09:19 -08:00
kali2
fa91f77b1b Merge pull request #214 from licaiguo/fix-rpl
fix reference picture modification bug -- review #67
2014-01-26 19:24:25 -08:00
volvet
5ac52e31e9 Merge pull request #224 from mstorsjo/msvc2005
Fix building on MSVC 2005
2014-01-26 17:51:44 -08:00
Martin Storsjö
e1d96aeaf3 Fix the old MSVC version of WelsGetTimeOfDay
The _ftime function returns void.

This fixes building on MSVC 2005.
2014-01-26 10:52:08 +02:00
volvet
d67fbe74ce Merge pull request #213 from licaiguo/update-resolution
change resolution update logic -- review #66
2014-01-26 00:51:35 -08:00
Varun B Patil
e459b91412 Removed unused headers in decoder core 2014-01-26 12:00:57 +05:30
licaiguo
058ceb369f fix reference picture modification bug 2014-01-25 16:37:22 +08:00
licaiguo
1a2dd0c1f1 change resolution update logic 2014-01-25 16:12:52 +08:00
Martin Storsjö
0f18b31d91 Remove unused defines of __FASTCALL 2014-01-24 15:50:26 +02:00
Licai Guo
fc56c7d007 1. use WELS_CLIP1 to replace table look-up;
2. fix bugs about buffer overflow
3. add more boundary checks
2014-01-23 00:07:21 -08:00
ruil2
99412b0fc2 Merge pull request #167 from licaiguo/fix-961370
fix 961370 -- review request #50
2014-01-22 23:52:30 -08:00
huili2
f149843f7a Merge pull request #190 from licaiguo/add-level-limits
Add level limits for decoder
2014-01-22 22:56:39 -08:00
ruil2
ca6c00ba18 Merge pull request #168 from licaiguo/fix-960932
fix 960932 by add boundary checks on run_before -- review request #51
2014-01-22 18:59:40 -08:00
Licai Guo
8e201827f4 remove blank lines 2014-01-22 18:48:19 -08:00
Licai Guo
34300be44f add change from master 2014-01-22 18:41:27 -08:00
Licai Guo
9a875532fd add level limits 2014-01-22 18:35:50 -08:00
Licai Guo
e8fc798d02 add parentheses 2014-01-22 18:27:46 -08:00
ruil2
9efbef67b9 Merge pull request #153 from licaiguo/fix-empty-packets
fix crash caused by empty packets and add more checks -- review request #44
2014-01-22 17:44:05 -08:00
Licai Guo
ff5e6dde2a remove unnecessary return 2014-01-21 23:56:39 -08:00
Licai Guo
048dea434d remove unnecessary check, confirmed safe usage 2014-01-21 23:54:21 -08:00
Licai Guo
a53377314a fix issues found by coverage scan 2014-01-21 19:13:46 -08:00
Martin Storsjö
67405177d9 Remove an unused function
This function contains a lot of platform specific constants
whose use is unknown.
2014-01-21 15:01:52 +02:00
Licai Guo
56767f8154 add parenthses 2014-01-21 00:23:41 -08:00
Licai Guo
a2164c22af fix 960932 by add boundary checks on run_before 2014-01-19 22:15:25 -08:00
Licai Guo
64380c46b8 fix 961370 2014-01-19 18:54:45 -08:00
Licai Guo
1a04694d97 fix crash caused by empty packets and add more checks 2014-01-16 22:13:03 -08:00
volvet
856f186b8e fix illegal instruction use 2014-01-16 15:57:22 +08:00
Martin Storsjö
65b339815e Get rid of trailing whitespace in the assembly source files 2014-01-13 20:12:04 +02:00
Martin Storsjö
9ccae7b0d6 Remove useless use of the HAVE_CACHE_LINE_ALIGN define
The code ends up as the exact same regardless of whether the
define is set or not.
2014-01-10 12:25:39 +02:00
Martin Storsjö
8bc5bf58a0 Remove the unused global variable g_uiCacheLineSize 2014-01-10 12:20:59 +02:00
Licai Guo
15bd7dab57 fix crash issue for too big packet size 2014-01-09 00:28:13 -08:00
Licai Guo
77fd9aa4f0 merge macros.h to common/macros.h 2014-01-09 15:41:24 +08:00
Licai Guo
f38111d76b file a new commit
Squashed commit of the following:

commit 26be4c66686d2d75ba1eb381ae562d30474429b2
Merge: 91bde82 8df0566
Author: Licai Guo <guolicai@gmail.com>
Date:   Wed Jan 8 16:56:49 2014 -0800

    Merge remote-tracking branch 'upstream/master' into move_to_common

    Conflicts:
    	codec/common/targets.mk
    	codec/console/dec/targets.mk
    	codec/decoder/targets.mk
    	codec/encoder/targets.mk
    	codec/processing/targets.mk

commit 91bde8209dad40eaa0b26cc75467e4ce52b4c8ae
Merge: c827054 cc2ffee
Author: Licai Guo <guolicai@gmail.com>
Date:   Tue Jan 7 20:16:11 2014 -0800

    Merge remote-tracking branch 'upstream/master' into move_to_common

commit c8270543fab8e40cb4aebf62d7646068afe19484
Author: Licai Guo <guolicai@gmail.com>
Date:   Mon Jan 6 19:12:39 2014 -0800

    enable WelsScan4x4DcAc_ssse3

commit c8d2823d54e54cab146098302441ef44a4638382
Author: Licai Guo <guolicai@gmail.com>
Date:   Mon Jan 6 18:46:06 2014 -0800

    remove trailing white spaces

commit 39866a9cf54db6120aabd6a01afd4aedbead8af0
Author: Licai Guo <guolicai@gmail.com>
Date:   Mon Jan 6 18:06:10 2014 -0800

    move common code(deblocking and cpu) to common, rename decoder's
    Intra-prediction functions prefix.
2014-01-08 17:03:00 -08:00
Ethan Hugg
4033940ba7 Merge pull request #105 from mstorsjo/msvc-disable-inline-asm-on-arm
Use MSVC inline assembly only on (32-bit) X86
2014-01-07 13:13:05 -08:00
Ethan Hugg
e801b58bf8 Merge pull request #110 from huili2/master
interface clean and inside modification
2014-01-06 11:02:49 -08:00
Ethan Hugg
057d3e507b Merge pull request #100 from mstorsjo/trailing-whitespace-cpp-comments
Remove trailing whitespace in comments
2014-01-06 09:33:52 -08:00
Ethan Hugg
9cf180dda6 Merge pull request #103 from mstorsjo/remove-commented-out-pragmas
Remove commented out pragmas
2014-01-06 08:37:33 -08:00
huili2
32fd2c4e4d interface clean and inside modification
clean and comment some API.
move the SKIP mv pred location
remove the unused buffer in intra construction.
2014-01-06 13:28:55 +08:00
licaiguo
a3e0a71c71 remove unused intra-prediction functions and declarations 2014-01-06 11:53:43 +08:00
licaiguo
abb1311fb9 rename decoder's intra-prediction prefix from Wels to WelsDecoder. 2014-01-06 11:22:39 +08:00
Martin Storsjö
4a08781c18 Use MSVC inline assembly only on (32-bit) X86
Currently this used the _MSC_VER && !WIN64 to enable the inline
assembly, which still tried to use this code on windows on arm.
Using _MSC_VER && _M_IX86 is enough since _M_IX86 is defined only
when targeting 32 bit x86, not for x64.
2014-01-05 19:20:20 +02:00
Martin Storsjö
790110b2ce Remove commented out pragmas 2014-01-05 15:04:34 +02:00
Martin Storsjö
d3ee1de5ac Remove trailing whitespace in comments
The astyle cleanup keeps trailing whitespace within comments,
but the whitespace here is not significant nor intentional
and thus should be removed.
2014-01-05 14:53:21 +02:00
volvet
ec84f4bcc9 resolve conflict 2014-01-03 14:49:45 +08:00
unknown
1e5a290855 1. fix gcc 3.4 link error.
2. fix mingw build issue when enable asm
2014-01-02 17:19:25 +08:00
V
b939d91517 Add workaround for missing strnlen.
Enabled by default, define HAVE_STRNLEN to disable workaround.
2013-12-23 22:03:41 +01:00
V
7fa09903cf Add MinGW platform makefile and related source changes 2013-12-23 21:42:31 +01:00
licaiguo
077ffed5ea Add Windows 64-bit build to VS project files 2013-12-15 15:18:19 +08:00
Licai Guo
ac6828f4fa Enable 64-bit build on Linux & Mac 2013-12-14 20:37:33 -08:00
Martin Storsjö
f9dea46712 Remove trailing whitespace
Most of it was removed in ff6b669176 from C++ source files,
but other files were left unchanged.
2013-12-13 11:24:17 +02:00
Martin Storsjö
8f9a5469be Convert source files to unix newlines
Most files were converted in ff6b669176, but some (non C++
source files) were left with windows newlines.
2013-12-13 11:20:23 +02:00
tab
3cc719ca0d Fix typo in strnlen fallback 2013-12-12 17:56:29 -05:00
Ethan Hugg
ff6b669176 Pretty printed the C++ code with astyle 2013-12-12 14:21:12 -08:00
Ethan Hugg
70e5e62f3d Initial Commit 2013-12-09 04:51:09 -08:00