c17b62e1bd
Change bitreading functions to use a larger window which is refilled less often. This makes it cheap enough to do bounds checking each time the window is refilled, which avoids the need to copy the input into a large circular buffer. This uses less memory and speeds up the total decode time by 1.6% on an ARM11, 2.8% on a Cortex A8, and 2.2% on x86-32, but less than 1% on x86-64. Inlining vp8dx_bool_decoder_fill() has a big penalty on x86-32, as does moving the refill loop to the front of vp8dx_decode_bool(). However, having the refill loop between computation of the split values and the branch in vp8_decode_mb_tokens() is a big win on ARM (presumably due to memory latency and code size: refilling after normalization duplicates the code in the DECODE_AND_BRANCH_IF_ZERO and DECODE_AND_LOOP_IF_ZERO cases. Unfortunately, refilling at the end of vp8dx_bool_decoder_fill() and at the beginning of each decode step in vp8_decode_mb_tokens() means the latter requires an extra refill at the end. Platform-specific versions could avoid the problem, but would require most of detokenize.c to be duplicated. Change-Id: I16c782a63376f2a15b78f8086d899b987204c1c7
44 lines
1.0 KiB
C
44 lines
1.0 KiB
C
#ifndef DBOOLHUFF_ARM_H
|
|
#define DBOOLHUFF_ARM_H
|
|
|
|
/* JLK
|
|
* There are currently no arm-optimized versions of
|
|
* these functions. As they are implemented, they
|
|
* can be uncommented below and added to
|
|
* arm/dsystemdependent.c
|
|
*
|
|
* The existing asm code is likely so different as
|
|
* to be useless. However, its been left (for now)
|
|
* for reference.
|
|
*/
|
|
/*
|
|
#if HAVE_ARMV6
|
|
#undef vp8_dbool_start
|
|
#define vp8_dbool_start vp8dx_start_decode_v6
|
|
|
|
#undef vp8_dbool_fill
|
|
#define vp8_dbool_fill vp8_bool_decoder_fill_v6
|
|
|
|
#undef vp8_dbool_debool
|
|
#define vp8_dbool_debool vp8_decode_bool_v6
|
|
|
|
#undef vp8_dbool_devalue
|
|
#define vp8_dbool_devalue vp8_decode_value_v6
|
|
#endif // HAVE_ARMV6
|
|
|
|
#if HAVE_ARMV7
|
|
#undef vp8_dbool_start
|
|
#define vp8_dbool_start vp8dx_start_decode_neon
|
|
|
|
#undef vp8_dbool_fill
|
|
#define vp8_dbool_fill vp8_bool_decoder_fill_neon
|
|
|
|
#undef vp8_dbool_debool
|
|
#define vp8_dbool_debool vp8_decode_bool_neon
|
|
|
|
#undef vp8_dbool_devalue
|
|
#define vp8_dbool_devalue vp8_decode_value_neon
|
|
#endif // HAVE_ARMV7
|
|
*/
|
|
#endif // DBOOLHUFF_ARM_H
|