Commit Graph

105 Commits

Author SHA1 Message Date
Licai Guo
fee0f14732 finish syntax checks in ParseSps 2014-02-21 00:16:42 -08:00
Licai Guo
4e0b8d4cbf refine checks in ParseSps 2014-02-20 19:25:11 -08:00
Licai Guo
d69b2faa9f fix the crash issues by changing the type iMbWidth & iMbHeight. 2014-02-19 23:06:35 -08:00
Licai Guo
46b9d5d0da Merge pull request #323 from huili2/check_bit_read
add safety check for bit-reading for headers
2014-02-20 14:17:07 +08:00
Licai Guo
a921bc6589 Merge pull request #320 from huili2/mb_residual_size_check
remain size to prevent MB residual reading overflow
2014-02-20 11:19:57 +08:00
Martin Storsjö
3532781556 Mark source parameters to MC functions as const 2014-02-19 10:19:56 +02:00
Martin Storsjö
ebb890e03e Declare static functions within the file they are used/defined in
It does not make sense to declare but not define static functions
in a header.
2014-02-19 09:51:25 +02:00
Licai Guo
a3c38b5631 add safety check for bit-reading for headers 2014-02-18 22:55:12 -08:00
huili2
0fcd066cde Merge pull request #298 from licaiguo/decoder-syntax-element-step1
add decoder syntax checks
2014-02-19 08:57:50 +08:00
Ethan Hugg
413b301e9c Merge pull request #303 from mstorsjo/simplify-decoder-api
Simplify the Initialize decoder method
2014-02-18 11:27:38 -08:00
Martin Storsjö
3b297ec866 Remove completely unused variables and private fields 2014-02-18 13:04:13 +02:00
Martin Storsjö
1075338b9b Use the actual struct type instead of a void pointer to the decoder Initialize method 2014-02-18 13:00:59 +02:00
Licai Guo
61b64190dd add decoder syntax checks 2014-02-17 23:57:12 -08:00
Licai Guo
d0a7f9b625 add refine mc.cpp on decoder
1. remove unecessary init
2. add static to constant function pointer array
2014-02-17 22:36:56 -08:00
Licai Guo
278597be2f Merge pull request #292 from huili2/level_prefix
fix level_prefix too large in residual decoding
2014-02-18 14:22:30 +08:00
Licai Guo
06d3ed8ddc Merge pull request #294 from huili2/neg_left_shift
negative data with left shift, use cast or multiplication instead
2014-02-18 14:21:44 +08:00
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