Skip to content

Instantly share code, notes, and snippets.

@tuankiet65
Created October 27, 2015 14:52
Show Gist options
  • Save tuankiet65/7167ae107a7d69212c8d to your computer and use it in GitHub Desktop.
Save tuankiet65/7167ae107a7d69212c8d to your computer and use it in GitHub Desktop.
SaberMod segfault
target arm C: libvpx <= external/libvpx/libvpx/vp9/encoder/vp9_dct.c
prebuilts/misc/linux-x86/ccache/ccache prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/arm-linux-androideabi-gcc -I device/samsung/n7100/include -I external/libvpx/libvpx -I external/libvpx/armv7a-neon -I /home/tuankiet65/android/out/target/product/n7100/obj/STATIC_LIBRARIES/libvpx_intermediates/vp8/common -I /home/tuankiet65/android/out/target/product/n7100/obj/STATIC_LIBRARIES/libvpx_intermediates/vp8/decoder -I /home/tuankiet65/android/out/target/product/n7100/obj/STATIC_LIBRARIES/libvpx_intermediates/vp8/encoder -I /home/tuankiet65/android/out/target/product/n7100/obj/STATIC_LIBRARIES/libvpx_intermediates/vpx_scale -I external/libvpx -I /home/tuankiet65/android/out/target/product/n7100/obj/STATIC_LIBRARIES/libvpx_intermediates -I /home/tuankiet65/android/out/target/product/n7100/gen/STATIC_LIBRARIES/libvpx_intermediates -I libnativehelper/include/nativehelper -isystem system/core/include -isystem hardware/libhardware/include -isystem hardware/libhardware_legacy/include -isystem libnativehelper/include -isystem frameworks/native/include -isystem frameworks/native/opengl/include -isystem frameworks/av/include -isystem frameworks/base/include -isystem hardware/ril/include -isystem /home/tuankiet65/android/out/target/product/n7100/obj/include -isystem bionic/libc/arch-arm/include -isystem bionic/libc/include -isystem bionic/libstdc++/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/uapi/asm-arm -isystem bionic/libm/include -isystem bionic/libm/include/arm -c -fno-exceptions -Wno-multichar -O3 -fgcse-las -fgcse-sm -fivopts -fomit-frame-pointer -frename-registers -fsection-anchors -ftracer -ftree-loop-im -ftree-loop-ivcanon -funsafe-loop-optimizations -funswitch-loops -fweb -Wno-error=array-bounds -Wno-error=clobbered -Wno-error=maybe-uninitialized -Wno-error=strict-overflow -fgraphite -fgraphite-identity -msoft-float -ffunction-sections -fdata-sections -funwind-tables -fstack-protector -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -fno-canonical-system-headers -mcpu=cortex-a9 -mfpu=neon -mfloat-abi=softfp -include build/core/combo/include/arch/linux-arm/AndroidConfig.h -I build/core/combo/include/arch/linux-arm/ -fno-builtin-sin -fno-strict-volatile-bitfields -Wno-psabi -mthumb-interwork -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -DEXYNOS4_ENHANCEMENTS -DEXYNOS4X12_ENHANCEMENTS -DDISABLE_HW_ID_MATCH_CHECK -DSEC_HWJPEG_G2D -DWORKAROUND_BUG_10194508 -DHAVE_ISO -DSAMSUNG_DVFS -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -DNDEBUG -Wstrict-aliasing=2 -fgcse-after-reload -frerun-cse-after-loop -frename-registers -DNDEBUG -UDEBUG -O3 -fomit-frame-pointer -fstrict-aliasing -funswitch-loops -DHAVE_CONFIG_H=vpx_config.h -O3 -fPIC -MD -MF /home/tuankiet65/android/out/target/product/n7100/obj/STATIC_LIBRARIES/libvpx_intermediates/libvpx/vp9/encoder/vp9_dct.d -o /home/tuankiet65/android/out/target/product/n7100/obj/STATIC_LIBRARIES/libvpx_intermediates/libvpx/vp9/encoder/vp9_dct.o external/libvpx/libvpx/vp9/encoder/vp9_dct.c
external/libvpx/armv7a-neon/./vpx_config.h:13:0: warning: "ARCH_ARM" redefined [enabled by default]
#define ARCH_ARM 1
^
In file included from <command-line>:0:0:
./build/core/combo/include/arch/linux-arm/AndroidConfig.h:241:0: note: this is the location of the previous definition
#define ARCH_ARM
^
In file included from external/libvpx/libvpx/vp9/common/vp9_blockd.h:20:0,
from external/libvpx/libvpx/vp9/encoder/vp9_dct.c:17:
external/libvpx/libvpx/vp9/common/vp9_common.h: In function 'clip_pixel':
external/libvpx/libvpx/vp9/common/vp9_common.h:52:46: warning: signed and unsigned type in conditional expression [-Wsign-compare]
return (val > 255) ? 255u : (val < 0) ? 0u : val;
^
In file included from external/libvpx/libvpx/vp9/common/vp9_seg_common.h:14:0,
from external/libvpx/libvpx/vp9/common/vp9_blockd.h:26,
from external/libvpx/libvpx/vp9/encoder/vp9_dct.c:17:
external/libvpx/libvpx/vp9/common/vp9_prob.h: In function 'clip_prob':
external/libvpx/libvpx/vp9/common/vp9_prob.h:47:42: warning: signed and unsigned type in conditional expression [-Wsign-compare]
return (p > 255) ? 255u : (p < 1) ? 1u : p;
^
external/libvpx/libvpx/vp9/encoder/vp9_dct.c: In function 'vp9_fdct16x16_c':
external/libvpx/libvpx/vp9/encoder/vp9_dct.c:314:6: internal compiler error: Segmentation fault
void vp9_fdct16x16_c(const int16_t *input, int16_t *output, int stride) {
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <mailto:[email protected]> for instructions.
tuankiet65@cm-docker:~/android$ prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/arm-linux-androideabi-gcc -v
Using built-in specs.
COLLECT_GCC=prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/arm-linux-androideabi-gcc
COLLECT_LTO_WRAPPER=/home/tuankiet65/tmp/arm-linux-androideabi-4.8/libexec/gcc/arm-linux-androideabi/4.8.x-sabermod/lto-wrapper
Target: arm-linux-androideabi
Configured with: .././../gcc/gcc-SaberMod/configure --prefix=/home/tuankiet65/tmp/arm-linux-androideabi-4.8 --target=arm-linux-androideabi --host=x86_64-linux-gnu --build=x86_64-linux-gnu --with-gnu-as --with-gnu-ld --enable-languages=c,c++ --with-gmp=/tmp/sm-tc/build/temp-install --with-mpfr=/tmp/sm-tc/build/temp-install --with-mpc=/tmp/sm-tc/build/temp-install --with-cloog=/tmp/sm-tc/build/temp-install --with-isl=/tmp/sm-tc/build/temp-install --disable-ppl-version-check --disable-cloog-version-check --disable-isl-version-check --with-host-libstdcxx='-static-libgcc -Wl,-Bstatic,-lstdc++,-Bdynamic -lm' --enable-version-specific-runtime-libs --enable-threads=posix --disable-sjlj-exceptions --disable-shared --disable-libssp --disable-libitm --disable-plugin --disable-docs --disable-nls --disable-tls --enable-eh-frame-hdr-for-static --with-bugurl=mailto:[email protected] --enable-multilib --disable-libstdc__-v3 --with-float=soft --with-fpu=neon --with-arch=armv7-a --enable-target-optspace --prefix=/home/tuankiet65/tmp/arm-linux-androideabi-4.8 --with-sysroot=/home/tuankiet65/tmp/arm-linux-androideabi-4.8/arch-arm --with-gcc-version=SaberMod --with-binutils-version=android --with-gmp-version=gnu --with-mpfr-version=gnu --with-mpc-version=gnu --with-cloog-version=0.18.4 --with-isl-version=0.15 --enable-graphite=yes --with-gold-version=android --enable-gold=default --disable-option-checking --enable-initfini-array --disable-bootstrap --with-gxx-include-dir=/home/tuankiet65/tmp/arm-linux-androideabi-4.8/arch-arm/c++ --with-python --with-gnu-ld --with-gnu-as --disable-werror --enable-libsanitizer --enable-silent-rules --enable-static --enable-plugins --with-tune=cortex-a9 --with-fpu=neon --program-transform-name='s&^&arm-linux-androideabi-&'
Thread model: posix
gcc version 4.8.x-sabermod 20150623 (release) (GCC)
# 1 "external/libvpx/libvpx/vp9/encoder/vp9_dct.c"
# 1 "<built-in>"
# 1 "<command-line>"
# 1 "./build/core/combo/include/arch/linux-arm/AndroidConfig.h" 1
# 1 "<command-line>" 2
# 1 "external/libvpx/libvpx/vp9/encoder/vp9_dct.c"
# 11 "external/libvpx/libvpx/vp9/encoder/vp9_dct.c"
# 1 "bionic/libc/include/assert.h" 1 3 4
# 45 "bionic/libc/include/assert.h" 3 4
# 1 "bionic/libc/include/sys/cdefs.h" 1 3 4
# 80 "bionic/libc/include/sys/cdefs.h" 3 4
# 1 "bionic/libc/include/sys/cdefs_elf.h" 1 3 4
# 81 "bionic/libc/include/sys/cdefs.h" 2 3 4
# 491 "bionic/libc/include/sys/cdefs.h" 3 4
# 1 "bionic/libc/include/android/api-level.h" 1 3 4
# 492 "bionic/libc/include/sys/cdefs.h" 2 3 4
# 46 "bionic/libc/include/assert.h" 2 3 4
# 62 "bionic/libc/include/assert.h" 3 4
void __assert(const char *, int, const char *) __attribute__((__noreturn__));
void __assert2(const char *, int, const char *, const char *) __attribute__((__noreturn__));
# 12 "external/libvpx/libvpx/vp9/encoder/vp9_dct.c" 2
# 1 "bionic/libm/include/math.h" 1 3 4
# 21 "bionic/libm/include/math.h" 3 4
# 1 "bionic/libc/include/limits.h" 1 3 4
# 86 "bionic/libc/include/limits.h" 3 4
# 1 "bionic/libc/include/sys/limits.h" 1 3 4
# 30 "bionic/libc/include/sys/limits.h" 3 4
# 1 "bionic/libc/kernel/uapi/linux/limits.h" 1 3 4
# 31 "bionic/libc/include/sys/limits.h" 2 3 4
# 87 "bionic/libc/include/limits.h" 2 3 4
# 1 "bionic/libc/include/sys/syslimits.h" 1 3 4
# 90 "bionic/libc/include/limits.h" 2 3 4
# 22 "bionic/libm/include/math.h" 2 3 4
#pragma GCC visibility push(default)
extern const union __infinity_un {
unsigned char __uc[8];
double __ud;
} __infinity;
extern const union __nan_un {
unsigned char __uc[sizeof(float)];
float __uf;
} __nan;
# 129 "bionic/libm/include/math.h" 3 4
typedef double __double_t;
typedef __double_t double_t;
typedef float __float_t;
typedef __float_t float_t;
# 154 "bionic/libm/include/math.h" 3 4
extern int signgam;
# 175 "bionic/libm/include/math.h" 3 4
int __fpclassifyd(double) __attribute__((__const__));
int __fpclassifyf(float) __attribute__((__const__));
int __fpclassifyl(long double) __attribute__((__const__));
int __isfinitef(float) __attribute__((__const__));
int __isfinite(double) __attribute__((__const__));
int __isfinitel(long double) __attribute__((__const__));
int __isinff(float) __attribute__((__const__));
int __isinfl(long double) __attribute__((__const__));
int __isnanf(float) __attribute__((__const__));
int __isnanl(long double) __attribute__((__const__));
int __isnormalf(float) __attribute__((__const__));
int __isnormal(double) __attribute__((__const__));
int __isnormall(long double) __attribute__((__const__));
int __signbit(double) __attribute__((__const__));
int __signbitf(float) __attribute__((__const__));
int __signbitl(long double) __attribute__((__const__));
double acos(double);
double asin(double);
double atan(double);
double atan2(double, double);
double cos(double);
double sin(double);
double tan(double);
double cosh(double);
double sinh(double);
double tanh(double);
double exp(double);
double frexp(double, int *);
double ldexp(double, int);
double log(double);
double log10(double);
double modf(double, double *);
double pow(double, double);
double sqrt(double);
double ceil(double);
double fabs(double) __attribute__((__const__));
double floor(double);
double fmod(double, double);
double acosh(double);
double asinh(double);
double atanh(double);
double cbrt(double);
double erf(double);
double erfc(double);
double exp2(double);
double expm1(double);
double fma(double, double, double);
double hypot(double, double);
int ilogb(double) __attribute__((__const__));
int (isinf)(double) __attribute__((__const__));
int (isnan)(double) __attribute__((__const__));
double lgamma(double);
long long llrint(double);
long long llround(double);
double log1p(double);
double log2(double);
double logb(double);
long lrint(double);
long lround(double);
double nan(const char *) __attribute__((__const__));
double nextafter(double, double);
double remainder(double, double);
double remquo(double, double, int *);
double rint(double);
double j0(double);
double j1(double);
double jn(int, double);
double y0(double);
double y1(double);
double yn(int, double);
double gamma(double);
double scalb(double, double);
double copysign(double, double) __attribute__((__const__));
double fdim(double, double);
double fmax(double, double) __attribute__((__const__));
double fmin(double, double) __attribute__((__const__));
double nearbyint(double);
double round(double);
double scalbln(double, long);
double scalbn(double, int);
double tgamma(double);
double trunc(double);
double drem(double, double);
int finite(double) __attribute__((__const__));
int isnanf(float) __attribute__((__const__));
long double significandl(long double);
double gamma_r(double, int *);
double lgamma_r(double, int *);
double significand(double);
float acosf(float);
float asinf(float);
float atanf(float);
float atan2f(float, float);
float cosf(float);
float sinf(float);
float tanf(float);
float coshf(float);
float sinhf(float);
float tanhf(float);
float exp2f(float);
float expf(float);
float expm1f(float);
float frexpf(float, int *);
int ilogbf(float) __attribute__((__const__));
float ldexpf(float, int);
float log10f(float);
float log1pf(float);
float log2f(float);
float logf(float);
float modff(float, float *);
float powf(float, float);
float sqrtf(float);
float ceilf(float);
float fabsf(float) __attribute__((__const__));
float floorf(float);
float fmodf(float, float);
float roundf(float);
float erff(float);
float erfcf(float);
float hypotf(float, float);
float lgammaf(float);
float tgammaf(float);
float acoshf(float);
float asinhf(float);
float atanhf(float);
float cbrtf(float);
float logbf(float);
float copysignf(float, float) __attribute__((__const__));
long long llrintf(float);
long long llroundf(float);
long lrintf(float);
long lroundf(float);
float nanf(const char *) __attribute__((__const__));
float nearbyintf(float);
float nextafterf(float, float);
float remainderf(float, float);
float remquof(float, float, int *);
float rintf(float);
float scalblnf(float, long);
float scalbnf(float, int);
float truncf(float);
float fdimf(float, float);
float fmaf(float, float, float);
float fmaxf(float, float) __attribute__((__const__));
float fminf(float, float) __attribute__((__const__));
float dremf(float, float);
int finitef(float) __attribute__((__const__));
float gammaf(float);
float j0f(float);
float j1f(float);
float jnf(int, float);
float scalbf(float, float);
float y0f(float);
float y1f(float);
float ynf(int, float);
float gammaf_r(float, int *);
float lgammaf_r(float, int *);
float significandf(float);
long double acoshl(long double);
long double acosl(long double);
long double asinhl(long double);
long double asinl(long double);
long double atan2l(long double, long double);
long double atanhl(long double);
long double atanl(long double);
long double cbrtl(long double);
long double ceill(long double);
long double copysignl(long double, long double) __attribute__((__const__));
long double coshl(long double);
long double cosl(long double);
long double erfcl(long double);
long double erfl(long double);
long double exp2l(long double);
long double expl(long double);
long double expm1l(long double);
long double fabsl(long double) __attribute__((__const__));
long double fdiml(long double, long double);
long double floorl(long double);
long double fmal(long double, long double, long double);
long double fmaxl(long double, long double) __attribute__((__const__));
long double fminl(long double, long double) __attribute__((__const__));
long double fmodl(long double, long double);
long double frexpl(long double value, int *);
long double hypotl(long double, long double);
int ilogbl(long double) __attribute__((__const__));
long double ldexpl(long double, int);
long double lgammal(long double);
long long llrintl(long double);
long long llroundl(long double);
long double log10l(long double);
long double log1pl(long double);
long double log2l(long double);
long double logbl(long double);
long double logl(long double);
long lrintl(long double);
long lroundl(long double);
long double modfl(long double, long double *);
long double nanl(const char *) __attribute__((__const__));
long double nearbyintl(long double);
long double nextafterl(long double, long double);
double nexttoward(double, long double);
float nexttowardf(float, long double);
long double nexttowardl(long double, long double);
long double powl(long double, long double);
long double remainderl(long double, long double);
long double remquol(long double, long double, int *);
long double rintl(long double);
long double roundl(long double);
long double scalblnl(long double, long);
long double scalbnl(long double, int);
long double sinhl(long double);
long double sinl(long double);
long double sqrtl(long double);
long double tanhl(long double);
long double tanl(long double);
long double tgammal(long double);
long double truncl(long double);
long double lgammal_r(long double, int *);
# 474 "bionic/libm/include/math.h" 3 4
#pragma GCC visibility pop
# 13 "external/libvpx/libvpx/vp9/encoder/vp9_dct.c" 2
# 1 "external/libvpx/armv7a-neon/./vpx_config.h" 1
# 15 "external/libvpx/libvpx/vp9/encoder/vp9_dct.c" 2
# 1 "external/libvpx/armv7a-neon/./vp9_rtcd.h" 1
# 18 "external/libvpx/armv7a-neon/./vp9_rtcd.h"
# 1 "external/libvpx/libvpx/vpx/vpx_integer.h" 1
# 16 "external/libvpx/libvpx/vpx/vpx_integer.h"
# 1 "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8.x-sabermod/include/stddef.h" 1 3 4
# 147 "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8.x-sabermod/include/stddef.h" 3 4
typedef int ptrdiff_t;
# 212 "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8.x-sabermod/include/stddef.h" 3 4
typedef unsigned int size_t;
# 324 "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8.x-sabermod/include/stddef.h" 3 4
typedef unsigned int wchar_t;
# 17 "external/libvpx/libvpx/vpx/vpx_integer.h" 2
# 46 "external/libvpx/libvpx/vpx/vpx_integer.h"
# 1 "bionic/libc/include/stdint.h" 1 3 4
# 32 "bionic/libc/include/stdint.h" 3 4
# 1 "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8.x-sabermod/include/stddef.h" 1 3 4
# 33 "bionic/libc/include/stdint.h" 2 3 4
# 1 "bionic/libc/include/machine/wchar_limits.h" 1 3 4
# 34 "bionic/libc/include/stdint.h" 2 3 4
typedef signed char __int8_t;
typedef unsigned char __uint8_t;
typedef short __int16_t;
typedef unsigned short __uint16_t;
typedef int __int32_t;
typedef unsigned int __uint32_t;
typedef long long __int64_t;
typedef unsigned long long __uint64_t;
typedef int __intptr_t;
typedef unsigned int __uintptr_t;
typedef __int8_t int8_t;
typedef __uint8_t uint8_t;
typedef __int16_t int16_t;
typedef __uint16_t uint16_t;
typedef __int32_t int32_t;
typedef __uint32_t uint32_t;
typedef __int64_t int64_t;
typedef __uint64_t uint64_t;
typedef __intptr_t intptr_t;
typedef __uintptr_t uintptr_t;
typedef int8_t int_least8_t;
typedef uint8_t uint_least8_t;
typedef int16_t int_least16_t;
typedef uint16_t uint_least16_t;
typedef int32_t int_least32_t;
typedef uint32_t uint_least32_t;
typedef int64_t int_least64_t;
typedef uint64_t uint_least64_t;
typedef int8_t int_fast8_t;
typedef uint8_t uint_fast8_t;
typedef int64_t int_fast64_t;
typedef uint64_t uint_fast64_t;
typedef int32_t int_fast16_t;
typedef uint32_t uint_fast16_t;
typedef int32_t int_fast32_t;
typedef uint32_t uint_fast32_t;
typedef uint64_t uintmax_t;
typedef int64_t intmax_t;
# 47 "external/libvpx/libvpx/vpx/vpx_integer.h" 2
# 1 "bionic/libc/include/inttypes.h" 1 3 4
# 251 "bionic/libc/include/inttypes.h" 3 4
typedef struct {
intmax_t quot;
intmax_t rem;
} imaxdiv_t;
intmax_t imaxabs(intmax_t) __attribute__((__const__));
imaxdiv_t imaxdiv(intmax_t, intmax_t) __attribute__((__const__));
intmax_t strtoimax(const char *, char **, int);
uintmax_t strtoumax(const char *, char **, int);
intmax_t wcstoimax(const wchar_t * __restrict,
wchar_t ** __restrict, int);
uintmax_t wcstoumax(const wchar_t * __restrict,
wchar_t ** __restrict, int);
# 55 "external/libvpx/libvpx/vpx/vpx_integer.h" 2
# 19 "external/libvpx/armv7a-neon/./vp9_rtcd.h" 2
# 1 "external/libvpx/libvpx/vp9/common/vp9_enums.h" 1
# 33 "external/libvpx/libvpx/vp9/common/vp9_enums.h"
typedef enum BITSTREAM_PROFILE {
PROFILE_0,
PROFILE_1,
PROFILE_2,
MAX_PROFILES
} BITSTREAM_PROFILE;
typedef enum BIT_DEPTH {
BITS_8,
BITS_10,
BITS_12
} BIT_DEPTH;
typedef enum BLOCK_SIZE {
BLOCK_4X4,
BLOCK_4X8,
BLOCK_8X4,
BLOCK_8X8,
BLOCK_8X16,
BLOCK_16X8,
BLOCK_16X16,
BLOCK_16X32,
BLOCK_32X16,
BLOCK_32X32,
BLOCK_32X64,
BLOCK_64X32,
BLOCK_64X64,
BLOCK_SIZES,
BLOCK_INVALID = BLOCK_SIZES
} BLOCK_SIZE;
typedef enum PARTITION_TYPE {
PARTITION_NONE,
PARTITION_HORZ,
PARTITION_VERT,
PARTITION_SPLIT,
PARTITION_TYPES,
PARTITION_INVALID = PARTITION_TYPES
} PARTITION_TYPE;
typedef enum {
TX_4X4 = 0,
TX_8X8 = 1,
TX_16X16 = 2,
TX_32X32 = 3,
TX_SIZES
} TX_SIZE;
typedef enum {
ONLY_4X4 = 0,
ALLOW_8X8 = 1,
ALLOW_16X16 = 2,
ALLOW_32X32 = 3,
TX_MODE_SELECT = 4,
TX_MODES = 5,
} TX_MODE;
typedef enum {
DCT_DCT = 0,
ADST_DCT = 1,
DCT_ADST = 2,
ADST_ADST = 3,
TX_TYPES = 4
} TX_TYPE;
typedef enum {
UNKNOWN = 0,
BT_601 = 1,
BT_709 = 2,
SMPTE_170 = 3,
SMPTE_240 = 4,
RESERVED_1 = 5,
RESERVED_2 = 6,
SRGB = 7
} COLOR_SPACE;
typedef enum {
VP9_LAST_FLAG = 1 << 0,
VP9_GOLD_FLAG = 1 << 1,
VP9_ALT_FLAG = 1 << 2,
} VP9_REFFRAME;
# 20 "external/libvpx/armv7a-neon/./vp9_rtcd.h" 2
struct macroblockd;
struct macroblock;
struct vp9_variance_vtable;
struct mv;
union int_mv;
struct yv12_buffer_config;
void vp9_blend_b_c(uint8_t *y, uint8_t *u, uint8_t *v, int y1, int u1, int v1, int alpha, int stride);
void vp9_blend_mb_inner_c(uint8_t *y, uint8_t *u, uint8_t *v, int y1, int u1, int v1, int alpha, int stride);
void vp9_blend_mb_outer_c(uint8_t *y, uint8_t *u, uint8_t *v, int y1, int u1, int v1, int alpha, int stride);
int64_t vp9_block_error_c(const int16_t *coeff, const int16_t *dqcoeff, intptr_t block_size, int64_t *ssz);
void vp9_convolve8_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
void vp9_convolve8_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
void vp9_convolve8_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
void vp9_convolve8_avg_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
void vp9_convolve8_avg_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
void vp9_convolve8_avg_horiz_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
void vp9_convolve8_avg_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
void vp9_convolve8_avg_vert_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
void vp9_convolve8_horiz_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
void vp9_convolve8_horiz_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
void vp9_convolve8_vert_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
void vp9_convolve8_vert_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
void vp9_convolve_avg_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
void vp9_convolve_avg_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
void vp9_convolve_copy_c(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
void vp9_convolve_copy_neon(const uint8_t *src, ptrdiff_t src_stride, uint8_t *dst, ptrdiff_t dst_stride, const int16_t *filter_x, int x_step_q4, const int16_t *filter_y, int y_step_q4, int w, int h);
void vp9_d117_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_d117_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_d117_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_d117_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_d135_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_d135_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_d135_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_d135_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_d153_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_d153_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_d153_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_d153_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_d207_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_d207_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_d207_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_d207_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_d45_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_d45_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_d45_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_d45_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_d63_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_d63_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_d63_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_d63_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_dc_128_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_dc_128_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_dc_128_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_dc_128_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_dc_left_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_dc_left_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_dc_left_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_dc_left_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_dc_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_dc_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_dc_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_dc_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_dc_top_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_dc_top_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_dc_top_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_dc_top_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
int vp9_diamond_search_sad_c(const struct macroblock *x, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, int *mvjcost, int *mvcost[2], const struct mv *center_mv);
void vp9_fdct16x16_c(const int16_t *input, int16_t *output, int stride);
void vp9_fdct32x32_c(const int16_t *input, int16_t *output, int stride);
void vp9_fdct32x32_rd_c(const int16_t *input, int16_t *output, int stride);
void vp9_fdct4x4_c(const int16_t *input, int16_t *output, int stride);
void vp9_fdct8x8_c(const int16_t *input, int16_t *output, int stride);
void vp9_fht16x16_c(const int16_t *input, int16_t *output, int stride, int tx_type);
void vp9_fht4x4_c(const int16_t *input, int16_t *output, int stride, int tx_type);
void vp9_fht8x8_c(const int16_t *input, int16_t *output, int stride, int tx_type);
int vp9_full_range_search_c(const struct macroblock *x, struct mv *ref_mv, struct mv *best_mv, int search_param, int sad_per_bit, int *num00, const struct vp9_variance_vtable *fn_ptr, int *mvjcost, int *mvcost[2], const struct mv *center_mv);
int vp9_full_search_sad_c(const struct macroblock *x, const struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, int *mvjcost, int *mvcost[2], const struct mv *center_mv, struct mv *best_mv);
void vp9_fwht4x4_c(const int16_t *input, int16_t *output, int stride);
unsigned int vp9_get_mb_ss_c(const int16_t *);
void vp9_get_sse_sum_16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum);
void vp9_get_sse_sum_8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum);
void vp9_h_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_h_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_h_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_h_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_h_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_h_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_h_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_h_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_idct16x16_10_add_c(const int16_t *input, uint8_t *dest, int dest_stride);
void vp9_idct16x16_10_add_neon(const int16_t *input, uint8_t *dest, int dest_stride);
void vp9_idct16x16_1_add_c(const int16_t *input, uint8_t *dest, int dest_stride);
void vp9_idct16x16_1_add_neon(const int16_t *input, uint8_t *dest, int dest_stride);
void vp9_idct16x16_256_add_c(const int16_t *input, uint8_t *dest, int dest_stride);
void vp9_idct16x16_256_add_neon(const int16_t *input, uint8_t *dest, int dest_stride);
void vp9_idct32x32_1024_add_c(const int16_t *input, uint8_t *dest, int dest_stride);
void vp9_idct32x32_1024_add_neon(const int16_t *input, uint8_t *dest, int dest_stride);
void vp9_idct32x32_1_add_c(const int16_t *input, uint8_t *dest, int dest_stride);
void vp9_idct32x32_1_add_neon(const int16_t *input, uint8_t *dest, int dest_stride);
void vp9_idct32x32_34_add_c(const int16_t *input, uint8_t *dest, int dest_stride);
void vp9_idct32x32_1024_add_neon(const int16_t *input, uint8_t *dest, int dest_stride);
void vp9_idct4x4_16_add_c(const int16_t *input, uint8_t *dest, int dest_stride);
void vp9_idct4x4_16_add_neon(const int16_t *input, uint8_t *dest, int dest_stride);
void vp9_idct4x4_1_add_c(const int16_t *input, uint8_t *dest, int dest_stride);
void vp9_idct4x4_1_add_neon(const int16_t *input, uint8_t *dest, int dest_stride);
void vp9_idct8x8_10_add_c(const int16_t *input, uint8_t *dest, int dest_stride);
void vp9_idct8x8_10_add_neon(const int16_t *input, uint8_t *dest, int dest_stride);
void vp9_idct8x8_1_add_c(const int16_t *input, uint8_t *dest, int dest_stride);
void vp9_idct8x8_1_add_neon(const int16_t *input, uint8_t *dest, int dest_stride);
void vp9_idct8x8_64_add_c(const int16_t *input, uint8_t *dest, int dest_stride);
void vp9_idct8x8_64_add_neon(const int16_t *input, uint8_t *dest, int dest_stride);
void vp9_iht16x16_256_add_c(const int16_t *input, uint8_t *output, int pitch, int tx_type);
void vp9_iht4x4_16_add_c(const int16_t *input, uint8_t *dest, int dest_stride, int tx_type);
void vp9_iht4x4_16_add_neon(const int16_t *input, uint8_t *dest, int dest_stride, int tx_type);
void vp9_iht8x8_64_add_c(const int16_t *input, uint8_t *dest, int dest_stride, int tx_type);
void vp9_iht8x8_64_add_neon(const int16_t *input, uint8_t *dest, int dest_stride, int tx_type);
void vp9_iwht4x4_16_add_c(const int16_t *input, uint8_t *dest, int dest_stride);
void vp9_iwht4x4_1_add_c(const int16_t *input, uint8_t *dest, int dest_stride);
void vp9_lpf_horizontal_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count);
void vp9_lpf_horizontal_16_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count);
void vp9_lpf_horizontal_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count);
void vp9_lpf_horizontal_4_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count);
void vp9_lpf_horizontal_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1);
void vp9_lpf_horizontal_4_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1);
void vp9_lpf_horizontal_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count);
void vp9_lpf_horizontal_8_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count);
void vp9_lpf_horizontal_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1);
void vp9_lpf_horizontal_8_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1);
void vp9_lpf_vertical_16_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
void vp9_lpf_vertical_16_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
void vp9_lpf_vertical_16_dual_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
void vp9_lpf_vertical_16_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh);
void vp9_lpf_vertical_4_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count);
void vp9_lpf_vertical_4_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count);
void vp9_lpf_vertical_4_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1);
void vp9_lpf_vertical_4_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1);
void vp9_lpf_vertical_8_c(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count);
void vp9_lpf_vertical_8_neon(uint8_t *s, int pitch, const uint8_t *blimit, const uint8_t *limit, const uint8_t *thresh, int count);
void vp9_lpf_vertical_8_dual_c(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1);
void vp9_lpf_vertical_8_dual_neon(uint8_t *s, int pitch, const uint8_t *blimit0, const uint8_t *limit0, const uint8_t *thresh0, const uint8_t *blimit1, const uint8_t *limit1, const uint8_t *thresh1);
unsigned int vp9_mse16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse);
unsigned int vp9_mse16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse);
unsigned int vp9_mse8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse);
unsigned int vp9_mse8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse);
void vp9_quantize_b_c(const int16_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, int16_t *qcoeff_ptr, int16_t *dqcoeff_ptr, const int16_t *dequant_ptr, int zbin_oq_value, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan);
void vp9_quantize_b_32x32_c(const int16_t *coeff_ptr, intptr_t n_coeffs, int skip_block, const int16_t *zbin_ptr, const int16_t *round_ptr, const int16_t *quant_ptr, const int16_t *quant_shift_ptr, int16_t *qcoeff_ptr, int16_t *dqcoeff_ptr, const int16_t *dequant_ptr, int zbin_oq_value, uint16_t *eob_ptr, const int16_t *scan, const int16_t *iscan);
int vp9_refining_search_sad_c(const struct macroblock *x, struct mv *ref_mv, int sad_per_bit, int distance, const struct vp9_variance_vtable *fn_ptr, int *mvjcost, int *mvcost[2], const struct mv *center_mv);
unsigned int vp9_sad16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad);
unsigned int vp9_sad16x16_avg_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, unsigned int max_sad);
void vp9_sad16x16x3_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sad_array);
void vp9_sad16x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, unsigned int *sad_array);
void vp9_sad16x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array);
unsigned int vp9_sad16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad);
unsigned int vp9_sad16x32_avg_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, unsigned int max_sad);
void vp9_sad16x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, unsigned int *sad_array);
unsigned int vp9_sad16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad);
unsigned int vp9_sad16x8_avg_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, unsigned int max_sad);
void vp9_sad16x8x3_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sad_array);
void vp9_sad16x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, unsigned int *sad_array);
void vp9_sad16x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array);
unsigned int vp9_sad32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad);
unsigned int vp9_sad32x16_avg_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, unsigned int max_sad);
void vp9_sad32x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, unsigned int *sad_array);
unsigned int vp9_sad32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad);
unsigned int vp9_sad32x32_avg_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, unsigned int max_sad);
void vp9_sad32x32x3_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sad_array);
void vp9_sad32x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, unsigned int *sad_array);
void vp9_sad32x32x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array);
unsigned int vp9_sad32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad);
unsigned int vp9_sad32x64_avg_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, unsigned int max_sad);
void vp9_sad32x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, unsigned int *sad_array);
unsigned int vp9_sad4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad);
unsigned int vp9_sad4x4_avg_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, unsigned int max_sad);
void vp9_sad4x4x3_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sad_array);
void vp9_sad4x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, unsigned int *sad_array);
void vp9_sad4x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array);
unsigned int vp9_sad4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad);
unsigned int vp9_sad4x8_avg_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, unsigned int max_sad);
void vp9_sad4x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, unsigned int *sad_array);
void vp9_sad4x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array);
unsigned int vp9_sad64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad);
unsigned int vp9_sad64x32_avg_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, unsigned int max_sad);
void vp9_sad64x32x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, unsigned int *sad_array);
unsigned int vp9_sad64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad);
unsigned int vp9_sad64x64_avg_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, unsigned int max_sad);
void vp9_sad64x64x3_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sad_array);
void vp9_sad64x64x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, unsigned int *sad_array);
void vp9_sad64x64x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array);
unsigned int vp9_sad8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad);
unsigned int vp9_sad8x16_avg_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, unsigned int max_sad);
void vp9_sad8x16x3_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sad_array);
void vp9_sad8x16x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, unsigned int *sad_array);
void vp9_sad8x16x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array);
unsigned int vp9_sad8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad);
unsigned int vp9_sad8x4_avg_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, unsigned int max_sad);
void vp9_sad8x4x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, unsigned int *sad_array);
void vp9_sad8x4x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array);
unsigned int vp9_sad8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int max_sad);
unsigned int vp9_sad8x8_avg_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, const uint8_t *second_pred, unsigned int max_sad);
void vp9_sad8x8x3_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sad_array);
void vp9_sad8x8x4d_c(const uint8_t *src_ptr, int src_stride, const uint8_t* const ref_ptr[], int ref_stride, unsigned int *sad_array);
void vp9_sad8x8x8_c(const uint8_t *src_ptr, int src_stride, const uint8_t *ref_ptr, int ref_stride, uint32_t *sad_array);
unsigned int vp9_sub_pixel_avg_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred);
unsigned int vp9_sub_pixel_avg_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred);
unsigned int vp9_sub_pixel_avg_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred);
unsigned int vp9_sub_pixel_avg_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred);
unsigned int vp9_sub_pixel_avg_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred);
unsigned int vp9_sub_pixel_avg_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred);
unsigned int vp9_sub_pixel_avg_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred);
unsigned int vp9_sub_pixel_avg_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred);
unsigned int vp9_sub_pixel_avg_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred);
unsigned int vp9_sub_pixel_avg_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred);
unsigned int vp9_sub_pixel_avg_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred);
unsigned int vp9_sub_pixel_avg_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred);
unsigned int vp9_sub_pixel_avg_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, const uint8_t *second_pred);
unsigned int vp9_sub_pixel_mse32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_sub_pixel_mse64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_sub_pixel_variance16x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_sub_pixel_variance16x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_sub_pixel_variance16x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_sub_pixel_variance32x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_sub_pixel_variance32x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_sub_pixel_variance32x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_sub_pixel_variance4x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_sub_pixel_variance4x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_sub_pixel_variance64x32_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_sub_pixel_variance64x64_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_sub_pixel_variance8x16_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_sub_pixel_variance8x4_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_sub_pixel_variance8x8_c(const uint8_t *src_ptr, int source_stride, int xoffset, int yoffset, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
void vp9_subtract_block_c(int rows, int cols, int16_t *diff_ptr, ptrdiff_t diff_stride, const uint8_t *src_ptr, ptrdiff_t src_stride, const uint8_t *pred_ptr, ptrdiff_t pred_stride);
void vp9_temporal_filter_apply_c(uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_size, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count);
void vp9_tm_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_tm_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_tm_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_tm_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_tm_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_tm_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_tm_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_tm_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_v_predictor_16x16_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_v_predictor_16x16_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_v_predictor_32x32_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_v_predictor_32x32_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_v_predictor_4x4_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_v_predictor_4x4_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_v_predictor_8x8_c(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
void vp9_v_predictor_8x8_neon(uint8_t *dst, ptrdiff_t y_stride, const uint8_t *above, const uint8_t *left);
unsigned int vp9_variance16x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_variance16x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_variance16x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_variance32x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_variance32x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_variance32x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_variance4x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_variance4x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_variance64x32_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_variance64x64_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_variance8x16_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_variance8x4_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_variance8x8_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_variance_halfpixvar16x16_h_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_variance_halfpixvar16x16_hv_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_variance_halfpixvar16x16_v_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_variance_halfpixvar32x32_h_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_variance_halfpixvar32x32_hv_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_variance_halfpixvar32x32_v_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_variance_halfpixvar64x64_h_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_variance_halfpixvar64x64_hv_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
unsigned int vp9_variance_halfpixvar64x64_v_c(const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse);
void vp9_rtcd(void);
# 1 "external/libvpx/armv7a-neon/./vpx_config.h" 1
# 739 "external/libvpx/armv7a-neon/./vp9_rtcd.h" 2
# 16 "external/libvpx/libvpx/vp9/encoder/vp9_dct.c" 2
# 1 "external/libvpx/libvpx/vp9/common/vp9_blockd.h" 1
# 17 "external/libvpx/libvpx/vp9/common/vp9_blockd.h"
# 1 "external/libvpx/libvpx/vpx_ports/mem.h" 1
# 15 "external/libvpx/libvpx/vpx_ports/mem.h"
# 1 "external/libvpx/armv7a-neon/vpx_config.h" 1
# 16 "external/libvpx/libvpx/vpx_ports/mem.h" 2
# 18 "external/libvpx/libvpx/vp9/common/vp9_blockd.h" 2
# 1 "external/libvpx/libvpx/vpx_scale/yv12config.h" 1
# 18 "external/libvpx/libvpx/vpx_scale/yv12config.h"
# 1 "external/libvpx/libvpx/vpx/vpx_frame_buffer.h" 1
# 22 "external/libvpx/libvpx/vpx/vpx_frame_buffer.h"
# 1 "external/libvpx/libvpx/vpx/./vpx_integer.h" 1
# 23 "external/libvpx/libvpx/vpx/vpx_frame_buffer.h" 2
# 36 "external/libvpx/libvpx/vpx/vpx_frame_buffer.h"
typedef struct vpx_codec_frame_buffer {
uint8_t *data;
size_t size;
void *priv;
} vpx_codec_frame_buffer_t;
# 60 "external/libvpx/libvpx/vpx/vpx_frame_buffer.h"
typedef int (*vpx_get_frame_buffer_cb_fn_t)(
void *priv, size_t min_size, vpx_codec_frame_buffer_t *fb);
# 73 "external/libvpx/libvpx/vpx/vpx_frame_buffer.h"
typedef int (*vpx_release_frame_buffer_cb_fn_t)(
void *priv, vpx_codec_frame_buffer_t *fb);
# 19 "external/libvpx/libvpx/vpx_scale/yv12config.h" 2
# 27 "external/libvpx/libvpx/vpx_scale/yv12config.h"
typedef struct yv12_buffer_config {
int y_width;
int y_height;
int y_crop_width;
int y_crop_height;
int y_stride;
int uv_width;
int uv_height;
int uv_crop_width;
int uv_crop_height;
int uv_stride;
int alpha_width;
int alpha_height;
int alpha_stride;
uint8_t *y_buffer;
uint8_t *u_buffer;
uint8_t *v_buffer;
uint8_t *alpha_buffer;
uint8_t *buffer_alloc;
int buffer_alloc_sz;
int border;
int frame_size;
int corrupted;
int flags;
} YV12_BUFFER_CONFIG;
int vp8_yv12_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf,
int width, int height, int border);
int vp8_yv12_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf,
int width, int height, int border);
int vp8_yv12_de_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf);
int vp9_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf,
int width, int height, int ss_x, int ss_y,
int border);
int vp9_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf,
int width, int height, int ss_x, int ss_y,
int border,
vpx_codec_frame_buffer_t *fb,
vpx_get_frame_buffer_cb_fn_t cb,
void *cb_priv);
int vp9_free_frame_buffer(YV12_BUFFER_CONFIG *ybf);
# 19 "external/libvpx/libvpx/vp9/common/vp9_blockd.h" 2
# 1 "external/libvpx/libvpx/vp9/common/vp9_common.h" 1
# 16 "external/libvpx/libvpx/vp9/common/vp9_common.h"
# 1 "bionic/libc/include/assert.h" 1 3 4
# 62 "bionic/libc/include/assert.h" 3 4
void __assert(const char *, int, const char *) __attribute__((__noreturn__));
void __assert2(const char *, int, const char *, const char *) __attribute__((__noreturn__));
# 17 "external/libvpx/libvpx/vp9/common/vp9_common.h" 2
# 1 "external/libvpx/libvpx/vpx_mem/vpx_mem.h" 1
# 41 "external/libvpx/libvpx/vpx_mem/vpx_mem.h"
# 1 "bionic/libc/include/stdlib.h" 1 3 4
# 33 "bionic/libc/include/stdlib.h" 3 4
# 1 "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8.x-sabermod/include/stddef.h" 1 3 4
# 34 "bionic/libc/include/stdlib.h" 2 3 4
# 1 "bionic/libc/include/string.h" 1 3 4
# 32 "bionic/libc/include/string.h" 3 4
# 1 "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8.x-sabermod/include/stddef.h" 1 3 4
# 33 "bionic/libc/include/string.h" 2 3 4
# 1 "bionic/libc/include/malloc.h" 1 3 4
# 26 "bionic/libc/include/malloc.h" 3 4
# 1 "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8.x-sabermod/include/stddef.h" 1 3 4
# 27 "bionic/libc/include/malloc.h" 2 3 4
extern void* malloc(size_t byte_count) __attribute__((malloc)) __attribute__((__warn_unused_result__)) __attribute__((alloc_size(1)));
extern void* calloc(size_t item_count, size_t item_size) __attribute__((malloc)) __attribute__((__warn_unused_result__)) __attribute__((alloc_size(1,2)));
extern void* realloc(void* p, size_t byte_count) __attribute__((__warn_unused_result__)) __attribute__((alloc_size(2)));
extern void free(void* p);
extern void* memalign(size_t alignment, size_t byte_count) __attribute__((malloc)) __attribute__((__warn_unused_result__)) __attribute__((alloc_size(2)));
extern size_t malloc_usable_size(const void* p);
struct mallinfo {
size_t arena;
size_t ordblks;
size_t smblks;
size_t hblks;
size_t hblkhd;
size_t usmblks;
size_t fsmblks;
size_t uordblks;
size_t fordblks;
size_t keepcost;
};
extern struct mallinfo mallinfo(void);
# 34 "bionic/libc/include/string.h" 2 3 4
# 1 "bionic/libc/include/xlocale.h" 1 3 4
# 33 "bionic/libc/include/xlocale.h" 3 4
struct __locale_t;
typedef struct __locale_t* locale_t;
# 35 "bionic/libc/include/string.h" 2 3 4
extern void* memccpy(void* __restrict, const void* __restrict, int, size_t);
extern void* memchr(const void *, int, size_t) __attribute__((pure));
extern void* memrchr(const void *, int, size_t) __attribute__((pure));
extern int memcmp(const void *, const void *, size_t) __attribute__((pure));
extern void* memcpy(void* __restrict, const void* __restrict, size_t);
extern void* memmove(void *, const void *, size_t);
extern void* memset(void *, int, size_t);
extern void* memmem(const void *, size_t, const void *, size_t) __attribute__((pure));
extern char* strchr(const char *, int) __attribute__((pure));
extern char* __strchr_chk(const char *, int, size_t);
extern char* strrchr(const char *, int) __attribute__((pure));
extern char* __strrchr_chk(const char *, int, size_t);
extern size_t strlen(const char *) __attribute__((pure));
extern size_t __strlen_chk(const char *, size_t);
extern int strcmp(const char *, const char *) __attribute__((pure));
extern char* stpcpy(char* __restrict, const char* __restrict);
extern char* strcpy(char* __restrict, const char* __restrict);
extern char* strcat(char* __restrict, const char* __restrict);
extern int strcasecmp(const char *, const char *) __attribute__((pure));
extern int strncasecmp(const char *, const char *, size_t) __attribute__((pure));
extern char* strdup(const char *);
extern char* strstr(const char *, const char *) __attribute__((pure));
extern char* strcasestr(const char *haystack, const char *needle) __attribute__((pure));
extern char* strtok(char* __restrict, const char* __restrict);
extern char* strtok_r(char* __restrict, const char* __restrict, char** __restrict);
extern char* strerror(int);
extern int strerror_r(int errnum, char *buf, size_t n);
extern size_t strnlen(const char *, size_t) __attribute__((pure));
extern char* strncat(char* __restrict, const char* __restrict, size_t);
extern char* strndup(const char *, size_t);
extern int strncmp(const char *, const char *, size_t) __attribute__((pure));
extern char* stpncpy(char* __restrict, const char* __restrict, size_t);
extern char* strncpy(char* __restrict, const char* __restrict, size_t);
extern size_t strlcat(char* __restrict, const char* __restrict, size_t);
extern size_t strlcpy(char* __restrict, const char* __restrict, size_t);
extern size_t strcspn(const char *, const char *) __attribute__((pure));
extern char* strpbrk(const char *, const char *) __attribute__((pure));
extern char* strsep(char** __restrict, const char* __restrict);
extern size_t strspn(const char *, const char *);
extern char* strsignal(int sig);
extern int strcoll(const char *, const char *) __attribute__((pure));
extern size_t strxfrm(char* __restrict, const char* __restrict, size_t);
extern int strcoll_l(const char *, const char *, locale_t) __attribute__((pure));
extern size_t strxfrm_l(char* __restrict, const char* __restrict, size_t, locale_t);
extern char* __stpncpy_chk2(char* __restrict, const char* __restrict, size_t, size_t, size_t);
extern char* __strncpy_chk2(char* __restrict, const char* __restrict, size_t, size_t, size_t);
extern size_t __strlcpy_real(char* __restrict, const char* __restrict, size_t) __asm__("strlcpy");
extern size_t __strlcpy_chk(char *, const char *, size_t, size_t);
extern size_t __strlcat_real(char* __restrict, const char* __restrict, size_t) __asm__("strlcat");
extern size_t __strlcat_chk(char* __restrict, const char* __restrict, size_t, size_t);
extern __inline__ __attribute__((__always_inline__)) __attribute__((gnu_inline)) __attribute__((__artificial__))
void* memcpy(void* __restrict dest, const void* __restrict src, size_t copy_amount) {
return __builtin___memcpy_chk(dest, src, copy_amount, __builtin_object_size((dest), 0));
}
extern __inline__ __attribute__((__always_inline__)) __attribute__((gnu_inline)) __attribute__((__artificial__))
void* memmove(void *dest, const void *src, size_t len) {
return __builtin___memmove_chk(dest, src, len, __builtin_object_size((dest), 0));
}
extern __inline__ __attribute__((__always_inline__)) __attribute__((gnu_inline)) __attribute__((__artificial__))
char* stpcpy(char* __restrict dest, const char* __restrict src) {
return __builtin___stpcpy_chk(dest, src, __builtin_object_size((dest), 1));
}
extern __inline__ __attribute__((__always_inline__)) __attribute__((gnu_inline)) __attribute__((__artificial__))
char* strcpy(char* __restrict dest, const char* __restrict src) {
return __builtin___strcpy_chk(dest, src, __builtin_object_size((dest), 1));
}
extern __inline__ __attribute__((__always_inline__)) __attribute__((gnu_inline)) __attribute__((__artificial__))
char* stpncpy(char* __restrict dest, const char* __restrict src, size_t n) {
size_t bos_dest = __builtin_object_size((dest), 1);
size_t bos_src = __builtin_object_size((src), 1);
if (bos_src == ((size_t) -1)) {
return __builtin___stpncpy_chk(dest, src, n, bos_dest);
}
if (__builtin_constant_p(n) && (n <= bos_src)) {
return __builtin___stpncpy_chk(dest, src, n, bos_dest);
}
size_t slen = __builtin_strlen(src);
if (__builtin_constant_p(slen)) {
return __builtin___stpncpy_chk(dest, src, n, bos_dest);
}
return __stpncpy_chk2(dest, src, n, bos_dest, bos_src);
}
extern __inline__ __attribute__((__always_inline__)) __attribute__((gnu_inline)) __attribute__((__artificial__))
char* strncpy(char* __restrict dest, const char* __restrict src, size_t n) {
size_t bos_dest = __builtin_object_size((dest), 1);
size_t bos_src = __builtin_object_size((src), 1);
if (bos_src == ((size_t) -1)) {
return __builtin___strncpy_chk(dest, src, n, bos_dest);
}
if (__builtin_constant_p(n) && (n <= bos_src)) {
return __builtin___strncpy_chk(dest, src, n, bos_dest);
}
size_t slen = __builtin_strlen(src);
if (__builtin_constant_p(slen)) {
return __builtin___strncpy_chk(dest, src, n, bos_dest);
}
return __strncpy_chk2(dest, src, n, bos_dest, bos_src);
}
extern __inline__ __attribute__((__always_inline__)) __attribute__((gnu_inline)) __attribute__((__artificial__))
char* strcat(char* __restrict dest, const char* __restrict src) {
return __builtin___strcat_chk(dest, src, __builtin_object_size((dest), 1));
}
extern __inline__ __attribute__((__always_inline__)) __attribute__((gnu_inline)) __attribute__((__artificial__))
char *strncat(char* __restrict dest, const char* __restrict src, size_t n) {
return __builtin___strncat_chk(dest, src, n, __builtin_object_size((dest), 1));
}
extern __inline__ __attribute__((__always_inline__)) __attribute__((gnu_inline)) __attribute__((__artificial__))
void* memset(void *s, int c, size_t n) {
return __builtin___memset_chk(s, c, n, __builtin_object_size((s), 0));
}
extern __inline__ __attribute__((__always_inline__)) __attribute__((gnu_inline)) __attribute__((__artificial__))
size_t strlcpy(char* __restrict dest, const char* __restrict src, size_t size) {
size_t bos = __builtin_object_size((dest), 1);
if (bos == ((size_t) -1)) {
return __strlcpy_real(dest, src, size);
}
if (__builtin_constant_p(size) && (size <= bos)) {
return __strlcpy_real(dest, src, size);
}
return __strlcpy_chk(dest, src, size, bos);
}
extern __inline__ __attribute__((__always_inline__)) __attribute__((gnu_inline)) __attribute__((__artificial__))
size_t strlcat(char* __restrict dest, const char* __restrict src, size_t size) {
size_t bos = __builtin_object_size((dest), 1);
if (bos == ((size_t) -1)) {
return __strlcat_real(dest, src, size);
}
if (__builtin_constant_p(size) && (size <= bos)) {
return __strlcat_real(dest, src, size);
}
return __strlcat_chk(dest, src, size, bos);
}
extern __inline__ __attribute__((__always_inline__)) __attribute__((gnu_inline)) __attribute__((__artificial__))
size_t strlen(const char *s) {
size_t bos = __builtin_object_size((s), 1);
if (bos == ((size_t) -1)) {
return __builtin_strlen(s);
}
size_t slen = __builtin_strlen(s);
if (__builtin_constant_p(slen)) {
return slen;
}
return __strlen_chk(s, bos);
}
extern __inline__ __attribute__((__always_inline__)) __attribute__((gnu_inline)) __attribute__((__artificial__))
char* strchr(const char *s, int c) {
size_t bos = __builtin_object_size((s), 1);
if (bos == ((size_t) -1)) {
return __builtin_strchr(s, c);
}
size_t slen = __builtin_strlen(s);
if (__builtin_constant_p(slen) && (slen < bos)) {
return __builtin_strchr(s, c);
}
return __strchr_chk(s, c, bos);
}
extern __inline__ __attribute__((__always_inline__)) __attribute__((gnu_inline)) __attribute__((__artificial__))
char* strrchr(const char *s, int c) {
size_t bos = __builtin_object_size((s), 1);
if (bos == ((size_t) -1)) {
return __builtin_strrchr(s, c);
}
size_t slen = __builtin_strlen(s);
if (__builtin_constant_p(slen) && (slen < bos)) {
return __builtin_strrchr(s, c);
}
return __strrchr_chk(s, c, bos);
}
# 35 "bionic/libc/include/stdlib.h" 2 3 4
# 1 "bionic/libc/include/alloca.h" 1 3 4
# 36 "bionic/libc/include/stdlib.h" 2 3 4
# 1 "bionic/libc/include/strings.h" 1 3 4
# 42 "bionic/libc/include/strings.h" 3 4
# 1 "bionic/libc/include/sys/types.h" 1 3 4
# 31 "bionic/libc/include/sys/types.h" 3 4
# 1 "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8.x-sabermod/include/stddef.h" 1 3 4
# 32 "bionic/libc/include/sys/types.h" 2 3 4
# 1 "bionic/libc/kernel/uapi/linux/types.h" 1 3 4
# 21 "bionic/libc/kernel/uapi/linux/types.h" 3 4
# 1 "bionic/libc/kernel/uapi/asm-arm/asm/types.h" 1 3 4
# 19 "bionic/libc/kernel/uapi/asm-arm/asm/types.h" 3 4
# 1 "bionic/libc/kernel/uapi/asm-generic/types.h" 1 3 4
# 21 "bionic/libc/kernel/uapi/asm-generic/types.h" 3 4
# 1 "bionic/libc/kernel/uapi/asm-generic/int-ll64.h" 1 3 4
# 21 "bionic/libc/kernel/uapi/asm-generic/int-ll64.h" 3 4
# 1 "bionic/libc/kernel/uapi/asm-arm/asm/bitsperlong.h" 1 3 4
# 19 "bionic/libc/kernel/uapi/asm-arm/asm/bitsperlong.h" 3 4
# 1 "bionic/libc/kernel/uapi/asm-generic/bitsperlong.h" 1 3 4
# 19 "bionic/libc/kernel/uapi/asm-arm/asm/bitsperlong.h" 2 3 4
# 22 "bionic/libc/kernel/uapi/asm-generic/int-ll64.h" 2 3 4
typedef __signed__ char __s8;
typedef unsigned char __u8;
typedef __signed__ short __s16;
typedef unsigned short __u16;
typedef __signed__ int __s32;
typedef unsigned int __u32;
__extension__ typedef __signed__ long long __s64;
__extension__ typedef unsigned long long __u64;
# 22 "bionic/libc/kernel/uapi/asm-generic/types.h" 2 3 4
# 19 "bionic/libc/kernel/uapi/asm-arm/asm/types.h" 2 3 4
# 22 "bionic/libc/kernel/uapi/linux/types.h" 2 3 4
# 1 "bionic/libc/kernel/uapi/linux/posix_types.h" 1 3 4
# 21 "bionic/libc/kernel/uapi/linux/posix_types.h" 3 4
# 1 "bionic/libc/kernel/uapi/linux/stddef.h" 1 3 4
# 19 "bionic/libc/kernel/uapi/linux/stddef.h" 3 4
# 1 "bionic/libc/kernel/uapi/linux/compiler.h" 1 3 4
# 19 "bionic/libc/kernel/uapi/linux/stddef.h" 2 3 4
# 22 "bionic/libc/kernel/uapi/linux/posix_types.h" 2 3 4
typedef struct {
unsigned long fds_bits[1024 / (8 * sizeof(long))];
} __kernel_fd_set;
typedef void (*__kernel_sighandler_t)(int);
typedef int __kernel_key_t;
typedef int __kernel_mqd_t;
# 1 "bionic/libc/kernel/uapi/asm-arm/asm/posix_types.h" 1 3 4
# 21 "bionic/libc/kernel/uapi/asm-arm/asm/posix_types.h" 3 4
typedef unsigned short __kernel_mode_t;
typedef unsigned short __kernel_ipc_pid_t;
typedef unsigned short __kernel_uid_t;
typedef unsigned short __kernel_gid_t;
typedef unsigned short __kernel_old_dev_t;
# 1 "bionic/libc/kernel/uapi/asm-generic/posix_types.h" 1 3 4
# 21 "bionic/libc/kernel/uapi/asm-generic/posix_types.h" 3 4
# 1 "bionic/libc/kernel/uapi/asm-arm/asm/bitsperlong.h" 1 3 4
# 22 "bionic/libc/kernel/uapi/asm-generic/posix_types.h" 2 3 4
typedef long __kernel_long_t;
typedef unsigned long __kernel_ulong_t;
typedef __kernel_ulong_t __kernel_ino_t;
typedef int __kernel_pid_t;
# 49 "bionic/libc/kernel/uapi/asm-generic/posix_types.h" 3 4
typedef __kernel_long_t __kernel_suseconds_t;
typedef int __kernel_daddr_t;
typedef unsigned int __kernel_uid32_t;
typedef unsigned int __kernel_gid32_t;
typedef __kernel_uid_t __kernel_old_uid_t;
typedef __kernel_gid_t __kernel_old_gid_t;
# 71 "bionic/libc/kernel/uapi/asm-generic/posix_types.h" 3 4
typedef unsigned int __kernel_size_t;
typedef int __kernel_ssize_t;
typedef int __kernel_ptrdiff_t;
# 84 "bionic/libc/kernel/uapi/asm-generic/posix_types.h" 3 4
typedef struct {
int val[2];
} __kernel_fsid_t;
typedef __kernel_long_t __kernel_off_t;
typedef long long __kernel_loff_t;
typedef __kernel_long_t __kernel_time_t;
typedef __kernel_long_t __kernel_clock_t;
typedef int __kernel_timer_t;
typedef int __kernel_clockid_t;
typedef char * __kernel_caddr_t;
typedef unsigned short __kernel_uid16_t;
typedef unsigned short __kernel_gid16_t;
# 33 "bionic/libc/kernel/uapi/asm-arm/asm/posix_types.h" 2 3 4
# 33 "bionic/libc/kernel/uapi/linux/posix_types.h" 2 3 4
# 25 "bionic/libc/kernel/uapi/linux/types.h" 2 3 4
typedef __u16 __le16;
typedef __u16 __be16;
typedef __u32 __le32;
typedef __u32 __be32;
typedef __u64 __le64;
typedef __u64 __be64;
typedef __u16 __sum16;
typedef __u32 __wsum;
# 36 "bionic/libc/include/sys/types.h" 2 3 4
typedef __kernel_gid32_t __gid_t;
typedef __gid_t gid_t;
typedef __kernel_uid32_t __uid_t;
typedef __uid_t uid_t;
typedef __kernel_pid_t __pid_t;
typedef __pid_t pid_t;
typedef uint32_t __id_t;
typedef __id_t id_t;
typedef unsigned long blkcnt_t;
typedef unsigned long blksize_t;
typedef __kernel_caddr_t caddr_t;
typedef __kernel_clock_t clock_t;
typedef __kernel_clockid_t __clockid_t;
typedef __clockid_t clockid_t;
typedef __kernel_daddr_t daddr_t;
typedef unsigned long fsblkcnt_t;
typedef unsigned long fsfilcnt_t;
typedef __kernel_mode_t __mode_t;
typedef __mode_t mode_t;
typedef __kernel_key_t __key_t;
typedef __key_t key_t;
typedef __kernel_ino_t __ino_t;
typedef __ino_t ino_t;
typedef uint32_t __nlink_t;
typedef __nlink_t nlink_t;
typedef void* __timer_t;
typedef __timer_t timer_t;
typedef __kernel_suseconds_t __suseconds_t;
typedef __suseconds_t suseconds_t;
typedef uint32_t __useconds_t;
typedef __useconds_t useconds_t;
typedef uint32_t dev_t;
typedef __kernel_time_t __time_t;
typedef __time_t time_t;
typedef __kernel_off_t off_t;
typedef __kernel_loff_t loff_t;
typedef loff_t off64_t;
# 122 "bionic/libc/include/sys/types.h" 3 4
typedef int32_t __socklen_t;
typedef __socklen_t socklen_t;
typedef __builtin_va_list __va_list;
# 138 "bionic/libc/include/sys/types.h" 3 4
typedef __kernel_ssize_t ssize_t;
typedef unsigned int uint_t;
typedef unsigned int uint;
# 1 "bionic/libc/include/sys/sysmacros.h" 1 3 4
# 36 "bionic/libc/include/sys/sysmacros.h" 3 4
static __inline__ int major(dev_t _dev)
{
return (_dev >> 8) & 0xfff;
}
static __inline__ int minor(dev_t _dev)
{
return (_dev & 0xff) | ((_dev >> 12) & 0xfff00);
}
static __inline__ dev_t makedev(int __ma, int __mi)
{
return ((__ma & 0xfff) << 8) | (__mi & 0xff) | ((__mi & 0xfff00) << 12);
}
# 146 "bionic/libc/include/sys/types.h" 2 3 4
typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;
typedef uint32_t u_int32_t;
typedef uint16_t u_int16_t;
typedef uint8_t u_int8_t;
typedef uint64_t u_int64_t;
# 43 "bionic/libc/include/strings.h" 2 3 4
# 57 "bionic/libc/include/strings.h" 3 4
int ffs(int);
int strcasecmp(const char *, const char *);
int strncasecmp(const char *, const char *, size_t);
# 37 "bionic/libc/include/stdlib.h" 2 3 4
# 1 "bionic/libc/include/memory.h" 1 3 4
# 38 "bionic/libc/include/stdlib.h" 2 3 4
extern __attribute__((__noreturn__)) void abort(void);
extern __attribute__((__noreturn__)) void exit(int);
extern __attribute__((__noreturn__)) void _Exit(int);
extern int atexit(void (*)(void));
extern char* getenv(const char*);
extern int putenv(char*);
extern int setenv(const char*, const char*, int);
extern int unsetenv(const char*);
extern int clearenv(void);
extern char* mkdtemp(char*);
extern char* mktemp(char*) __attribute__((__warning__("mktemp possibly used unsafely; consider using mkstemp")));
extern int mkstemp(char*);
extern int mkstemp64(char*);
extern long strtol(const char *, char **, int);
extern long long strtoll(const char *, char **, int);
extern unsigned long strtoul(const char *, char **, int);
extern unsigned long long strtoull(const char *, char **, int);
extern int posix_memalign(void **memptr, size_t alignment, size_t size);
extern double atof(const char*);
extern double strtod(const char*, char**) __attribute__((visibility ("default")));
extern float strtof(const char*, char**) __attribute__((visibility ("default")));
extern long double strtold(const char*, char**) __attribute__((visibility ("default")));
extern long double strtold_l(const char *, char **, locale_t) __attribute__((visibility ("default")));
extern long long strtoll_l(const char *, char **, int, locale_t) __attribute__((visibility ("default")));
extern unsigned long long strtoull_l(const char *, char **, int, locale_t) __attribute__((visibility ("default")));
extern int atoi(const char*) __attribute__((pure));
extern long atol(const char*) __attribute__((pure));
extern long long atoll(const char*) __attribute__((pure));
extern int abs(int) __attribute__((__const__));
extern long labs(long) __attribute__((__const__));
extern long long llabs(long long) __attribute__((__const__));
extern char * realpath(const char *path, char *resolved);
extern int system(const char * string);
extern void * bsearch(const void *key, const void *base0,
size_t nmemb, size_t size,
int (*compar)(const void *, const void *));
extern void qsort(void *, size_t, size_t, int (*)(const void *, const void *));
extern long jrand48(unsigned short *);
extern long mrand48(void);
extern long nrand48(unsigned short *);
extern long lrand48(void);
extern unsigned short *seed48(unsigned short*);
extern double erand48(unsigned short xsubi[3]);
extern double drand48(void);
extern void srand48(long);
unsigned int arc4random(void);
unsigned int arc4random_uniform(unsigned int);
void arc4random_buf(void*, size_t);
int rand(void);
int rand_r(unsigned int*);
void srand(unsigned int);
char* initstate(unsigned int, char*, size_t);
long random(void);
char* setstate(char*);
void srandom(unsigned int);
int getpt(void);
int grantpt(int);
int posix_openpt(int);
char* ptsname(int) __attribute__((__warning__("ptsname is not thread-safe; use ptsname_r instead")));
int ptsname_r(int, char*, size_t);
int unlockpt(int);
typedef struct {
int quot;
int rem;
} div_t;
extern div_t div(int, int) __attribute__((__const__));
typedef struct {
long int quot;
long int rem;
} ldiv_t;
extern ldiv_t ldiv(long, long) __attribute__((__const__));
typedef struct {
long long int quot;
long long int rem;
} lldiv_t;
extern lldiv_t lldiv(long long, long long) __attribute__((__const__));
extern const char* getprogname(void);
extern void setprogname(const char*);
extern int mblen(const char *, size_t);
extern size_t mbstowcs(wchar_t *, const char *, size_t);
extern int mbtowc(wchar_t *, const char *, size_t);
extern int wctomb(char *, wchar_t);
extern size_t wcstombs(char *, const wchar_t *, size_t);
extern size_t __ctype_get_mb_cur_max(void);
# 42 "external/libvpx/libvpx/vpx_mem/vpx_mem.h" 2
# 1 "prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.8/bin/../lib/gcc/arm-linux-androideabi/4.8.x-sabermod/include/stddef.h" 1 3 4
# 43 "external/libvpx/libvpx/vpx_mem/vpx_mem.h" 2
# 54 "external/libvpx/libvpx/vpx_mem/vpx_mem.h"
unsigned int vpx_mem_get_version(void);
# 66 "external/libvpx/libvpx/vpx_mem/vpx_mem.h"
int vpx_mem_set_heap_size(size_t size);
void *vpx_memalign(size_t align, size_t size);
void *vpx_malloc(size_t size);
void *vpx_calloc(size_t num, size_t size);
void *vpx_realloc(void *memblk, size_t size);
void vpx_free(void *memblk);
void *vpx_memcpy(void *dest, const void *src, size_t length);
void *vpx_memset(void *dest, int val, size_t length);
void *vpx_memmove(void *dest, const void *src, size_t count);
void *vpx_mem_alloc(int id, size_t size, size_t align);
void vpx_mem_free(int id, void *mem, size_t size);
typedef void *(* g_malloc_func)(size_t);
typedef void *(* g_calloc_func)(size_t, size_t);
typedef void *(* g_realloc_func)(void *, size_t);
typedef void (* g_free_func)(void *);
typedef void *(* g_memcpy_func)(void *, const void *, size_t);
typedef void *(* g_memset_func)(void *, int, size_t);
typedef void *(* g_memmove_func)(void *, const void *, size_t);
int vpx_mem_set_functions(g_malloc_func g_malloc_l
, g_calloc_func g_calloc_l
, g_realloc_func g_realloc_l
, g_free_func g_free_l
, g_memcpy_func g_memcpy_l
, g_memset_func g_memset_l
, g_memmove_func g_memmove_l);
int vpx_mem_unset_functions(void);
# 20 "external/libvpx/libvpx/vp9/common/vp9_common.h" 2
# 1 "external/libvpx/libvpx/vp9/common/vp9_systemdependent.h" 1
# 48 "external/libvpx/libvpx/vp9/common/vp9_systemdependent.h"
static __inline__ __attribute__((always_inline)) int get_msb(unsigned int n) {
return 31 ^ __builtin_clz(n);
}
# 22 "external/libvpx/libvpx/vp9/common/vp9_common.h" 2
# 51 "external/libvpx/libvpx/vp9/common/vp9_common.h"
static __inline__ __attribute__((always_inline)) uint8_t clip_pixel(int val) {
return (val > 255) ? 255u : (val < 0) ? 0u : val;
}
static __inline__ __attribute__((always_inline)) int clamp(int value, int low, int high) {
return value < low ? low : (value > high ? high : value);
}
static __inline__ __attribute__((always_inline)) double fclamp(double value, double low, double high) {
return value < low ? low : (value > high ? high : value);
}
static __inline__ __attribute__((always_inline)) int get_unsigned_bits(unsigned int num_values) {
return num_values > 0 ? get_msb(num_values) + 1 : 0;
}
# 21 "external/libvpx/libvpx/vp9/common/vp9_blockd.h" 2
# 1 "external/libvpx/libvpx/vp9/common/vp9_common_data.h" 1
# 20 "external/libvpx/libvpx/vp9/common/vp9_common_data.h"
extern const int b_width_log2_lookup[BLOCK_SIZES];
extern const int b_height_log2_lookup[BLOCK_SIZES];
extern const int mi_width_log2_lookup[BLOCK_SIZES];
extern const int num_8x8_blocks_wide_lookup[BLOCK_SIZES];
extern const int num_8x8_blocks_high_lookup[BLOCK_SIZES];
extern const int num_4x4_blocks_high_lookup[BLOCK_SIZES];
extern const int num_4x4_blocks_wide_lookup[BLOCK_SIZES];
extern const int size_group_lookup[BLOCK_SIZES];
extern const int num_pels_log2_lookup[BLOCK_SIZES];
extern const PARTITION_TYPE partition_lookup[][BLOCK_SIZES];
extern const BLOCK_SIZE subsize_lookup[PARTITION_TYPES][BLOCK_SIZES];
extern const TX_SIZE max_txsize_lookup[BLOCK_SIZES];
extern const TX_SIZE tx_mode_to_biggest_tx_size[TX_MODES];
extern const BLOCK_SIZE ss_size_lookup[BLOCK_SIZES][2][2];
# 22 "external/libvpx/libvpx/vp9/common/vp9_blockd.h" 2
# 1 "external/libvpx/libvpx/vp9/common/vp9_filter.h" 1
# 16 "external/libvpx/libvpx/vp9/common/vp9_filter.h"
# 1 "external/libvpx/libvpx/vpx_ports/mem.h" 1
# 17 "external/libvpx/libvpx/vp9/common/vp9_filter.h" 2
# 30 "external/libvpx/libvpx/vp9/common/vp9_filter.h"
typedef enum {
EIGHTTAP = 0,
EIGHTTAP_SMOOTH = 1,
EIGHTTAP_SHARP = 2,
BILINEAR = 3,
SWITCHABLE = 4
} INTERP_FILTER;
typedef int16_t InterpKernel[8];
const InterpKernel *vp9_get_interp_kernel(INTERP_FILTER filter);
extern const InterpKernel vp9_bilinear_filters[(1 << 4)] __attribute__ ((aligned (256)))
;
extern const InterpKernel vp9_sub_pel_filters_8[(1 << 4)] __attribute__ ((aligned (256)))
;
extern const InterpKernel vp9_sub_pel_filters_8s[(1 << 4)] __attribute__ ((aligned (256)))
;
extern const InterpKernel vp9_sub_pel_filters_8lp[(1 << 4)] __attribute__ ((aligned (256)))
;
# 24 "external/libvpx/libvpx/vp9/common/vp9_blockd.h" 2
# 1 "external/libvpx/libvpx/vp9/common/vp9_mv.h" 1
# 22 "external/libvpx/libvpx/vp9/common/vp9_mv.h"
typedef struct mv {
int16_t row;
int16_t col;
} MV;
typedef union int_mv {
uint32_t as_int;
MV as_mv;
} int_mv;
typedef struct mv32 {
int32_t row;
int32_t col;
} MV32;
static __inline__ __attribute__((always_inline)) void clamp_mv(MV *mv, int min_col, int max_col,
int min_row, int max_row) {
mv->col = clamp(mv->col, min_col, max_col);
mv->row = clamp(mv->row, min_row, max_row);
}
# 25 "external/libvpx/libvpx/vp9/common/vp9_blockd.h" 2
# 1 "external/libvpx/libvpx/vp9/common/vp9_scale.h" 1
# 15 "external/libvpx/libvpx/vp9/common/vp9_scale.h"
# 1 "external/libvpx/libvpx/vp9/common/vp9_convolve.h" 1
# 20 "external/libvpx/libvpx/vp9/common/vp9_convolve.h"
typedef void (*convolve_fn_t)(const uint8_t *src, ptrdiff_t src_stride,
uint8_t *dst, ptrdiff_t dst_stride,
const int16_t *filter_x, int x_step_q4,
const int16_t *filter_y, int y_step_q4,
int w, int h);
# 16 "external/libvpx/libvpx/vp9/common/vp9_scale.h" 2
# 25 "external/libvpx/libvpx/vp9/common/vp9_scale.h"
struct scale_factors {
int x_scale_fp;
int y_scale_fp;
int x_step_q4;
int y_step_q4;
int (*scale_value_x)(int val, const struct scale_factors *sf);
int (*scale_value_y)(int val, const struct scale_factors *sf);
convolve_fn_t predict[2][2][2];
};
MV32 vp9_scale_mv(const MV *mv, int x, int y, const struct scale_factors *sf);
void vp9_setup_scale_factors_for_frame(struct scale_factors *sf,
int other_w, int other_h,
int this_w, int this_h);
static __inline__ __attribute__((always_inline)) int vp9_is_valid_scale(const struct scale_factors *sf) {
return sf->x_scale_fp != -1 &&
sf->y_scale_fp != -1;
}
static __inline__ __attribute__((always_inline)) int vp9_is_scaled(const struct scale_factors *sf) {
return sf->x_scale_fp != (1 << 14) ||
sf->y_scale_fp != (1 << 14);
}
# 26 "external/libvpx/libvpx/vp9/common/vp9_blockd.h" 2
# 1 "external/libvpx/libvpx/vp9/common/vp9_seg_common.h" 1
# 14 "external/libvpx/libvpx/vp9/common/vp9_seg_common.h"
# 1 "external/libvpx/libvpx/vp9/common/vp9_prob.h" 1
# 16 "external/libvpx/libvpx/vp9/common/vp9_prob.h"
# 1 "external/libvpx/libvpx/vpx_ports/mem.h" 1
# 17 "external/libvpx/libvpx/vp9/common/vp9_prob.h" 2
# 25 "external/libvpx/libvpx/vp9/common/vp9_prob.h"
typedef uint8_t vp9_prob;
typedef int8_t vp9_tree_index;
# 44 "external/libvpx/libvpx/vp9/common/vp9_prob.h"
typedef const vp9_tree_index vp9_tree[];
static __inline__ __attribute__((always_inline)) vp9_prob clip_prob(int p) {
return (p > 255) ? 255u : (p < 1) ? 1u : p;
}
# 58 "external/libvpx/libvpx/vp9/common/vp9_prob.h"
static __inline__ __attribute__((always_inline)) vp9_prob get_prob(int num, int den) {
return (den == 0) ? 128u : clip_prob((num * 256 + (den >> 1)) / den);
}
static __inline__ __attribute__((always_inline)) vp9_prob get_binary_prob(int n0, int n1) {
return get_prob(n0, n0 + n1);
}
static __inline__ __attribute__((always_inline)) vp9_prob weighted_prob(int prob1, int prob2, int factor) {
return (((prob1 * (256 - factor) + prob2 * factor) + (1 << ((8) - 1))) >> (8));
}
static __inline__ __attribute__((always_inline)) vp9_prob merge_probs(vp9_prob pre_prob,
const unsigned int ct[2],
unsigned int count_sat,
unsigned int max_update_factor) {
const vp9_prob prob = get_binary_prob(ct[0], ct[1]);
const unsigned int count = (((ct[0] + ct[1]) < (count_sat)) ? (ct[0] + ct[1]) : (count_sat));
const unsigned int factor = max_update_factor * count / count_sat;
return weighted_prob(pre_prob, prob, factor);
}
void vp9_tree_merge_probs(const vp9_tree_index *tree, const vp9_prob *pre_probs,
const unsigned int *counts, unsigned int count_sat,
unsigned int max_update_factor, vp9_prob *probs);
extern const uint8_t vp9_norm[256] __attribute__ ((aligned (16)));
# 15 "external/libvpx/libvpx/vp9/common/vp9_seg_common.h" 2
# 29 "external/libvpx/libvpx/vp9/common/vp9_seg_common.h"
typedef enum {
SEG_LVL_ALT_Q = 0,
SEG_LVL_ALT_LF = 1,
SEG_LVL_REF_FRAME = 2,
SEG_LVL_SKIP = 3,
SEG_LVL_MAX = 4
} SEG_LVL_FEATURES;
struct segmentation {
uint8_t enabled;
uint8_t update_map;
uint8_t update_data;
uint8_t abs_delta;
uint8_t temporal_update;
vp9_prob tree_probs[(8 -1)];
vp9_prob pred_probs[3];
int16_t feature_data[8][SEG_LVL_MAX];
unsigned int feature_mask[8];
};
int vp9_segfeature_active(const struct segmentation *seg,
int segment_id,
SEG_LVL_FEATURES feature_id);
void vp9_clearall_segfeatures(struct segmentation *seg);
void vp9_enable_segfeature(struct segmentation *seg,
int segment_id,
SEG_LVL_FEATURES feature_id);
int vp9_seg_feature_data_max(SEG_LVL_FEATURES feature_id);
int vp9_is_segfeature_signed(SEG_LVL_FEATURES feature_id);
void vp9_set_segdata(struct segmentation *seg,
int segment_id,
SEG_LVL_FEATURES feature_id,
int seg_data);
int vp9_get_segdata(const struct segmentation *seg,
int segment_id,
SEG_LVL_FEATURES feature_id);
extern const vp9_tree_index vp9_segment_tree[(2 * (8) - 2)];
# 27 "external/libvpx/libvpx/vp9/common/vp9_blockd.h" 2
# 43 "external/libvpx/libvpx/vp9/common/vp9_blockd.h"
typedef enum {
PLANE_TYPE_Y = 0,
PLANE_TYPE_UV = 1,
PLANE_TYPES
} PLANE_TYPE;
typedef char ENTROPY_CONTEXT;
typedef char PARTITION_CONTEXT;
static __inline__ __attribute__((always_inline)) int combine_entropy_contexts(ENTROPY_CONTEXT a,
ENTROPY_CONTEXT b) {
return (a != 0) + (b != 0);
}
typedef enum {
KEY_FRAME = 0,
INTER_FRAME = 1,
FRAME_TYPES,
} FRAME_TYPE;
typedef enum {
DC_PRED,
V_PRED,
H_PRED,
D45_PRED,
D135_PRED,
D117_PRED,
D153_PRED,
D207_PRED,
D63_PRED,
TM_PRED,
NEARESTMV,
NEARMV,
ZEROMV,
NEWMV,
MB_MODE_COUNT
} MB_PREDICTION_MODE;
static __inline__ __attribute__((always_inline)) int is_inter_mode(MB_PREDICTION_MODE mode) {
return mode >= NEARESTMV && mode <= NEWMV;
}
# 96 "external/libvpx/libvpx/vp9/common/vp9_blockd.h"
typedef struct {
MB_PREDICTION_MODE as_mode;
int_mv as_mv[2];
} b_mode_info;
typedef enum {
NONE = -1,
INTRA_FRAME = 0,
LAST_FRAME = 1,
GOLDEN_FRAME = 2,
ALTREF_FRAME = 3,
MAX_REF_FRAMES = 4
} MV_REFERENCE_FRAME;
static __inline__ __attribute__((always_inline)) int b_width_log2(BLOCK_SIZE sb_type) {
return b_width_log2_lookup[sb_type];
}
static __inline__ __attribute__((always_inline)) int b_height_log2(BLOCK_SIZE sb_type) {
return b_height_log2_lookup[sb_type];
}
static __inline__ __attribute__((always_inline)) int mi_width_log2(BLOCK_SIZE sb_type) {
return mi_width_log2_lookup[sb_type];
}
typedef struct {
BLOCK_SIZE sb_type;
MB_PREDICTION_MODE mode;
TX_SIZE tx_size;
uint8_t skip;
uint8_t segment_id;
uint8_t seg_id_predicted;
MB_PREDICTION_MODE uv_mode;
MV_REFERENCE_FRAME ref_frame[2];
int_mv mv[2];
int_mv ref_mvs[MAX_REF_FRAMES][2];
uint8_t mode_context[MAX_REF_FRAMES];
INTERP_FILTER interp_filter;
} MB_MODE_INFO;
typedef struct {
MB_MODE_INFO mbmi;
b_mode_info bmi[4];
} MODE_INFO;
static __inline__ __attribute__((always_inline)) MB_PREDICTION_MODE get_y_mode(const MODE_INFO *mi, int block) {
return mi->mbmi.sb_type < BLOCK_8X8 ? mi->bmi[block].as_mode
: mi->mbmi.mode;
}
static __inline__ __attribute__((always_inline)) int is_inter_block(const MB_MODE_INFO *mbmi) {
return mbmi->ref_frame[0] > INTRA_FRAME;
}
static __inline__ __attribute__((always_inline)) int has_second_ref(const MB_MODE_INFO *mbmi) {
return mbmi->ref_frame[1] > INTRA_FRAME;
}
MB_PREDICTION_MODE vp9_left_block_mode(const MODE_INFO *cur_mi,
const MODE_INFO *left_mi, int b);
MB_PREDICTION_MODE vp9_above_block_mode(const MODE_INFO *cur_mi,
const MODE_INFO *above_mi, int b);
enum mv_precision {
MV_PRECISION_Q3,
MV_PRECISION_Q4
};
enum { MAX_MB_PLANE = 3 };
struct buf_2d {
uint8_t *buf;
int stride;
};
struct macroblockd_plane {
int16_t *dqcoeff;
PLANE_TYPE plane_type;
int subsampling_x;
int subsampling_y;
struct buf_2d dst;
struct buf_2d pre[2];
const int16_t *dequant;
ENTROPY_CONTEXT *above_context;
ENTROPY_CONTEXT *left_context;
};
typedef struct RefBuffer {
int idx;
YV12_BUFFER_CONFIG *buf;
struct scale_factors sf;
} RefBuffer;
typedef struct macroblockd {
struct macroblockd_plane plane[MAX_MB_PLANE];
int mi_stride;
MODE_INFO **mi;
int up_available;
int left_available;
int mb_to_left_edge;
int mb_to_right_edge;
int mb_to_top_edge;
int mb_to_bottom_edge;
RefBuffer *block_refs[2];
const YV12_BUFFER_CONFIG *cur_buf;
uint8_t mc_buf[80 * 2 * 80 * 2] __attribute__ ((aligned (16)));
int lossless;
void (*itxm_add)(const int16_t *input, uint8_t *dest, int stride, int eob);
int corrupted;
int16_t dqcoeff[MAX_MB_PLANE][64 * 64] __attribute__ ((aligned (16)));
ENTROPY_CONTEXT *above_context[MAX_MB_PLANE];
ENTROPY_CONTEXT left_context[MAX_MB_PLANE][16];
PARTITION_CONTEXT *above_seg_context;
PARTITION_CONTEXT left_seg_context[8];
} MACROBLOCKD;
static __inline__ __attribute__((always_inline)) BLOCK_SIZE get_subsize(BLOCK_SIZE bsize,
PARTITION_TYPE partition) {
const BLOCK_SIZE subsize = subsize_lookup[partition][bsize];
((void)0);
return subsize;
}
extern const TX_TYPE intra_mode_to_tx_type_lookup[(TM_PRED + 1)];
static __inline__ __attribute__((always_inline)) TX_TYPE get_tx_type(PLANE_TYPE plane_type,
const MACROBLOCKD *xd) {
const MB_MODE_INFO *const mbmi = &xd->mi[0]->mbmi;
if (plane_type != PLANE_TYPE_Y || is_inter_block(mbmi))
return DCT_DCT;
return intra_mode_to_tx_type_lookup[mbmi->mode];
}
static __inline__ __attribute__((always_inline)) TX_TYPE get_tx_type_4x4(PLANE_TYPE plane_type,
const MACROBLOCKD *xd, int ib) {
const MODE_INFO *const mi = xd->mi[0];
if (plane_type != PLANE_TYPE_Y || xd->lossless || is_inter_block(&mi->mbmi))
return DCT_DCT;
return intra_mode_to_tx_type_lookup[get_y_mode(mi, ib)];
}
void vp9_setup_block_planes(MACROBLOCKD *xd, int ss_x, int ss_y);
static __inline__ __attribute__((always_inline)) TX_SIZE get_uv_tx_size_impl(TX_SIZE y_tx_size, BLOCK_SIZE bsize) {
if (bsize < BLOCK_8X8) {
return TX_4X4;
} else {
const BLOCK_SIZE plane_bsize = ss_size_lookup[bsize][1][1];
return (((y_tx_size) < (max_txsize_lookup[plane_bsize])) ? (y_tx_size) : (max_txsize_lookup[plane_bsize]));
}
}
static __inline__ __attribute__((always_inline)) TX_SIZE get_uv_tx_size(const MB_MODE_INFO *mbmi) {
return get_uv_tx_size_impl(mbmi->tx_size, mbmi->sb_type);
}
static __inline__ __attribute__((always_inline)) BLOCK_SIZE get_plane_block_size(BLOCK_SIZE bsize,
const struct macroblockd_plane *pd) {
BLOCK_SIZE bs = ss_size_lookup[bsize][pd->subsampling_x][pd->subsampling_y];
((void)0);
return bs;
}
typedef void (*foreach_transformed_block_visitor)(int plane, int block,
BLOCK_SIZE plane_bsize,
TX_SIZE tx_size,
void *arg);
void vp9_foreach_transformed_block_in_plane(
const MACROBLOCKD *const xd, BLOCK_SIZE bsize, int plane,
foreach_transformed_block_visitor visit, void *arg);
void vp9_foreach_transformed_block(
const MACROBLOCKD* const xd, BLOCK_SIZE bsize,
foreach_transformed_block_visitor visit, void *arg);
static __inline__ __attribute__((always_inline)) void txfrm_block_to_raster_xy(BLOCK_SIZE plane_bsize,
TX_SIZE tx_size, int block,
int *x, int *y) {
const int bwl = b_width_log2(plane_bsize);
const int tx_cols_log2 = bwl - tx_size;
const int tx_cols = 1 << tx_cols_log2;
const int raster_mb = block >> (tx_size << 1);
*x = (raster_mb & (tx_cols - 1)) << tx_size;
*y = (raster_mb >> tx_cols_log2) << tx_size;
}
void vp9_set_contexts(const MACROBLOCKD *xd, struct macroblockd_plane *pd,
BLOCK_SIZE plane_bsize, TX_SIZE tx_size, int has_eob,
int aoff, int loff);
# 18 "external/libvpx/libvpx/vp9/encoder/vp9_dct.c" 2
# 1 "external/libvpx/libvpx/vp9/common/vp9_idct.h" 1
# 14 "external/libvpx/libvpx/vp9/common/vp9_idct.h"
# 1 "bionic/libc/include/assert.h" 1 3 4
# 62 "bionic/libc/include/assert.h" 3 4
void __assert(const char *, int, const char *) __attribute__((__noreturn__));
void __assert2(const char *, int, const char *, const char *) __attribute__((__noreturn__));
# 15 "external/libvpx/libvpx/vp9/common/vp9_idct.h" 2
# 44 "external/libvpx/libvpx/vp9/common/vp9_idct.h"
static const int cospi_1_64 = 16364;
static const int cospi_2_64 = 16305;
static const int cospi_3_64 = 16207;
static const int cospi_4_64 = 16069;
static const int cospi_5_64 = 15893;
static const int cospi_6_64 = 15679;
static const int cospi_7_64 = 15426;
static const int cospi_8_64 = 15137;
static const int cospi_9_64 = 14811;
static const int cospi_10_64 = 14449;
static const int cospi_11_64 = 14053;
static const int cospi_12_64 = 13623;
static const int cospi_13_64 = 13160;
static const int cospi_14_64 = 12665;
static const int cospi_15_64 = 12140;
static const int cospi_16_64 = 11585;
static const int cospi_17_64 = 11003;
static const int cospi_18_64 = 10394;
static const int cospi_19_64 = 9760;
static const int cospi_20_64 = 9102;
static const int cospi_21_64 = 8423;
static const int cospi_22_64 = 7723;
static const int cospi_23_64 = 7005;
static const int cospi_24_64 = 6270;
static const int cospi_25_64 = 5520;
static const int cospi_26_64 = 4756;
static const int cospi_27_64 = 3981;
static const int cospi_28_64 = 3196;
static const int cospi_29_64 = 2404;
static const int cospi_30_64 = 1606;
static const int cospi_31_64 = 804;
static const int sinpi_1_9 = 5283;
static const int sinpi_2_9 = 9929;
static const int sinpi_3_9 = 13377;
static const int sinpi_4_9 = 15212;
static __inline__ __attribute__((always_inline)) int dct_const_round_shift(int input) {
int rv = (((input) + (1 << ((14) - 1))) >> (14));
return (int16_t)rv;
}
typedef void (*transform_1d)(const int16_t*, int16_t*);
typedef struct {
transform_1d cols, rows;
} transform_2d;
void vp9_iwht4x4_add(const int16_t *input, uint8_t *dest, int stride, int eob);
void vp9_idct4x4_add(const int16_t *input, uint8_t *dest, int stride, int eob);
void vp9_idct8x8_add(const int16_t *input, uint8_t *dest, int stride, int eob);
void vp9_idct16x16_add(const int16_t *input, uint8_t *dest, int stride, int
eob);
void vp9_idct32x32_add(const int16_t *input, uint8_t *dest, int stride,
int eob);
void vp9_iht4x4_add(TX_TYPE tx_type, const int16_t *input, uint8_t *dest,
int stride, int eob);
void vp9_iht8x8_add(TX_TYPE tx_type, const int16_t *input, uint8_t *dest,
int stride, int eob);
void vp9_iht16x16_add(TX_TYPE tx_type, const int16_t *input, uint8_t *dest,
int stride, int eob);
# 19 "external/libvpx/libvpx/vp9/encoder/vp9_dct.c" 2
static __inline__ __attribute__((always_inline)) int fdct_round_shift(int input) {
int rv = (((input) + (1 << ((14) - 1))) >> (14));
((void)0);
return rv;
}
static void fdct4(const int16_t *input, int16_t *output) {
int16_t step[4];
int temp1, temp2;
step[0] = input[0] + input[3];
step[1] = input[1] + input[2];
step[2] = input[1] - input[2];
step[3] = input[0] - input[3];
temp1 = (step[0] + step[1]) * cospi_16_64;
temp2 = (step[0] - step[1]) * cospi_16_64;
output[0] = fdct_round_shift(temp1);
output[2] = fdct_round_shift(temp2);
temp1 = step[2] * cospi_24_64 + step[3] * cospi_8_64;
temp2 = -step[2] * cospi_8_64 + step[3] * cospi_24_64;
output[1] = fdct_round_shift(temp1);
output[3] = fdct_round_shift(temp2);
}
void vp9_fdct4x4_c(const int16_t *input, int16_t *output, int stride) {
int pass;
int16_t intermediate[4 * 4];
const int16_t *in = input;
int16_t *out = intermediate;
for (pass = 0; pass < 2; ++pass) {
int input[4];
int step[4];
int temp1, temp2;
int i;
for (i = 0; i < 4; ++i) {
if (0 == pass) {
input[0] = in[0 * stride] * 16;
input[1] = in[1 * stride] * 16;
input[2] = in[2 * stride] * 16;
input[3] = in[3 * stride] * 16;
if (i == 0 && input[0]) {
input[0] += 1;
}
} else {
input[0] = in[0 * 4];
input[1] = in[1 * 4];
input[2] = in[2 * 4];
input[3] = in[3 * 4];
}
step[0] = input[0] + input[3];
step[1] = input[1] + input[2];
step[2] = input[1] - input[2];
step[3] = input[0] - input[3];
temp1 = (step[0] + step[1]) * cospi_16_64;
temp2 = (step[0] - step[1]) * cospi_16_64;
out[0] = fdct_round_shift(temp1);
out[2] = fdct_round_shift(temp2);
temp1 = step[2] * cospi_24_64 + step[3] * cospi_8_64;
temp2 = -step[2] * cospi_8_64 + step[3] * cospi_24_64;
out[1] = fdct_round_shift(temp1);
out[3] = fdct_round_shift(temp2);
in++;
out += 4;
}
in = intermediate;
out = output;
}
{
int i, j;
for (i = 0; i < 4; ++i) {
for (j = 0; j < 4; ++j)
output[j + i * 4] = (output[j + i * 4] + 1) >> 2;
}
}
}
static void fadst4(const int16_t *input, int16_t *output) {
int x0, x1, x2, x3;
int s0, s1, s2, s3, s4, s5, s6, s7;
x0 = input[0];
x1 = input[1];
x2 = input[2];
x3 = input[3];
if (!(x0 | x1 | x2 | x3)) {
output[0] = output[1] = output[2] = output[3] = 0;
return;
}
s0 = sinpi_1_9 * x0;
s1 = sinpi_4_9 * x0;
s2 = sinpi_2_9 * x1;
s3 = sinpi_1_9 * x1;
s4 = sinpi_3_9 * x2;
s5 = sinpi_4_9 * x3;
s6 = sinpi_2_9 * x3;
s7 = x0 + x1 - x3;
x0 = s0 + s2 + s5;
x1 = sinpi_3_9 * s7;
x2 = s1 - s3 + s6;
x3 = s4;
s0 = x0 + x3;
s1 = x1;
s2 = x2 - x3;
s3 = x2 - x0 + x3;
output[0] = fdct_round_shift(s0);
output[1] = fdct_round_shift(s1);
output[2] = fdct_round_shift(s2);
output[3] = fdct_round_shift(s3);
}
static const transform_2d FHT_4[] = {
{ fdct4, fdct4 },
{ fadst4, fdct4 },
{ fdct4, fadst4 },
{ fadst4, fadst4 }
};
void vp9_fht4x4_c(const int16_t *input, int16_t *output,
int stride, int tx_type) {
if (tx_type == DCT_DCT) {
vp9_fdct4x4_c(input, output, stride);
} else {
int16_t out[4 * 4];
int16_t *outptr = &out[0];
int i, j;
int16_t temp_in[4], temp_out[4];
const transform_2d ht = FHT_4[tx_type];
for (i = 0; i < 4; ++i) {
for (j = 0; j < 4; ++j)
temp_in[j] = input[j * stride + i] * 16;
if (i == 0 && temp_in[0])
temp_in[0] += 1;
ht.cols(temp_in, temp_out);
for (j = 0; j < 4; ++j)
outptr[j * 4 + i] = temp_out[j];
}
for (i = 0; i < 4; ++i) {
for (j = 0; j < 4; ++j)
temp_in[j] = out[j + i * 4];
ht.rows(temp_in, temp_out);
for (j = 0; j < 4; ++j)
output[j + i * 4] = (temp_out[j] + 1) >> 2;
}
}
}
static void fdct8(const int16_t *input, int16_t *output) {
int s0, s1, s2, s3, s4, s5, s6, s7;
int t0, t1, t2, t3;
int x0, x1, x2, x3;
s0 = input[0] + input[7];
s1 = input[1] + input[6];
s2 = input[2] + input[5];
s3 = input[3] + input[4];
s4 = input[3] - input[4];
s5 = input[2] - input[5];
s6 = input[1] - input[6];
s7 = input[0] - input[7];
x0 = s0 + s3;
x1 = s1 + s2;
x2 = s1 - s2;
x3 = s0 - s3;
t0 = (x0 + x1) * cospi_16_64;
t1 = (x0 - x1) * cospi_16_64;
t2 = x2 * cospi_24_64 + x3 * cospi_8_64;
t3 = -x2 * cospi_8_64 + x3 * cospi_24_64;
output[0] = fdct_round_shift(t0);
output[2] = fdct_round_shift(t2);
output[4] = fdct_round_shift(t1);
output[6] = fdct_round_shift(t3);
t0 = (s6 - s5) * cospi_16_64;
t1 = (s6 + s5) * cospi_16_64;
t2 = fdct_round_shift(t0);
t3 = fdct_round_shift(t1);
x0 = s4 + t2;
x1 = s4 - t2;
x2 = s7 - t3;
x3 = s7 + t3;
t0 = x0 * cospi_28_64 + x3 * cospi_4_64;
t1 = x1 * cospi_12_64 + x2 * cospi_20_64;
t2 = x2 * cospi_12_64 + x1 * -cospi_20_64;
t3 = x3 * cospi_28_64 + x0 * -cospi_4_64;
output[1] = fdct_round_shift(t0);
output[3] = fdct_round_shift(t2);
output[5] = fdct_round_shift(t1);
output[7] = fdct_round_shift(t3);
}
void vp9_fdct8x8_c(const int16_t *input, int16_t *final_output, int stride) {
int i, j;
int16_t intermediate[64];
{
int16_t *output = intermediate;
int s0, s1, s2, s3, s4, s5, s6, s7;
int t0, t1, t2, t3;
int x0, x1, x2, x3;
int i;
for (i = 0; i < 8; i++) {
s0 = (input[0 * stride] + input[7 * stride]) * 4;
s1 = (input[1 * stride] + input[6 * stride]) * 4;
s2 = (input[2 * stride] + input[5 * stride]) * 4;
s3 = (input[3 * stride] + input[4 * stride]) * 4;
s4 = (input[3 * stride] - input[4 * stride]) * 4;
s5 = (input[2 * stride] - input[5 * stride]) * 4;
s6 = (input[1 * stride] - input[6 * stride]) * 4;
s7 = (input[0 * stride] - input[7 * stride]) * 4;
x0 = s0 + s3;
x1 = s1 + s2;
x2 = s1 - s2;
x3 = s0 - s3;
t0 = (x0 + x1) * cospi_16_64;
t1 = (x0 - x1) * cospi_16_64;
t2 = x2 * cospi_24_64 + x3 * cospi_8_64;
t3 = -x2 * cospi_8_64 + x3 * cospi_24_64;
output[0 * 8] = fdct_round_shift(t0);
output[2 * 8] = fdct_round_shift(t2);
output[4 * 8] = fdct_round_shift(t1);
output[6 * 8] = fdct_round_shift(t3);
t0 = (s6 - s5) * cospi_16_64;
t1 = (s6 + s5) * cospi_16_64;
t2 = fdct_round_shift(t0);
t3 = fdct_round_shift(t1);
x0 = s4 + t2;
x1 = s4 - t2;
x2 = s7 - t3;
x3 = s7 + t3;
t0 = x0 * cospi_28_64 + x3 * cospi_4_64;
t1 = x1 * cospi_12_64 + x2 * cospi_20_64;
t2 = x2 * cospi_12_64 + x1 * -cospi_20_64;
t3 = x3 * cospi_28_64 + x0 * -cospi_4_64;
output[1 * 8] = fdct_round_shift(t0);
output[3 * 8] = fdct_round_shift(t2);
output[5 * 8] = fdct_round_shift(t1);
output[7 * 8] = fdct_round_shift(t3);
input++;
output++;
}
}
for (i = 0; i < 8; ++i) {
fdct8(&intermediate[i * 8], &final_output[i * 8]);
for (j = 0; j < 8; ++j)
final_output[j + i * 8] /= 2;
}
}
void vp9_fdct16x16_c(const int16_t *input, int16_t *output, int stride) {
int pass;
int16_t intermediate[256];
const int16_t *in = input;
int16_t *out = intermediate;
for (pass = 0; pass < 2; ++pass) {
int step1[8];
int step2[8];
int step3[8];
int input[8];
int temp1, temp2;
int i;
for (i = 0; i < 16; i++) {
if (0 == pass) {
input[0] = (in[0 * stride] + in[15 * stride]) * 4;
input[1] = (in[1 * stride] + in[14 * stride]) * 4;
input[2] = (in[2 * stride] + in[13 * stride]) * 4;
input[3] = (in[3 * stride] + in[12 * stride]) * 4;
input[4] = (in[4 * stride] + in[11 * stride]) * 4;
input[5] = (in[5 * stride] + in[10 * stride]) * 4;
input[6] = (in[6 * stride] + in[ 9 * stride]) * 4;
input[7] = (in[7 * stride] + in[ 8 * stride]) * 4;
step1[0] = (in[7 * stride] - in[ 8 * stride]) * 4;
step1[1] = (in[6 * stride] - in[ 9 * stride]) * 4;
step1[2] = (in[5 * stride] - in[10 * stride]) * 4;
step1[3] = (in[4 * stride] - in[11 * stride]) * 4;
step1[4] = (in[3 * stride] - in[12 * stride]) * 4;
step1[5] = (in[2 * stride] - in[13 * stride]) * 4;
step1[6] = (in[1 * stride] - in[14 * stride]) * 4;
step1[7] = (in[0 * stride] - in[15 * stride]) * 4;
} else {
input[0] = ((in[0 * 16] + 1) >> 2) + ((in[15 * 16] + 1) >> 2);
input[1] = ((in[1 * 16] + 1) >> 2) + ((in[14 * 16] + 1) >> 2);
input[2] = ((in[2 * 16] + 1) >> 2) + ((in[13 * 16] + 1) >> 2);
input[3] = ((in[3 * 16] + 1) >> 2) + ((in[12 * 16] + 1) >> 2);
input[4] = ((in[4 * 16] + 1) >> 2) + ((in[11 * 16] + 1) >> 2);
input[5] = ((in[5 * 16] + 1) >> 2) + ((in[10 * 16] + 1) >> 2);
input[6] = ((in[6 * 16] + 1) >> 2) + ((in[ 9 * 16] + 1) >> 2);
input[7] = ((in[7 * 16] + 1) >> 2) + ((in[ 8 * 16] + 1) >> 2);
step1[0] = ((in[7 * 16] + 1) >> 2) - ((in[ 8 * 16] + 1) >> 2);
step1[1] = ((in[6 * 16] + 1) >> 2) - ((in[ 9 * 16] + 1) >> 2);
step1[2] = ((in[5 * 16] + 1) >> 2) - ((in[10 * 16] + 1) >> 2);
step1[3] = ((in[4 * 16] + 1) >> 2) - ((in[11 * 16] + 1) >> 2);
step1[4] = ((in[3 * 16] + 1) >> 2) - ((in[12 * 16] + 1) >> 2);
step1[5] = ((in[2 * 16] + 1) >> 2) - ((in[13 * 16] + 1) >> 2);
step1[6] = ((in[1 * 16] + 1) >> 2) - ((in[14 * 16] + 1) >> 2);
step1[7] = ((in[0 * 16] + 1) >> 2) - ((in[15 * 16] + 1) >> 2);
}
{
int s0, s1, s2, s3, s4, s5, s6, s7;
int t0, t1, t2, t3;
int x0, x1, x2, x3;
s0 = input[0] + input[7];
s1 = input[1] + input[6];
s2 = input[2] + input[5];
s3 = input[3] + input[4];
s4 = input[3] - input[4];
s5 = input[2] - input[5];
s6 = input[1] - input[6];
s7 = input[0] - input[7];
x0 = s0 + s3;
x1 = s1 + s2;
x2 = s1 - s2;
x3 = s0 - s3;
t0 = (x0 + x1) * cospi_16_64;
t1 = (x0 - x1) * cospi_16_64;
t2 = x3 * cospi_8_64 + x2 * cospi_24_64;
t3 = x3 * cospi_24_64 - x2 * cospi_8_64;
out[0] = fdct_round_shift(t0);
out[4] = fdct_round_shift(t2);
out[8] = fdct_round_shift(t1);
out[12] = fdct_round_shift(t3);
t0 = (s6 - s5) * cospi_16_64;
t1 = (s6 + s5) * cospi_16_64;
t2 = fdct_round_shift(t0);
t3 = fdct_round_shift(t1);
x0 = s4 + t2;
x1 = s4 - t2;
x2 = s7 - t3;
x3 = s7 + t3;
t0 = x0 * cospi_28_64 + x3 * cospi_4_64;
t1 = x1 * cospi_12_64 + x2 * cospi_20_64;
t2 = x2 * cospi_12_64 + x1 * -cospi_20_64;
t3 = x3 * cospi_28_64 + x0 * -cospi_4_64;
out[2] = fdct_round_shift(t0);
out[6] = fdct_round_shift(t2);
out[10] = fdct_round_shift(t1);
out[14] = fdct_round_shift(t3);
}
{
temp1 = (step1[5] - step1[2]) * cospi_16_64;
temp2 = (step1[4] - step1[3]) * cospi_16_64;
step2[2] = fdct_round_shift(temp1);
step2[3] = fdct_round_shift(temp2);
temp1 = (step1[4] + step1[3]) * cospi_16_64;
temp2 = (step1[5] + step1[2]) * cospi_16_64;
step2[4] = fdct_round_shift(temp1);
step2[5] = fdct_round_shift(temp2);
step3[0] = step1[0] + step2[3];
step3[1] = step1[1] + step2[2];
step3[2] = step1[1] - step2[2];
step3[3] = step1[0] - step2[3];
step3[4] = step1[7] - step2[4];
step3[5] = step1[6] - step2[5];
step3[6] = step1[6] + step2[5];
step3[7] = step1[7] + step2[4];
temp1 = step3[1] * -cospi_8_64 + step3[6] * cospi_24_64;
temp2 = step3[2] * -cospi_24_64 - step3[5] * cospi_8_64;
step2[1] = fdct_round_shift(temp1);
step2[2] = fdct_round_shift(temp2);
temp1 = step3[2] * -cospi_8_64 + step3[5] * cospi_24_64;
temp2 = step3[1] * cospi_24_64 + step3[6] * cospi_8_64;
step2[5] = fdct_round_shift(temp1);
step2[6] = fdct_round_shift(temp2);
step1[0] = step3[0] + step2[1];
step1[1] = step3[0] - step2[1];
step1[2] = step3[3] - step2[2];
step1[3] = step3[3] + step2[2];
step1[4] = step3[4] + step2[5];
step1[5] = step3[4] - step2[5];
step1[6] = step3[7] - step2[6];
step1[7] = step3[7] + step2[6];
temp1 = step1[0] * cospi_30_64 + step1[7] * cospi_2_64;
temp2 = step1[1] * cospi_14_64 + step1[6] * cospi_18_64;
out[1] = fdct_round_shift(temp1);
out[9] = fdct_round_shift(temp2);
temp1 = step1[2] * cospi_22_64 + step1[5] * cospi_10_64;
temp2 = step1[3] * cospi_6_64 + step1[4] * cospi_26_64;
out[5] = fdct_round_shift(temp1);
out[13] = fdct_round_shift(temp2);
temp1 = step1[3] * -cospi_26_64 + step1[4] * cospi_6_64;
temp2 = step1[2] * -cospi_10_64 + step1[5] * cospi_22_64;
out[3] = fdct_round_shift(temp1);
out[11] = fdct_round_shift(temp2);
temp1 = step1[1] * -cospi_18_64 + step1[6] * cospi_14_64;
temp2 = step1[0] * -cospi_2_64 + step1[7] * cospi_30_64;
out[7] = fdct_round_shift(temp1);
out[15] = fdct_round_shift(temp2);
}
in++;
out += 16;
}
in = intermediate;
out = output;
}
}
static void fadst8(const int16_t *input, int16_t *output) {
int s0, s1, s2, s3, s4, s5, s6, s7;
int x0 = input[7];
int x1 = input[0];
int x2 = input[5];
int x3 = input[2];
int x4 = input[3];
int x5 = input[4];
int x6 = input[1];
int x7 = input[6];
s0 = cospi_2_64 * x0 + cospi_30_64 * x1;
s1 = cospi_30_64 * x0 - cospi_2_64 * x1;
s2 = cospi_10_64 * x2 + cospi_22_64 * x3;
s3 = cospi_22_64 * x2 - cospi_10_64 * x3;
s4 = cospi_18_64 * x4 + cospi_14_64 * x5;
s5 = cospi_14_64 * x4 - cospi_18_64 * x5;
s6 = cospi_26_64 * x6 + cospi_6_64 * x7;
s7 = cospi_6_64 * x6 - cospi_26_64 * x7;
x0 = fdct_round_shift(s0 + s4);
x1 = fdct_round_shift(s1 + s5);
x2 = fdct_round_shift(s2 + s6);
x3 = fdct_round_shift(s3 + s7);
x4 = fdct_round_shift(s0 - s4);
x5 = fdct_round_shift(s1 - s5);
x6 = fdct_round_shift(s2 - s6);
x7 = fdct_round_shift(s3 - s7);
s0 = x0;
s1 = x1;
s2 = x2;
s3 = x3;
s4 = cospi_8_64 * x4 + cospi_24_64 * x5;
s5 = cospi_24_64 * x4 - cospi_8_64 * x5;
s6 = - cospi_24_64 * x6 + cospi_8_64 * x7;
s7 = cospi_8_64 * x6 + cospi_24_64 * x7;
x0 = s0 + s2;
x1 = s1 + s3;
x2 = s0 - s2;
x3 = s1 - s3;
x4 = fdct_round_shift(s4 + s6);
x5 = fdct_round_shift(s5 + s7);
x6 = fdct_round_shift(s4 - s6);
x7 = fdct_round_shift(s5 - s7);
s2 = cospi_16_64 * (x2 + x3);
s3 = cospi_16_64 * (x2 - x3);
s6 = cospi_16_64 * (x6 + x7);
s7 = cospi_16_64 * (x6 - x7);
x2 = fdct_round_shift(s2);
x3 = fdct_round_shift(s3);
x6 = fdct_round_shift(s6);
x7 = fdct_round_shift(s7);
output[0] = x0;
output[1] = - x4;
output[2] = x6;
output[3] = - x2;
output[4] = x3;
output[5] = - x7;
output[6] = x5;
output[7] = - x1;
}
static const transform_2d FHT_8[] = {
{ fdct8, fdct8 },
{ fadst8, fdct8 },
{ fdct8, fadst8 },
{ fadst8, fadst8 }
};
void vp9_fht8x8_c(const int16_t *input, int16_t *output,
int stride, int tx_type) {
if (tx_type == DCT_DCT) {
vp9_fdct8x8_c(input, output, stride);
} else {
int16_t out[64];
int16_t *outptr = &out[0];
int i, j;
int16_t temp_in[8], temp_out[8];
const transform_2d ht = FHT_8[tx_type];
for (i = 0; i < 8; ++i) {
for (j = 0; j < 8; ++j)
temp_in[j] = input[j * stride + i] * 4;
ht.cols(temp_in, temp_out);
for (j = 0; j < 8; ++j)
outptr[j * 8 + i] = temp_out[j];
}
for (i = 0; i < 8; ++i) {
for (j = 0; j < 8; ++j)
temp_in[j] = out[j + i * 8];
ht.rows(temp_in, temp_out);
for (j = 0; j < 8; ++j)
output[j + i * 8] = (temp_out[j] + (temp_out[j] < 0)) >> 1;
}
}
}
void vp9_fwht4x4_c(const int16_t *input, int16_t *output, int stride) {
int i;
int a1, b1, c1, d1, e1;
const int16_t *ip = input;
int16_t *op = output;
for (i = 0; i < 4; i++) {
a1 = ip[0 * stride];
b1 = ip[1 * stride];
c1 = ip[2 * stride];
d1 = ip[3 * stride];
a1 += b1;
d1 = d1 - c1;
e1 = (a1 - d1) >> 1;
b1 = e1 - b1;
c1 = e1 - c1;
a1 -= c1;
d1 += b1;
op[0] = a1;
op[4] = c1;
op[8] = d1;
op[12] = b1;
ip++;
op++;
}
ip = output;
op = output;
for (i = 0; i < 4; i++) {
a1 = ip[0];
b1 = ip[1];
c1 = ip[2];
d1 = ip[3];
a1 += b1;
d1 -= c1;
e1 = (a1 - d1) >> 1;
b1 = e1 - b1;
c1 = e1 - c1;
a1 -= c1;
d1 += b1;
op[0] = a1 * (1 << 2);
op[1] = c1 * (1 << 2);
op[2] = d1 * (1 << 2);
op[3] = b1 * (1 << 2);
ip += 4;
op += 4;
}
}
static void fdct16(const int16_t in[16], int16_t out[16]) {
int step1[8];
int step2[8];
int step3[8];
int input[8];
int temp1, temp2;
input[0] = in[0] + in[15];
input[1] = in[1] + in[14];
input[2] = in[2] + in[13];
input[3] = in[3] + in[12];
input[4] = in[4] + in[11];
input[5] = in[5] + in[10];
input[6] = in[6] + in[ 9];
input[7] = in[7] + in[ 8];
step1[0] = in[7] - in[ 8];
step1[1] = in[6] - in[ 9];
step1[2] = in[5] - in[10];
step1[3] = in[4] - in[11];
step1[4] = in[3] - in[12];
step1[5] = in[2] - in[13];
step1[6] = in[1] - in[14];
step1[7] = in[0] - in[15];
{
int s0, s1, s2, s3, s4, s5, s6, s7;
int t0, t1, t2, t3;
int x0, x1, x2, x3;
s0 = input[0] + input[7];
s1 = input[1] + input[6];
s2 = input[2] + input[5];
s3 = input[3] + input[4];
s4 = input[3] - input[4];
s5 = input[2] - input[5];
s6 = input[1] - input[6];
s7 = input[0] - input[7];
x0 = s0 + s3;
x1 = s1 + s2;
x2 = s1 - s2;
x3 = s0 - s3;
t0 = (x0 + x1) * cospi_16_64;
t1 = (x0 - x1) * cospi_16_64;
t2 = x3 * cospi_8_64 + x2 * cospi_24_64;
t3 = x3 * cospi_24_64 - x2 * cospi_8_64;
out[0] = fdct_round_shift(t0);
out[4] = fdct_round_shift(t2);
out[8] = fdct_round_shift(t1);
out[12] = fdct_round_shift(t3);
t0 = (s6 - s5) * cospi_16_64;
t1 = (s6 + s5) * cospi_16_64;
t2 = fdct_round_shift(t0);
t3 = fdct_round_shift(t1);
x0 = s4 + t2;
x1 = s4 - t2;
x2 = s7 - t3;
x3 = s7 + t3;
t0 = x0 * cospi_28_64 + x3 * cospi_4_64;
t1 = x1 * cospi_12_64 + x2 * cospi_20_64;
t2 = x2 * cospi_12_64 + x1 * -cospi_20_64;
t3 = x3 * cospi_28_64 + x0 * -cospi_4_64;
out[2] = fdct_round_shift(t0);
out[6] = fdct_round_shift(t2);
out[10] = fdct_round_shift(t1);
out[14] = fdct_round_shift(t3);
}
temp1 = (step1[5] - step1[2]) * cospi_16_64;
temp2 = (step1[4] - step1[3]) * cospi_16_64;
step2[2] = fdct_round_shift(temp1);
step2[3] = fdct_round_shift(temp2);
temp1 = (step1[4] + step1[3]) * cospi_16_64;
temp2 = (step1[5] + step1[2]) * cospi_16_64;
step2[4] = fdct_round_shift(temp1);
step2[5] = fdct_round_shift(temp2);
step3[0] = step1[0] + step2[3];
step3[1] = step1[1] + step2[2];
step3[2] = step1[1] - step2[2];
step3[3] = step1[0] - step2[3];
step3[4] = step1[7] - step2[4];
step3[5] = step1[6] - step2[5];
step3[6] = step1[6] + step2[5];
step3[7] = step1[7] + step2[4];
temp1 = step3[1] * -cospi_8_64 + step3[6] * cospi_24_64;
temp2 = step3[2] * -cospi_24_64 - step3[5] * cospi_8_64;
step2[1] = fdct_round_shift(temp1);
step2[2] = fdct_round_shift(temp2);
temp1 = step3[2] * -cospi_8_64 + step3[5] * cospi_24_64;
temp2 = step3[1] * cospi_24_64 + step3[6] * cospi_8_64;
step2[5] = fdct_round_shift(temp1);
step2[6] = fdct_round_shift(temp2);
step1[0] = step3[0] + step2[1];
step1[1] = step3[0] - step2[1];
step1[2] = step3[3] - step2[2];
step1[3] = step3[3] + step2[2];
step1[4] = step3[4] + step2[5];
step1[5] = step3[4] - step2[5];
step1[6] = step3[7] - step2[6];
step1[7] = step3[7] + step2[6];
temp1 = step1[0] * cospi_30_64 + step1[7] * cospi_2_64;
temp2 = step1[1] * cospi_14_64 + step1[6] * cospi_18_64;
out[1] = fdct_round_shift(temp1);
out[9] = fdct_round_shift(temp2);
temp1 = step1[2] * cospi_22_64 + step1[5] * cospi_10_64;
temp2 = step1[3] * cospi_6_64 + step1[4] * cospi_26_64;
out[5] = fdct_round_shift(temp1);
out[13] = fdct_round_shift(temp2);
temp1 = step1[3] * -cospi_26_64 + step1[4] * cospi_6_64;
temp2 = step1[2] * -cospi_10_64 + step1[5] * cospi_22_64;
out[3] = fdct_round_shift(temp1);
out[11] = fdct_round_shift(temp2);
temp1 = step1[1] * -cospi_18_64 + step1[6] * cospi_14_64;
temp2 = step1[0] * -cospi_2_64 + step1[7] * cospi_30_64;
out[7] = fdct_round_shift(temp1);
out[15] = fdct_round_shift(temp2);
}
static void fadst16(const int16_t *input, int16_t *output) {
int s0, s1, s2, s3, s4, s5, s6, s7, s8, s9, s10, s11, s12, s13, s14, s15;
int x0 = input[15];
int x1 = input[0];
int x2 = input[13];
int x3 = input[2];
int x4 = input[11];
int x5 = input[4];
int x6 = input[9];
int x7 = input[6];
int x8 = input[7];
int x9 = input[8];
int x10 = input[5];
int x11 = input[10];
int x12 = input[3];
int x13 = input[12];
int x14 = input[1];
int x15 = input[14];
s0 = x0 * cospi_1_64 + x1 * cospi_31_64;
s1 = x0 * cospi_31_64 - x1 * cospi_1_64;
s2 = x2 * cospi_5_64 + x3 * cospi_27_64;
s3 = x2 * cospi_27_64 - x3 * cospi_5_64;
s4 = x4 * cospi_9_64 + x5 * cospi_23_64;
s5 = x4 * cospi_23_64 - x5 * cospi_9_64;
s6 = x6 * cospi_13_64 + x7 * cospi_19_64;
s7 = x6 * cospi_19_64 - x7 * cospi_13_64;
s8 = x8 * cospi_17_64 + x9 * cospi_15_64;
s9 = x8 * cospi_15_64 - x9 * cospi_17_64;
s10 = x10 * cospi_21_64 + x11 * cospi_11_64;
s11 = x10 * cospi_11_64 - x11 * cospi_21_64;
s12 = x12 * cospi_25_64 + x13 * cospi_7_64;
s13 = x12 * cospi_7_64 - x13 * cospi_25_64;
s14 = x14 * cospi_29_64 + x15 * cospi_3_64;
s15 = x14 * cospi_3_64 - x15 * cospi_29_64;
x0 = fdct_round_shift(s0 + s8);
x1 = fdct_round_shift(s1 + s9);
x2 = fdct_round_shift(s2 + s10);
x3 = fdct_round_shift(s3 + s11);
x4 = fdct_round_shift(s4 + s12);
x5 = fdct_round_shift(s5 + s13);
x6 = fdct_round_shift(s6 + s14);
x7 = fdct_round_shift(s7 + s15);
x8 = fdct_round_shift(s0 - s8);
x9 = fdct_round_shift(s1 - s9);
x10 = fdct_round_shift(s2 - s10);
x11 = fdct_round_shift(s3 - s11);
x12 = fdct_round_shift(s4 - s12);
x13 = fdct_round_shift(s5 - s13);
x14 = fdct_round_shift(s6 - s14);
x15 = fdct_round_shift(s7 - s15);
s0 = x0;
s1 = x1;
s2 = x2;
s3 = x3;
s4 = x4;
s5 = x5;
s6 = x6;
s7 = x7;
s8 = x8 * cospi_4_64 + x9 * cospi_28_64;
s9 = x8 * cospi_28_64 - x9 * cospi_4_64;
s10 = x10 * cospi_20_64 + x11 * cospi_12_64;
s11 = x10 * cospi_12_64 - x11 * cospi_20_64;
s12 = - x12 * cospi_28_64 + x13 * cospi_4_64;
s13 = x12 * cospi_4_64 + x13 * cospi_28_64;
s14 = - x14 * cospi_12_64 + x15 * cospi_20_64;
s15 = x14 * cospi_20_64 + x15 * cospi_12_64;
x0 = s0 + s4;
x1 = s1 + s5;
x2 = s2 + s6;
x3 = s3 + s7;
x4 = s0 - s4;
x5 = s1 - s5;
x6 = s2 - s6;
x7 = s3 - s7;
x8 = fdct_round_shift(s8 + s12);
x9 = fdct_round_shift(s9 + s13);
x10 = fdct_round_shift(s10 + s14);
x11 = fdct_round_shift(s11 + s15);
x12 = fdct_round_shift(s8 - s12);
x13 = fdct_round_shift(s9 - s13);
x14 = fdct_round_shift(s10 - s14);
x15 = fdct_round_shift(s11 - s15);
s0 = x0;
s1 = x1;
s2 = x2;
s3 = x3;
s4 = x4 * cospi_8_64 + x5 * cospi_24_64;
s5 = x4 * cospi_24_64 - x5 * cospi_8_64;
s6 = - x6 * cospi_24_64 + x7 * cospi_8_64;
s7 = x6 * cospi_8_64 + x7 * cospi_24_64;
s8 = x8;
s9 = x9;
s10 = x10;
s11 = x11;
s12 = x12 * cospi_8_64 + x13 * cospi_24_64;
s13 = x12 * cospi_24_64 - x13 * cospi_8_64;
s14 = - x14 * cospi_24_64 + x15 * cospi_8_64;
s15 = x14 * cospi_8_64 + x15 * cospi_24_64;
x0 = s0 + s2;
x1 = s1 + s3;
x2 = s0 - s2;
x3 = s1 - s3;
x4 = fdct_round_shift(s4 + s6);
x5 = fdct_round_shift(s5 + s7);
x6 = fdct_round_shift(s4 - s6);
x7 = fdct_round_shift(s5 - s7);
x8 = s8 + s10;
x9 = s9 + s11;
x10 = s8 - s10;
x11 = s9 - s11;
x12 = fdct_round_shift(s12 + s14);
x13 = fdct_round_shift(s13 + s15);
x14 = fdct_round_shift(s12 - s14);
x15 = fdct_round_shift(s13 - s15);
s2 = (- cospi_16_64) * (x2 + x3);
s3 = cospi_16_64 * (x2 - x3);
s6 = cospi_16_64 * (x6 + x7);
s7 = cospi_16_64 * (- x6 + x7);
s10 = cospi_16_64 * (x10 + x11);
s11 = cospi_16_64 * (- x10 + x11);
s14 = (- cospi_16_64) * (x14 + x15);
s15 = cospi_16_64 * (x14 - x15);
x2 = fdct_round_shift(s2);
x3 = fdct_round_shift(s3);
x6 = fdct_round_shift(s6);
x7 = fdct_round_shift(s7);
x10 = fdct_round_shift(s10);
x11 = fdct_round_shift(s11);
x14 = fdct_round_shift(s14);
x15 = fdct_round_shift(s15);
output[0] = x0;
output[1] = - x8;
output[2] = x12;
output[3] = - x4;
output[4] = x6;
output[5] = x14;
output[6] = x10;
output[7] = x2;
output[8] = x3;
output[9] = x11;
output[10] = x15;
output[11] = x7;
output[12] = x5;
output[13] = - x13;
output[14] = x9;
output[15] = - x1;
}
static const transform_2d FHT_16[] = {
{ fdct16, fdct16 },
{ fadst16, fdct16 },
{ fdct16, fadst16 },
{ fadst16, fadst16 }
};
void vp9_fht16x16_c(const int16_t *input, int16_t *output,
int stride, int tx_type) {
if (tx_type == DCT_DCT) {
vp9_fdct16x16_c(input, output, stride);
} else {
int16_t out[256];
int16_t *outptr = &out[0];
int i, j;
int16_t temp_in[16], temp_out[16];
const transform_2d ht = FHT_16[tx_type];
for (i = 0; i < 16; ++i) {
for (j = 0; j < 16; ++j)
temp_in[j] = input[j * stride + i] * 4;
ht.cols(temp_in, temp_out);
for (j = 0; j < 16; ++j)
outptr[j * 16 + i] = (temp_out[j] + 1 + (temp_out[j] < 0)) >> 2;
}
for (i = 0; i < 16; ++i) {
for (j = 0; j < 16; ++j)
temp_in[j] = out[j + i * 16];
ht.rows(temp_in, temp_out);
for (j = 0; j < 16; ++j)
output[j + i * 16] = temp_out[j];
}
}
}
static __inline__ __attribute__((always_inline)) int dct_32_round(int input) {
int rv = (((input) + (1 << ((14) - 1))) >> (14));
((void)0);
return rv;
}
static __inline__ __attribute__((always_inline)) int half_round_shift(int input) {
int rv = (input + 1 + (input < 0)) >> 2;
return rv;
}
static void fdct32(const int *input, int *output, int round) {
int step[32];
step[0] = input[0] + input[(32 - 1)];
step[1] = input[1] + input[(32 - 2)];
step[2] = input[2] + input[(32 - 3)];
step[3] = input[3] + input[(32 - 4)];
step[4] = input[4] + input[(32 - 5)];
step[5] = input[5] + input[(32 - 6)];
step[6] = input[6] + input[(32 - 7)];
step[7] = input[7] + input[(32 - 8)];
step[8] = input[8] + input[(32 - 9)];
step[9] = input[9] + input[(32 - 10)];
step[10] = input[10] + input[(32 - 11)];
step[11] = input[11] + input[(32 - 12)];
step[12] = input[12] + input[(32 - 13)];
step[13] = input[13] + input[(32 - 14)];
step[14] = input[14] + input[(32 - 15)];
step[15] = input[15] + input[(32 - 16)];
step[16] = -input[16] + input[(32 - 17)];
step[17] = -input[17] + input[(32 - 18)];
step[18] = -input[18] + input[(32 - 19)];
step[19] = -input[19] + input[(32 - 20)];
step[20] = -input[20] + input[(32 - 21)];
step[21] = -input[21] + input[(32 - 22)];
step[22] = -input[22] + input[(32 - 23)];
step[23] = -input[23] + input[(32 - 24)];
step[24] = -input[24] + input[(32 - 25)];
step[25] = -input[25] + input[(32 - 26)];
step[26] = -input[26] + input[(32 - 27)];
step[27] = -input[27] + input[(32 - 28)];
step[28] = -input[28] + input[(32 - 29)];
step[29] = -input[29] + input[(32 - 30)];
step[30] = -input[30] + input[(32 - 31)];
step[31] = -input[31] + input[(32 - 32)];
output[0] = step[0] + step[16 - 1];
output[1] = step[1] + step[16 - 2];
output[2] = step[2] + step[16 - 3];
output[3] = step[3] + step[16 - 4];
output[4] = step[4] + step[16 - 5];
output[5] = step[5] + step[16 - 6];
output[6] = step[6] + step[16 - 7];
output[7] = step[7] + step[16 - 8];
output[8] = -step[8] + step[16 - 9];
output[9] = -step[9] + step[16 - 10];
output[10] = -step[10] + step[16 - 11];
output[11] = -step[11] + step[16 - 12];
output[12] = -step[12] + step[16 - 13];
output[13] = -step[13] + step[16 - 14];
output[14] = -step[14] + step[16 - 15];
output[15] = -step[15] + step[16 - 16];
output[16] = step[16];
output[17] = step[17];
output[18] = step[18];
output[19] = step[19];
output[20] = dct_32_round((-step[20] + step[27]) * cospi_16_64);
output[21] = dct_32_round((-step[21] + step[26]) * cospi_16_64);
output[22] = dct_32_round((-step[22] + step[25]) * cospi_16_64);
output[23] = dct_32_round((-step[23] + step[24]) * cospi_16_64);
output[24] = dct_32_round((step[24] + step[23]) * cospi_16_64);
output[25] = dct_32_round((step[25] + step[22]) * cospi_16_64);
output[26] = dct_32_round((step[26] + step[21]) * cospi_16_64);
output[27] = dct_32_round((step[27] + step[20]) * cospi_16_64);
output[28] = step[28];
output[29] = step[29];
output[30] = step[30];
output[31] = step[31];
if (round) {
output[0] = half_round_shift(output[0]);
output[1] = half_round_shift(output[1]);
output[2] = half_round_shift(output[2]);
output[3] = half_round_shift(output[3]);
output[4] = half_round_shift(output[4]);
output[5] = half_round_shift(output[5]);
output[6] = half_round_shift(output[6]);
output[7] = half_round_shift(output[7]);
output[8] = half_round_shift(output[8]);
output[9] = half_round_shift(output[9]);
output[10] = half_round_shift(output[10]);
output[11] = half_round_shift(output[11]);
output[12] = half_round_shift(output[12]);
output[13] = half_round_shift(output[13]);
output[14] = half_round_shift(output[14]);
output[15] = half_round_shift(output[15]);
output[16] = half_round_shift(output[16]);
output[17] = half_round_shift(output[17]);
output[18] = half_round_shift(output[18]);
output[19] = half_round_shift(output[19]);
output[20] = half_round_shift(output[20]);
output[21] = half_round_shift(output[21]);
output[22] = half_round_shift(output[22]);
output[23] = half_round_shift(output[23]);
output[24] = half_round_shift(output[24]);
output[25] = half_round_shift(output[25]);
output[26] = half_round_shift(output[26]);
output[27] = half_round_shift(output[27]);
output[28] = half_round_shift(output[28]);
output[29] = half_round_shift(output[29]);
output[30] = half_round_shift(output[30]);
output[31] = half_round_shift(output[31]);
}
step[0] = output[0] + output[(8 - 1)];
step[1] = output[1] + output[(8 - 2)];
step[2] = output[2] + output[(8 - 3)];
step[3] = output[3] + output[(8 - 4)];
step[4] = -output[4] + output[(8 - 5)];
step[5] = -output[5] + output[(8 - 6)];
step[6] = -output[6] + output[(8 - 7)];
step[7] = -output[7] + output[(8 - 8)];
step[8] = output[8];
step[9] = output[9];
step[10] = dct_32_round((-output[10] + output[13]) * cospi_16_64);
step[11] = dct_32_round((-output[11] + output[12]) * cospi_16_64);
step[12] = dct_32_round((output[12] + output[11]) * cospi_16_64);
step[13] = dct_32_round((output[13] + output[10]) * cospi_16_64);
step[14] = output[14];
step[15] = output[15];
step[16] = output[16] + output[23];
step[17] = output[17] + output[22];
step[18] = output[18] + output[21];
step[19] = output[19] + output[20];
step[20] = -output[20] + output[19];
step[21] = -output[21] + output[18];
step[22] = -output[22] + output[17];
step[23] = -output[23] + output[16];
step[24] = -output[24] + output[31];
step[25] = -output[25] + output[30];
step[26] = -output[26] + output[29];
step[27] = -output[27] + output[28];
step[28] = output[28] + output[27];
step[29] = output[29] + output[26];
step[30] = output[30] + output[25];
step[31] = output[31] + output[24];
output[0] = step[0] + step[3];
output[1] = step[1] + step[2];
output[2] = -step[2] + step[1];
output[3] = -step[3] + step[0];
output[4] = step[4];
output[5] = dct_32_round((-step[5] + step[6]) * cospi_16_64);
output[6] = dct_32_round((step[6] + step[5]) * cospi_16_64);
output[7] = step[7];
output[8] = step[8] + step[11];
output[9] = step[9] + step[10];
output[10] = -step[10] + step[9];
output[11] = -step[11] + step[8];
output[12] = -step[12] + step[15];
output[13] = -step[13] + step[14];
output[14] = step[14] + step[13];
output[15] = step[15] + step[12];
output[16] = step[16];
output[17] = step[17];
output[18] = dct_32_round(step[18] * -cospi_8_64 + step[29] * cospi_24_64);
output[19] = dct_32_round(step[19] * -cospi_8_64 + step[28] * cospi_24_64);
output[20] = dct_32_round(step[20] * -cospi_24_64 + step[27] * -cospi_8_64);
output[21] = dct_32_round(step[21] * -cospi_24_64 + step[26] * -cospi_8_64);
output[22] = step[22];
output[23] = step[23];
output[24] = step[24];
output[25] = step[25];
output[26] = dct_32_round(step[26] * cospi_24_64 + step[21] * -cospi_8_64);
output[27] = dct_32_round(step[27] * cospi_24_64 + step[20] * -cospi_8_64);
output[28] = dct_32_round(step[28] * cospi_8_64 + step[19] * cospi_24_64);
output[29] = dct_32_round(step[29] * cospi_8_64 + step[18] * cospi_24_64);
output[30] = step[30];
output[31] = step[31];
step[0] = dct_32_round((output[0] + output[1]) * cospi_16_64);
step[1] = dct_32_round((-output[1] + output[0]) * cospi_16_64);
step[2] = dct_32_round(output[2] * cospi_24_64 + output[3] * cospi_8_64);
step[3] = dct_32_round(output[3] * cospi_24_64 - output[2] * cospi_8_64);
step[4] = output[4] + output[5];
step[5] = -output[5] + output[4];
step[6] = -output[6] + output[7];
step[7] = output[7] + output[6];
step[8] = output[8];
step[9] = dct_32_round(output[9] * -cospi_8_64 + output[14] * cospi_24_64);
step[10] = dct_32_round(output[10] * -cospi_24_64 + output[13] * -cospi_8_64);
step[11] = output[11];
step[12] = output[12];
step[13] = dct_32_round(output[13] * cospi_24_64 + output[10] * -cospi_8_64);
step[14] = dct_32_round(output[14] * cospi_8_64 + output[9] * cospi_24_64);
step[15] = output[15];
step[16] = output[16] + output[19];
step[17] = output[17] + output[18];
step[18] = -output[18] + output[17];
step[19] = -output[19] + output[16];
step[20] = -output[20] + output[23];
step[21] = -output[21] + output[22];
step[22] = output[22] + output[21];
step[23] = output[23] + output[20];
step[24] = output[24] + output[27];
step[25] = output[25] + output[26];
step[26] = -output[26] + output[25];
step[27] = -output[27] + output[24];
step[28] = -output[28] + output[31];
step[29] = -output[29] + output[30];
step[30] = output[30] + output[29];
step[31] = output[31] + output[28];
output[0] = step[0];
output[1] = step[1];
output[2] = step[2];
output[3] = step[3];
output[4] = dct_32_round(step[4] * cospi_28_64 + step[7] * cospi_4_64);
output[5] = dct_32_round(step[5] * cospi_12_64 + step[6] * cospi_20_64);
output[6] = dct_32_round(step[6] * cospi_12_64 + step[5] * -cospi_20_64);
output[7] = dct_32_round(step[7] * cospi_28_64 + step[4] * -cospi_4_64);
output[8] = step[8] + step[9];
output[9] = -step[9] + step[8];
output[10] = -step[10] + step[11];
output[11] = step[11] + step[10];
output[12] = step[12] + step[13];
output[13] = -step[13] + step[12];
output[14] = -step[14] + step[15];
output[15] = step[15] + step[14];
output[16] = step[16];
output[17] = dct_32_round(step[17] * -cospi_4_64 + step[30] * cospi_28_64);
output[18] = dct_32_round(step[18] * -cospi_28_64 + step[29] * -cospi_4_64);
output[19] = step[19];
output[20] = step[20];
output[21] = dct_32_round(step[21] * -cospi_20_64 + step[26] * cospi_12_64);
output[22] = dct_32_round(step[22] * -cospi_12_64 + step[25] * -cospi_20_64);
output[23] = step[23];
output[24] = step[24];
output[25] = dct_32_round(step[25] * cospi_12_64 + step[22] * -cospi_20_64);
output[26] = dct_32_round(step[26] * cospi_20_64 + step[21] * cospi_12_64);
output[27] = step[27];
output[28] = step[28];
output[29] = dct_32_round(step[29] * cospi_28_64 + step[18] * -cospi_4_64);
output[30] = dct_32_round(step[30] * cospi_4_64 + step[17] * cospi_28_64);
output[31] = step[31];
step[0] = output[0];
step[1] = output[1];
step[2] = output[2];
step[3] = output[3];
step[4] = output[4];
step[5] = output[5];
step[6] = output[6];
step[7] = output[7];
step[8] = dct_32_round(output[8] * cospi_30_64 + output[15] * cospi_2_64);
step[9] = dct_32_round(output[9] * cospi_14_64 + output[14] * cospi_18_64);
step[10] = dct_32_round(output[10] * cospi_22_64 + output[13] * cospi_10_64);
step[11] = dct_32_round(output[11] * cospi_6_64 + output[12] * cospi_26_64);
step[12] = dct_32_round(output[12] * cospi_6_64 + output[11] * -cospi_26_64);
step[13] = dct_32_round(output[13] * cospi_22_64 + output[10] * -cospi_10_64);
step[14] = dct_32_round(output[14] * cospi_14_64 + output[9] * -cospi_18_64);
step[15] = dct_32_round(output[15] * cospi_30_64 + output[8] * -cospi_2_64);
step[16] = output[16] + output[17];
step[17] = -output[17] + output[16];
step[18] = -output[18] + output[19];
step[19] = output[19] + output[18];
step[20] = output[20] + output[21];
step[21] = -output[21] + output[20];
step[22] = -output[22] + output[23];
step[23] = output[23] + output[22];
step[24] = output[24] + output[25];
step[25] = -output[25] + output[24];
step[26] = -output[26] + output[27];
step[27] = output[27] + output[26];
step[28] = output[28] + output[29];
step[29] = -output[29] + output[28];
step[30] = -output[30] + output[31];
step[31] = output[31] + output[30];
output[0] = step[0];
output[16] = step[1];
output[8] = step[2];
output[24] = step[3];
output[4] = step[4];
output[20] = step[5];
output[12] = step[6];
output[28] = step[7];
output[2] = step[8];
output[18] = step[9];
output[10] = step[10];
output[26] = step[11];
output[6] = step[12];
output[22] = step[13];
output[14] = step[14];
output[30] = step[15];
output[1] = dct_32_round(step[16] * cospi_31_64 + step[31] * cospi_1_64);
output[17] = dct_32_round(step[17] * cospi_15_64 + step[30] * cospi_17_64);
output[9] = dct_32_round(step[18] * cospi_23_64 + step[29] * cospi_9_64);
output[25] = dct_32_round(step[19] * cospi_7_64 + step[28] * cospi_25_64);
output[5] = dct_32_round(step[20] * cospi_27_64 + step[27] * cospi_5_64);
output[21] = dct_32_round(step[21] * cospi_11_64 + step[26] * cospi_21_64);
output[13] = dct_32_round(step[22] * cospi_19_64 + step[25] * cospi_13_64);
output[29] = dct_32_round(step[23] * cospi_3_64 + step[24] * cospi_29_64);
output[3] = dct_32_round(step[24] * cospi_3_64 + step[23] * -cospi_29_64);
output[19] = dct_32_round(step[25] * cospi_19_64 + step[22] * -cospi_13_64);
output[11] = dct_32_round(step[26] * cospi_11_64 + step[21] * -cospi_21_64);
output[27] = dct_32_round(step[27] * cospi_27_64 + step[20] * -cospi_5_64);
output[7] = dct_32_round(step[28] * cospi_7_64 + step[19] * -cospi_25_64);
output[23] = dct_32_round(step[29] * cospi_23_64 + step[18] * -cospi_9_64);
output[15] = dct_32_round(step[30] * cospi_15_64 + step[17] * -cospi_17_64);
output[31] = dct_32_round(step[31] * cospi_31_64 + step[16] * -cospi_1_64);
}
void vp9_fdct32x32_c(const int16_t *input, int16_t *out, int stride) {
int i, j;
int output[32 * 32];
for (i = 0; i < 32; ++i) {
int temp_in[32], temp_out[32];
for (j = 0; j < 32; ++j)
temp_in[j] = input[j * stride + i] * 4;
fdct32(temp_in, temp_out, 0);
for (j = 0; j < 32; ++j)
output[j * 32 + i] = (temp_out[j] + 1 + (temp_out[j] > 0)) >> 2;
}
for (i = 0; i < 32; ++i) {
int temp_in[32], temp_out[32];
for (j = 0; j < 32; ++j)
temp_in[j] = output[j + i * 32];
fdct32(temp_in, temp_out, 0);
for (j = 0; j < 32; ++j)
out[j + i * 32] = (temp_out[j] + 1 + (temp_out[j] < 0)) >> 2;
}
}
void vp9_fdct32x32_rd_c(const int16_t *input, int16_t *out, int stride) {
int i, j;
int output[32 * 32];
for (i = 0; i < 32; ++i) {
int temp_in[32], temp_out[32];
for (j = 0; j < 32; ++j)
temp_in[j] = input[j * stride + i] * 4;
fdct32(temp_in, temp_out, 0);
for (j = 0; j < 32; ++j)
output[j * 32 + i] = (temp_out[j] + 1 + (temp_out[j] > 0)) >> 2;
}
for (i = 0; i < 32; ++i) {
int temp_in[32], temp_out[32];
for (j = 0; j < 32; ++j)
temp_in[j] = output[j + i * 32];
fdct32(temp_in, temp_out, 1);
for (j = 0; j < 32; ++j)
out[j + i * 32] = temp_out[j];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment