Forums - How to compile Android with the Snapdragon LLVM Compiler

57 posts / 0 new
Last post
How to compile Android with the Snapdragon LLVM Compiler
jake.weinstein
Join Date: 6 Aug 16
Posts: 15
Posted: Fri, 2016-09-30 15:29

Over the years, there have been many who have wanted to compile the Android platform with the Snapdragon LLVM Compiler, which has several performance enhancements for Snapdragon chipsets, such as improved Krait targeting and enhanced auto-vectorization for the NEON SIMD.  With Qualcomm's release of Android Nougat repos, it is now possible to compile target modules with their optimized compiler.  Please see the commits in the following repository for more information: https://source.codeaurora.org/quic/la/platform/build/log/?h=LA.BF64.1.2....

In order to use the Qualcomm Compiler to build Android for Snapdragon chipsets, please follow the steps below.  Please note that Darwin (Mac OS X) is not supported at this time.

1. Download the Qualcomm LLVM Compiler here: https://developer.qualcomm.com/download/sdllvm/snapdragon-llvm-compiler-...

2. Extract Snapdragon-llvm-3.8.4-toolchain.tar.gz

3. Move toolchains\llvm-Snapdragon_LLVM_for_Android_3.8\prebuilt\linux-x86_64 to prebuilts/clang/linux-x86/host/sdclang-3.8 within your Android build environment.

4. Add the following lines to your device's BoardConfig:

ifneq ($(HOST_OS),darwin)

SDCLANG := true

SDCLANG_PATH := prebuilts/clang/linux-x86/host/sdclang-3.8/bin

SDCLANG_LTO_DEFS := device/qcom/common/sdllvm-lto-defs.mk

endif

5. Compile Android

Please post your results here.  Many have reported improved scrolling and animation frame rates.

 

  • Up0
  • Down0
FSadino
Join Date: 14 Jan 17
Posts: 1
Posted: Sat, 2017-01-14 12:48

How to solve this error:

Quote:

[ 14% 5105/34476] target SharedLib: li...IES/libc_intermediates/LINKED/libc.so) FAILED: /bin/bash -c "prebuilts/misc/linux-x86/ccache/ccache prebuilts/clang/host/linux-x86/clang-2690385/bin/clang++ -nostdlib -Wl,-soname,libc.so -Wl,--gc-sections -shared -L/home/fsadino/android/LineageOS_14.1/out/target/product/bacon/obj/lib /home/fsadino/android/LineageOS_14.1/out/target/product/bacon/obj/SHARED_LIBRARIES/libc_intermediates/arch-common/bionic/crtbrand.o /home/fsadino/android/LineageOS_14.1/out/target/product/bacon/obj/SHARED_LIBRARIES/libc_intermediates/arch-common/bionic/crtend_so.o /home/fsadino/android/LineageOS_14.1/out/target/product/bacon/obj/SHARED_LIBRARIES/libc_intermediates/bionic/malloc_common.o /home/fsadino/android/LineageOS_14.1/out/target/product/bacon/obj/SHARED_LIBRARIES/libc_intermediates/bionic/libc_init_dynamic.o /home/fsadino/android/LineageOS_14.1/out/target/product/bacon/obj/SHARED_LIBRARIES/libc_intermediates/bionic/NetdClient.o /home/fsadino/android/LineageOS_14.1/out/target/product/bacon/obj/SHARED_LIBRARIES/libc_intermediates/arch-common/bionic/crtbegin_so.o /home/fsadino/android/LineageOS_14.1/out/target/product/bacon/obj/SHARED_LIBRARIES/libc_intermediates/arch-arm/bionic/exidx_dynamic.o /home/fsadino/android/LineageOS_14.1/out/target/product/bacon/obj/SHARED_LIBRARIES/libc_intermediates/arch-arm/bionic/atexit_legacy.o -Wl,--whole-archive /home/fsadino/android/LineageOS_14.1/out/target/product/bacon/obj/STATIC_LIBRARIES/libc_common_intermediates/libc_common.a /home/fsadino/android/LineageOS_14.1/out/target/product/bacon/obj/STATIC_LIBRARIES/libjemalloc_intermediates/libjemalloc.a -Wl,--no-whole-archive /home/fsadino/android/LineageOS_14.1/out/target/product/bacon/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/libcompiler_rt-extras.a prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/../lib/gcc/arm-linux-androideabi/4.9.4/libatomic.a prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/../lib/gcc/arm-linux-androideabi/4.9.4/libgcc.a -ldl -o /home/fsadino/android/LineageOS_14.1/out/target/product/bacon/obj/SHARED_LIBRARIES/libc_intermediates/LINKED/libc.so -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--build-id=md5 -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,--icf=safe -Wl,--hash-style=gnu -Wl,--no-undefined-version -Wl,--no-fix-cortex-a8 -target arm-linux-androideabi -Bprebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/arm-linux-androideabi/bin -Wl,--hash-style=both -Wl,--version-script,bionic/libc/libc.arm.map -Wl,--no-undefined" clang++: error: unable to execute command: Segmentation fault (core dumped) clang++: error: linker command failed due to signal (use -v to see invocation) [ 14% 5105/34476] Compiling SDK Stubs:...tubs_current_intermediates/classes.jar Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. ninja: build stopped: subcommand failed. build/core/ninja.mk:151: recipe for target 'ninja_wrapper' failed make: *** [ninja_wrapper] Error 1 make: Leaving directory '/home/fsadino/android/LineageOS_14.1' #### make failed to build some targets (12:05 (mm:ss)) ####

  • Up0
  • Down0
dm47021
Join Date: 21 Nov 12
Posts: 2
Posted: Sun, 2017-01-15 22:45

Segmentation fault (core dumped) clang++: error: linker command failed due to signal

 
This is usually an internal compiler error, 
did you extract the files under build to the proper dirs?
  • Up0
  • Down0
pstrong
Join Date: 12 May 16
Posts: 27
Posted: Mon, 2017-01-16 13:51

It doesn't look like you're using the Snapdragon LLVM toolchain.

Please send the version number from running the following command (from your ouput log):

prebuilts/misc/linux-x86/ccache/ccache prebuilts/clang/host/linux-x86/clang-2690385/bin/clang++ -v

 

  • Up0
  • Down0
krassermensch
Join Date: 12 Aug 16
Posts: 2
Posted: Fri, 2017-03-10 12:02

Hi,

I tried to set it up as you explained but every time I try to compile I face this error:

 

[  8% 4239/51834] target SharedLib: libdl (/home/nico/beanstalk/out/target/product/pme/obj/SHARED_LIBRARIES/libdl_intermediates/LINKED/libdl.so)
FAILED: /bin/bash -c "/usr/bin/ccache prebuilts/clang/linux-x86/host/sdclang-3.8/bin/clang++  -Wno-vectorizer-no-neon -nostdlib -Wl,-soname,libdl.so -Wl,--gc-sections -shared  -L/home/nico/beanstalk/out/target/product/pme/obj/lib /home/nico/beanstalk/out/target/product/pme/obj/lib/crtbegin_so.o             /home/nico/beanstalk/out/target/product/pme/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.o        -Wl,--whole-archive   -Wl,--no-whole-archive   /home/nico/beanstalk/out/target/product/pme/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/libcompiler_rt-extras.a   libatomic.a prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/../lib/gcc/aarch64-linux-android/7.0.0/libgcc.a   -o /home/nico/beanstalk/out/target/product/pme/obj/SHARED_LIBRARIES/libdl_intermediates/LINKED/libdl.so   -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--build-id=md5 -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,-maarch64linux -Wl,--hash-style=gnu -Wl,--fix-cortex-a53-843419 -fuse-ld=gold -Wl,--icf=safe -Wl,--no-undefined-version -Wl,--allow-shlib-undefined    -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin   -Wl,--exclude-libs=libgcc.a -Wl,--version-script=bionic/libdl/libdl.arm64.map /home/nico/beanstalk/out/target/product/pme/obj/lib/crtend_so.o"
clang-3.8: error: no such file or directory: 'libatomic.a'

 

Cache is wiped and I guess I didn't do any mistakes setting it up. Thus I don't know what I'm doin' wrong. I'd appreciate any recommendation. Thanks a lot!

Sincerely

Nico

  • Up0
  • Down0
pstrong
Join Date: 12 May 16
Posts: 27
Posted: Fri, 2017-03-10 15:18

Hi Nico,

The static library file 'libatomic.a' should be part of the Android tree in the prebuilts directory and the path should be expanded similar to what is done for libgcc.a in your command line --> prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/../lib/gcc/aarch64-linux-android/7.0.0/libgcc.a.

Please run your failed command line and add the '-v' flag and send us the output.  Run the command from the build root. like this:

cd /home/nico/beanstalk

/bin/bash -c "/usr/bin/ccache prebuilts/clang/linux-x86/host/sdclang-3.8/bin/clang++ -Wno-vectorizer-no-neon -nostdlib -Wl,-soname,libdl.so -Wl,--gc-sections -shared -L/home/nico/beanstalk/out/target/product/pme/obj/lib /home/nico/beanstalk/out/target/product/pme/obj/lib/crtbegin_so.o /home/nico/beanstalk/out/target/product/pme/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.o -Wl,--whole-archive -Wl,--no-whole-archive /home/nico/beanstalk/out/target/product/pme/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/libcompiler_rt-extras.a libatomic.a prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/../lib/gcc/aarch64-linux-android/7.0.0/libgcc.a -o /home/nico/beanstalk/out/target/product/pme/obj/SHARED_LIBRARIES/libdl_intermediates/LINKED/libdl.so -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--build-id=md5 -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,-maarch64linux -Wl,--hash-style=gnu -Wl,--fix-cortex-a53-843419 -fuse-ld=gold -Wl,--icf=safe -Wl,--no-undefined-version -Wl,--allow-shlib-undefined -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin -Wl,--exclude-libs=libgcc.a -Wl,--version-script=bionic/libdl/libdl.arm64.map /home/nico/beanstalk/out/target/product/pme/obj/lib/crtend_so.o -v"

Thanks, Paul

  • Up0
  • Down0
krassermensch
Join Date: 12 Aug 16
Posts: 2
Posted: Fri, 2017-03-10 16:56

Thanks a lot for the reply. That's my output:

Quote:
Target: aarch64--linux-android Thread model: posix Repository:  Snapdragon LLVM ARM Compiler 3.8.8 for Android NDK (based on LLVM 3.8.0) InstalledDir: /home/nico/beanstalk/prebuilts/clang/linux-x86/host/sdclang-3.8/bin clang-3.8: error: no such file or directory: 'libatomic.a' Options for link job construction: --driver-mode=g++ -Wno-vectorizer-no-neon -nostdlib -Wl,-soname,libdl.so -Wl,--gc-sections -shared -L/home/nico/beanstalk/out/target/product/pme/obj/lib /home/nico/beanstalk/out/target/product/pme/obj/lib/crtbegin_so.o /home/nico/beanstalk/out/target/product/pme/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.o -Wl,--whole-archive -Wl,--no-whole-archive /home/nico/beanstalk/out/target/product/pme/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/libcompiler_rt-extras.a libatomic.a prebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/bin/../lib/gcc/aarch64-linux-android/7.0.0/libgcc.a -o /home/nico/beanstalk/out/target/product/pme/obj/SHARED_LIBRARIES/libdl_intermediates/LINKED/libdl.so -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now -Wl,--build-id=md5 -Wl,--warn-shared-textrel -Wl,--fatal-warnings -Wl,-maarch64linux -Wl,--hash-style=gnu -Wl,--fix-cortex-a53-843419 -fuse-ld=gold -Wl,--icf=safe -Wl,--no-undefined-version -Wl,--allow-shlib-undefined -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin -Wl,--exclude-libs=libgcc.a -Wl,--version-script=bionic/libdl/libdl.arm64.map /home/nico/beanstalk/out/target/product/pme/obj/lib/crtend_so.o -v

 

I hope it'll help :)

  • Up0
  • Down0
pstrong
Join Date: 12 May 16
Posts: 27
Posted: Wed, 2017-03-15 18:30

I checked a couple of recent builds and the full path to libatomic.a is always present in the link line.  

And, I see that the full path is there in the earlier post on this thread on Sat, 2017-01-14 12:48.

Here's the path it shows:

prebuilts/gcc/linux-x86/arm/arm-linux-androideabi-4.9/bin/../lib/gcc/arm-linux-androideabi/4.9.4/libatomic.a 

  • So, it may be a setup/config issue.  Can you please share your build recipe, including build command, so we can try to repeat your issue.
  • Up0
  • Down0
jhayzt
Join Date: 10 Aug 17
Posts: 2
Posted: Wed, 2017-08-16 20:47

Hi there! So I'm trying to build LOS with sdClang. I've successfully built a rom with sdClang enabled, but it seems in LOS, it keeps failing. The error starts here:

 

FAILED: /bin/bash -c "(PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/linux-x86/host/sdclang-3.8/bin/clang  -Wno-vectorizer-no-neon -I device/xiaomi/msm8996-common/include -I bionic/libdl -I /home/jhayzt/DarkOS/out/target/product/gemini/obj/SHARED_LIBRARIES/libdl_intermediates -I /home/jhayzt/DarkOS/out/target/product/gemini/gen/SHARED_LIBRARIES/libdl_intermediates -I libnativehelper/include/nativehelper \$(cat /home/jhayzt/DarkOS/out/target/product/gemini/obj/SHARED_LIBRARIES/libdl_intermediates/import_includes) -isystem system/core/include -isystem system/media/audio/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-caf/include -isystem /home/jhayzt/DarkOS/out/target/product/gemini/obj/include -isystem bionic/libc/arch-arm64/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/common -isystem bionic/libc/kernel/uapi/asm-arm64 -isystem bionic/libm/include -isystem bionic/libm/include/arm64 -c    -fno-exceptions -Wno-multichar -fno-strict-aliasing -fstack-protector-strong -ffunction-sections -fdata-sections -funwind-tables -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -Werror=pointer-to-int-cast -Werror=int-to-pointer-cast -Werror=implicit-function-declaration -DQCOM_HARDWARE -DQCOM_BSP -DQTI_BSP -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -DNDEBUG -O2 -g -Wstrict-aliasing=2 -DNDEBUG -UDEBUG  -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -nostdlibinc     -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin    -std=gnu99      -Wall -Wextra -Wunused -Werror -fPIC   -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast  -Werror=address-of-temporary -Werror=null-dereference -Werror=return-type  -MD -MF /home/jhayzt/DarkOS/out/target/product/gemini/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.d -o /home/jhayzt/DarkOS/out/target/product/gemini/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.o bionic/libdl/libdl.c ) && (cp /home/jhayzt/DarkOS/out/target/product/gemini/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.d /home/jhayzt/DarkOS/out/target/product/gemini/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.P; sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\\\\$//' -e '/^\$/ d' -e 's/\$/ :/' < /home/jhayzt/DarkOS/out/target/product/gemini/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.d >> /home/jhayzt/DarkOS/out/target/product/gemini/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.P; rm -f /home/jhayzt/DarkOS/out/target/product/gemini/obj/SHARED_LIBRARIES/libdl_intermediates/libdl.d )"
ccache: error: execv of prebuilts/clang/linux-x86/host/sdclang-3.8/bin/clang failed: Exec format error
 
[  6% 3191/47211] target  C: libcompiler_rt-extras <= external/compiler-rt/lib/builtins/mulodi4.c
FAILED: /bin/bash -c "(PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/linux-x86/host/sdclang-3.8/bin/clang  -Wno-vectorizer-no-neon -I device/xiaomi/msm8996-common/include -I external/compiler-rt -I /home/jhayzt/DarkOS/out/target/product/gemini/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates -I /home/jhayzt/DarkOS/out/target/product/gemini/gen/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates -I libnativehelper/include/nativehelper \$(cat /home/jhayzt/DarkOS/out/target/product/gemini/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/import_includes) -isystem system/core/include -isystem system/media/audio/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-caf/include -isystem /home/jhayzt/DarkOS/out/target/product/gemini/obj/include -isystem bionic/libc/arch-arm64/include -isystem bionic/libc/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/common -isystem bionic/libc/kernel/uapi/asm-arm64 -isystem bionic/libm/include -isystem bionic/libm/include/arm64 -c    -fno-exceptions -Wno-multichar -fno-strict-aliasing -fstack-protector-strong -ffunction-sections -fdata-sections -funwind-tables -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -Werror=pointer-to-int-cast -Werror=int-to-pointer-cast -Werror=implicit-function-declaration -DQCOM_HARDWARE -DQCOM_BSP -DQTI_BSP -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -DNDEBUG -O2 -g -Wstrict-aliasing=2 -DNDEBUG -UDEBUG  -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -nostdlibinc     -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin    -std=gnu99      -Wno-unused-parameter -Werror -fPIC   -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast  -Werror=address-of-temporary -Werror=null-dereference -Werror=return-type  -MD -MF /home/jhayzt/DarkOS/out/target/product/gemini/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/lib/builtins/mulodi4.d -o /home/jhayzt/DarkOS/out/target/product/gemini/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/lib/builtins/mulodi4.o external/compiler-rt/lib/builtins/mulodi4.c ) && (cp /home/jhayzt/DarkOS/out/target/product/gemini/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/lib/builtins/mulodi4.d /home/jhayzt/DarkOS/out/target/product/gemini/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/lib/builtins/mulodi4.P; sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\\\\$//' -e '/^\$/ d' -e 's/\$/ :/' < /home/jhayzt/DarkOS/out/target/product/gemini/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/lib/builtins/mulodi4.d >> /home/jhayzt/DarkOS/out/target/product/gemini/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/lib/builtins/mulodi4.P; rm -f /home/jhayzt/DarkOS/out/target/product/gemini/obj/STATIC_LIBRARIES/libcompiler_rt-extras_intermediates/lib/builtins/mulodi4.d )"
ccache: error: execv of prebuilts/clang/linux-x86/host/sdclang-3.8/bin/clang failed: Exec format error
I hope someone can help me. :D
  • Up0
  • Down0
pstrong
Join Date: 12 May 16
Posts: 27
Posted: Thu, 2017-08-17 11:43

Hi jhayzt,

The "Exec format error" typically means that the host OS doesn't recognize or is incompatible with the binary format of the executable, which is "prebuilts/clang/linux-x86/host/sdclang-3.8/bin/clang".

You should be running on a Ubuntu OS with a version of 10.04 or later.

Do the following from your host build machine and post here:

  1. uname -a
  2. cd to the top of the Android build tree
  3. file prebuilts/clang/linux-x86/host/sdclang-3.8/bin/clang

Paul

  • Up0
  • Down0
jhayzt
Join Date: 10 Aug 17
Posts: 2
Posted: Thu, 2017-08-17 17:39

Hey there pstrong!

First of all, thanks for replying. Here are the details you need:

root@romcompiler:~/DarkOS# uname -a
Linux romcompiler 4.10.0-32-generic #36~16.04.1-Ubuntu SMP Wed Aug 9 09:19:02 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
 
root@romcompiler:~/DarkOS# file prebuilts/clang/linux-x86/host/sdclang-3.8/bin/clang
prebuilts/clang/linux-x86/host/sdclang-3.8/bin/clang: empty
 
root@romcompiler:~/DarkOS# 
hmm, that's weird.

  • Up0
  • Down0
jk.menon
Join Date: 2 Nov 17
Posts: 4
Posted: Sun, 2017-11-12 22:07

I am building android 8.0 for msm8996 this is the log when full build is done

 

PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.0.0
TARGET_PRODUCT=msm8996
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=kryo
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a9
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.10.0-37-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPR1.170623.026
OUT_DIR=out
============================================
ninja: no work to do.
[1/2] glob device/*/*/Android.bp
[1/8] test android/soong/cc/config
FAILED: out/soong/.bootstrap/soong-cc-config/test/test.passed 
out/soong/.bootstrap/bin/gotestrunner -p ./build/soong/cc/config -f out/soong/.bootstrap/soong-cc-config/test/test.passed -- out/soong/.bootstrap/soong-cc-config/test/test -test.short
panic: read /home/dolby/JK/android8msm: is a directory
 
goroutine 1 [running]:
android/soong/cc/config.setSdclangVars()
/home/dolby/JK/android8msm/build/soong/cc/config/global.go:197 +0x20d4
android/soong/cc/config.init.2()
/home/dolby/JK/android8msm/build/soong/cc/config/global.go:169 +0xcc9
android/soong/cc/config.init()
/home/dolby/JK/android8msm/build/soong/cc/config/tidy_test.go:42 +0x3969
main.init()
/home/dolby/JK/android8msm/out/soong/.bootstrap/soong-cc-config/test/test.go:34 +0x4e
[3/8] link out/soong/.bootstrap/soong-cc/test/test
ninja: build stopped: subcommand failed.
11:27:45 soong bootstrap failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
 
 
my Boardconfig.mk file is set as
 
 
#sdclang configuration
 
TARGET_USE_SDCLANG := true
SDCLANG_PATH := prebuilts/clang/host/linux-x86/clang-3859424/bin
SDCLANG_LTO_DEFS := device/qcom/common/sdllvm-lto-defs.mk
 
 
 

 

  • Up0
  • Down0
pstrong
Join Date: 12 May 16
Posts: 27
Posted: Mon, 2017-11-13 14:26

Hi jk.menon,

Please provide your build steps/recipe so we can debug your build issue...

Thanks, Paul

  • Up0
  • Down0
jk.menon
Join Date: 2 Nov 17
Posts: 4
Posted: Mon, 2017-11-13 20:38

Hi paul,

Thanks for the response,

First of all my host is ubuntu 16.04 xenial and i was able to  build 7.1 for the same chip from this host  ,so i guess there is no problem with the environment setup .

openjdk version is  "1.8.0_151"

These are the steps that i followed:

Download the repo script:
3. Set the repo script’s attributes to executable.
$ chmod a+x ~/bin/repo
4. Make sure that the installed directory location for repo is included in your PATH.

$ export PATH=~/bin:$PATH

i have downloaded the source code from here   https://wiki.codeaurora.org/xwiki/bin/QAEP/release 

repo init -u git://codeaurora.org/platform/manifest.git -b release -m LA.UM.6.5.r1-04000-8x96.0.xml --repo url=git://codeaurora.org/tools/repo.git

repo sync 

source build/envsetup.h

lunch msm8996-userdebug

make -j4

 

i am not sure if  its something related to setting  up the path to sdclang compiler ,

it would be great if you could  figure out the issue.

Thanks,

Jayakrishnan

 

 

 

  • Up0
  • Down0
s1083531
Join Date: 26 Nov 17
Posts: 1
Posted: Sun, 2017-11-26 13:22

I have THE SAME EXACT PROBLEM as you. And I've been building for 7.1 too (just Snapdragon Camera for my own purposes) without problems. It turns out that this time following instructions is not enough.

  • Up0
  • Down0
jk.menon
Join Date: 2 Nov 17
Posts: 4
Posted: Sun, 2017-11-26 20:43

Hi ,

 

For me the issue of sdclangvars () got disappeared when i commented out the set sdclang vars() in global.go file , but i am getting another issue : ninja: no work to do.

[18/19] soong_build docs out/soong/.bootstrap/docs/soong_build.html
FAILED: out/soong/.bootstrap/docs/soong_build.html 
out/soong/.bootstrap/bin/soong_build  -t -b out/soong --docs out/soong/.bootstrap/docs/soong_build.html ./Android.bp
error: system/bt/btif/Android.bp:31:1: "libbtif" depends on undefined module "[email protected]"
error: system/bt/main/Android.bp:3:1: "bluetooth.default" depends on undefined module "[email protected]"
[19/19] out/soong/.bootstrap/bin/soong_build out/soong/build.ninja
FAILED: out/soong/build.ninja 
out/soong/.bootstrap/bin/soong_build -t -b out/soong -d out/soong/build.ninja.d -o out/soong/build.ninja Android.bp
error: system/bt/btif/Android.bp:31:1: "libbtif" depends on undefined module "[email protected]"
error: system/bt/main/Android.bp:3:1: "bluetooth.default" depends on undefined module "[email protected]"
ninja: build stopped: subcommand failed.
14:08:58 soong bootstrap failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
 
 
Looks like this is probably due to the (vendor/qcom/proprietary) file missing from the android subtree for oreo build. I am not sure about the exact issue here , is it because of some compiler path that we need to set or because  of the propreitary file missing .
 
Regards,
Jayakrishnan
  • Up0
  • Down0
jake.weinstein
Join Date: 11 Feb 13
Posts: 44
Posted: Thu, 2017-11-30 11:55

SDClang now expects a json such as this one in 8.0 https://github.com/OnePlusOSS/android_vendor_qcom_cobalt/blob/oneplus/QC...

 

You're correct that the BT file doesn't exist in OSS.  Try this commit: https://github.com/AOSPA/android_system_bt/commit/c78c34cdbd6d7163ad9345...

 

@pstrong, I see that 4.0 breaks certain functionality such as camera and I suspect that is why 3.9 is used by vendors such as OnePlus.  Is 4.0 expected to be fixed for full builds soon?

  • Up0
  • Down0
jk.menon
Join Date: 2 Nov 17
Posts: 4
Posted: Fri, 2017-12-01 03:43
Hi
 
I am building oreo for the msm8996 , this is the error log when i give a full build .
 
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.0.0
TARGET_PRODUCT=msm8996
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_PLATFORM_VERSION=OPR1
TARGET_BUILD_APPS=
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=kryo
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a9
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.10.0-40-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPR1.170623.026
OUT_DIR=out
AUX_OS_VARIANT_LIST=
============================================
dolby@dolby-server:~/JK/android04000$ make 
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.0.0
TARGET_PRODUCT=msm8996
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm64
TARGET_ARCH_VARIANT=armv8-a
TARGET_CPU_VARIANT=kryo
TARGET_2ND_ARCH=arm
TARGET_2ND_ARCH_VARIANT=armv7-a-neon
TARGET_2ND_CPU_VARIANT=cortex-a9
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.10.0-40-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPR1.170623.026
OUT_DIR=out
============================================
ninja: no work to do.
ninja: no work to do.
out/target/product/msm8996/clean_steps.mk was modified, regenerating...
[6/1002] including ./build/target/board/Android.mk ...
kernel/msm-3.18/AndroidKernel.mk:20: warning: Forcing kernel header generation only for 'arm64'
Using appended DTB
[9/1002] including ./cts/Android.mk ...
cts/apps/CtsVerifier/Android.mk:72: warning: FindEmulator: find: `cts/apps/CtsVerifier/src/com/android/cts/verifier/backup': No such file or directory
build/core/java_common.mk:88: warning: FindEmulator: cd: cts/hostsidetests/appsecurity/test-apps/WriteExternalStorageApp/cts/hostsidetests/appsecurity/test-apps/WriteExternalStorageApp/res: No such file or directory
build/core/java_common.mk:88: warning: FindEmulator: cd: cts/hostsidetests/backup/assets: No such file or directory
cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider/Android.mk:23: warning: FindEmulator: find: `cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider/src': No such file or directory
cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider1/Android.mk:23: warning: FindEmulator: find: `cts/hostsidetests/os/test-apps/StaticSharedNativeLibProvider1/src': No such file or directory
cts/tests/tests/contactsproviderwipe/Android.mk:33: warning: FindEmulator: find: `cts/tests/tests/contactsproviderwipe/common/src': No such file or directory
cts/tests/tests/telecom3/Android.mk:37: warning: FindEmulator: find: `cts/tests/tests/telecom/src/android/telecom/cts/MockDialerActivity.java': No such file or directory
[326/1002] including ./external/toybox/Android.mk ...
awk: line 1: syntax error at or near ,
[358/1002] including ./frameworks/av/media/libaaudio/Android.mk ...
frameworks/av/media/libaaudio/examples/input_monitor/static/Android.mk: warning: input_monitor: unusual tags examples 
frameworks/av/media/libaaudio/examples/write_sine/static/Android.mk: warning: write_sine: unusual tags examples 
[393/1002] including ./frameworks/base/Android.mk ...
./frameworks/base/Android.mk:869: warning: FindEmulator: find: `frameworks/opt/telephony/src/java/android/provider': No such file or directory
./frameworks/base/Android.mk:878: warning: FindEmulator: find: `frameworks/opt/telephony/src/java/android/provider': No such file or directory
./frameworks/base/Android.mk:883: warning: FindEmulator: find: `frameworks/opt/telephony/src/java/android/provider': No such file or directory
./frameworks/base/Android.mk:888: warning: FindEmulator: find: `frameworks/opt/telephony/src/java/android/provider': No such file or directory
[515/1002] including ./hardware/libhardware/Android.mk ...
hardware/libhardware/modules/sensors/Android.mk:46: warning: Treble enabled device have built-in sensor multihal support. USE_SENSOR_MULTI_HAL should not be set.
[998/1002] including ./vendor/qcom/opensource/wlan/qcacld-2.0/Android.mk ...
"WLAN: supported kernel detected, building qcacld-2.0"
kernel/msm-3.18/AndroidKernel.mk:20: warning: Forcing kernel header generation only for 'arm64'
ln: failed to create symbolic link 'out/target/product/msm8996/system/etc/firmware/wlan/qca_cld/wlan_mac.bin': No such file or directory
[1000/1002] including ./vendor/qcom/proprietary/android-perf/Android.mk ...
cat: device/qcom/msm8996/public.libraries.vendor.txt: No such file or directory
[1002/1002] including ./vendor/qcom/proprietary/prebuilt_HY11/target/product/msm8996/Android.mk ...
ln: failed to create symbolic link 'libEGL_adreno.so': File exists
ln: failed to create symbolic link 'libEGL_adreno.so': File exists
build/core/Makefile:54: warning: Duplicate header copy: out/target/product/msm8996/obj/include/qcom/display/qd_utils.h
build/core/Makefile:54: warning: Defined in: hardware/qcom/display/libqdutils/../common.mk hardware/qcom/display/libqdutils/../common.mk
build/core/Makefile:54: warning: Duplicate header copy: out/target/product/msm8996/obj/include/cld80211-lib/cld80211_lib.h
build/core/Makefile:54: warning: Defined in: hardware/qcom/wlan/cld80211-lib/Android.mk hardware/qcom/wlan/cld80211-lib/Android.mk
No private recovery resources for TARGET_DEVICE msm8996
platform_testing/build/tasks/tests/instrumentation_metric_test_list.mk: warning: continuous_instrumentation_metric_tests: Unknown installed file for module perf-setup.sh 
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module RecyclerViewTests 
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module SettingsFunctionalTests 
platform_testing/build/tasks/tests/instrumentation_test_list.mk: warning: continuous_instrumentation_tests: Unknown installed file for module LauncherFunctionalTests 
platform_testing/build/tasks/tests/native_metric_test_list.mk: warning: continuous_native_metric_tests: Unknown installed file for module perf-setup.sh 
test/vts/tools/build/tasks/vts_package.mk:216: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory
test/vts/tools/build/tasks/vts_package.mk:216: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory
test/vts/tools/build/tasks/vts_package.mk:216: warning: FindEmulator: cd: vendor/google_vts/testcases: No such file or directory
bootable/bootloader/lk/AndroidBoot.mk:90: warning: overriding commands for target `out/target/product/msm8996/obj/ABOOT_OBJ'
bootable/bootloader/lk/AndroidBoot.mk:90: warning: ignoring old commands for target `out/target/product/msm8996/obj/ABOOT_OBJ'
bootable/bootloader/lk/AndroidBoot.mk:93: warning: overriding commands for target `ABOOT_CLEAN'
bootable/bootloader/lk/AndroidBoot.mk:93: warning: ignoring old commands for target `ABOOT_CLEAN'
bootable/bootloader/lk/AndroidBoot.mk:98: warning: overriding commands for target `out/target/product/msm8996/aboot.elf'
bootable/bootloader/lk/AndroidBoot.mk:98: warning: ignoring old commands for target `out/target/product/msm8996/aboot.elf'
bootable/bootloader/lk/AndroidBoot.mk:106: warning: overriding commands for target `appsbootldr_clean'
bootable/bootloader/lk/AndroidBoot.mk:106: warning: ignoring old commands for target `appsbootldr_clean'
bootable/bootloader/lk/AndroidBoot.mk:109: warning: overriding commands for target `out/target/product/msm8996/obj/NAND_BOOTLOADER_OBJ'
bootable/bootloader/lk/AndroidBoot.mk:109: warning: ignoring old commands for target `out/target/product/msm8996/obj/NAND_BOOTLOADER_OBJ'
bootable/bootloader/lk/AndroidBoot.mk:116: warning: overriding commands for target `emmc_appsbootldr_clean'
bootable/bootloader/lk/AndroidBoot.mk:116: warning: ignoring old commands for target `emmc_appsbootldr_clean'
bootable/bootloader/lk/AndroidBoot.mk:119: warning: overriding commands for target `out/target/product/msm8996/obj/EMMC_BOOTLOADER_OBJ'
bootable/bootloader/lk/AndroidBoot.mk:119: warning: ignoring old commands for target `out/target/product/msm8996/obj/EMMC_BOOTLOADER_OBJ'
bootable/bootloader/lk/AndroidBoot.mk:123: warning: overriding commands for target `out/target/product/msm8996/appsboot.mbn'
bootable/bootloader/lk/AndroidBoot.mk:123: warning: ignoring old commands for target `out/target/product/msm8996/appsboot.mbn'
bootable/bootloader/lk/AndroidBoot.mk:127: warning: overriding commands for target `out/target/product/msm8996/emmc_appsboot.mbn'
bootable/bootloader/lk/AndroidBoot.mk:127: warning: ignoring old commands for target `out/target/product/msm8996/emmc_appsboot.mbn'
bootable/bootloader/lk/AndroidBoot.mk:140: warning: overriding commands for target `nandwrite_clean'
bootable/bootloader/lk/AndroidBoot.mk:140: warning: ignoring old commands for target `nandwrite_clean'
bootable/bootloader/lk/AndroidBoot.mk:144: warning: overriding commands for target `out/target/product/msm8996/obj/nandwrite'
bootable/bootloader/lk/AndroidBoot.mk:144: warning: ignoring old commands for target `out/target/product/msm8996/obj/nandwrite'
bootable/bootloader/lk/AndroidBoot.mk:147: warning: overriding commands for target `out/target/product/msm8996/obj/nandwrite/build-msm8996'
bootable/bootloader/lk/AndroidBoot.mk:147: warning: ignoring old commands for target `out/target/product/msm8996/obj/nandwrite/build-msm8996'
bootable/bootloader/lk/AndroidBoot.mk:147: warning: overriding commands for target `_nandwrite/lk'
bootable/bootloader/lk/AndroidBoot.mk:147: warning: ignoring old commands for target `_nandwrite/lk'
build/core/base_rules.mk:466: warning: overriding commands for target `out/host/linux-x86/cts/android-cts/testcases/libcrash-jni.so'
build/core/base_rules.mk:466: warning: ignoring old commands for target `out/host/linux-x86/cts/android-cts/testcases/libcrash-jni.so'
build/core/base_rules.mk:466: warning: overriding commands for target `out/target/product/msm8996/testcases/libcrash-jni/libcrash-jni.so'
build/core/base_rules.mk:466: warning: ignoring old commands for target `out/target/product/msm8996/testcases/libcrash-jni/libcrash-jni.so'
build/core/binary.mk:1262: warning: overriding commands for target `out/host/linux-x86/obj/STATIC_LIBRARIES/libavb_host_intermediates/libavb/avb_version.o'
build/core/binary.mk:1262: warning: ignoring old commands for target `out/host/linux-x86/obj/STATIC_LIBRARIES/libavb_host_intermediates/libavb/avb_version.o'
build/core/binary.mk:1262: warning: overriding commands for target `out/host/linux-x86/obj32/STATIC_LIBRARIES/libavb_host_intermediates/libavb/avb_version.o'
build/core/binary.mk:1262: warning: ignoring old commands for target `out/host/linux-x86/obj32/STATIC_LIBRARIES/libavb_host_intermediates/libavb/avb_version.o'
build/core/base_rules.mk:466: warning: overriding commands for target `out/target/product/msm8996/testcases/hello_world_test/hello_world_test'
build/core/base_rules.mk:466: warning: ignoring old commands for target `out/target/product/msm8996/testcases/hello_world_test/hello_world_test'
./test/vts/utils/python/archive/Android.mk:28: warning: overriding commands for target `default'
./test/vts/runners/host/tcp_server/Android.mk:19: warning: ignoring old commands for target `default'
./test/vts/utils/python/coverage/Android.mk:28: warning: overriding commands for target `default'
./test/vts/utils/python/archive/Android.mk:28: warning: ignoring old commands for target `default'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/msm8996/system/framework/cneapiclient.jar'
build/core/base_rules.mk:374: warning: ignoring old commands for target `out/target/product/msm8996/system/framework/cneapiclient.jar'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/msm8996/system/framework/com.qti.dpmframework.jar'
build/core/base_rules.mk:374: warning: ignoring old commands for target `out/target/product/msm8996/system/framework/com.qti.dpmframework.jar'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/msm8996/system/framework/com.qti.snapdragon.sdk.display.jar'
build/core/base_rules.mk:374: warning: ignoring old commands for target `out/target/product/msm8996/system/framework/com.qti.snapdragon.sdk.display.jar'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/msm8996/system/framework/dpmapi.jar'
build/core/base_rules.mk:374: warning: ignoring old commands for target `out/target/product/msm8996/system/framework/dpmapi.jar'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/msm8996/system/framework/imscmlibrary.jar'
build/core/base_rules.mk:374: warning: ignoring old commands for target `out/target/product/msm8996/system/framework/imscmlibrary.jar'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/msm8996/system/framework/izat.xt.srv.jar'
build/core/base_rules.mk:374: warning: ignoring old commands for target `out/target/product/msm8996/system/framework/izat.xt.srv.jar'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/msm8996/system/framework/oem-services.jar'
build/core/base_rules.mk:374: warning: ignoring old commands for target `out/target/product/msm8996/system/framework/oem-services.jar'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/msm8996/system/framework/rcsimssettings.jar'
build/core/base_rules.mk:374: warning: ignoring old commands for target `out/target/product/msm8996/system/framework/rcsimssettings.jar'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/msm8996/system/framework/rcsservice.jar'
build/core/base_rules.mk:374: warning: ignoring old commands for target `out/target/product/msm8996/system/framework/rcsservice.jar'
build/core/Makefile:34: warning: overriding commands for target `out/target/product/msm8996/system/framework/tcmclient.jar'
build/core/base_rules.mk:374: warning: ignoring old commands for target `out/target/product/msm8996/system/framework/tcmclient.jar'
vendor/qcom/build/tasks/generate_extra_images.mk:35: warning: overriding commands for target `out/target/product/msm8996/root/firmware'
device/qcom/common/generate_extra_images.mk:35: warning: ignoring old commands for target `out/target/product/msm8996/root/firmware'
vendor/qcom/build/tasks/generate_extra_images.mk:40: warning: overriding commands for target `out/target/product/msm8996/root/bt_firmware'
device/qcom/common/generate_extra_images.mk:40: warning: ignoring old commands for target `out/target/product/msm8996/root/bt_firmware'
vendor/qcom/build/tasks/generate_extra_images.mk:45: warning: overriding commands for target `out/target/product/msm8996/root/dsp'
device/qcom/common/generate_extra_images.mk:45: warning: ignoring old commands for target `out/target/product/msm8996/root/dsp'
vendor/qcom/build/tasks/generate_extra_images.mk:50: warning: overriding commands for target `out/target/product/msm8996/root/persist'
device/qcom/common/generate_extra_images.mk:50: warning: ignoring old commands for target `out/target/product/msm8996/root/persist'
vendor/qcom/build/tasks/generate_extra_images.mk:90: warning: overriding commands for target `out/target/product/msm8996/boot.img.secure'
device/qcom/common/generate_extra_images.mk:90: warning: ignoring old commands for target `out/target/product/msm8996/boot.img.secure'
vendor/qcom/build/tasks/generate_extra_images.mk:93: warning: overriding commands for target `out/target/product/msm8996/recovery.img.secure'
device/qcom/common/generate_extra_images.mk:93: warning: ignoring old commands for target `out/target/product/msm8996/recovery.img.secure'
vendor/qcom/build/tasks/generate_extra_images.mk:121: warning: overriding commands for target `out/target/product/msm8996/persist.img'
device/qcom/common/generate_extra_images.mk:121: warning: ignoring old commands for target `out/target/product/msm8996/persist.img'
bootable/bootloader/lk/AndroidBoot.mk:90: warning: overriding commands for target `out/target/product/msm8996/obj/ABOOT_OBJ'
bootable/bootloader/lk/AndroidBoot.mk:90: warning: ignoring old commands for target `out/target/product/msm8996/obj/ABOOT_OBJ'
bootable/bootloader/lk/AndroidBoot.mk:93: warning: overriding commands for target `ABOOT_CLEAN'
bootable/bootloader/lk/AndroidBoot.mk:93: warning: ignoring old commands for target `ABOOT_CLEAN'
bootable/bootloader/lk/AndroidBoot.mk:98: warning: overriding commands for target `out/target/product/msm8996/aboot.elf'
bootable/bootloader/lk/AndroidBoot.mk:98: warning: ignoring old commands for target `out/target/product/msm8996/aboot.elf'
bootable/bootloader/lk/AndroidBoot.mk:106: warning: overriding commands for target `appsbootldr_clean'
bootable/bootloader/lk/AndroidBoot.mk:106: warning: ignoring old commands for target `appsbootldr_clean'
bootable/bootloader/lk/AndroidBoot.mk:109: warning: overriding commands for target `out/target/product/msm8996/obj/NAND_BOOTLOADER_OBJ'
bootable/bootloader/lk/AndroidBoot.mk:109: warning: ignoring old commands for target `out/target/product/msm8996/obj/NAND_BOOTLOADER_OBJ'
bootable/bootloader/lk/AndroidBoot.mk:116: warning: overriding commands for target `emmc_appsbootldr_clean'
bootable/bootloader/lk/AndroidBoot.mk:116: warning: ignoring old commands for target `emmc_appsbootldr_clean'
bootable/bootloader/lk/AndroidBoot.mk:119: warning: overriding commands for target `out/target/product/msm8996/obj/EMMC_BOOTLOADER_OBJ'
bootable/bootloader/lk/AndroidBoot.mk:119: warning: ignoring old commands for target `out/target/product/msm8996/obj/EMMC_BOOTLOADER_OBJ'
bootable/bootloader/lk/AndroidBoot.mk:123: warning: overriding commands for target `out/target/product/msm8996/appsboot.mbn'
bootable/bootloader/lk/AndroidBoot.mk:123: warning: ignoring old commands for target `out/target/product/msm8996/appsboot.mbn'
bootable/bootloader/lk/AndroidBoot.mk:127: warning: overriding commands for target `out/target/product/msm8996/emmc_appsboot.mbn'
bootable/bootloader/lk/AndroidBoot.mk:127: warning: ignoring old commands for target `out/target/product/msm8996/emmc_appsboot.mbn'
bootable/bootloader/lk/AndroidBoot.mk:140: warning: overriding commands for target `nandwrite_clean'
bootable/bootloader/lk/AndroidBoot.mk:140: warning: ignoring old commands for target `nandwrite_clean'
bootable/bootloader/lk/AndroidBoot.mk:144: warning: overriding commands for target `out/target/product/msm8996/obj/nandwrite'
bootable/bootloader/lk/AndroidBoot.mk:144: warning: ignoring old commands for target `out/target/product/msm8996/obj/nandwrite'
bootable/bootloader/lk/AndroidBoot.mk:147: warning: overriding commands for target `out/target/product/msm8996/obj/nandwrite/build-msm8996'
bootable/bootloader/lk/AndroidBoot.mk:147: warning: ignoring old commands for target `out/target/product/msm8996/obj/nandwrite/build-msm8996'
bootable/bootloader/lk/AndroidBoot.mk:147: warning: overriding commands for target `_nandwrite/lk'
bootable/bootloader/lk/AndroidBoot.mk:147: warning: ignoring old commands for target `_nandwrite/lk'
vendor/qcom/build/tasks/generate_extra_images.mk:503: warning: overriding commands for target `kernelclean'
device/qcom/common/generate_extra_images.mk:503: warning: ignoring old commands for target `kernelclean'
ninja: error: out/soong/build.ninja:493: empty path
 
16:57:30 ninja failed with: exit status 1
16:57:30 Missing ninja log: stat out/.ninja_log: no such file or directory
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
 
 
There is no out/soong/.intermediates generated and its showing empty path in the generated build.ninja file , what could be the possible reason for this ,is ther something to do with the compiler settings.
 
 
    out/soong/.intermediates/bionic/libc/crtend_android/android_arm64_armv8-a_kryo_core/obj/bionic/libc/arch-common/bionic/crtend.o
    crtBegin = out/soong/.intermediates/bionic/libc/crtbegin_dynamic/android_arm64_armv8-a_kryo_core/crtbegin_dynamic.o
    crtEnd = out/soong/.intermediates/bionic/libc/crtend_android/android_arm64_armv8-a_kryo_core/obj/bionic/libc/arch-common/bionic/crtend.o
    ldCmd =
 ldFlags = -target aarch64-linux-android -B${g.config.Arm64GccRoot}/aarch64-linux-android/bin -Wl,--no-undefined ${g.config.Arm64Ldflags}  -pie -nostdlib -Bdynamic -Wl,--gc-sections -Wl,-z,nocopyreloc  -Wl,-dynamic-linker,/system/bin/linker64
    libFlags = out/soong/.intermediates/external/googletest/googletest/libgtest_main/android_arm64_armv8-a_kryo_static_core/libgtest_main.a out/soong/.intermediates/external/googletest/googletest/libgtest/android_arm64_armv8-a_kryo_static_core/libgtest.a -Wl,--start-group out/soong/.intermediates/external/compiler-rt/libcompiler_rt-extras/android_arm64_armv8-a_kryo_static_core/libcompiler_rt-extras.a out/soong/.intermediates/build/soong/libatomic/android_arm64_armv8-a_kryo_static_core/libatomic.a out/soong/.intermediates/build/soong/libgcc/android_arm64_armv8-a_kryo_static_core/libgcc.a -Wl,--end-group out/soong/.intermediates/frameworks/native/libs/nativewindow/libnativewindow/android_arm64_armv8-a_kryo_shared_core/libnativewindow.so out/soong/.intermediates/hardware/interfaces/graphics/common/1.0/[email protected]/android_arm64_armv8-a_kryo_shared_core/[email protected] out/soong/.intermediates/external/libcxx/libc++/android_arm64_armv8-a_kryo_shared_core/libc++.so out/soong/.intermediates/bionic/libdl/libdl/android_arm64_armv8-a_kryo_shared_core/libdl.so out/soong/.intermediates/bionic/libc/libc/android_arm64_armv8-a_kryo_shared_core/libc.so out/soong/.intermediates/bionic/libm/libm/android_arm64_armv8-a_kryo_shared_core/libm.so
  
the error is shown at the ldflags line
 
  • Up0
  • Down0
fenil.paul
Join Date: 14 Dec 17
Posts: 2
Posted: Fri, 2017-12-15 03:24
Hi, I am trying to build Oreo 8.01 for msm8909w processor, when compiling the following error occured.
 
$ make -j32
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=8.1.0
TARGET_PRODUCT=msm8909go
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=cortex-a7
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.10.0-42-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=OPM1.171019.011
OUT_DIR=out
============================================
[44/44] bootstrap out/soong/.minibootstrap/build.ninja.in
[4/4] out/soong/.bootstrap/bin/minibp out/soong/.bootstrap/build.ninja
[865/866] glob vendor/qcom/opensource/interfaces/wifi/*/Android.bp
[39/54] test android/soong/cc/config
FAILED: out/soong/.bootstrap/soong-cc-config/test/test.passed 
out/soong/.bootstrap/bin/gotestrunner -p ./build/soong/cc/config -f out/soong/.bootstrap/soong-cc-config/test/test.passed -- out/soong/.bootstrap/soong-cc
config/test/test -test.short
panic: read /home/fenil/APQ8009W_LA.UM.6.7.r1-04400-8x09.0_N_v2.0.1: is a directory
goroutine 1 [running]:
android/soong/cc/config.setSdclangVars()
/home/fenil/APQ8009W_LA.UM.6.7.r1-04400-8x09.0_N_v2.0.1/build/soong/cc/config/global.go:206 +0x17bc
android/soong/cc/config.init.2()
/home/fenil/APQ8009W_LA.UM.6.7.r1-04400-8x09.0_N_v2.0.1/build/soong/cc/config/global.go:179 +0xcd6
android/soong/cc/config.init()
/home/fenil/APQ8009W_LA.UM.6.7.r1-04400-8x09.0_N_v2.0.1/build/soong/cc/config/tidy_test.go:42 +0x3cbb
main.init()
/home/fenil/APQ8009W_LA.UM.6.7.r1-04400-8x09.0_N_v2.0.1/out/soong/.bootstrap/soong-cc-config/test/test.go:64 +0x58
[41/54] compile out/soong/.bootstrap/soong-cc/test/android/soong/cc.a
ninja: build stopped: subcommand failed.
16:01:08 soong failed with: exit status 1
#### failed to build some targets (5 seconds) ####
 
I had downloaded the snapdragon-llvm-4.0.2-linux64.tar.gz an copied to prebuilts/clang/host/linux-x86/sdclang-4.0 and changed the device's BoardConfig.mk file. Still the error persists.How to solve this error? Any help will be greatly appreciated. :)
  • Up0
  • Down0
jake.weinstein
Join Date: 11 Feb 13
Posts: 44
Posted: Thu, 2017-12-21 20:20

If you are building Android O with vendor/qcom/proprietary (also known as the BSP), you do not need to follow the instructions I posted in the OP and you do not need to download the compiler from Qualcomm Developer Network.  There are compilers in vendor/qcom/proprietary/llvm-arm-toolchain-ship, which are likely newer than the latest versions available here.  When they are not, you can replace them and update vendor/qcom/proprietary/common/config/sdclang.json.

In sdclang.json, you can also check the default options for your platform.  Some targets enable sdclang by default, others do not, you can define specific flags or compiler paths for each SoC.

  • Up0
  • Down0
fenil.paul
Join Date: 14 Dec 17
Posts: 2
Posted: Tue, 2017-12-26 02:18
Thankyou  so much for your reply.
 
I defined the specific flags and compiler path (to compiler which I downloaded from Qcom site) for my SoC in my sdclang.json file. And set, SDCLANG_AE_CONFIG = 'path/to/sdclang.json'
SDCLANG_CONFIG = 'path/to/sdclang.json'
in my build/soong/cc/config/global.go file. By doing this the error is gone and a new error appears
 
[ 99% 1421/1422] glob vendor/qcom/opensource/bluetooth_ext/system_bt_ext/include
ninja: error: 'out/target/common/obj/JAVA_LIBRARIES/com.qualcomm.qti.camera_intermediates/javalib.jar', needed by 'out/target/product/msm8909go/dex_bootjars/system/framework/boot.prof', missing and no known rule to make it
13:06:31 ninja failed with: exit status 1
 
I found that no 'dex_bootjars' directory is created inside 'out/target/product/msm8909go' directory. 
Could you please help me to solve the above error.
  • Up0
  • Down0
jake.weinstein
Join Date: 11 Feb 13
Posts: 44
Posted: Tue, 2017-12-26 19:32
Hello Fenil, you should see the product package here https://source.codeaurora.org/quic/la/device/qcom/common/tree/base.mk?h=... in your environment (line 1066) and the QTIC_EXTENSION flag should be enabled here https://source.codeaurora.org/quic/la/platform/vendor/qcom/msm8909go/tre... (line 34). Can you confirm that? If it is all set up correctly, check vendor/qcom/proprietary. If you need more help with this, you can email me at [email protected]
  • Up0
  • Down0
x565178035
Join Date: 19 Jan 18
Posts: 3
Posted: Fri, 2018-01-19 05:10

Hi,

I tried to set it up as you explained but it seems that I did not compile the source code using the specified clang (sdclang).

When I was compiling, I saw that my process was still using clang-2690385 compilation, like this:

anemone@anemone-VirtualBox:/media/anemone/src/lineageOS$ ps -ef|grep clang
anemone  19822 12922  1 20:51 ?        00:00:00 /bin/sh -c /bin/bash -c "(PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/host/linux-x86/clang-2690385/bin/clang++ -I system/core/base/include -I system/core/base -I /media/anemone/src/lineageOS/out/host/linux-x86/obj/STATIC_LIBRARIES/libbase_intermediates -I /media/anemone/src/lineageOS/out/host/linux-x86/gen/STATIC_LIBRARIES/libbase_intermediates -I libnativehelper/include/nativehelper \$(cat /media/anemone/src/lineageOS/out/host/linux-x...
 
anemone@anemone-VirtualBox:/media/anemone/src/lineageOS$ prebuilts/clang/host/linux-x86/clang-2690385/bin/clang++ -v
Android clang version 3.8.256229  (based on LLVM 3.8.256229)
Target: x86_64-unknown-linux
Thread model: posix
 
My configuration is as follows:
anemone@anemone-VirtualBox:/media/anemone/src/lineageOS$ tail -n 10 device/lge/mako/BoardConfig.mk
 
BOARD_HAS_NO_SELECT_BUTTON := true
 
BOARD_HARDWARE_CLASS := device/lge/mako/cmhw/
ifneq ($(HOST_OS),darwin)
SDCLANG := true
SDCLANG_PATH := prebuilts/clang/linux-x86/host/sdclang-4.0/bin
SDCLANG_LTO_DEFS := device/qcom/common/sdllvm-lto-defs.mk
endif
 
anemone@anemone-VirtualBox:/media/anemone/src/lineageOS$ ls prebuilts/clang/linux-x86/host/sdclang-4.0
aarch64-linux-android    bin      NOTICE         Snapdragon_LLVM_ARM_40_Compiler_User_Guide.pdf
AndroidVersion.txt       lib      RELEASE_NOTES
armv7-linux-androideabi  libexec  share
 
anemone@anemone-VirtualBox:/media/anemone/src/lineageOS$ . ./build/envsetup.sh 
including device/generic/mini-emulator-arm64/vendorsetup.sh
including device/generic/mini-emulator-armv7-a-neon/vendorsetup.sh
including device/generic/mini-emulator-x86_64/vendorsetup.sh
including device/generic/mini-emulator-x86/vendorsetup.sh
including vendor/cm/vendorsetup.sh
including sdk/bash_completion/adb.bash
including vendor/cm/bash_completion/git.bash
including vendor/cm/bash_completion/repo.bash
anemone@anemone-VirtualBox:/media/anemone/src/lineageOS$ breakfast lineage_mako-userdebug
including vendor/cm/vendorsetup.sh
Looking for dependencies in device/lge/mako
 
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=7.1.2
LINEAGE_VERSION=14.1-20180119-UNOFFICIAL-mako
TARGET_PRODUCT=lineage_mako
TARGET_BUILD_VARIANT=userdebug
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=arm
TARGET_ARCH_VARIANT=armv7-a-neon
TARGET_CPU_VARIANT=krait
TARGET_2ND_ARCH=
TARGET_2ND_ARCH_VARIANT=
TARGET_2ND_CPU_VARIANT=
HOST_ARCH=x86_64
HOST_2ND_ARCH=x86
HOST_OS=linux
HOST_OS_EXTRA=Linux-4.13.0-26-generic-x86_64-with-Ubuntu-16.04-xenial
HOST_CROSS_OS=windows
HOST_CROSS_ARCH=x86
HOST_CROSS_2ND_ARCH=x86_64
HOST_BUILD_TYPE=release
BUILD_ID=NJH47F
OUT_DIR=/media/anemone/src/lineageOS/out
============================================
 
 
 
 
 

 

  • Up0
  • Down0
jake.weinstein
Join Date: 11 Feb 13
Posts: 44
Posted: Fri, 2018-01-19 09:59
Not entirely sure why but lineage changes the default sdclang handling. You'll need a change like this https://review.lineageos.org/#/c/184636/1/BoardConfigCommon.mk and to follow path naming here https://github.com/LineageOS/android_vendor_cm/blob/cm-14.1/build/envset...
  • Up0
  • Down0
x565178035
Join Date: 19 Jan 18
Posts: 3
Posted: Fri, 2018-01-19 18:37

This problem is solved. But there are may errors in compilation. Maybe LineageOS is not suitable for Snapdragon LLVM Compiler?

In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:61:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND && _LIBUNWIND_SUPPORT_DWARF_INDEX
    ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:61:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
external/libunwind_llvm/src/config.h:87:43: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
                                          defined(__ARM_DWARF_EH__)
                                          ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:61:40: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND && _LIBUNWIND_SUPPORT_DWARF_INDEX
                                       ^
external/libunwind_llvm/src/config.h:88:42: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_INDEX'
  #define _LIBUNWIND_SUPPORT_DWARF_INDEX _LIBUNWIND_SUPPORT_DWARF_UNWIND
                                         ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:61:40: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
external/libunwind_llvm/src/config.h:88:42: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_INDEX'
  #define _LIBUNWIND_SUPPORT_DWARF_INDEX _LIBUNWIND_SUPPORT_DWARF_UNWIND
                                         ^
external/libunwind_llvm/src/config.h:87:43: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
                                          defined(__ARM_DWARF_EH__)
                                          ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:78:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND || _LIBUNWIND_SUPPORT_DWARF_INDEX ||       \
    ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:78:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
external/libunwind_llvm/src/config.h:87:43: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
                                          defined(__ARM_DWARF_EH__)
                                          ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:78:40: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND || _LIBUNWIND_SUPPORT_DWARF_INDEX ||       \
                                       ^
external/libunwind_llvm/src/config.h:88:42: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_INDEX'
  #define _LIBUNWIND_SUPPORT_DWARF_INDEX _LIBUNWIND_SUPPORT_DWARF_UNWIND
                                         ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:78:40: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
external/libunwind_llvm/src/config.h:88:42: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_INDEX'
  #define _LIBUNWIND_SUPPORT_DWARF_INDEX _LIBUNWIND_SUPPORT_DWARF_UNWIND
                                         ^
external/libunwind_llvm/src/config.h:87:43: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
                                          defined(__ARM_DWARF_EH__)
                                          ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:83:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND
    ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:83:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
external/libunwind_llvm/src/config.h:87:43: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
                                          defined(__ARM_DWARF_EH__)
                                          ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:87:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_INDEX
    ^
external/libunwind_llvm/src/config.h:88:42: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_INDEX'
  #define _LIBUNWIND_SUPPORT_DWARF_INDEX _LIBUNWIND_SUPPORT_DWARF_UNWIND
                                         ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:87:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
external/libunwind_llvm/src/config.h:88:42: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_INDEX'
  #define _LIBUNWIND_SUPPORT_DWARF_INDEX _LIBUNWIND_SUPPORT_DWARF_UNWIND
                                         ^
external/libunwind_llvm/src/config.h:87:43: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
                                          defined(__ARM_DWARF_EH__)
                                          ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
external/libunwind_llvm/src/UnwindCursor.hpp:39:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND
    ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
external/libunwind_llvm/src/UnwindCursor.hpp:39:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
external/libunwind_llvm/src/config.h:87:43: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
                                          defined(__ARM_DWARF_EH__)
                                          ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
external/libunwind_llvm/src/UnwindCursor.hpp:459:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND
    ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
external/libunwind_llvm/src/UnwindCursor.hpp:459:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
external/libunwind_llvm/src/config.h:87:43: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
                                          defined(__ARM_DWARF_EH__)
                                          ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
external/libunwind_llvm/src/UnwindCursor.hpp:538:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND
    ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
external/libunwind_llvm/src/UnwindCursor.hpp:538:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
external/libunwind_llvm/src/config.h:87:43: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
                                          defined(__ARM_DWARF_EH__)
                                          ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
external/libunwind_llvm/src/UnwindCursor.hpp:832:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND
    ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
 
  • Up0
  • Down0
jake.weinstein
Join Date: 11 Feb 13
Posts: 44
Posted: Sat, 2018-01-20 22:32

Which version of the Snapdragon LLVM Compiler are you using?  For Nougat, the 4.0 release will not work, so you will need the 3.8 version.

  • Up0
  • Down0
x565178035
Join Date: 19 Jan 18
Posts: 3
Posted: Sun, 2018-01-21 03:37

Great! It works as you say. Thanks a lot!

  • Up0
  • Down0
nejrobbins
Join Date: 21 Jan 18
Posts: 6
Posted: Sun, 2018-01-21 09:33

I'm trying to use this toolchain with OxygenOS 8.0 OREO, but I don't have the same file structure. I have: prebuilts/clang/host/linux-x86/(No sdclang-3.8) folder, so I can't implement this toolchain.

 

Without this toolchain though, I'm getting close to the same error as someone else in this thread, so I'm hoping someone can help me solve it.

ninja: error: 'out/target/common/obj/JAVA_LIBRARIES/com.qualcomm.qti.camera_intermediates/javalib.jar', needed by 'out/target/product/msm8996/dex_bootjars/system/framework/arm64/boot.art', missing and no known rule to make it
12:30:26 ninja failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
 
What's the solution to this problem? Thanks.
 
 

 

 

  • Up0
  • Down0
jake.weinstein
Join Date: 11 Feb 13
Posts: 44
Posted: Sun, 2018-01-21 10:30

Just FYI, OnePlus does not release the code for Oxygen OS.  They do however, release source for a "AOSP" build based on Qualcomm's Code Aurora source, so builds you make will be missing the features of Oxygen OS.

Anyway, not sure which device you have, but OnePlus already inherits the sdclang json file, so it is already enabled as you can see here for OnePlus 5: https://github.com/OnePlusOSS/android_build/commit/666b51c4b116f58b176d0... or here for OnePlus 3: https://github.com/OnePlusOSS/android_build/commit/59ed0009ce3775fcfbe1d...

 

For the build error, it seems as though you don't have com.qualcomm.qti.Camera.jar, but they have it for 8996 here, which seems to be the target you're building: https://github.com/OnePlusOSS/android_vendor_oneplus_8996O/blob/oneplus/... so it looks like you may be missing some things in the vendor source.

  • Up0
  • Down0
aperio.ostendo
Join Date: 9 Oct 17
Posts: 2
Posted: Wed, 2018-01-31 01:32

For Nougat/Android 7.0 - we could confirm SDCLANG was used to compile the rom by entering below in a terminal window on the android device;
strings /system/lib/libeffects.so|grep -i 'gcc'How do we check this for Oreo/Android 8.0?

  • Up0
  • Down0
jake.weinstein
Join Date: 11 Feb 13
Posts: 44
Posted: Wed, 2018-01-31 06:24
Check libc.so strings for Snapdragon (as in Snapdragon LLVM Compiler).
  • Up0
  • Down0
aperio.ostendo
Join Date: 9 Oct 17
Posts: 2
Posted: Sun, 2018-02-11 01:16

Thanks for the advice.

What is the proper set up required to compile with SDCLANG for ANY Oreo/Android 8.0 rom? Have tried configuring/copying sdclang.json to device folder and to vendor/qcom/proprietary/common/config/ and still found only default CLANG used.

  • Up0
  • Down0
jake.weinstein
Join Date: 11 Feb 13
Posts: 44
Posted: Tue, 2018-02-13 13:06

That only works if your target name is the same as the board name, such as if you build the standard QC device trees.  If you use your own naming, you need to add a rule for your device in sdclang.json or change the default settings in it.

  • Up0
  • Down0
dungphp
Join Date: 14 Feb 18
Posts: 1
Posted: Wed, 2018-02-14 07:52

Please who can help me !

Im compiling crDoid Oreo 8.1 rom but has problem:

When vendor apks set LOCAL_CERTIFICATE := platform =>  rom booloop

I must set to LOCAL_CERTIFICATE := PRESIGNED =>  rom boot complate but VoLTE brocken

What's problem ? Compiled RR work everything with LOCAL_CERTIFICATE := platform but others No

Thanks

  • Up0
  • Down0
karbain4ik
Join Date: 14 Feb 18
Posts: 1
Posted: Wed, 2018-02-14 22:44

FAILED: out/soong/.bootstrap/soong-cc-config/test/test.passed
out/soong/.bootstrap/bin/gotestrunner -p ./build/soong/cc/config -f out/soong/.bootstrap/soong-cc-config/test/test.passed -- out/soong/.bootstrap/soong-cc-config/test/test -test.short
panic: read /home/winkarbik/caf: is a directory

goroutine 1 [running]:
android/soong/cc/config.setSdclangVars()
        /home/winkarbik/caf/build/soong/cc/config/global.go:197 +0x20d4
android/soong/cc/config.init.2()
        /home/winkarbik/caf/build/soong/cc/config/global.go:169 +0xcc9
android/soong/cc/config.init()
        /home/winkarbik/caf/build/soong/cc/config/tidy_test.go:42 +0x3969
main.init()
        /home/winkarbik/caf/out/soong/.bootstrap/soong-cc-config/test/test.go:34 +0x4e
[7/19] compile out/soong/.bootstrap/soong-cc/test/android/soong/cc.a
ninja: build stopped: subcommand failed.
09:38:29 soong bootstrap failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1

How I can fix this? I am try compile msm8916_64 oreo.

I want to compile the firmware, sdclang is optional for me (you can turn it off) tell me how to do it?

 

  • Up0
  • Down0
valuedcustomer
Join Date: 22 Feb 18
Posts: 1
Posted: Thu, 2018-02-22 15:36

im compiling 8.1 oreo. the build is successful with no error. so i grep libc for clang/snapdragon:

λ adb shell
shell@android:/ $ cd /system/lib
shell@android:/system/lib $ strings libc.so | grep -i clang
Android clang version 5.0.300080  (based on LLVM 5.0.300080)
shell@android:/system/lib $ strings libc.so | grep -i Snapdragon
1|shell@android:/system/lib $ strings libc.so | grep -i snapdragon
1|shell@android:/system/lib $
 
so i make the build with showcommands:
 
 
clearly sdclang is compiling the modules. my question is why aosp default clang was used to compile elsewhere (libc, etc.?). TARGET_USES_SDCLANG := TRUE is defined in device/boardconfig. also, the camera is broken (device reboots when opening camera), so im certain of the compiler used here as aosp clang compiles a working stock camera with the same source (third-party camera working with sdclang build).  how do i define sdclang properly to build all?

 

  • Up0
  • Down0
thegreatonimaster
Join Date: 10 Oct 17
Posts: 7
Posted: Tue, 2018-03-13 07:46
Hello to everyone, I'm trying to compile LineageOS 14.1 for a Oneplus 2 with the QC Snapdragon LLVM compiler 3.8.4. I found myself in a situation very similiar to the one reported by the user x565178035 in the previous posts. Even though the LLVM seems to be used, an error occurs at the 94% of the build process:
[ 94% 46737/49707] target  C: libavcodec <= external/ffmpeg/libavcodec/vp9dsp_8bpp.c
FAILED: /bin/bash -c "(PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/linux-x86/host/sdclang-3.8/bin/clang  -Wno-vectorizer-no-neon -I device/oneplus/oneplus2/include -I bionic/libc/include -I external/ffmpeg/libavcodec/../android/include -I external/ffmpeg/libavcodec/../ -I external/zlib -I external/ffmpeg/libavcodec -I /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates -I /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/gen/SHARED_LIBRARIES/libavcodec_intermediates -I libnativehelper/include/nativehelper \$(cat /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/import_includes) -isystem system/core/include -isystem system/media/audio/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 /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/include -isystem bionic/libc/arch-arm64/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/common -isystem bionic/libc/kernel/uapi/asm-arm64 -isystem bionic/libm/include -isystem bionic/libm/include/arm64 -c    -fno-exceptions -Wno-multichar -fno-strict-aliasing -fstack-protector-strong -ffunction-sections -fdata-sections -funwind-tables -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -mcpu=cortex-a53 -Werror=pointer-to-int-cast -Werror=int-to-pointer-cast -Werror=implicit-function-declaration -DQCOM_HARDWARE -DQCOM_BSP -DQTI_BSP -DHAS_EXTRA_FLAC_METADATA -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -DNDEBUG -O2 -g -Wstrict-aliasing=2 -DNDEBUG -UDEBUG  -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -nostdlibinc     -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin    -std=gnu99      -DANDROID_SDK_VERSION=25 -DTARGET_CONFIG=\\\"config-armv8-a.h\\\" -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -O3 -std=c99 -fno-math-errno -fno-signed-zeros -fomit-frame-pointer -Wno-pointer-to-int-cast -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -Wno-unused-parameter -Wno-unknown-attributes -Wno-missing-field-initializers -Wno-sign-compare -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat -fPIC -fPIC -D_USING_LIBCXX   -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast  -Werror=address-of-temporary -Werror=null-dereference -Werror=return-type  -MD -MF /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/vp9dsp_8bpp.d -o /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/vp9dsp_8bpp.o external/ffmpeg/libavcodec/vp9dsp_8bpp.c ) && (cp /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/vp9dsp_8bpp.d /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/vp9dsp_8bpp.P; sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\\\\$//' -e '/^\$/ d' -e 's/\$/ :/' < /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/vp9dsp_8bpp.d >> /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/vp9dsp_8bpp.P; rm -f /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/vp9dsp_8bpp.d )"
fatal error: error in backend: Cannot select: 0x50b23f0: v8i8 = truncate 0x4fe0aa0
  0x4fe0aa0: v4i32 = llvm.aarch64.neon.urhadd TargetConstant:i64<179>, 0x46124c0, 0x505e180
    0x4d2b8e0: i64 = TargetConstant<179>
    0x46124c0: v4i32 = zero_extend 0x509a5b0
      0x509a5b0: v4i16 = extract_subvector 0x50b0510, Constant:i64<0>
        0x50b0510: v8i16 = zero_extend 0x50b6540
          0x50b6540: v8i8,ch = load<LD8[%424](align=1)(alias.scope=<0x474a738>,<0x4b7a820>,!"polly.alias.scope._left")(noalias=<0x4aef7c8>,<0x4204538>)> 0x479e260, 0x5098460, undef:i64
            0x5098460: i64 = add 0x4fe49b0, Constant:i64<1>
              0x4fe49b0: i64,ch = CopyFromReg 0x479e260, Register:i64 %vreg32
                0x4fde650: i64 = Register %vreg32
              0x4fe1d10: i64 = Constant<1>
            0x46181e0: i64 = undef
        0x505df20: i64 = Constant<0>
    0x505e180: v4i32 = zero_extend 0x4fada50
      0x4fada50: v4i16 = extract_subvector 0x504ff70, Constant:i64<0>
        0x504ff70: v8i16 = zero_extend 0x4fde820
          0x4fde820: v8i8,ch = load<LD8[%vector_ptr30](align=1)(alias.scope=<0x474a738>,<0x4b7a820>,!"polly.alias.scope._left")(noalias=<0x4aef7c8>,<0x4204538>)> 0x479e260, 0x4fe49b0, undef:i64
            0x4fe49b0: i64,ch = CopyFromReg 0x479e260, Register:i64 %vreg32
              0x4fde650: i64 = Register %vreg32
            0x46181e0: i64 = undef
        0x505df20: i64 = Constant<0>
In function: hor_down_16x16_c
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
Target: aarch64--linux-android
Thread model: posix
Repository: 
Snapdragon LLVM ARM Compiler 3.8.4 for Android NDK (based on LLVM 3.8.0)
InstalledDir: prebuilts/clang/linux-x86/host/sdclang-3.8/bin
clang: note: diagnostic msg: Please report the bug through your designated Qualcomm/QuIC support channel.
clang: note: diagnostic msg: 
********************
 
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/vp9dsp_8bpp-2c9bd5.c
clang: note: diagnostic msg: /tmp/vp9dsp_8bpp-2c9bd5.sh
clang: note: diagnostic msg: 
 
********************
[ 94% 46737/49707] target  C: libavformat <= external/ffmpeg/libavformat/http.c
ninja: build stopped: subcommand failed.
build/core/ninja.mk:151: set di istruzioni per l'obiettivo "ninja_wrapper" non riuscito
make: *** [ninja_wrapper] Errore 1
 

I set up the LLVM version 3.8.4 as stated in the first post and I can confirm that the build process is working if it's done without the Snapdragon LLVM. 

Could you please help me to solve this issue?

Does Qualcomm provide a link to download versions of the Snapdragon LLVM  older than 4.0.2 (which is the current at the time of writing)? 

Thank you in advance

  • Up0
  • Down0
pstrong
Join Date: 12 May 16
Posts: 27
Posted: Tue, 2018-03-13 17:48

Snapdragon LLVM ARM 3.8.4 is an old version (from Oct 2016) that is no longer supported.

Please move to the latest, supported SDLLVM toolchain availabe on QDN, which is version 4.0.2.

https://developer.qualcomm.com/download/software

Paul

  • Up0
  • Down0
thegreatonimaster
Join Date: 10 Oct 17
Posts: 7
Posted: Thu, 2018-03-15 18:48

Dear Paul,

Thanks for your reply!

I moved to 4.0.2 version as you suggested and I got these errors:

In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:61:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND && _LIBUNWIND_SUPPORT_DWARF_INDEX
    ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:61:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
external/libunwind_llvm/src/config.h:87:43: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
                                          defined(__ARM_DWARF_EH__)
                                          ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:61:40: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND && _LIBUNWIND_SUPPORT_DWARF_INDEX
                                       ^
external/libunwind_llvm/src/config.h:88:42: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_INDEX'
  #define _LIBUNWIND_SUPPORT_DWARF_INDEX _LIBUNWIND_SUPPORT_DWARF_UNWIND
                                         ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:61:40: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
external/libunwind_llvm/src/config.h:88:42: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_INDEX'
  #define _LIBUNWIND_SUPPORT_DWARF_INDEX _LIBUNWIND_SUPPORT_DWARF_UNWIND
                                         ^
external/libunwind_llvm/src/config.h:87:43: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
                                          defined(__ARM_DWARF_EH__)
                                          ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:78:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND || _LIBUNWIND_SUPPORT_DWARF_INDEX ||       \
    ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:78:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
external/libunwind_llvm/src/config.h:87:43: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
                                          defined(__ARM_DWARF_EH__)
                                          ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:78:40: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND || _LIBUNWIND_SUPPORT_DWARF_INDEX ||       \
                                       ^
external/libunwind_llvm/src/config.h:88:42: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_INDEX'
  #define _LIBUNWIND_SUPPORT_DWARF_INDEX _LIBUNWIND_SUPPORT_DWARF_UNWIND
                                         ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:78:40: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
external/libunwind_llvm/src/config.h:88:42: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_INDEX'
  #define _LIBUNWIND_SUPPORT_DWARF_INDEX _LIBUNWIND_SUPPORT_DWARF_UNWIND
                                         ^
external/libunwind_llvm/src/config.h:87:43: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
                                          defined(__ARM_DWARF_EH__)
                                          ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:83:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND
    ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:83:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
external/libunwind_llvm/src/config.h:87:43: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
                                          defined(__ARM_DWARF_EH__)
                                          ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:87:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_INDEX
    ^
external/libunwind_llvm/src/config.h:88:42: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_INDEX'
  #define _LIBUNWIND_SUPPORT_DWARF_INDEX _LIBUNWIND_SUPPORT_DWARF_UNWIND
                                         ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
In file included from external/libunwind_llvm/src/UnwindCursor.hpp:28:
external/libunwind_llvm/src/AddressSpace.hpp:87:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
external/libunwind_llvm/src/config.h:88:42: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_INDEX'
  #define _LIBUNWIND_SUPPORT_DWARF_INDEX _LIBUNWIND_SUPPORT_DWARF_UNWIND
                                         ^
external/libunwind_llvm/src/config.h:87:43: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
                                          defined(__ARM_DWARF_EH__)
                                          ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
external/libunwind_llvm/src/UnwindCursor.hpp:39:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND
    ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
external/libunwind_llvm/src/UnwindCursor.hpp:39:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
external/libunwind_llvm/src/config.h:87:43: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
                                          defined(__ARM_DWARF_EH__)
                                          ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
external/libunwind_llvm/src/UnwindCursor.hpp:459:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND
    ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
external/libunwind_llvm/src/UnwindCursor.hpp:459:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
external/libunwind_llvm/src/config.h:87:43: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
                                          defined(__ARM_DWARF_EH__)
                                          ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
external/libunwind_llvm/src/UnwindCursor.hpp:538:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND
    ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
external/libunwind_llvm/src/UnwindCursor.hpp:538:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
external/libunwind_llvm/src/config.h:87:43: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
                                          defined(__ARM_DWARF_EH__)
                                          ^
In file included from external/libunwind_llvm/src/libunwind.cpp:30:
external/libunwind_llvm/src/UnwindCursor.hpp:832:5: error: macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]
#if _LIBUNWIND_SUPPORT_DWARF_UNWIND
    ^
external/libunwind_llvm/src/config.h:86:44: note: expanded from macro '_LIBUNWIND_SUPPORT_DWARF_UNWIND'
  #define _LIBUNWIND_SUPPORT_DWARF_UNWIND !defined(__arm__) || \
                                           ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
[  6% 2552/41090] target Java: android-support-comp...android-support-compat-api21_intermediates/classes)
Note: frameworks/support/compat/api21/android/support/v4/app/NotificationCompatApi21.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
ninja: build stopped: subcommand failed.
build/core/ninja.mk:151: set di istruzioni per l'obiettivo "ninja_wrapper" non riuscito
make: *** [ninja_wrapper] Errore 1
 

As you may notice, these are the same errors in which @x565178035 ran into, as described in this post https://developer.qualcomm.com/comment/14087#comment-14087. That's why I thought that the version 4.0.2 was somehow incompatible with Android 7.1.2.

Could you please help me to undestand how to solve these errors?

Thank you for your advice,

Joseph

  • Up0
  • Down0
pstrong
Join Date: 12 May 16
Posts: 27
Posted: Mon, 2018-03-19 16:31

Hi Joseph,

We can take a look at your original failure (fatal error: error in backend), which is using SDLLVM 3.8.4.  We look to see if there's a workaround, etc.  No guarantees.  To get started, we need the pre-processed file from the failed compile command.  Please run the failing compile command and add '-save-temps' to the end of the command.  This will generate a preprocesed file (*.i).  Please send that to us and we'll take a look.

Thanks, Paul

-----

/bin/bash -c "(PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/linux-x86/host/sdclang-3.8/bin/clang  -Wno-vectorizer-no-neon -I device/oneplus/oneplus2/include -I bionic/libc/include -I external/ffmpeg/libavcodec/../android/include -I external/ffmpeg/libavcodec/../ -I external/zlib -I external/ffmpeg/libavcodec

...

...

-o /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/vp9dsp_8bpp.o external/ffmpeg/libavcodec/vp9dsp_8bpp.c ) -save-temps

 

 

  • Up0
  • Down0
thegreatonimaster
Join Date: 10 Oct 17
Posts: 7
Posted: Tue, 2018-03-20 19:11

Dear Paul,

First of all I would like to thank you for your reply.

I issued the failing command with the -save-temps option at the end, as you described, but I can't find the preprocessed file with the usual .i extension. I thought these kind of file were put in the output directory, such as the dependencies .d files, but when I searched for them in /android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/ I couldn't find any .i file. I also made a research in all the /lineage subfolders with the same result.

That's how I issued the command:

/bin/bash -c "(PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/linux-x86/host/sdclang-3.8/bin/clang  -Wno-vectorizer-no-neon -I device/oneplus/oneplus2/include -I bionic/libc/include -I external/ffmpeg/libavcodec/../android/include -I external/ffmpeg/libavcodec/../ -I external/zlib -I external/ffmpeg/libavcodec -I /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates -I /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/gen/SHARED_LIBRARIES/libavcodec_intermediates -I libnativehelper/include/nativehelper \$(cat /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/import_includes) -isystem system/core/include -isystem system/media/audio/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 /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/include -isystem bionic/libc/arch-arm64/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/common -isystem bionic/libc/kernel/uapi/asm-arm64 -isystem bionic/libm/include -isystem bionic/libm/include/arm64 -c    -fno-exceptions -Wno-multichar -fno-strict-aliasing -fstack-protector-strong -ffunction-sections -fdata-sections -funwind-tables -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -mcpu=cortex-a53 -Werror=pointer-to-int-cast -Werror=int-to-pointer-cast -Werror=implicit-function-declaration -DQCOM_HARDWARE -DQCOM_BSP -DQTI_BSP -DHAS_EXTRA_FLAC_METADATA -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -DNDEBUG -O2 -g -Wstrict-aliasing=2 -DNDEBUG -UDEBUG  -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -nostdlibinc     -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin    -std=gnu99      -DANDROID_SDK_VERSION=25 -DTARGET_CONFIG=\\\"config-armv8-a.h\\\" -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -O3 -std=c99 -fno-math-errno -fno-signed-zeros -fomit-frame-pointer -Wno-pointer-to-int-cast -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -Wno-unused-parameter -Wno-unknown-attributes -Wno-missing-field-initializers -Wno-sign-compare -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat -fPIC -fPIC -D_USING_LIBCXX   -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast  -Werror=address-of-temporary -Werror=null-dereference -Werror=return-type  -MD -MF /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/vp9dsp_8bpp.d -o /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/vp9dsp_8bpp.o external/ffmpeg/libavcodec/vp9dsp_8bpp.c ) && (cp /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/vp9dsp_8bpp.d /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/vp9dsp_8bpp.P; sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\\\\$//' -e '/^\$/ d' -e 's/\$/ :/' < /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/vp9dsp_8bpp.d >> /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/vp9dsp_8bpp.P; rm -f /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/vp9dsp_8bpp.d )" -save-temps

Since I wasn't sure if I had to issue the command including only the first part of the string (the part before the &&), I also tried in this way:

/bin/bash -c "(PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/linux-x86/host/sdclang-3.8/bin/clang  -Wno-vectorizer-no-neon -I device/oneplus/oneplus2/include -I bionic/libc/include -I external/ffmpeg/libavcodec/../android/include -I external/ffmpeg/libavcodec/../ -I external/zlib -I external/ffmpeg/libavcodec -I /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates -I /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/gen/SHARED_LIBRARIES/libavcodec_intermediates -I libnativehelper/include/nativehelper \$(cat /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/import_includes) -isystem system/core/include -isystem system/media/audio/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 /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/include -isystem bionic/libc/arch-arm64/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/common -isystem bionic/libc/kernel/uapi/asm-arm64 -isystem bionic/libm/include -isystem bionic/libm/include/arm64 -c    -fno-exceptions -Wno-multichar -fno-strict-aliasing -fstack-protector-strong -ffunction-sections -fdata-sections -funwind-tables -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -mcpu=cortex-a53 -Werror=pointer-to-int-cast -Werror=int-to-pointer-cast -Werror=implicit-function-declaration -DQCOM_HARDWARE -DQCOM_BSP -DQTI_BSP -DHAS_EXTRA_FLAC_METADATA -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -DNDEBUG -O2 -g -Wstrict-aliasing=2 -DNDEBUG -UDEBUG  -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -nostdlibinc     -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin    -std=gnu99      -DANDROID_SDK_VERSION=25 -DTARGET_CONFIG=\\\"config-armv8-a.h\\\" -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -O3 -std=c99 -fno-math-errno -fno-signed-zeros -fomit-frame-pointer -Wno-pointer-to-int-cast -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -Wno-unused-parameter -Wno-unknown-attributes -Wno-missing-field-initializers -Wno-sign-compare -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat -fPIC -fPIC -D_USING_LIBCXX   -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast  -Werror=address-of-temporary -Werror=null-dereference -Werror=return-type  -MD -MF /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/vp9dsp_8bpp.d -o /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/vp9dsp_8bpp.o external/ffmpeg/libavcodec/vp9dsp_8bpp.c )" -save-temps

(I just added the " to close the string and then the -save-temps option.)

Finally I checked out the /tmp directory as the final part of the error points out:

PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang: note: diagnostic msg: /tmp/vp9dsp_8bpp-2c9bd5.c
clang: note: diagnostic msg: /tmp/vp9dsp_8bpp-2c9bd5.sh
clang: note: diagnostic msg: 
but even there, no preprocessed file.
 
Did I made a mistake issuing the command? Where should I look for that .i file?
Sincerely,
Joseph
  • Up0
  • Down0
pstrong
Join Date: 12 May 16
Posts: 27
Posted: Tue, 2018-03-20 21:46

Hi Joseph,

You will need to add the -save-temps option at the end of the compile command, just after the source file name (vp9dsp_8bpp.c ), like below.

The *.i file will be in the same directory that you 're in when running the compile command.  Let me know if this works

Thanks, Paul

 

/bin/bash -c "(PWD=/proc/self/cwd /usr/bin/ccache prebuilts/clang/linux-x86/host/sdclang-3.8/bin/clang  -Wno-vectorizer-no-neon -I device/oneplus/oneplus2/include -I bionic/libc/include -I external/ffmpeg/libavcodec/../android/include -I external/ffmpeg/libavcodec/../ -I external/zlib -I external/ffmpeg/libavcodec -I /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates -I /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/gen/SHARED_LIBRARIES/libavcodec_intermediates -I libnativehelper/include/nativehelper \$(cat /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/import_includes) -isystem system/core/include -isystem system/media/audio/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 /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/include -isystem bionic/libc/arch-arm64/include -isystem bionic/libc/kernel/uapi -isystem bionic/libc/kernel/common -isystem bionic/libc/kernel/uapi/asm-arm64 -isystem bionic/libm/include -isystem bionic/libm/include/arm64 -c    -fno-exceptions -Wno-multichar -fno-strict-aliasing -fstack-protector-strong -ffunction-sections -fdata-sections -funwind-tables -Wa,--noexecstack -Werror=format-security -D_FORTIFY_SOURCE=2 -fno-short-enums -no-canonical-prefixes -mcpu=cortex-a53 -Werror=pointer-to-int-cast -Werror=int-to-pointer-cast -Werror=implicit-function-declaration -DQCOM_HARDWARE -DQCOM_BSP -DQTI_BSP -DHAS_EXTRA_FLAC_METADATA -DANDROID -fmessage-length=0 -W -Wall -Wno-unused -Winit-self -Wpointer-arith -Werror=return-type -Werror=non-virtual-dtor -Werror=address -Werror=sequence-point -Werror=date-time -DNDEBUG -O2 -g -Wstrict-aliasing=2 -DNDEBUG -UDEBUG  -D__compiler_offsetof=__builtin_offsetof -Werror=int-conversion -Wno-reserved-id-macro -Wno-format-pedantic -Wno-unused-command-line-argument -fcolor-diagnostics -nostdlibinc     -target aarch64-linux-android -Bprebuilts/gcc/linux-x86/aarch64/aarch64-linux-android-4.9/aarch64-linux-android/bin    -std=gnu99      -DANDROID_SDK_VERSION=25 -DTARGET_CONFIG=\\\"config-armv8-a.h\\\" -DHAVE_AV_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -DPIC -O3 -std=c99 -fno-math-errno -fno-signed-zeros -fomit-frame-pointer -Wno-pointer-to-int-cast -Wstrict-prototypes -Wempty-body -Wno-parentheses -Wno-switch -Wno-format-zero-length -Wno-pointer-sign -Wno-unused-parameter -Wno-unknown-attributes -Wno-missing-field-initializers -Wno-sign-compare -Werror=format-security -Werror=implicit-function-declaration -Werror=missing-prototypes -Werror=return-type -Werror=vla -Wformat -fPIC -fPIC -D_USING_LIBCXX   -Werror=int-to-pointer-cast -Werror=pointer-to-int-cast  -Werror=address-of-temporary -Werror=null-dereference -Werror=return-type  -MD -MF /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/vp9dsp_8bpp.d -o /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/vp9dsp_8bpp.o external/ffmpeg/libavcodec/vp9dsp_8bpp.c -save-temps) && (cp /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/vp9dsp_8bpp.d /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/vp9dsp_8bpp.P; sed -e 's/#.*//' -e 's/^[^:]*: *//' -e 's/ *\\\\\$//' -e '/^\$/ d' -e 's/\$/ :/' < /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/vp9dsp_8bpp.d >> /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/vp9dsp_8bpp.P; rm -f /media/giuseppe/Dati/LineageOS14.1_ARM64/android/lineage/out/target/product/oneplus2/obj/SHARED_LIBRARIES/libavcodec_intermediates/vp9dsp_8bpp.d )"

  • Up0
  • Down0
thegreatonimaster
Join Date: 10 Oct 17
Posts: 7
Posted: Wed, 2018-03-21 06:28

Dear Paul,

It worked great as you wrote! 

The following is the content of the  vp9dsp_8bpp.i file:

# 1 "external/ffmpeg/libavcodec/vp9dsp_8bpp.c"
# 1 "<built-in>" 1
# 1 "<built-in>" 3
# 336 "<built-in>" 3
# 1 "<command line>" 1
# 1 "<built-in>" 2
# 1 "external/ffmpeg/libavcodec/vp9dsp_8bpp.c" 2
# 26 "external/ffmpeg/libavcodec/vp9dsp_8bpp.c"
# 1 "external/ffmpeg/libavcodec/vp9dsp_template.c" 1
# 24 "external/ffmpeg/libavcodec/vp9dsp_template.c"
# 1 "external/ffmpeg/libavcodec/../libavutil/common.h" 1
# 33 "external/ffmpeg/libavcodec/../libavutil/common.h"
# 1 "bionic/libc/include/errno.h" 1
# 31 "bionic/libc/include/errno.h"
# 1 "bionic/libc/include/sys/cdefs.h" 1
# 396 "bionic/libc/include/sys/cdefs.h"
# 1 "bionic/libc/include/android/api-level.h" 1
# 397 "bionic/libc/include/sys/cdefs.h" 2
# 32 "bionic/libc/include/errno.h" 2
# 1 "bionic/libc/kernel/uapi/linux/errno.h" 1 3
# 19 "bionic/libc/kernel/uapi/linux/errno.h" 3
# 1 "bionic/libc/kernel/uapi/asm-arm64/asm/errno.h" 1 3
# 19 "bionic/libc/kernel/uapi/asm-arm64/asm/errno.h" 3
# 1 "bionic/libc/kernel/uapi/asm-generic/errno.h" 1 3
# 21 "bionic/libc/kernel/uapi/asm-generic/errno.h" 3
# 1 "bionic/libc/kernel/uapi/asm-generic/errno-base.h" 1 3
# 22 "bionic/libc/kernel/uapi/asm-generic/errno.h" 2 3
# 20 "bionic/libc/kernel/uapi/asm-arm64/asm/errno.h" 2 3
# 20 "bionic/libc/kernel/uapi/linux/errno.h" 2 3
# 33 "bionic/libc/include/errno.h" 2
# 44 "bionic/libc/include/errno.h"
extern volatile int* __errno(void) __attribute__((__const__));
# 34 "external/ffmpeg/libavcodec/../libavutil/common.h" 2
# 1 "bionic/libc/include/inttypes.h" 1
# 22 "bionic/libc/include/inttypes.h"
# 1 "bionic/libc/include/stdint.h" 1
# 32 "bionic/libc/include/stdint.h"
# 1 "bionic/libc/include/bits/wchar_limits.h" 1
# 33 "bionic/libc/include/stdint.h" 2
# 1 "prebuilts/clang/linux-x86/host/sdclang-3.8/bin/../lib/clang/3.8.4/include/stddef.h" 1 3
# 51 "prebuilts/clang/linux-x86/host/sdclang-3.8/bin/../lib/clang/3.8.4/include/stddef.h" 3
typedef long int ptrdiff_t;
# 62 "prebuilts/clang/linux-x86/host/sdclang-3.8/bin/../lib/clang/3.8.4/include/stddef.h" 3
typedef long unsigned int size_t;
# 90 "prebuilts/clang/linux-x86/host/sdclang-3.8/bin/../lib/clang/3.8.4/include/stddef.h" 3
typedef unsigned int wchar_t;
# 34 "bionic/libc/include/stdint.h" 2
 
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 __int64_t;
typedef unsigned long __uint64_t;
 
 
 
 
 
 
typedef long __intptr_t;
typedef unsigned long __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 int64_t int_fast16_t;
typedef uint64_t uint_fast16_t;
typedef int64_t int_fast32_t;
typedef uint64_t uint_fast32_t;
 
 
 
 
 
 
 
typedef uint64_t uintmax_t;
typedef int64_t intmax_t;
# 23 "bionic/libc/include/inttypes.h" 2
# 251 "bionic/libc/include/inttypes.h"
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);
# 35 "external/ffmpeg/libavcodec/../libavutil/common.h" 2
# 1 "bionic/libc/include/limits.h" 1
# 53 "bionic/libc/include/limits.h"
# 1 "bionic/libc/include/sys/limits.h" 1
# 30 "bionic/libc/include/sys/limits.h"
# 1 "bionic/libc/kernel/uapi/linux/limits.h" 1 3
# 31 "bionic/libc/include/sys/limits.h" 2
# 54 "bionic/libc/include/limits.h" 2
 
 
# 1 "bionic/libc/include/sys/syslimits.h" 1
# 57 "bionic/libc/include/limits.h" 2
# 87 "bionic/libc/include/limits.h"
# 1 "bionic/libc/include/bits/posix_limits.h" 1
# 88 "bionic/libc/include/limits.h" 2
# 36 "external/ffmpeg/libavcodec/../libavutil/common.h" 2
# 1 "bionic/libm/include/math.h" 1 3
# 30 "bionic/libm/include/math.h" 3
#pragma GCC visibility push(default)
# 83 "bionic/libm/include/math.h" 3
typedef double __double_t;
typedef __double_t double_t;
typedef float __float_t;
typedef __float_t float_t;
# 108 "bionic/libm/include/math.h" 3
extern int signgam;
# 129 "bionic/libm/include/math.h" 3
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__));
extern __inline__ __attribute__((__always_inline__)) __attribute__((gnu_inline)) __attribute__((__artificial__)) double fabs(double x) { return __builtin_fabs(x); }
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__));
extern __inline__ __attribute__((__always_inline__)) __attribute__((gnu_inline)) __attribute__((__artificial__)) float fabsf(float x) { return __builtin_fabsf(x); }
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__));
extern __inline__ __attribute__((__always_inline__)) __attribute__((gnu_inline)) __attribute__((__artificial__)) long double fabsl(long double x) { return __builtin_fabsl(x); }
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 *);
 
 
 
 
 
 
 
 
#pragma GCC visibility pop
# 37 "external/ffmpeg/libavcodec/../libavutil/common.h" 2
 
# 1 "bionic/libc/include/stdio.h" 1
# 42 "bionic/libc/include/stdio.h"
# 1 "bionic/libc/include/sys/types.h" 1
# 31 "bionic/libc/include/sys/types.h"
# 1 "prebuilts/clang/linux-x86/host/sdclang-3.8/bin/../lib/clang/3.8.4/include/stddef.h" 1 3
# 32 "bionic/libc/include/sys/types.h" 2
 
 
 
# 1 "bionic/libc/kernel/uapi/linux/types.h" 1 3
# 21 "bionic/libc/kernel/uapi/linux/types.h" 3
# 1 "bionic/libc/kernel/uapi/asm-arm64/asm/types.h" 1 3
# 19 "bionic/libc/kernel/uapi/asm-arm64/asm/types.h" 3
# 1 "bionic/libc/kernel/uapi/asm-generic/types.h" 1 3
# 21 "bionic/libc/kernel/uapi/asm-generic/types.h" 3
# 1 "bionic/libc/kernel/uapi/asm-generic/int-ll64.h" 1 3
# 21 "bionic/libc/kernel/uapi/asm-generic/int-ll64.h" 3
# 1 "bionic/libc/kernel/uapi/asm-arm64/asm/bitsperlong.h" 1 3
# 22 "bionic/libc/kernel/uapi/asm-arm64/asm/bitsperlong.h" 3
# 1 "bionic/libc/kernel/uapi/asm-generic/bitsperlong.h" 1 3
# 23 "bionic/libc/kernel/uapi/asm-arm64/asm/bitsperlong.h" 2 3
# 22 "bionic/libc/kernel/uapi/asm-generic/int-ll64.h" 2 3
 
 
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
# 20 "bionic/libc/kernel/uapi/asm-arm64/asm/types.h" 2 3
# 22 "bionic/libc/kernel/uapi/linux/types.h" 2 3
 
 
# 1 "bionic/libc/kernel/uapi/linux/posix_types.h" 1 3
# 21 "bionic/libc/kernel/uapi/linux/posix_types.h" 3
# 1 "bionic/libc/kernel/uapi/linux/stddef.h" 1 3
# 19 "bionic/libc/kernel/uapi/linux/stddef.h" 3
# 1 "bionic/libc/kernel/uapi/linux/compiler.h" 1 3
# 20 "bionic/libc/kernel/uapi/linux/stddef.h" 2 3
# 22 "bionic/libc/kernel/uapi/linux/posix_types.h" 2 3
 
 
 
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-arm64/asm/posix_types.h" 1 3
# 21 "bionic/libc/kernel/uapi/asm-arm64/asm/posix_types.h" 3
typedef unsigned short __kernel_old_uid_t;
typedef unsigned short __kernel_old_gid_t;
 
 
 
# 1 "bionic/libc/kernel/uapi/asm-generic/posix_types.h" 1 3
# 24 "bionic/libc/kernel/uapi/asm-generic/posix_types.h" 3
typedef long __kernel_long_t;
typedef unsigned long __kernel_ulong_t;
 
 
 
typedef __kernel_ulong_t __kernel_ino_t;
 
 
typedef unsigned int __kernel_mode_t;
 
 
 
typedef int __kernel_pid_t;
 
 
 
typedef int __kernel_ipc_pid_t;
 
 
 
typedef unsigned int __kernel_uid_t;
typedef unsigned int __kernel_gid_t;
 
 
 
typedef __kernel_long_t __kernel_suseconds_t;
 
 
typedef int __kernel_daddr_t;
 
 
 
typedef unsigned int __kernel_uid32_t;
typedef unsigned int __kernel_gid32_t;
# 66 "bionic/libc/kernel/uapi/asm-generic/posix_types.h" 3
typedef unsigned int __kernel_old_dev_t;
# 76 "bionic/libc/kernel/uapi/asm-generic/posix_types.h" 3
typedef __kernel_ulong_t __kernel_size_t;
typedef __kernel_long_t __kernel_ssize_t;
 
typedef __kernel_long_t __kernel_ptrdiff_t;
 
 
 
 
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;
# 26 "bionic/libc/kernel/uapi/asm-arm64/asm/posix_types.h" 2 3
# 33 "bionic/libc/kernel/uapi/linux/posix_types.h" 2 3
# 25 "bionic/libc/kernel/uapi/linux/types.h" 2 3
 
 
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
 
 
 
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 uint64_t dev_t;
 
 
 
typedef __kernel_time_t __time_t;
typedef __time_t time_t;
 
 
typedef int64_t off_t;
typedef off_t loff_t;
typedef loff_t off64_t;
# 123 "bionic/libc/include/sys/types.h"
typedef uint32_t __socklen_t;
 
typedef __socklen_t socklen_t;
 
typedef __builtin_va_list __va_list;
# 136 "bionic/libc/include/sys/types.h"
typedef __kernel_ssize_t ssize_t;
 
 
typedef unsigned int uint_t;
typedef unsigned int uint;
 
 
 
# 1 "bionic/libc/include/sys/sysmacros.h" 1
# 144 "bionic/libc/include/sys/types.h" 2
 
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/stdio.h" 2
 
# 1 "prebuilts/clang/linux-x86/host/sdclang-3.8/bin/../lib/clang/3.8.4/include/stdarg.h" 1 3
# 30 "prebuilts/clang/linux-x86/host/sdclang-3.8/bin/../lib/clang/3.8.4/include/stdarg.h" 3
typedef __builtin_va_list va_list;
# 50 "prebuilts/clang/linux-x86/host/sdclang-3.8/bin/../lib/clang/3.8.4/include/stdarg.h" 3
typedef __builtin_va_list __gnuc_va_list;
# 45 "bionic/libc/include/stdio.h" 2
# 1 "prebuilts/clang/linux-x86/host/sdclang-3.8/bin/../lib/clang/3.8.4/include/stddef.h" 1 3
# 46 "bionic/libc/include/stdio.h" 2
 
 
# 1 "prebuilts/clang/linux-x86/host/sdclang-3.8/bin/../lib/clang/3.8.4/include/stddef.h" 1 3
# 49 "bionic/libc/include/stdio.h" 2
 
 
 
typedef off_t fpos_t;
typedef off64_t fpos64_t;
 
struct __sFILE;
typedef struct __sFILE FILE;
 
extern FILE* stdin;
extern FILE* stdout;
extern FILE* stderr;
# 105 "bionic/libc/include/stdio.h"
void clearerr(FILE *);
int fclose(FILE *);
int feof(FILE *);
int ferror(FILE *);
int fflush(FILE *);
int fgetc(FILE *);
char *fgets(char * __restrict, int, FILE * __restrict);
int fprintf(FILE * __restrict , const char * __restrict, ...)
  __attribute__((__format__(printf, 2, 3))) __attribute__((__nonnull__ (2)));
int fputc(int, FILE *);
int fputs(const char * __restrict, FILE * __restrict);
size_t fread(void * __restrict, size_t, size_t, FILE * __restrict);
int fscanf(FILE * __restrict, const char * __restrict, ...)
  __attribute__((__format__(scanf, 2, 3))) __attribute__((__nonnull__ (2)));
size_t fwrite(const void * __restrict, size_t, size_t, FILE * __restrict);
int getc(FILE *);
int getchar(void);
ssize_t getdelim(char ** __restrict, size_t * __restrict, int,
     FILE * __restrict);
ssize_t getline(char ** __restrict, size_t * __restrict, FILE * __restrict);
 
void perror(const char *);
int printf(const char * __restrict, ...)
  __attribute__((__format__(printf, 1, 2))) __attribute__((__nonnull__ (1)));
int putc(int, FILE *);
int putchar(int);
int puts(const char *);
int remove(const char *);
void rewind(FILE *);
int scanf(const char * __restrict, ...)
  __attribute__((__format__(scanf, 1, 2))) __attribute__((__nonnull__ (1)));
void setbuf(FILE * __restrict, char * __restrict);
int setvbuf(FILE * __restrict, char * __restrict, int, size_t);
int sscanf(const char * __restrict, const char * __restrict, ...)
  __attribute__((__format__(scanf, 2, 3))) __attribute__((__nonnull__ (2)));
int ungetc(int, FILE *);
int vfprintf(FILE * __restrict, const char * __restrict, __va_list)
  __attribute__((__format__(printf, 2, 0))) __attribute__((__nonnull__ (2)));
int vprintf(const char * __restrict, __va_list)
  __attribute__((__format__(printf, 1, 0))) __attribute__((__nonnull__ (1)));
 
int dprintf(int, const char * __restrict, ...) __attribute__((__format__(printf, 2, 3))) __attribute__((__nonnull__ (2)));
int vdprintf(int, const char * __restrict, __va_list) __attribute__((__format__(printf, 2, 0))) __attribute__((__nonnull__ (2)));
 
 
 
char* gets(char*) __attribute__((deprecated("gets is unsafe, use fgets instead")));
 
int sprintf(char* __restrict, const char* __restrict, ...)
    __attribute__((__format__(printf, 2, 3))) __attribute__((__nonnull__ (2))) __attribute__((__warning__("sprintf is often misused; please use snprintf")));
int vsprintf(char* __restrict, const char* __restrict, __va_list)
    __attribute__((__format__(printf, 2, 0))) __attribute__((__nonnull__ (2))) __attribute__((__warning__("vsprintf is often misused; please use vsnprintf")));
char* tmpnam(char*) __attribute__((deprecated("tmpnam is unsafe, use mkstemp or tmpfile instead")));
 
char* tempnam(const char*, const char*)
    __attribute__((deprecated("tempnam is unsafe, use mkstemp or tmpfile instead")));
 
 
 
int rename(const char*, const char*);
int renameat(int, const char*, int, const char*);
 
int fseek(FILE*, long, int);
long ftell(FILE*);
# 183 "bionic/libc/include/stdio.h"
int fgetpos(FILE*, fpos_t*);
int fsetpos(FILE*, const fpos_t*);
int fseeko(FILE*, off_t, int);
off_t ftello(FILE*);
# 195 "bionic/libc/include/stdio.h"
int fgetpos64(FILE*, fpos64_t*);
int fsetpos64(FILE*, const fpos64_t*);
int fseeko64(FILE*, off64_t, int);
off64_t ftello64(FILE*);
# 207 "bionic/libc/include/stdio.h"
FILE* fopen(const char* __restrict, const char* __restrict);
FILE* fopen64(const char* __restrict, const char* __restrict);
FILE* freopen(const char* __restrict, const char* __restrict, FILE* __restrict);
FILE* freopen64(const char* __restrict, const char* __restrict, FILE* __restrict);
FILE* tmpfile(void);
FILE* tmpfile64(void);
 
 
int snprintf(char * __restrict, size_t, const char * __restrict, ...)
  __attribute__((__format__(printf, 3, 4))) __attribute__((__nonnull__ (3)));
int vfscanf(FILE * __restrict, const char * __restrict, __va_list)
  __attribute__((__format__(scanf, 2, 0))) __attribute__((__nonnull__ (2)));
int vscanf(const char *, __va_list)
  __attribute__((__format__(scanf, 1, 0))) __attribute__((__nonnull__ (1)));
int vsnprintf(char * __restrict, size_t, const char * __restrict, __va_list)
  __attribute__((__format__(printf, 3, 0))) __attribute__((__nonnull__ (3)));
int vsscanf(const char * __restrict, const char * __restrict, __va_list)
  __attribute__((__format__(scanf, 2, 0))) __attribute__((__nonnull__ (2)));
# 233 "bionic/libc/include/stdio.h"
FILE *fdopen(int, const char *);
int fileno(FILE *);
 
 
int pclose(FILE *);
FILE *popen(const char *, const char *);
 
 
 
void flockfile(FILE *);
int ftrylockfile(FILE *);
void funlockfile(FILE *);
 
 
 
 
 
int getc_unlocked(FILE *);
int getchar_unlocked(void);
int putc_unlocked(int, FILE *);
int putchar_unlocked(int);
 
 
 
FILE* fmemopen(void*, size_t, const char*);
FILE* open_memstream(char**, size_t*);
# 267 "bionic/libc/include/stdio.h"
int asprintf(char ** __restrict, const char * __restrict, ...)
  __attribute__((__format__(printf, 2, 3))) __attribute__((__nonnull__ (2)));
char *fgetln(FILE * __restrict, size_t * __restrict);
int fpurge(FILE *);
void setbuffer(FILE *, char *, int);
int setlinebuf(FILE *);
int vasprintf(char ** __restrict, const char * __restrict,
    __va_list)
  __attribute__((__format__(printf, 2, 0))) __attribute__((__nonnull__ (2)));
 
void clearerr_unlocked(FILE*);
int feof_unlocked(FILE*);
int ferror_unlocked(FILE*);
int fileno_unlocked(FILE*);
 
 
 
 
 
extern char* __fgets_chk(char*, int, FILE*, size_t);
extern char* __fgets_real(char*, int, FILE*) __asm__("fgets");
extern void __fgets_too_big_error(void) __attribute__((__error__("fgets called with size bigger than buffer")));
extern void __fgets_too_small_error(void) __attribute__((__error__("fgets called with size less than zero")));
 
extern size_t __fread_chk(void * __restrict, size_t, size_t, FILE * __restrict, size_t);
extern size_t __fread_real(void * __restrict, size_t, size_t, FILE * __restrict) __asm__("fread");
extern void __fread_too_big_error(void) __attribute__((__error__("fread called with size * count bigger than buffer")));
extern void __fread_overflow(void) __attribute__((__error__("fread called with overflowing size * count")));
 
extern size_t __fwrite_chk(const void * __restrict, size_t, size_t, FILE * __restrict, size_t);
extern size_t __fwrite_real(const void * __restrict, size_t, size_t, FILE * __restrict) __asm__("fwrite");
extern void __fwrite_too_big_error(void) __attribute__((__error__("fwrite called with size * count bigger than buffer")));
extern void __fwrite_overflow(void) __attribute__((__error__("fwrite called with overflowing size * count")));
 
 
 
extern __inline__ __attribute__((__always_inline__)) __attribute__((gnu_inline)) __attribute__((__artificial__))
__attribute__((__format__(printf, 3, 0))) __attribute__((__nonnull__ (3)))
int vsnprintf(char *dest, size_t size, const char *format, __va_list ap)
{
    return __builtin___vsnprintf_chk(dest, size, 0, __builtin_object_size((dest), 1), format, ap);
}
 
extern __inline__ __attribute__((__always_inline__)) __attribute__((gnu_inline)) __attribute__((__artificial__))
__attribute__((__format__(printf, 2, 0))) __attribute__((__nonnull__ (2)))
int vsprintf(char *dest, const char *format, __va_list ap)
{
    return __builtin___vsprintf_chk(dest, 0, __builtin_object_size((dest), 1), format, ap);
}
# 347 "bionic/libc/include/stdio.h"
extern __inline__ __attribute__((__always_inline__)) __attribute__((gnu_inline)) __attribute__((__artificial__))
size_t fread(void * __restrict buf, size_t size, size_t count, FILE * __restrict stream) {
    size_t bos = __builtin_object_size((buf), 0);
# 370 "bionic/libc/include/stdio.h"
    return __fread_chk(buf, size, count, stream, bos);
}
 
extern __inline__ __attribute__((__always_inline__)) __attribute__((gnu_inline)) __attribute__((__artificial__))
size_t fwrite(const void * __restrict buf, size_t size, size_t count, FILE * __restrict stream) {
    size_t bos = __builtin_object_size((buf), 0);
# 396 "bionic/libc/include/stdio.h"
    return __fwrite_chk(buf, size, count, stream, bos);
}
# 39 "external/ffmpeg/libavcodec/../libavutil/common.h" 2
# 1 "bionic/libc/include/stdlib.h" 1
# 33 "bionic/libc/include/stdlib.h"
# 1 "bionic/libc/include/xlocale.h" 1
# 33 "bionic/libc/include/xlocale.h"
struct __locale_t;
typedef struct __locale_t* locale_t;
# 34 "bionic/libc/include/stdlib.h" 2
 
# 1 "bionic/libc/include/alloca.h" 1
# 36 "bionic/libc/include/stdlib.h" 2
# 1 "bionic/libc/include/malloc.h" 1
# 21 "bionic/libc/include/malloc.h"
# 1 "prebuilts/clang/linux-x86/host/sdclang-3.8/bin/../lib/clang/3.8.4/include/stddef.h" 1 3
# 22 "bionic/libc/include/malloc.h" 2
 
 
 
 
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);
# 71 "bionic/libc/include/malloc.h"
extern int malloc_info(int, FILE *);
# 37 "bionic/libc/include/stdlib.h" 2
# 1 "prebuilts/clang/linux-x86/host/sdclang-3.8/bin/../lib/clang/3.8.4/include/stddef.h" 1 3
# 38 "bionic/libc/include/stdlib.h" 2
 
 
 
 
 
 
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__((deprecated("mktemp is unsafe, use mkstemp or tmpfile instead")));
 
extern int mkostemp64(char*, int);
extern int mkostemp(char*, int);
extern int mkostemps64(char*, int, int);
extern int mkostemps(char*, int, int);
extern int mkstemp64(char*);
extern int mkstemp(char*);
extern int mkstemps64(char*, int);
extern int mkstemps(char*, int);
 
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*) __attribute__((availability(android,introduced=21)));
 
extern double strtod(const char*, char**) __attribute__((visibility ("default")));
extern float strtof(const char*, char**) __attribute__((visibility ("default"))) __attribute__((availability(android,introduced=21)));
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__)) __attribute__((availability(android,introduced=21)));
extern long labs(long) __attribute__((__const__)) __attribute__((availability(android,introduced=21)));
extern long long llabs(long long) __attribute__((__const__)) __attribute__((availability(android,introduced=21)));
 
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 *));
 
uint32_t arc4random(void);
uint32_t arc4random_uniform(uint32_t);
void arc4random_buf(void*, size_t);
 
 
 
int rand(void) __attribute__((availability(android,introduced=21)));
int rand_r(unsigned int*);
void srand(unsigned int) __attribute__((availability(android,introduced=21)));
 
double drand48(void);
double erand48(unsigned short[3]);
long jrand48(unsigned short[3]);
void lcong48(unsigned short[7]);
long lrand48(void);
long mrand48(void);
long nrand48(unsigned short[3]);
unsigned short* seed48(unsigned short[3]);
void srand48(long);
 
char* initstate(unsigned int, char*, size_t);
long random(void) __attribute__((availability(android,introduced=21)));
char* setstate(char*);
void srandom(unsigned int) __attribute__((availability(android,introduced=21)));
 
int getpt(void);
int grantpt(int) __attribute__((availability(android,introduced=21)));
int posix_openpt(int);
char* ptsname(int);
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);
# 181 "bionic/libc/include/stdlib.h"
extern char* __realpath_real(const char*, char*) __asm__("realpath");
extern void __realpath_size_error(void) __attribute__((__error__("realpath output parameter must be NULL or a >= PATH_MAX bytes buffer")));
# 40 "external/ffmpeg/libavcodec/../libavutil/common.h" 2
# 1 "bionic/libc/include/string.h" 1
# 33 "bionic/libc/include/string.h"
# 1 "prebuilts/clang/linux-x86/host/sdclang-3.8/bin/../lib/clang/3.8.4/include/stddef.h" 1 3
# 34 "bionic/libc/include/string.h" 2
 
 
 
 
 
 
 
 
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);
# 65 "bionic/libc/include/string.h"
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);
 
int strcasecmp(const char*, const char*) __attribute__((pure));
int strcasecmp_l(const char*, const char*, locale_t) __attribute__((pure));
int strncasecmp(const char*, const char*, size_t) __attribute__((pure));
int strncasecmp_l(const char*, const char*, size_t, locale_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 char* strerror_l(int, locale_t);
 
 
 
extern int strerror_r(int, char*, size_t);
 
 
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);
# 132 "bionic/libc/include/string.h"
extern void* __memchr_chk(const void*, int, size_t, size_t);
extern void __memchr_buf_size_error(void) __attribute__((__error__("memchr called with size bigger than buffer")));
 
extern void* __memrchr_chk(const void*, int, size_t, size_t);
extern void __memrchr_buf_size_error(void) __attribute__((__error__("memrchr called with size bigger than buffer")));
extern void* __memrchr_real(const void*, int, size_t) __asm__("memrchr");
 
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* memchr(const void *s, int c, size_t n) {
    size_t bos = __builtin_object_size((s), 1);
# 166 "bionic/libc/include/string.h"
    return __memchr_chk(s, c, n, bos);
}
 
extern __inline__ __attribute__((__always_inline__)) __attribute__((gnu_inline)) __attribute__((__artificial__))
void* memrchr(const void *s, int c, size_t n) {
    size_t bos = __builtin_object_size((s), 1);
# 187 "bionic/libc/include/string.h"
    return __memrchr_chk(s, c, n, bos);
}
 
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);
# 284 "bionic/libc/include/string.h"
    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);
# 305 "bionic/libc/include/string.h"
    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);
# 324 "bionic/libc/include/string.h"
    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);
# 343 "bionic/libc/include/string.h"
    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);
# 362 "bionic/libc/include/string.h"
    return __strrchr_chk(s, c, bos);
}
# 41 "external/ffmpeg/libavcodec/../libavutil/common.h" 2
 
# 1 "external/ffmpeg/libavcodec/../libavutil/attributes.h" 1
# 43 "external/ffmpeg/libavcodec/../libavutil/common.h" 2
# 1 "external/ffmpeg/libavcodec/../libavutil/macros.h" 1
# 44 "external/ffmpeg/libavcodec/../libavutil/common.h" 2
# 1 "external/ffmpeg/libavcodec/../libavutil/version.h" 1
# 45 "external/ffmpeg/libavcodec/../libavutil/common.h" 2
# 1 "external/ffmpeg/libavcodec/../android/include/libavutil/avconfig.h" 1
# 46 "external/ffmpeg/libavcodec/../libavutil/common.h" 2
# 105 "external/ffmpeg/libavcodec/../libavutil/common.h"
# 1 "external/ffmpeg/libavcodec/../android/include/config.h" 1
 
# 1 "external/ffmpeg/libavcodec/../android/include/config-armv8-a.h" 1
# 3 "external/ffmpeg/libavcodec/../android/include/config.h" 2
# 106 "external/ffmpeg/libavcodec/../libavutil/common.h" 2
# 1 "external/ffmpeg/libavcodec/../libavutil/intmath.h" 1
# 26 "external/ffmpeg/libavcodec/../libavutil/intmath.h"
# 1 "external/ffmpeg/libavcodec/../android/include/config.h" 1
# 27 "external/ffmpeg/libavcodec/../libavutil/intmath.h" 2
# 47 "external/ffmpeg/libavcodec/../libavutil/intmath.h"
extern const uint8_t ff_log2_tab[256];
# 107 "external/ffmpeg/libavcodec/../libavutil/common.h" 2
 
 
 
# 1 "external/ffmpeg/libavcodec/../libavutil/common.h" 1
# 111 "external/ffmpeg/libavcodec/../libavutil/common.h" 2
# 127 "external/ffmpeg/libavcodec/../libavutil/common.h"
static __attribute__((always_inline)) inline __attribute__((const)) int av_clip_c(int a, int amin, int amax)
{
 
 
 
    if (a < amin) return amin;
    else if (a > amax) return amax;
    else return a;
}
# 144 "external/ffmpeg/libavcodec/../libavutil/common.h"
static __attribute__((always_inline)) inline __attribute__((const)) int64_t av_clip64_c(int64_t a, int64_t amin, int64_t amax)
{
 
 
 
    if (a < amin) return amin;
    else if (a > amax) return amax;
    else return a;
}
 
 
 
 
 
 
static __attribute__((always_inline)) inline __attribute__((const)) uint8_t av_clip_uint8_c(int a)
{
    if (a&(~0xFF)) return (-a)>>31;
    else return a;
}
 
 
 
 
 
 
static __attribute__((always_inline)) inline __attribute__((const)) int8_t av_clip_int8_c(int a)
{
    if ((a+0x80U) & ~0xFF) return (a>>31) ^ 0x7F;
    else return a;
}
 
 
 
 
 
 
static __attribute__((always_inline)) inline __attribute__((const)) uint16_t av_clip_uint16_c(int a)
{
    if (a&(~0xFFFF)) return (-a)>>31;
    else return a;
}
 
 
 
 
 
 
static __attribute__((always_inline)) inline __attribute__((const)) int16_t av_clip_int16_c(int a)
{
    if ((a+0x8000U) & ~0xFFFF) return (a>>31) ^ 0x7FFF;
    else return a;
}
 
 
 
 
 
 
static __attribute__((always_inline)) inline __attribute__((const)) int32_t av_clipl_int32_c(int64_t a)
{
    if ((a+0x80000000u) & ~0xFFFFFFFFUL) return (int32_t)((a>>63) ^ 0x7FFFFFFF);
    else return (int32_t)a;
}
 
 
 
 
 
 
 
static __attribute__((always_inline)) inline __attribute__((const)) int av_clip_intp2_c(int a, int p)
{
    if (((unsigned)a + (1 << p)) & ~((2 << p) - 1))
        return (a >> 31) ^ ((1 << p) - 1);
    else
        return a;
}
 
 
 
 
 
 
 
static __attribute__((always_inline)) inline __attribute__((const)) unsigned av_clip_uintp2_c(int a, int p)
{
    if (a & ~((1<<p) - 1)) return -a >> 31 & ((1<<p) - 1);
    else return a;
}
 
 
 
 
 
 
 
static __attribute__((always_inline)) inline __attribute__((const)) unsigned av_mod_uintp2_c(unsigned a, unsigned p)
{
    return a & ((1 << p) - 1);
}
# 253 "external/ffmpeg/libavcodec/../libavutil/common.h"
static __attribute__((always_inline)) inline int av_sat_add32_c(int a, int b)
{
    return av_clipl_int32_c((int64_t)a + b);
}
# 265 "external/ffmpeg/libavcodec/../libavutil/common.h"
static __attribute__((always_inline)) inline int av_sat_dadd32_c(int a, int b)
{
    return av_sat_add32_c(a, av_sat_add32_c(b, b));
}
# 277 "external/ffmpeg/libavcodec/../libavutil/common.h"
static __attribute__((always_inline)) inline __attribute__((const)) float av_clipf_c(float a, float amin, float amax)
{
 
 
 
    if (a < amin) return amin;
    else if (a > amax) return amax;
    else return a;
}
# 294 "external/ffmpeg/libavcodec/../libavutil/common.h"
static __attribute__((always_inline)) inline __attribute__((const)) double av_clipd_c(double a, double amin, double amax)
{
 
 
 
    if (a < amin) return amin;
    else if (a > amax) return amax;
    else return a;
}
 
 
 
 
 
static __attribute__((always_inline)) inline __attribute__((const)) int av_ceil_log2_c(int x)
{
    return (31 - __builtin_clz(((x - 1) << 1)|1));
}
 
 
 
 
 
 
static __attribute__((always_inline)) inline __attribute__((const)) int av_popcount_c(uint32_t x)
{
    x -= (x >> 1) & 0x55555555;
    x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
    x = (x + (x >> 4)) & 0x0F0F0F0F;
    x += x >> 8;
    return (x + (x >> 16)) & 0x3F;
}
 
 
 
 
 
 
static __attribute__((always_inline)) inline __attribute__((const)) int av_popcount64_c(uint64_t x)
{
    return av_popcount_c((uint32_t)x) + av_popcount_c((uint32_t)(x >> 32));
}
 
static __attribute__((always_inline)) inline __attribute__((const)) int av_parity_c(uint32_t v)
{
    return av_popcount_c(v) & 1;
}
# 464 "external/ffmpeg/libavcodec/../libavutil/common.h"
# 1 "external/ffmpeg/libavcodec/../libavutil/mem.h" 1
# 33 "external/ffmpeg/libavcodec/../libavutil/mem.h"
# 1 "external/ffmpeg/libavcodec/../libavutil/error.h" 1
# 28 "external/ffmpeg/libavcodec/../libavutil/error.h"
# 1 "prebuilts/clang/linux-x86/host/sdclang-3.8/bin/../lib/clang/3.8.4/include/stddef.h" 1 3
# 29 "external/ffmpeg/libavcodec/../libavutil/error.h" 2
# 97 "external/ffmpeg/libavcodec/../libavutil/error.h"
int av_strerror(int errnum, char *errbuf, size_t errbuf_size);
# 109 "external/ffmpeg/libavcodec/../libavutil/error.h"
static inline char *av_make_error_string(char *errbuf, size_t errbuf_size, int errnum)
{
    av_strerror(errnum, errbuf, errbuf_size);
    return errbuf;
}
# 34 "external/ffmpeg/libavcodec/../libavutil/mem.h" 2
# 1 "external/ffmpeg/libavcodec/../libavutil/avutil.h" 1
# 163 "external/ffmpeg/libavcodec/../libavutil/avutil.h"
unsigned avutil_version(void);
 
 
 
 
 
 
const char *av_version_info(void);
 
 
 
 
const char *avutil_configuration(void);
 
 
 
 
const char *avutil_license(void);
# 191 "external/ffmpeg/libavcodec/../libavutil/avutil.h"
enum AVMediaType {
    AVMEDIA_TYPE_UNKNOWN = -1,
    AVMEDIA_TYPE_VIDEO,
    AVMEDIA_TYPE_AUDIO,
    AVMEDIA_TYPE_DATA,
    AVMEDIA_TYPE_SUBTITLE,
    AVMEDIA_TYPE_ATTACHMENT,
    AVMEDIA_TYPE_NB
};
 
 
 
 
 
const char *av_get_media_type_string(enum AVMediaType media_type);
# 264 "external/ffmpeg/libavcodec/../libavutil/avutil.h"
enum AVPictureType {
    AV_PICTURE_TYPE_NONE = 0,
    AV_PICTURE_TYPE_I,
    AV_PICTURE_TYPE_P,
    AV_PICTURE_TYPE_B,
    AV_PICTURE_TYPE_S,
    AV_PICTURE_TYPE_SI,
    AV_PICTURE_TYPE_SP,
    AV_PICTURE_TYPE_BI,
};
# 282 "external/ffmpeg/libavcodec/../libavutil/avutil.h"
char av_get_picture_type_char(enum AVPictureType pict_type);
 
 
 
 
 
 
# 1 "external/ffmpeg/libavcodec/../libavutil/common.h" 1
# 289 "external/ffmpeg/libavcodec/../libavutil/avutil.h" 2
 
# 1 "external/ffmpeg/libavcodec/../libavutil/rational.h" 1
# 43 "external/ffmpeg/libavcodec/../libavutil/rational.h"
typedef struct AVRational{
    int num;
    int den;
} AVRational;
 
 
 
 
 
 
static inline AVRational av_make_q(int num, int den)
{
    AVRational r = { num, den };
    return r;
}
# 66 "external/ffmpeg/libavcodec/../libavutil/rational.h"
static inline int av_cmp_q(AVRational a, AVRational b){
    const int64_t tmp= a.num * (int64_t)b.den - b.num * (int64_t)a.den;
 
    if(tmp) return (int)((tmp ^ a.den ^ b.den)>>63)|1;
    else if(b.den && a.den) return 0;
    else if(a.num && b.num) return (a.num>>31) - (b.num>>31);
    else return (-0x7fffffff-1);
}
 
 
 
 
 
 
static inline double av_q2d(AVRational a){
    return a.num / (double) a.den;
}
# 94 "external/ffmpeg/libavcodec/../libavutil/rational.h"
int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max);
 
 
 
 
 
 
 
AVRational av_mul_q(AVRational b, AVRational c) __attribute__((const));
 
 
 
 
 
 
 
AVRational av_div_q(AVRational b, AVRational c) __attribute__((const));
 
 
 
 
 
 
 
AVRational av_add_q(AVRational b, AVRational c) __attribute__((const));
 
 
 
 
 
 
 
AVRational av_sub_q(AVRational b, AVRational c) __attribute__((const));
 
 
 
 
 
 
static __attribute__((always_inline)) inline AVRational av_inv_q(AVRational q)
{
    AVRational r = { q.den, q.num };
    return r;
}
# 147 "external/ffmpeg/libavcodec/../libavutil/rational.h"
AVRational av_d2q(double d, int max) __attribute__((const));
 
 
 
 
 
int av_nearer_q(AVRational q, AVRational q1, AVRational q2);
 
 
 
 
 
 
int av_find_nearest_q_idx(AVRational q, const AVRational* q_list);
 
 
 
 
 
 
uint32_t av_q2intfloat(AVRational q);
# 291 "external/ffmpeg/libavcodec/../libavutil/avutil.h" 2
 
 
# 1 "external/ffmpeg/libavcodec/../libavutil/mathematics.h" 1
# 28 "external/ffmpeg/libavcodec/../libavutil/mathematics.h"
# 1 "external/ffmpeg/libavcodec/../libavutil/intfloat.h" 1
# 27 "external/ffmpeg/libavcodec/../libavutil/intfloat.h"
union av_intfloat32 {
    uint32_t i;
    float f;
};
 
union av_intfloat64 {
    uint64_t i;
    double f;
};
 
 
 
 
static __attribute__((always_inline)) inline float av_int2float(uint32_t i)
{
    union av_intfloat32 v;
    v.i = i;
    return v.f;
}
 
 
 
 
static __attribute__((always_inline)) inline uint32_t av_float2int(float f)
{
    union av_intfloat32 v;
    v.f = f;
    return v.i;
}
 
 
 
 
static __attribute__((always_inline)) inline double av_int2double(uint64_t i)
{
    union av_intfloat64 v;
    v.i = i;
    return v.f;
}
 
 
 
 
static __attribute__((always_inline)) inline uint64_t av_double2int(double f)
{
    union av_intfloat64 v;
    v.f = f;
    return v.i;
}
# 29 "external/ffmpeg/libavcodec/../libavutil/mathematics.h" 2
# 70 "external/ffmpeg/libavcodec/../libavutil/mathematics.h"
enum AVRounding {
    AV_ROUND_ZERO = 0,
    AV_ROUND_INF = 1,
    AV_ROUND_DOWN = 2,
    AV_ROUND_UP = 3,
    AV_ROUND_NEAR_INF = 5,
    AV_ROUND_PASS_MINMAX = 8192,
};
 
 
 
 
 
 
 
int64_t __attribute__((const)) av_gcd(int64_t a, int64_t b);
 
 
 
 
 
int64_t av_rescale(int64_t a, int64_t b, int64_t c) __attribute__((const));
# 100 "external/ffmpeg/libavcodec/../libavutil/mathematics.h"
int64_t av_rescale_rnd(int64_t a, int64_t b, int64_t c, enum AVRounding) __attribute__((const));
 
 
 
 
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq) __attribute__((const));
 
 
 
 
 
 
 
int64_t av_rescale_q_rnd(int64_t a, AVRational bq, AVRational cq,
                         enum AVRounding) __attribute__((const));
 
 
 
 
 
 
 
int av_compare_ts(int64_t ts_a, AVRational tb_a, int64_t ts_b, AVRational tb_b);
# 134 "external/ffmpeg/libavcodec/../libavutil/mathematics.h"
int64_t av_compare_mod(uint64_t a, uint64_t b, uint64_t mod);
# 145 "external/ffmpeg/libavcodec/../libavutil/mathematics.h"
int64_t av_rescale_delta(AVRational in_tb, int64_t in_ts, AVRational fs_tb, int duration, int64_t *last, AVRational out_tb);
# 158 "external/ffmpeg/libavcodec/../libavutil/mathematics.h"
int64_t av_add_stable(AVRational ts_tb, int64_t ts, AVRational inc_tb, int64_t inc);
# 294 "external/ffmpeg/libavcodec/../libavutil/avutil.h" 2
# 1 "external/ffmpeg/libavcodec/../libavutil/log.h" 1
# 25 "external/ffmpeg/libavcodec/../libavutil/log.h"
# 1 "external/ffmpeg/libavcodec/../libavutil/avutil.h" 1
# 26 "external/ffmpeg/libavcodec/../libavutil/log.h" 2
 
 
 
typedef enum {
    AV_CLASS_CATEGORY_NA = 0,
    AV_CLASS_CATEGORY_INPUT,
    AV_CLASS_CATEGORY_OUTPUT,
    AV_CLASS_CATEGORY_MUXER,
    AV_CLASS_CATEGORY_DEMUXER,
    AV_CLASS_CATEGORY_ENCODER,
    AV_CLASS_CATEGORY_DECODER,
    AV_CLASS_CATEGORY_FILTER,
    AV_CLASS_CATEGORY_BITSTREAM_FILTER,
    AV_CLASS_CATEGORY_SWSCALER,
    AV_CLASS_CATEGORY_SWRESAMPLER,
    AV_CLASS_CATEGORY_DEVICE_VIDEO_OUTPUT = 40,
    AV_CLASS_CATEGORY_DEVICE_VIDEO_INPUT,
    AV_CLASS_CATEGORY_DEVICE_AUDIO_OUTPUT,
    AV_CLASS_CATEGORY_DEVICE_AUDIO_INPUT,
    AV_CLASS_CATEGORY_DEVICE_OUTPUT,
    AV_CLASS_CATEGORY_DEVICE_INPUT,
    AV_CLASS_CATEGORY_NB,
}AVClassCategory;
# 60 "external/ffmpeg/libavcodec/../libavutil/log.h"
struct AVOptionRanges;
 
 
 
 
 
 
typedef struct AVClass {
 
 
 
 
    const char* class_name;
 
 
 
 
 
    const char* (*item_name)(void* ctx);
 
 
 
 
 
 
    const struct AVOption *option;
 
 
 
 
 
 
 
    int version;
 
 
 
 
 
    int log_level_offset_offset;
# 108 "external/ffmpeg/libavcodec/../libavutil/log.h"
    int parent_log_context_offset;
 
 
 
 
    void* (*child_next)(void *obj, void *prev);
# 123 "external/ffmpeg/libavcodec/../libavutil/log.h"
    const struct AVClass* (*child_class_next)(const struct AVClass *prev);
 
 
 
 
 
 
    AVClassCategory category;
 
 
 
 
 
    AVClassCategory (*get_category)(void* ctx);
 
 
 
 
 
    int (*query_ranges)(struct AVOptionRanges **, void *obj, const char *key, int flags);
} AVClass;
# 234 "external/ffmpeg/libavcodec/../libavutil/log.h"
void av_log(void *avcl, int level, const char *fmt, ...) __attribute__((__format__(__printf__, 3, 4)));
# 252 "external/ffmpeg/libavcodec/../libavutil/log.h"
void av_vlog(void *avcl, int level, const char *fmt, va_list vl);
# 261 "external/ffmpeg/libavcodec/../libavutil/log.h"
int av_log_get_level(void);
# 270 "external/ffmpeg/libavcodec/../libavutil/log.h"
void av_log_set_level(int level);
# 282 "external/ffmpeg/libavcodec/../libavutil/log.h"
void av_log_set_callback(void (*callback)(void*, int, const char*, va_list));
# 297 "external/ffmpeg/libavcodec/../libavutil/log.h"
void av_log_default_callback(void *avcl, int level, const char *fmt,
                             va_list vl);
# 307 "external/ffmpeg/libavcodec/../libavutil/log.h"
const char* av_default_item_name(void* ctx);
AVClassCategory av_default_get_category(void *ptr);
# 317 "external/ffmpeg/libavcodec/../libavutil/log.h"
void av_log_format_line(void *ptr, int level, const char *fmt, va_list vl,
                        char *line, int line_size, int *print_prefix);
# 352 "external/ffmpeg/libavcodec/../libavutil/log.h"
void av_log_set_flags(int arg);
int av_log_get_flags(void);
# 295 "external/ffmpeg/libavcodec/../libavutil/avutil.h" 2
# 1 "external/ffmpeg/libavcodec/../libavutil/pixfmt.h" 1
# 61 "external/ffmpeg/libavcodec/../libavutil/pixfmt.h"
enum AVPixelFormat {
    AV_PIX_FMT_NONE = -1,
    AV_PIX_FMT_YUV420P,
    AV_PIX_FMT_YUYV422,
    AV_PIX_FMT_RGB24,
    AV_PIX_FMT_BGR24,
    AV_PIX_FMT_YUV422P,
    AV_PIX_FMT_YUV444P,
    AV_PIX_FMT_YUV410P,
    AV_PIX_FMT_YUV411P,
    AV_PIX_FMT_GRAY8,
    AV_PIX_FMT_MONOWHITE,
    AV_PIX_FMT_MONOBLACK,
    AV_PIX_FMT_PAL8,
    AV_PIX_FMT_YUVJ420P,
    AV_PIX_FMT_YUVJ422P,
    AV_PIX_FMT_YUVJ444P,
 
    AV_PIX_FMT_XVMC_MPEG2_MC,
    AV_PIX_FMT_XVMC_MPEG2_IDCT,
 
 
    AV_PIX_FMT_UYVY422,
    AV_PIX_FMT_UYYVYY411,
    AV_PIX_FMT_BGR8,
    AV_PIX_FMT_BGR4,
    AV_PIX_FMT_BGR4_BYTE,
    AV_PIX_FMT_RGB8,
    AV_PIX_FMT_RGB4,
    AV_PIX_FMT_RGB4_BYTE,
    AV_PIX_FMT_NV12,
    AV_PIX_FMT_NV21,
 
    AV_PIX_FMT_ARGB,
    AV_PIX_FMT_RGBA,
    AV_PIX_FMT_ABGR,
    AV_PIX_FMT_BGRA,
 
    AV_PIX_FMT_GRAY16BE,
    AV_PIX_FMT_GRAY16LE,
    AV_PIX_FMT_YUV440P,
    AV_PIX_FMT_YUVJ440P,
    AV_PIX_FMT_YUVA420P,
 
    AV_PIX_FMT_VDPAU_H264,
    AV_PIX_FMT_VDPAU_MPEG1,
    AV_PIX_FMT_VDPAU_MPEG2,
    AV_PIX_FMT_VDPAU_WMV3,
    AV_PIX_FMT_VDPAU_VC1,
 
    AV_PIX_FMT_RGB48BE,
    AV_PIX_FMT_RGB48LE,
 
    AV_PIX_FMT_RGB565BE,
    AV_PIX_FMT_RGB565LE,
    AV_PIX_FMT_RGB555BE,
    AV_PIX_FMT_RGB555LE,
 
    AV_PIX_FMT_BGR565BE,
    AV_PIX_FMT_BGR565LE,
    AV_PIX_FMT_BGR555BE,
    AV_PIX_FMT_BGR555LE,
 
 
 
 
    AV_PIX_FMT_VAAPI_MOCO,
    AV_PIX_FMT_VAAPI_IDCT,
    AV_PIX_FMT_VAAPI_VLD,
 
    AV_PIX_FMT_VAAPI = AV_PIX_FMT_VAAPI_VLD,
# 140 "external/ffmpeg/libavcodec/../libavutil/pixfmt.h"
    AV_PIX_FMT_YUV420P16LE,
    AV_PIX_FMT_YUV420P16BE,
    AV_PIX_FMT_YUV422P16LE,
    AV_PIX_FMT_YUV422P16BE,
    AV_PIX_FMT_YUV444P16LE,
    AV_PIX_FMT_YUV444P16BE,
 
    AV_PIX_FMT_VDPAU_MPEG4,
 
    AV_PIX_FMT_DXVA2_VLD,
 
    AV_PIX_FMT_RGB444LE,
    AV_PIX_FMT_RGB444BE,
    AV_PIX_FMT_BGR444LE,
    AV_PIX_FMT_BGR444BE,
    AV_PIX_FMT_YA8,
 
    AV_PIX_FMT_Y400A = AV_PIX_FMT_YA8,
    AV_PIX_FMT_GRAY8A= AV_PIX_FMT_YA8,
 
    AV_PIX_FMT_BGR48BE,
    AV_PIX_FMT_BGR48LE,
 
 
 
 
 
 
    AV_PIX_FMT_YUV420P9BE,
    AV_PIX_FMT_YUV420P9LE,
    AV_PIX_FMT_YUV420P10BE,
    AV_PIX_FMT_YUV420P10LE,
    AV_PIX_FMT_YUV422P10BE,
    AV_PIX_FMT_YUV422P10LE,
    AV_PIX_FMT_YUV444P9BE,
    AV_PIX_FMT_YUV444P9LE,
    AV_PIX_FMT_YUV444P10BE,
    AV_PIX_FMT_YUV444P10LE,
    AV_PIX_FMT_YUV422P9BE,
    AV_PIX_FMT_YUV422P9LE,
    AV_PIX_FMT_VDA_VLD,
    AV_PIX_FMT_GBRP,
    AV_PIX_FMT_GBRP9BE,
    AV_PIX_FMT_GBRP9LE,
    AV_PIX_FMT_GBRP10BE,
    AV_PIX_FMT_GBRP10LE,
    AV_PIX_FMT_GBRP16BE,
    AV_PIX_FMT_GBRP16LE,
    AV_PIX_FMT_YUVA422P,
    AV_PIX_FMT_YUVA444P,
    AV_PIX_FMT_YUVA420P9BE,
    AV_PIX_FMT_YUVA420P9LE,
    AV_PIX_FMT_YUVA422P9BE,
    AV_PIX_FMT_YUVA422P9LE,
    AV_PIX_FMT_YUVA444P9BE,
    AV_PIX_FMT_YUVA444P9LE,
    AV_PIX_FMT_YUVA420P10BE,
    AV_PIX_FMT_YUVA420P10LE,
    AV_PIX_FMT_YUVA422P10BE,
    AV_PIX_FMT_YUVA422P10LE,
    AV_PIX_FMT_YUVA444P10BE,
    AV_PIX_FMT_YUVA444P10LE,
    AV_PIX_FMT_YUVA420P16BE,
    AV_PIX_FMT_YUVA420P16LE,
    AV_PIX_FMT_YUVA422P16BE,
    AV_PIX_FMT_YUVA422P16LE,
    AV_PIX_FMT_YUVA444P16BE,
    AV_PIX_FMT_YUVA444P16LE,
 
    AV_PIX_FMT_VDPAU,
 
    AV_PIX_FMT_XYZ12LE,
    AV_PIX_FMT_XYZ12BE,
    AV_PIX_FMT_NV16,
    AV_PIX_FMT_NV20LE,
    AV_PIX_FMT_NV20BE,
 
    AV_PIX_FMT_RGBA64BE,
    AV_PIX_FMT_RGBA64LE,
    AV_PIX_FMT_BGRA64BE,
    AV_PIX_FMT_BGRA64LE,
 
    AV_PIX_FMT_YVYU422,
 
    AV_PIX_FMT_VDA,
 
    AV_PIX_FMT_YA16BE,
    AV_PIX_FMT_YA16LE,
 
    AV_PIX_FMT_GBRAP,
    AV_PIX_FMT_GBRAP16BE,
    AV_PIX_FMT_GBRAP16LE,
 
 
 
 
    AV_PIX_FMT_QSV,
 
 
 
 
    AV_PIX_FMT_MMAL,
 
    AV_PIX_FMT_D3D11VA_VLD,
 
    AV_PIX_FMT_0RGB=0x123+4,
    AV_PIX_FMT_RGB0,
    AV_PIX_FMT_0BGR,
    AV_PIX_FMT_BGR0,
 
    AV_PIX_FMT_YUV420P12BE,
    AV_PIX_FMT_YUV420P12LE,
    AV_PIX_FMT_YUV420P14BE,
    AV_PIX_FMT_YUV420P14LE,
    AV_PIX_FMT_YUV422P12BE,
    AV_PIX_FMT_YUV422P12LE,
    AV_PIX_FMT_YUV422P14BE,
    AV_PIX_FMT_YUV422P14LE,
    AV_PIX_FMT_YUV444P12BE,
    AV_PIX_FMT_YUV444P12LE,
    AV_PIX_FMT_YUV444P14BE,
    AV_PIX_FMT_YUV444P14LE,
    AV_PIX_FMT_GBRP12BE,
    AV_PIX_FMT_GBRP12LE,
    AV_PIX_FMT_GBRP14BE,
    AV_PIX_FMT_GBRP14LE,
    AV_PIX_FMT_YUVJ411P,
 
    AV_PIX_FMT_BAYER_BGGR8,
    AV_PIX_FMT_BAYER_RGGB8,
    AV_PIX_FMT_BAYER_GBRG8,
    AV_PIX_FMT_BAYER_GRBG8,
    AV_PIX_FMT_BAYER_BGGR16LE,
    AV_PIX_FMT_BAYER_BGGR16BE,
    AV_PIX_FMT_BAYER_RGGB16LE,
    AV_PIX_FMT_BAYER_RGGB16BE,
    AV_PIX_FMT_BAYER_GBRG16LE,
    AV_PIX_FMT_BAYER_GBRG16BE,
    AV_PIX_FMT_BAYER_GRBG16LE,
    AV_PIX_FMT_BAYER_GRBG16BE,
 
 
 
    AV_PIX_FMT_YUV440P10LE,
    AV_PIX_FMT_YUV440P10BE,
    AV_PIX_FMT_YUV440P12LE,
    AV_PIX_FMT_YUV440P12BE,
    AV_PIX_FMT_AYUV64LE,
    AV_PIX_FMT_AYUV64BE,
 
    AV_PIX_FMT_VIDEOTOOLBOX,
 
    AV_PIX_FMT_P010LE,
    AV_PIX_FMT_P010BE,
 
    AV_PIX_FMT_NB,
};
# 376 "external/ffmpeg/libavcodec/../libavutil/pixfmt.h"
enum AVColorPrimaries {
    AVCOL_PRI_RESERVED0 = 0,
    AVCOL_PRI_BT709 = 1,
    AVCOL_PRI_UNSPECIFIED = 2,
    AVCOL_PRI_RESERVED = 3,
    AVCOL_PRI_BT470M = 4,
 
    AVCOL_PRI_BT470BG = 5,
    AVCOL_PRI_SMPTE170M = 6,
    AVCOL_PRI_SMPTE240M = 7,
    AVCOL_PRI_FILM = 8,
    AVCOL_PRI_BT2020 = 9,
    AVCOL_PRI_SMPTEST428_1= 10,
    AVCOL_PRI_NB,
};
 
 
 
 
enum AVColorTransferCharacteristic {
    AVCOL_TRC_RESERVED0 = 0,
    AVCOL_TRC_BT709 = 1,
    AVCOL_TRC_UNSPECIFIED = 2,
    AVCOL_TRC_RESERVED = 3,
    AVCOL_TRC_GAMMA22 = 4,
    AVCOL_TRC_GAMMA28 = 5,
    AVCOL_TRC_SMPTE170M = 6,
    AVCOL_TRC_SMPTE240M = 7,
    AVCOL_TRC_LINEAR = 8,
    AVCOL_TRC_LOG = 9,
    AVCOL_TRC_LOG_SQRT = 10,
    AVCOL_TRC_IEC61966_2_4 = 11,
    AVCOL_TRC_BT1361_ECG = 12,
    AVCOL_TRC_IEC61966_2_1 = 13,
    AVCOL_TRC_BT2020_10 = 14,
    AVCOL_TRC_BT2020_12 = 15,
    AVCOL_TRC_SMPTEST2084 = 16,
    AVCOL_TRC_SMPTEST428_1 = 17,
    AVCOL_TRC_NB,
};
 
 
 
 
enum AVColorSpace {
    AVCOL_SPC_RGB = 0,
    AVCOL_SPC_BT709 = 1,
    AVCOL_SPC_UNSPECIFIED = 2,
    AVCOL_SPC_RESERVED = 3,
    AVCOL_SPC_FCC = 4,
    AVCOL_SPC_BT470BG = 5,
    AVCOL_SPC_SMPTE170M = 6,
    AVCOL_SPC_SMPTE240M = 7,
    AVCOL_SPC_YCOCG = 8,
    AVCOL_SPC_BT2020_NCL = 9,
    AVCOL_SPC_BT2020_CL = 10,
    AVCOL_SPC_NB,
};
 
 
 
 
 
 
enum AVColorRange {
    AVCOL_RANGE_UNSPECIFIED = 0,
    AVCOL_RANGE_MPEG = 1,
    AVCOL_RANGE_JPEG = 2,
    AVCOL_RANGE_NB,
};
# 462 "external/ffmpeg/libavcodec/../libavutil/pixfmt.h"
enum AVChromaLocation {
    AVCHROMA_LOC_UNSPECIFIED = 0,
    AVCHROMA_LOC_LEFT = 1,
    AVCHROMA_LOC_CENTER = 2,
    AVCHROMA_LOC_TOPLEFT = 3,
    AVCHROMA_LOC_TOP = 4,
    AVCHROMA_LOC_BOTTOMLEFT = 5,
    AVCHROMA_LOC_BOTTOM = 6,
    AVCHROMA_LOC_NB,
};
# 296 "external/ffmpeg/libavcodec/../libavutil/avutil.h" 2
 
 
 
 
static inline void *av_x_if_null(const void *p, const void *x)
{
    return (void *)(intptr_t)(p ? p : x);
}
# 313 "external/ffmpeg/libavcodec/../libavutil/avutil.h"
unsigned av_int_list_length_for_size(unsigned elsize,
                                     const void *list, uint64_t term) __attribute__((pure));
# 331 "external/ffmpeg/libavcodec/../libavutil/avutil.h"
FILE *av_fopen_utf8(const char *path, const char *mode);
 
 
 
 
AVRational av_get_time_base_q(void);
# 35 "external/ffmpeg/libavcodec/../libavutil/mem.h" 2
# 83 "external/ffmpeg/libavcodec/../libavutil/mem.h"
void *av_malloc(size_t size) __attribute__((__malloc__)) ;
# 93 "external/ffmpeg/libavcodec/../libavutil/mem.h"
                    static inline void *av_malloc_array(size_t nmemb, size_t size)
{
    if (!size || nmemb >= 0x7fffffff / size)
        return ((void*)0);
    return av_malloc(nmemb * size);
}
# 118 "external/ffmpeg/libavcodec/../libavutil/mem.h"
void *av_realloc(void *ptr, size_t size) ;
# 128 "external/ffmpeg/libavcodec/../libavutil/mem.h"
void *av_realloc_f(void *ptr, size_t nelem, size_t elsize);
# 147 "external/ffmpeg/libavcodec/../libavutil/mem.h"
__attribute__((warn_unused_result))
int av_reallocp(void *ptr, size_t size);
# 167 "external/ffmpeg/libavcodec/../libavutil/mem.h"
                    void *av_realloc_array(void *ptr, size_t nmemb, size_t size);
# 186 "external/ffmpeg/libavcodec/../libavutil/mem.h"
                    int av_reallocp_array(void *ptr, size_t nmemb, size_t size);
# 196 "external/ffmpeg/libavcodec/../libavutil/mem.h"
void av_free(void *ptr);
# 206 "external/ffmpeg/libavcodec/../libavutil/mem.h"
void *av_mallocz(size_t size) __attribute__((__malloc__)) ;
# 218 "external/ffmpeg/libavcodec/../libavutil/mem.h"
void *av_calloc(size_t nmemb, size_t size) __attribute__((__malloc__));
# 229 "external/ffmpeg/libavcodec/../libavutil/mem.h"
                    static inline void *av_mallocz_array(size_t nmemb, size_t size)
{
    if (!size || nmemb >= 0x7fffffff / size)
        return ((void*)0);
    return av_mallocz(nmemb * size);
}
 
 
 
 
 
 
 
char *av_strdup(const char *s) __attribute__((__malloc__));
# 252 "external/ffmpeg/libavcodec/../libavutil/mem.h"
char *av_strndup(const char *s, size_t len) __attribute__((__malloc__));
 
 
 
 
 
 
 
void *av_memdup(const void *p, size_t size);
# 270 "external/ffmpeg/libavcodec/../libavutil/mem.h"
void av_freep(void *ptr);
# 293 "external/ffmpeg/libavcodec/../libavutil/mem.h"
void av_dynarray_add(void *tab_ptr, int *nb_ptr, void *elem);
# 308 "external/ffmpeg/libavcodec/../libavutil/mem.h"
__attribute__((warn_unused_result))
int av_dynarray_add_nofree(void *tab_ptr, int *nb_ptr, void *elem);
# 332 "external/ffmpeg/libavcodec/../libavutil/mem.h"
void *av_dynarray2_add(void **tab_ptr, int *nb_ptr, size_t elem_size,
                       const uint8_t *elem_data);
 
 
 
 
 
static inline int av_size_mult(size_t a, size_t b, size_t *r)
{
    size_t t = a * b;
 
 
    if ((a | b) >= ((size_t)1 << (sizeof(size_t) * 4)) && a && t / a != b)
        return (-(22));
    *r = t;
    return 0;
}
 
 
 
 
void av_max_alloc(size_t max);
# 364 "external/ffmpeg/libavcodec/../libavutil/mem.h"
void av_memcpy_backptr(uint8_t *dst, int back, int cnt);
 
 
 
 
 
 
void *av_fast_realloc(void *ptr, unsigned int *size, size_t min_size);
# 385 "external/ffmpeg/libavcodec/../libavutil/mem.h"
void av_fast_malloc(void *ptr, unsigned int *size, size_t min_size);
# 400 "external/ffmpeg/libavcodec/../libavutil/mem.h"
void av_fast_mallocz(void *ptr, unsigned int *size, size_t min_size);
# 465 "external/ffmpeg/libavcodec/../libavutil/common.h" 2
 
 
# 1 "external/ffmpeg/libavcodec/../libavutil/internal.h" 1
# 39 "external/ffmpeg/libavcodec/../libavutil/internal.h"
# 1 "prebuilts/clang/linux-x86/host/sdclang-3.8/bin/../lib/clang/3.8.4/include/stddef.h" 1 3
# 40 "external/ffmpeg/libavcodec/../libavutil/internal.h" 2
# 1 "bionic/libc/include/assert.h" 1
# 63 "bionic/libc/include/assert.h"
__attribute__((__noreturn__)) void __assert(const char *, int, const char *) __attribute__((__noreturn__));
__attribute__((__noreturn__)) void __assert2(const char *, int, const char *, const char *) __attribute__((__noreturn__));
# 41 "external/ffmpeg/libavcodec/../libavutil/internal.h" 2
# 1 "external/ffmpeg/libavcodec/../android/include/config.h" 1
# 42 "external/ffmpeg/libavcodec/../libavutil/internal.h" 2
 
# 1 "external/ffmpeg/libavcodec/../libavutil/timer.h" 1
# 33 "external/ffmpeg/libavcodec/../libavutil/timer.h"
# 1 "external/ffmpeg/libavcodec/../android/include/config.h" 1
# 34 "external/ffmpeg/libavcodec/../libavutil/timer.h" 2
 
 
 
 
 
 
 
 
# 1 "external/ffmpeg/libavcodec/../libavutil/aarch64/timer.h" 1
# 25 "external/ffmpeg/libavcodec/../libavutil/aarch64/timer.h"
# 1 "external/ffmpeg/libavcodec/../android/include/config.h" 1
# 26 "external/ffmpeg/libavcodec/../libavutil/aarch64/timer.h" 2
 
 
 
 
 
static inline uint64_t read_time(void)
{
    uint64_t cycle_counter;
    __asm__ volatile(
        "isb                   \t\n"
        "mrs %0, pmccntr_el0       "
        : "=r"(cycle_counter) :: "memory" );
 
    return cycle_counter;
}
# 43 "external/ffmpeg/libavcodec/../libavutil/timer.h" 2
# 44 "external/ffmpeg/libavcodec/../libavutil/internal.h" 2
# 1 "external/ffmpeg/libavcodec/../libavutil/cpu.h" 1
# 76 "external/ffmpeg/libavcodec/../libavutil/cpu.h"
int av_get_cpu_flags(void);
 
 
 
 
 
void av_force_cpu_flags(int flags);
# 91 "external/ffmpeg/libavcodec/../libavutil/cpu.h"
__attribute__((deprecated)) void av_set_cpu_flags_mask(int mask);
# 102 "external/ffmpeg/libavcodec/../libavutil/cpu.h"
__attribute__((deprecated))
int av_parse_cpu_flags(const char *s);
 
 
 
 
 
 
int av_parse_cpu_caps(unsigned *flags, const char *s);
 
 
 
 
int av_cpu_count(void);
# 45 "external/ffmpeg/libavcodec/../libavutil/internal.h" 2
# 1 "external/ffmpeg/libavcodec/../libavutil/dict.h" 1
# 82 "external/ffmpeg/libavcodec/../libavutil/dict.h"
typedef struct AVDictionaryEntry {
    char *key;
    char *value;
} AVDictionaryEntry;
 
typedef struct AVDictionary AVDictionary;
# 104 "external/ffmpeg/libavcodec/../libavutil/dict.h"
AVDictionaryEntry *av_dict_get(const AVDictionary *m, const char *key,
                               const AVDictionaryEntry *prev, int flags);
 
 
 
 
 
 
 
int av_dict_count(const AVDictionary *m);
# 128 "external/ffmpeg/libavcodec/../libavutil/dict.h"
int av_dict_set(AVDictionary **pm, const char *key, const char *value, int flags);
 
 
 
 
 
 
 
int av_dict_set_int(AVDictionary **pm, const char *key, int64_t value, int flags);
# 154 "external/ffmpeg/libavcodec/../libavutil/dict.h"
int av_dict_parse_string(AVDictionary **pm, const char *str,
                         const char *key_val_sep, const char *pairs_sep,
                         int flags);
# 168 "external/ffmpeg/libavcodec/../libavutil/dict.h"
int av_dict_copy(AVDictionary **dst, const AVDictionary *src, int flags);
 
 
 
 
 
void av_dict_free(AVDictionary **m);
# 191 "external/ffmpeg/libavcodec/../libavutil/dict.h"
int av_dict_get_string(const AVDictionary *m, char **buffer,
                       const char key_val_sep, const char pairs_sep);
# 46 "external/ffmpeg/libavcodec/../libavutil/internal.h" 2
# 170 "external/ffmpeg/libavcodec/../libavutil/internal.h"
# 1 "external/ffmpeg/libavcodec/../libavutil/libm.h" 1
# 29 "external/ffmpeg/libavcodec/../libavutil/libm.h"
# 1 "external/ffmpeg/libavcodec/../android/include/config.h" 1
# 30 "external/ffmpeg/libavcodec/../libavutil/libm.h" 2
# 171 "external/ffmpeg/libavcodec/../libavutil/internal.h" 2
# 229 "external/ffmpeg/libavcodec/../libavutil/internal.h"
void avpriv_report_missing_feature(void *avc,
                                   const char *msg, ...) __attribute__((__format__(__printf__, 2, 3)));
# 240 "external/ffmpeg/libavcodec/../libavutil/internal.h"
void avpriv_request_sample(void *avc,
                           const char *msg, ...) __attribute__((__format__(__printf__, 2, 3)));
# 288 "external/ffmpeg/libavcodec/../libavutil/internal.h"
static __attribute__((always_inline)) inline __attribute__((const)) int64_t ff_rint64_clip(double a, int64_t amin, int64_t amax)
{
    int64_t res;
 
 
 
 
 
    if (a >= 9223372036854775808.0)
        return amax;
    if (a <= -9223372036854775808.0)
        return amin;
 
 
    res = llrint(a);
    if (res > amax)
        return amax;
    if (res < amin)
        return amin;
    return res;
}
# 320 "external/ffmpeg/libavcodec/../libavutil/internal.h"
static __attribute__((always_inline)) inline double ff_exp10(double x)
{
    return exp2(3.32192809488736234787 * x);
}
 
static __attribute__((always_inline)) inline float ff_exp10f(float x)
{
    return exp2f(3.32192809488736234787 * x);
}
# 340 "external/ffmpeg/libavcodec/../libavutil/internal.h"
static __attribute__((always_inline)) inline float ff_fast_powf(float x, float y)
{
    return expf(logf(x) * y);
}
 
 
 
 
 
__attribute__((warn_unused_result))
int avpriv_open(const char *filename, int flags, ...);
 
int avpriv_set_systematic_pal2(uint32_t pal[256], enum AVPixelFormat pix_fmt);
 
static __attribute__((always_inline)) inline __attribute__((const)) int avpriv_mirror(int x, int w)
{
    if (!w)
        return 0;
 
    while ((unsigned)x > (unsigned)w) {
        x = -x;
        if (x < 0)
            x += 2 * w;
    }
    return x;
}
 
void ff_check_pixfmt_descriptors(void);
 
extern const uint8_t ff_reverse[256];
# 468 "external/ffmpeg/libavcodec/../libavutil/common.h" 2
# 25 "external/ffmpeg/libavcodec/vp9dsp_template.c" 2
# 1 "external/ffmpeg/libavcodec/bit_depth_template.c" 1
# 19 "external/ffmpeg/libavcodec/bit_depth_template.c"
# 1 "external/ffmpeg/libavcodec/mathops.h" 1
# 27 "external/ffmpeg/libavcodec/mathops.h"
# 1 "external/ffmpeg/libavcodec/../libavutil/common.h" 1
# 28 "external/ffmpeg/libavcodec/mathops.h" 2
# 1 "external/ffmpeg/libavcodec/../android/include/config.h" 1
# 29 "external/ffmpeg/libavcodec/mathops.h" 2
 
 
 
extern const uint32_t ff_inverse[257];
extern const uint8_t ff_sqrt_tab[256];
extern const uint8_t ff_crop_tab[256 + 2 * 1024];
extern const uint8_t ff_zigzag_direct[64];
# 60 "external/ffmpeg/libavcodec/mathops.h"
static __attribute__((always_inline)) inline int MULH(int a, int b){
    return ((int64_t)(a) * (int64_t)(b)) >> 32;
}
 
 
 
static __attribute__((always_inline)) inline unsigned UMULH(unsigned a, unsigned b){
    return ((uint64_t)(a) * (uint64_t)(b))>>32;
}
# 96 "external/ffmpeg/libavcodec/mathops.h"
static inline __attribute__((const)) int mid_pred(int a, int b, int c)
{
# 107 "external/ffmpeg/libavcodec/mathops.h"
    if(a>b){
        if(c>b){
            if(c>a) b=a;
            else b=c;
        }
    }else{
        if(b>c){
            if(c>a) b=c;
            else b=a;
        }
    }
    return b;
 
}
 
 
 
 
static inline __attribute__((const)) int median4(int a, int b, int c, int d)
{
    if (a < b) {
        if (c < d) return (((b) > (d) ? (d) : (b)) + ((a) > (c) ? (a) : (c))) / 2;
        else return (((b) > (c) ? (c) : (b)) + ((a) > (d) ? (a) : (d))) / 2;
    } else {
        if (c < d) return (((a) > (d) ? (d) : (a)) + ((b) > (c) ? (b) : (c))) / 2;
        else return (((a) > (c) ? (c) : (a)) + ((b) > (d) ? (b) : (d))) / 2;
    }
}
 
 
 
static inline __attribute__((const)) int sign_extend(int val, unsigned bits)
{
    unsigned shift = 8 * sizeof(int) - bits;
    union { unsigned u; int s; } v = { (unsigned) val << shift };
    return v.s >> shift;
}
 
 
 
static inline __attribute__((const)) unsigned zero_extend(unsigned val, unsigned bits)
{
    return (val << ((8 * sizeof(int)) - bits)) >> ((8 * sizeof(int)) - bits);
}
# 215 "external/ffmpeg/libavcodec/mathops.h"
static inline __attribute__((const)) unsigned int ff_sqrt(unsigned int a)
{
    unsigned int b;
 
    if (a < 255) return (ff_sqrt_tab[a + 1] - 1) >> 4;
    else if (a < (1 << 12)) b = ff_sqrt_tab[a >> 4] >> 2;
 
    else if (a < (1 << 14)) b = ff_sqrt_tab[a >> 6] >> 1;
    else if (a < (1 << 16)) b = ff_sqrt_tab[a >> 8] ;
 
    else {
        int s = (31 - __builtin_clz((a >> 16)|1)) >> 1;
        unsigned int c = a >> (s + 2);
        b = ff_sqrt_tab[c >> (s + 8)];
        b = ((uint32_t)((((uint64_t)c) * ff_inverse[b]) >> 32)) + (b << s);
    }
 
    return b - (a < b * b);
}
 
 
static inline __attribute__((const)) float ff_sqrf(float a)
{
    return a*a;
}
 
static inline int8_t ff_u8_to_s8(uint8_t a)
{
    union {
        uint8_t u8;
        int8_t s8;
    } b;
    b.u8 = a;
    return b.s8;
}
# 20 "external/ffmpeg/libavcodec/bit_depth_template.c" 2
# 1 "external/ffmpeg/libavcodec/rnd_avg.h" 1
# 25 "external/ffmpeg/libavcodec/rnd_avg.h"
# 1 "prebuilts/clang/linux-x86/host/sdclang-3.8/bin/../lib/clang/3.8.4/include/stddef.h" 1 3
# 26 "external/ffmpeg/libavcodec/rnd_avg.h" 2
 
 
 
 
 
static inline uint32_t rnd_avg32(uint32_t a, uint32_t b)
{
    return (a | b) - (((a ^ b) & ~((0x01) * 0x01010101UL)) >> 1);
}
 
static inline uint32_t no_rnd_avg32(uint32_t a, uint32_t b)
{
    return (a & b) + (((a ^ b) & ~((0x01) * 0x01010101UL)) >> 1);
}
 
static inline uint64_t rnd_avg64(uint64_t a, uint64_t b)
{
    return (a | b) - (((a ^ b) & ~((0x01) * 0x0001000100010001UL)) >> 1);
}
 
static inline uint64_t no_rnd_avg64(uint64_t a, uint64_t b)
{
    return (a & b) + (((a ^ b) & ~((0x01) * 0x0001000100010001UL)) >> 1);
}
# 21 "external/ffmpeg/libavcodec/bit_depth_template.c" 2
# 1 "external/ffmpeg/libavcodec/../libavutil/intreadwrite.h" 1
# 25 "external/ffmpeg/libavcodec/../libavutil/intreadwrite.h"
# 1 "external/ffmpeg/libavcodec/../libavutil/bswap.h" 1
# 35 "external/ffmpeg/libavcodec/../libavutil/bswap.h"
# 1 "external/ffmpeg/libavcodec/../android/include/config.h" 1
# 36 "external/ffmpeg/libavcodec/../libavutil/bswap.h" 2
 
 
# 1 "external/ffmpeg/libavcodec/../libavutil/aarch64/bswap.h" 1
# 23 "external/ffmpeg/libavcodec/../libavutil/aarch64/bswap.h"
# 1 "external/ffmpeg/libavcodec/../android/include/config.h" 1
# 24 "external/ffmpeg/libavcodec/../libavutil/aarch64/bswap.h" 2
 
 
 
 
 
static __attribute__((always_inline)) inline __attribute__((const)) unsigned av_bswap16(unsigned x)
{
    __asm__("rev16 %w0, %w0" : "+r"(x));
    return x;
}
 
 
static __attribute__((always_inline)) inline __attribute__((const)) uint32_t av_bswap32(uint32_t x)
{
    __asm__("rev %w0, %w0" : "+r"(x));
    return x;
}
 
 
static __attribute__((always_inline)) inline __attribute__((const)) uint64_t av_bswap64(uint64_t x)
{
    __asm__("rev %0, %0" : "+r"(x));
    return x;
}
# 39 "external/ffmpeg/libavcodec/../libavutil/bswap.h" 2
# 26 "external/ffmpeg/libavcodec/../libavutil/intreadwrite.h" 2
 
typedef union {
    uint64_t u64;
    uint32_t u32[2];
    uint16_t u16[4];
    uint8_t u8 [8];
    double f64;
    float f32[2];
} __attribute__((may_alias)) av_alias64;
 
typedef union {
    uint32_t u32;
    uint16_t u16[2];
    uint8_t u8 [4];
    float f32;
} __attribute__((may_alias)) av_alias32;
 
typedef union {
    uint16_t u16;
    uint8_t u8 [2];
} __attribute__((may_alias)) av_alias16;
# 65 "external/ffmpeg/libavcodec/../libavutil/intreadwrite.h"
# 1 "external/ffmpeg/libavcodec/../android/include/config.h" 1
# 66 "external/ffmpeg/libavcodec/../libavutil/intreadwrite.h" 2
# 220 "external/ffmpeg/libavcodec/../libavutil/intreadwrite.h"
union unaligned_64 { uint64_t l; } __attribute__((packed)) __attribute__((may_alias));
union unaligned_32 { uint32_t l; } __attribute__((packed)) __attribute__((may_alias));
union unaligned_16 { uint16_t l; } __attribute__((packed)) __attribute__((may_alias));
# 22 "external/ffmpeg/libavcodec/bit_depth_template.c" 2
# 26 "external/ffmpeg/libavcodec/vp9dsp_template.c" 2
# 1 "external/ffmpeg/libavcodec/vp9dsp.h" 1
# 27 "external/ffmpeg/libavcodec/vp9dsp.h"
# 1 "prebuilts/clang/linux-x86/host/sdclang-3.8/bin/../lib/clang/3.8.4/include/stddef.h" 1 3
# 28 "external/ffmpeg/libavcodec/vp9dsp.h" 2
 
 
# 1 "external/ffmpeg/libavcodec/vp9.h" 1
# 29 "external/ffmpeg/libavcodec/vp9.h"
# 1 "external/ffmpeg/libavcodec/thread.h" 1
# 30 "external/ffmpeg/libavcodec/thread.h"
# 1 "external/ffmpeg/libavcodec/../libavutil/buffer.h" 1
# 73 "external/ffmpeg/libavcodec/../libavutil/buffer.h"
typedef struct AVBuffer AVBuffer;
 
 
 
 
 
 
 
typedef struct AVBufferRef {
    AVBuffer *buffer;
 
 
 
 
 
 
    uint8_t *data;
 
 
 
    int size;
} AVBufferRef;
 
 
 
 
 
 
AVBufferRef *av_buffer_alloc(int size);
 
 
 
 
 
AVBufferRef *av_buffer_allocz(int size);
# 130 "external/ffmpeg/libavcodec/../libavutil/buffer.h"
AVBufferRef *av_buffer_create(uint8_t *data, int size,
                              void (*free)(void *opaque, uint8_t *data),
                              void *opaque, int flags);
 
 
 
 
 
 
void av_buffer_default_free(void *opaque, uint8_t *data);
 
 
 
 
 
 
 
AVBufferRef *av_buffer_ref(AVBufferRef *buf);
 
 
 
 
 
 
 
void av_buffer_unref(AVBufferRef **buf);
 
 
 
 
 
 
 
int av_buffer_is_writable(const AVBufferRef *buf);
 
 
 
 
void *av_buffer_get_opaque(const AVBufferRef *buf);
 
int av_buffer_get_ref_count(const AVBufferRef *buf);
# 181 "external/ffmpeg/libavcodec/../libavutil/buffer.h"
int av_buffer_make_writable(AVBufferRef **buf);
# 198 "external/ffmpeg/libavcodec/../libavutil/buffer.h"
int av_buffer_realloc(AVBufferRef **buf, int size);
# 238 "external/ffmpeg/libavcodec/../libavutil/buffer.h"
typedef struct AVBufferPool AVBufferPool;
# 249 "external/ffmpeg/libavcodec/../libavutil/buffer.h"
AVBufferPool *av_buffer_pool_init(int size, AVBufferRef* (*alloc)(int size));
# 260 "external/ffmpeg/libavcodec/../libavutil/buffer.h"
void av_buffer_pool_uninit(AVBufferPool **pool);
 
 
 
 
 
 
 
AVBufferRef *av_buffer_pool_get(AVBufferPool *pool);
# 31 "external/ffmpeg/libavcodec/thread.h" 2
 
# 1 "external/ffmpeg/libavcodec/../android/include/config.h" 1
# 33 "external/ffmpeg/libavcodec/thread.h" 2
# 1 "external/ffmpeg/libavcodec/avcodec.h" 1
# 31 "external/ffmpeg/libavcodec/avcodec.h"
# 1 "external/ffmpeg/libavcodec/../libavutil/samplefmt.h" 1
# 59 "external/ffmpeg/libavcodec/../libavutil/samplefmt.h"
enum AVSampleFormat {
    AV_SAMPLE_FMT_NONE = -1,
    AV_SAMPLE_FMT_U8,
    AV_SAMPLE_FMT_S16,
    AV_SAMPLE_FMT_S32,
    AV_SAMPLE_FMT_FLT,
    AV_SAMPLE_FMT_DBL,
 
    AV_SAMPLE_FMT_U8P,
    AV_SAMPLE_FMT_S16P,
    AV_SAMPLE_FMT_S32P,
    AV_SAMPLE_FMT_FLTP,
    AV_SAMPLE_FMT_DBLP,
 
    AV_SAMPLE_FMT_NB
};
 
 
 
 
 
const char *av_get_sample_fmt_name(enum AVSampleFormat sample_fmt);
 
 
 
 
 
enum AVSampleFormat av_get_sample_fmt(const char *name);
 
 
 
 
 
 
 
enum AVSampleFormat av_get_alt_sample_fmt(enum AVSampleFormat sample_fmt, int planar);
# 105 "external/ffmpeg/libavcodec/../libavutil/samplefmt.h"
enum AVSampleFormat av_get_packed_sample_fmt(enum AVSampleFormat sample_fmt);
# 116 "external/ffmpeg/libavcodec/../libavutil/samplefmt.h"
enum AVSampleFormat av_get_planar_sample_fmt(enum AVSampleFormat sample_fmt);
# 130 "external/ffmpeg/libavcodec/../libavutil/samplefmt.h"
char *av_get_sample_fmt_string(char *buf, int buf_size, enum AVSampleFormat sample_fmt);
# 139 "external/ffmpeg/libavcodec/../libavutil/samplefmt.h"
int av_get_bytes_per_sample(enum AVSampleFormat sample_fmt);
 
 
 
 
 
 
 
int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt);
# 159 "external/ffmpeg/libavcodec/../libavutil/samplefmt.h"
int av_samples_get_buffer_size(int *linesize, int nb_channels, int nb_samples,
                               enum AVSampleFormat sample_fmt, int align);
# 201 "external/ffmpeg/libavcodec/../libavutil/samplefmt.h"
int av_samples_fill_arrays(uint8_t **audio_data, int *linesize,
                           const uint8_t *buf,
                           int nb_channels, int nb_samples,
                           enum AVSampleFormat sample_fmt, int align);
# 225 "external/ffmpeg/libavcodec/../libavutil/samplefmt.h"
int av_samples_alloc(uint8_t **audio_data, int *linesize, int nb_channels,
                     int nb_samples, enum AVSampleFormat sample_fmt, int align);
# 237 "external/ffmpeg/libavcodec/../libavutil/samplefmt.h"
int av_samples_alloc_array_and_samples(uint8_t ***audio_data, int *linesize, int nb_channels,
                                       int nb_samples, enum AVSampleFormat sample_fmt, int align);
# 251 "external/ffmpeg/libavcodec/../libavutil/samplefmt.h"
int av_samples_copy(uint8_t **dst, uint8_t * const *src, int dst_offset,
                    int src_offset, int nb_samples, int nb_channels,
                    enum AVSampleFormat sample_fmt);
# 264 "external/ffmpeg/libavcodec/../libavutil/samplefmt.h"
int av_samples_set_silence(uint8_t **audio_data, int offset, int nb_samples,
                           int nb_channels, enum AVSampleFormat sample_fmt);
# 32 "external/ffmpeg/libavcodec/avcodec.h" 2
 
 
 
 
# 1 "external/ffmpeg/libavcodec/../libavutil/channel_layout.h" 1
# 114 "external/ffmpeg/libavcodec/../libavutil/channel_layout.h"
enum AVMatrixEncoding {
    AV_MATRIX_ENCODING_NONE,
    AV_MATRIX_ENCODING_DOLBY,
    AV_MATRIX_ENCODING_DPLII,
    AV_MATRIX_ENCODING_DPLIIX,
    AV_MATRIX_ENCODING_DPLIIZ,
    AV_MATRIX_ENCODING_DOLBYEX,
    AV_MATRIX_ENCODING_DOLBYHEADPHONE,
    AV_MATRIX_ENCODING_NB
};
# 147 "external/ffmpeg/libavcodec/../libavutil/channel_layout.h"
uint64_t av_get_channel_layout(const char *name);
# 156 "external/ffmpeg/libavcodec/../libavutil/channel_layout.h"
void av_get_channel_layout_string(char *buf, int buf_size, int nb_channels, uint64_t channel_layout);
 
struct AVBPrint;
 
 
 
void av_bprint_channel_layout(struct AVBPrint *bp, int nb_channels, uint64_t channel_layout);
 
 
 
 
int av_get_channel_layout_nb_channels(uint64_t channel_layout);
 
 
 
 
int64_t av_get_default_channel_layout(int nb_channels);
# 183 "external/ffmpeg/libavcodec/../libavutil/channel_layout.h"
int av_get_channel_layout_channel_index(uint64_t channel_layout,
                                        uint64_t channel);
 
 
 
 
uint64_t av_channel_layout_extract_channel(uint64_t channel_layout, int index);
 
 
 
 
 
 
const char *av_get_channel_name(uint64_t channel);
 
 
 
 
 
 
 
const char *av_get_channel_description(uint64_t channel);
# 215 "external/ffmpeg/libavcodec/../libavutil/channel_layout.h"
int av_get_standard_channel_layout(unsigned index, uint64_t *layout,
                                   const char **name);
# 37 "external/ffmpeg/libavcodec/avcodec.h" 2
 
# 1 "external/ffmpeg/libavcodec/../libavutil/frame.h" 1
# 48 "external/ffmpeg/libavcodec/../libavutil/frame.h"
enum AVFrameSideDataType {
 
 
 
    AV_FRAME_DATA_PANSCAN,
 
 
 
 
 
    AV_FRAME_DATA_A53_CC,
 
 
 
 
    AV_FRAME_DATA_STEREO3D,
 
 
 
    AV_FRAME_DATA_MATRIXENCODING,
 
 
 
 
    AV_FRAME_DATA_DOWNMIX_INFO,
 
 
 
    AV_FRAME_DATA_REPLAYGAIN,
 
 
 
 
 
 
 
    AV_FRAME_DATA_DISPLAYMATRIX,
 
 
 
 
    AV_FRAME_DATA_AFD,
 
 
 
 
 
 
    AV_FRAME_DATA_MOTION_VECTORS,
# 108 "external/ffmpeg/libavcodec/../libavutil/frame.h"
    AV_FRAME_DATA_SKIP_SAMPLES,
 
 
 
 
    AV_FRAME_DATA_AUDIO_SERVICE_TYPE,
 
 
 
 
 
    AV_FRAME_DATA_MASTERING_DISPLAY_METADATA,
 
 
 
 
    AV_FRAME_DATA_GOP_TIMECODE
};
 
enum AVActiveFormatDescription {
    AV_AFD_SAME = 8,
    AV_AFD_4_3 = 9,
    AV_AFD_16_9 = 10,
    AV_AFD_14_9 = 11,
    AV_AFD_4_3_SP_14_9 = 13,
    AV_AFD_16_9_SP_14_9 = 14,
    AV_AFD_SP_4_3 = 15,
};
# 144 "external/ffmpeg/libavcodec/../libavutil/frame.h"
typedef struct AVFrameSideData {
    enum AVFrameSideDataType type;
    uint8_t *data;
    int size;
    AVDictionary *metadata;
    AVBufferRef *buf;
} AVFrameSideData;
# 181 "external/ffmpeg/libavcodec/../libavutil/frame.h"
typedef struct AVFrame {
# 192 "external/ffmpeg/libavcodec/../libavutil/frame.h"
    uint8_t *data[8];
# 209 "external/ffmpeg/libavcodec/../libavutil/frame.h"
    int linesize[8];
# 225 "external/ffmpeg/libavcodec/../libavutil/frame.h"
    uint8_t **extended_data;
 
 
 
 
    int width, height;
 
 
 
 
    int nb_samples;
 
 
 
 
 
 
    int format;
 
 
 
 
    int key_frame;
 
 
 
 
    enum AVPictureType pict_type;
 
 
 
 
    AVRational sample_aspect_ratio;
 
 
 
 
    int64_t pts;
 
 
 
 
    int64_t pkt_pts;
 
 
 
 
 
 
    int64_t pkt_dts;
 
 
 
 
    int coded_picture_number;
 
 
 
    int display_picture_number;
 
 
 
 
    int quality;
 
 
 
 
    void *opaque;
 
 
 
 
 
    __attribute__((deprecated))
    uint64_t error[8];
 
 
 
 
 
 
    int repeat_pict;
 
 
 
 
    int interlaced_frame;
 
 
 
 
    int top_field_first;
 
 
 
 
    int palette_has_changed;
# 333 "external/ffmpeg/libavcodec/../libavutil/frame.h"
    int64_t reordered_opaque;
 
 
 
 
    int sample_rate;
 
 
 
 
    uint64_t channel_layout;
# 357 "external/ffmpeg/libavcodec/../libavutil/frame.h"
    AVBufferRef *buf[8];
# 371 "external/ffmpeg/libavcodec/../libavutil/frame.h"
    AVBufferRef **extended_buf;
 
 
 
    int nb_extended_buf;
 
    AVFrameSideData **side_data;
    int nb_side_data;
# 398 "external/ffmpeg/libavcodec/../libavutil/frame.h"
    int flags;
# 407 "external/ffmpeg/libavcodec/../libavutil/frame.h"
    enum AVColorRange color_range;
 
    enum AVColorPrimaries color_primaries;
 
    enum AVColorTransferCharacteristic color_trc;
# 420 "external/ffmpeg/libavcodec/../libavutil/frame.h"
    enum AVColorSpace colorspace;
 
    enum AVChromaLocation chroma_location;
# 431 "external/ffmpeg/libavcodec/../libavutil/frame.h"
    int64_t best_effort_timestamp;
# 440 "external/ffmpeg/libavcodec/../libavutil/frame.h"
    int64_t pkt_pos;
# 450 "external/ffmpeg/libavcodec/../libavutil/frame.h"
    int64_t pkt_duration;
# 459 "external/ffmpeg/libavcodec/../libavutil/frame.h"
    AVDictionary *metadata;
# 470 "external/ffmpeg/libavcodec/../libavutil/frame.h"
    int decode_error_flags;
# 481 "external/ffmpeg/libavcodec/../libavutil/frame.h"
    int channels;
# 491 "external/ffmpeg/libavcodec/../libavutil/frame.h"
    int pkt_size;
 
 
 
 
 
 
    __attribute__((deprecated))
    int8_t *qscale_table;
 
 
 
 
    __attribute__((deprecated))
    int qstride;
 
    __attribute__((deprecated))
    int qscale_type;
 
 
 
 
    AVBufferRef *qp_table_buf;
 
} AVFrame;
 
 
 
 
 
 
int64_t av_frame_get_best_effort_timestamp(const AVFrame *frame);
void av_frame_set_best_effort_timestamp(AVFrame *frame, int64_t val);
int64_t av_frame_get_pkt_duration (const AVFrame *frame);
void av_frame_set_pkt_duration (AVFrame *frame, int64_t val);
int64_t av_frame_get_pkt_pos (const AVFrame *frame);
void av_frame_set_pkt_pos (AVFrame *frame, int64_t val);
int64_t av_frame_get_channel_layout (const AVFrame *frame);
void av_frame_set_channel_layout (AVFrame *frame, int64_t val);
int av_frame_get_channels (const AVFrame *frame);
void av_frame_set_channels (AVFrame *frame, int val);
int av_frame_get_sample_rate (const AVFrame *frame);
void av_frame_set_sample_rate (AVFrame *frame, int val);
AVDictionary *av_frame_get_metadata (const AVFrame *frame);
void av_frame_set_metadata (AVFrame *frame, AVDictionary *val);
int av_frame_get_decode_error_flags (const AVFrame *frame);
void av_frame_set_decode_error_flags (AVFrame *frame, int val);
int av_frame_get_pkt_size(const AVFrame *frame);
void av_frame_set_pkt_size(AVFrame *frame, int val);
AVDictionary **avpriv_frame_get_metadatap(AVFrame *frame);
 
int8_t *av_frame_get_qp_table(AVFrame *f, int *stride, int *type);
int av_frame_set_qp_table(AVFrame *f, AVBufferRef *buf, int stride, int type);
 
enum AVColorSpace av_frame_get_colorspace(const AVFrame *frame);
void av_frame_set_colorspace(AVFrame *frame, enum AVColorSpace val);
enum AVColorRange av_frame_get_color_range(const AVFrame *frame);
void av_frame_set_color_range(AVFrame *frame, enum AVColorRange val);
 
 
 
 
 
const char *av_get_colorspace_name(enum AVColorSpace val);
# 566 "external/ffmpeg/libavcodec/../libavutil/frame.h"
AVFrame *av_frame_alloc(void);
# 575 "external/ffmpeg/libavcodec/../libavutil/frame.h"
void av_frame_free(AVFrame **frame);
# 588 "external/ffmpeg/libavcodec/../libavutil/frame.h"
int av_frame_ref(AVFrame *dst, const AVFrame *src);
# 597 "external/ffmpeg/libavcodec/../libavutil/frame.h"
AVFrame *av_frame_clone(const AVFrame *src);
 
 
 
 
void av_frame_unref(AVFrame *frame);
 
 
 
 
void av_frame_move_ref(AVFrame *dst, AVFrame *src);
# 626 "external/ffmpeg/libavcodec/../libavutil/frame.h"
int av_frame_get_buffer(AVFrame *frame, int align);
# 640 "external/ffmpeg/libavcodec/../libavutil/frame.h"
int av_frame_is_writable(AVFrame *frame);
# 653 "external/ffmpeg/libavcodec/../libavutil/frame.h"
int av_frame_make_writable(AVFrame *frame);
# 666 "external/ffmpeg/libavcodec/../libavutil/frame.h"
int av_frame_copy(AVFrame *dst, const AVFrame *src);
# 676 "external/ffmpeg/libavcodec/../libavutil/frame.h"
int av_frame_copy_props(AVFrame *dst, const AVFrame *src);
# 686 "external/ffmpeg/libavcodec/../libavutil/frame.h"
AVBufferRef *av_frame_get_plane_buffer(AVFrame *frame, int plane);
# 697 "external/ffmpeg/libavcodec/../libavutil/frame.h"
AVFrameSideData *av_frame_new_side_data(AVFrame *frame,
                                        enum AVFrameSideDataType type,
                                        int size);
 
 
 
 
 
AVFrameSideData *av_frame_get_side_data(const AVFrame *frame,
                                        enum AVFrameSideDataType type);
 
 
 
 
 
void av_frame_remove_side_data(AVFrame *frame, enum AVFrameSideDataType type);
 
 
 
 
const char *av_frame_side_data_name(enum AVFrameSideDataType type);
# 39 "external/ffmpeg/libavcodec/avcodec.h" 2
 
 
 
 
# 1 "external/ffmpeg/libavcodec/version.h" 1
# 44 "external/ffmpeg/libavcodec/avcodec.h" 2
# 101 "external/ffmpeg/libavcodec/avcodec.h"
enum AVCodecID {
    AV_CODEC_ID_NONE,
 
 
    AV_CODEC_ID_MPEG1VIDEO,
    AV_CODEC_ID_MPEG2VIDEO,
 
    AV_CODEC_ID_MPEG2VIDEO_XVMC,
 
    AV_CODEC_ID_H261,
    AV_CODEC_ID_H263,
    AV_CODEC_ID_RV10,
    AV_CODEC_ID_RV20,
    AV_CODEC_ID_MJPEG,
    AV_CODEC_ID_MJPEGB,
    AV_CODEC_ID_LJPEG,
    AV_CODEC_ID_SP5X,
    AV_CODEC_ID_JPEGLS,
    AV_CODEC_ID_MPEG4,
    AV_CODEC_ID_RAWVIDEO,
    AV_CODEC_ID_MSMPEG4V1,
    AV_CODEC_ID_MSMPEG4V2,
    AV_CODEC_ID_MSMPEG4V3,
    AV_CODEC_ID_WMV1,
    AV_CODEC_ID_WMV2,
    AV_CODEC_ID_H263P,
    AV_CODEC_ID_H263I,
    AV_CODEC_ID_FLV1,
    AV_CODEC_ID_SVQ1,
    AV_CODEC_ID_SVQ3,
    AV_CODEC_ID_DVVIDEO,
    AV_CODEC_ID_HUFFYUV,
    AV_CODEC_ID_CYUV,
    AV_CODEC_ID_H264,
    AV_CODEC_ID_INDEO3,
    AV_CODEC_ID_VP3,
    AV_CODEC_ID_THEORA,
    AV_CODEC_ID_ASV1,
    AV_CODEC_ID_ASV2,
    AV_CODEC_ID_FFV1,
    AV_CODEC_ID_4XM,
    AV_CODEC_ID_VCR1,
    AV_CODEC_ID_CLJR,
    AV_CODEC_ID_MDEC,
    AV_CODEC_ID_ROQ,
    AV_CODEC_ID_INTERPLAY_VIDEO,
    AV_CODEC_ID_XAN_WC3,
    AV_CODEC_ID_XAN_WC4,
    AV_CODEC_ID_RPZA,
    AV_CODEC_ID_CINEPAK,
    AV_CODEC_ID_WS_VQA,
    AV_CODEC_ID_MSRLE,
    AV_CODEC_ID_MSVIDEO1,
    AV_CODEC_ID_IDCIN,
    AV_CODEC_ID_8BPS,
    AV_CODEC_ID_SMC,
    AV_CODEC_ID_FLIC,
    AV_CODEC_ID_TRUEMOTION1,
    AV_CODEC_ID_VMDVIDEO,
    AV_CODEC_ID_MSZH,
    AV_CODEC_ID_ZLIB,
    AV_CODEC_ID_QTRLE,
    AV_CODEC_ID_TSCC,
    AV_CODEC_ID_ULTI,
    AV_CODEC_ID_QDRAW,
    AV_CODEC_ID_VIXL,
    AV_CODEC_ID_QPEG,
    AV_CODEC_ID_PNG,
    AV_CODEC_ID_PPM,
    AV_CODEC_ID_PBM,
    AV_CODEC_ID_PGM,
    AV_CODEC_ID_PGMYUV,
    AV_CODEC_ID_PAM,
    AV_CODEC_ID_FFVHUFF,
    AV_CODEC_ID_RV30,
    AV_CODEC_ID_RV40,
    AV_CODEC_ID_VC1,
    AV_CODEC_ID_WMV3,
    AV_CODEC_ID_LOCO,
    AV_CODEC_ID_WNV1,
    AV_CODEC_ID_AASC,
    AV_CODEC_ID_INDEO2,
    AV_CODEC_ID_FRAPS,
    AV_CODEC_ID_TRUEMOTION2,
    AV_CODEC_ID_BMP,
    AV_CODEC_ID_CSCD,
    AV_CODEC_ID_MMVIDEO,
    AV_CODEC_ID_ZMBV,
    AV_CODEC_ID_AVS,
    AV_CODEC_ID_SMACKVIDEO,
    AV_CODEC_ID_NUV,
    AV_CODEC_ID_KMVC,
    AV_CODEC_ID_FLASHSV,
    AV_CODEC_ID_CAVS,
    AV_CODEC_ID_JPEG2000,
    AV_CODEC_ID_VMNC,
    AV_CODEC_ID_VP5,
    AV_CODEC_ID_VP6,
    AV_CODEC_ID_VP6F,
    AV_CODEC_ID_TARGA,
    AV_CODEC_ID_DSICINVIDEO,
    AV_CODEC_ID_TIERTEXSEQVIDEO,
    AV_CODEC_ID_TIFF,
    AV_CODEC_ID_GIF,
    AV_CODEC_ID_DXA,
    AV_CODEC_ID_DNXHD,
    AV_CODEC_ID_THP,
    AV_CODEC_ID_SGI,
    AV_CODEC_ID_C93,
    AV_CODEC_ID_BETHSOFTVID,
    AV_CODEC_ID_PTX,
    AV_CODEC_ID_TXD,
    AV_CODEC_ID_VP6A,
    AV_CODEC_ID_AMV,
    AV_CODEC_ID_VB,
    AV_CODEC_ID_PCX,
    AV_CODEC_ID_SUNRAST,
    AV_CODEC_ID_INDEO4,
    AV_CODEC_ID_INDEO5,
    AV_CODEC_ID_MIMIC,
    AV_CODEC_ID_RL2,
    AV_CODEC_ID_ESCAPE124,
    AV_CODEC_ID_DIRAC,
    AV_CODEC_ID_BFI,
    AV_CODEC_ID_CMV,
    AV_CODEC_ID_MOTIONPIXELS,
    AV_CODEC_ID_TGV,
    AV_CODEC_ID_TGQ,
    AV_CODEC_ID_TQI,
    AV_CODEC_ID_AURA,
    AV_CODEC_ID_AURA2,
    AV_CODEC_ID_V210X,
    AV_CODEC_ID_TMV,
    AV_CODEC_ID_V210,
    AV_CODEC_ID_DPX,
    AV_CODEC_ID_MAD,
    AV_CODEC_ID_FRWU,
    AV_CODEC_ID_FLASHSV2,
    AV_CODEC_ID_CDGRAPHICS,
    AV_CODEC_ID_R210,
    AV_CODEC_ID_ANM,
    AV_CODEC_ID_BINKVIDEO,
    AV_CODEC_ID_IFF_ILBM,
 
    AV_CODEC_ID_KGV1,
    AV_CODEC_ID_YOP,
    AV_CODEC_ID_VP8,
    AV_CODEC_ID_PICTOR,
    AV_CODEC_ID_ANSI,
    AV_CODEC_ID_A64_MULTI,
    AV_CODEC_ID_A64_MULTI5,
    AV_CODEC_ID_R10K,
    AV_CODEC_ID_MXPEG,
    AV_CODEC_ID_LAGARITH,
    AV_CODEC_ID_PRORES,
    AV_CODEC_ID_JV,
    AV_CODEC_ID_DFA,
    AV_CODEC_ID_WMV3IMAGE,
    AV_CODEC_ID_VC1IMAGE,
    AV_CODEC_ID_UTVIDEO,
    AV_CODEC_ID_BMV_VIDEO,
    AV_CODEC_ID_VBLE,
    AV_CODEC_ID_DXTORY,
    AV_CODEC_ID_V410,
    AV_CODEC_ID_XWD,
    AV_CODEC_ID_CDXL,
    AV_CODEC_ID_XBM,
    AV_CODEC_ID_ZEROCODEC,
    AV_CODEC_ID_MSS1,
    AV_CODEC_ID_MSA1,
    AV_CODEC_ID_TSCC2,
    AV_CODEC_ID_MTS2,
    AV_CODEC_ID_CLLC,
    AV_CODEC_ID_MSS2,
    AV_CODEC_ID_VP9,
    AV_CODEC_ID_AIC,
    AV_CODEC_ID_ESCAPE130,
    AV_CODEC_ID_G2M,
    AV_CODEC_ID_WEBP,
    AV_CODEC_ID_HNM4_VIDEO,
    AV_CODEC_ID_HEVC,
 
    AV_CODEC_ID_FIC,
    AV_CODEC_ID_ALIAS_PIX,
    AV_CODEC_ID_BRENDER_PIX,
    AV_CODEC_ID_PAF_VIDEO,
    AV_CODEC_ID_EXR,
    AV_CODEC_ID_VP7,
    AV_CODEC_ID_SANM,
    AV_CODEC_ID_SGIRLE,
    AV_CODEC_ID_MVC1,
    AV_CODEC_ID_MVC2,
    AV_CODEC_ID_HQX,
    AV_CODEC_ID_TDSC,
    AV_CODEC_ID_HQ_HQA,
    AV_CODEC_ID_HAP,
    AV_CODEC_ID_DDS,
    AV_CODEC_ID_DXV,
    AV_CODEC_ID_SCREENPRESSO,
    AV_CODEC_ID_RSCC,
 
    AV_CODEC_ID_Y41P = 0x8000,
    AV_CODEC_ID_AVRP,
    AV_CODEC_ID_012V,
    AV_CODEC_ID_AVUI,
    AV_CODEC_ID_AYUV,
    AV_CODEC_ID_TARGA_Y216,
    AV_CODEC_ID_V308,
    AV_CODEC_ID_V408,
    AV_CODEC_ID_YUV4,
    AV_CODEC_ID_AVRN,
    AV_CODEC_ID_CPIA,
    AV_CODEC_ID_XFACE,
    AV_CODEC_ID_SNOW,
    AV_CODEC_ID_SMVJPEG,
    AV_CODEC_ID_APNG,
    AV_CODEC_ID_DAALA,
    AV_CODEC_ID_CFHD,
 
 
    AV_CODEC_ID_FIRST_AUDIO = 0x10000,
    AV_CODEC_ID_PCM_S16LE = 0x10000,
    AV_CODEC_ID_PCM_S16BE,
    AV_CODEC_ID_PCM_U16LE,
    AV_CODEC_ID_PCM_U16BE,
    AV_CODEC_ID_PCM_S8,
    AV_CODEC_ID_PCM_U8,
    AV_CODEC_ID_PCM_MULAW,
    AV_CODEC_ID_PCM_ALAW,
    AV_CODEC_ID_PCM_S32LE,
    AV_CODEC_ID_PCM_S32BE,
    AV_CODEC_ID_PCM_U32LE,
    AV_CODEC_ID_PCM_U32BE,
    AV_CODEC_ID_PCM_S24LE,
    AV_CODEC_ID_PCM_S24BE,
    AV_CODEC_ID_PCM_U24LE,
    AV_CODEC_ID_PCM_U24BE,
    AV_CODEC_ID_PCM_S24DAUD,
    AV_CODEC_ID_PCM_ZORK,
    AV_CODEC_ID_PCM_S16LE_PLANAR,
    AV_CODEC_ID_PCM_DVD,
    AV_CODEC_ID_PCM_F32BE,
    AV_CODEC_ID_PCM_F32LE,
    AV_CODEC_ID_PCM_F64BE,
    AV_CODEC_ID_PCM_F64LE,
    AV_CODEC_ID_PCM_BLURAY,
    AV_CODEC_ID_PCM_LXF,
    AV_CODEC_ID_S302M,
    AV_CODEC_ID_PCM_S8_PLANAR,
    AV_CODEC_ID_PCM_S24LE_PLANAR,
    AV_CODEC_ID_PCM_S32LE_PLANAR,
    AV_CODEC_ID_PCM_S16BE_PLANAR,
 
 
 
 
 
    AV_CODEC_ID_ADPCM_IMA_QT = 0x11000,
    AV_CODEC_ID_ADPCM_IMA_WAV,
    AV_CODEC_ID_ADPCM_IMA_DK3,
    AV_CODEC_ID_ADPCM_IMA_DK4,
    AV_CODEC_ID_ADPCM_IMA_WS,
    AV_CODEC_ID_ADPCM_IMA_SMJPEG,
    AV_CODEC_ID_ADPCM_MS,
    AV_CODEC_ID_ADPCM_4XM,
    AV_CODEC_ID_ADPCM_XA,
    AV_CODEC_ID_ADPCM_ADX,
    AV_CODEC_ID_ADPCM_EA,
    AV_CODEC_ID_ADPCM_G726,
    AV_CODEC_ID_ADPCM_CT,
    AV_CODEC_ID_ADPCM_SWF,
    AV_CODEC_ID_ADPCM_YAMAHA,
    AV_CODEC_ID_ADPCM_SBPRO_4,
    AV_CODEC_ID_ADPCM_SBPRO_3,
    AV_CODEC_ID_ADPCM_SBPRO_2,
    AV_CODEC_ID_ADPCM_THP,
    AV_CODEC_ID_ADPCM_IMA_AMV,
    AV_CODEC_ID_ADPCM_EA_R1,
    AV_CODEC_ID_ADPCM_EA_R3,
    AV_CODEC_ID_ADPCM_EA_R2,
    AV_CODEC_ID_ADPCM_IMA_EA_SEAD,
    AV_CODEC_ID_ADPCM_IMA_EA_EACS,
    AV_CODEC_ID_ADPCM_EA_XAS,
    AV_CODEC_ID_ADPCM_EA_MAXIS_XA,
    AV_CODEC_ID_ADPCM_IMA_ISS,
    AV_CODEC_ID_ADPCM_G722,
    AV_CODEC_ID_ADPCM_IMA_APC,
    AV_CODEC_ID_ADPCM_VIMA,
 
    AV_CODEC_ID_VIMA = AV_CODEC_ID_ADPCM_VIMA,
 
 
    AV_CODEC_ID_ADPCM_AFC = 0x11800,
    AV_CODEC_ID_ADPCM_IMA_OKI,
    AV_CODEC_ID_ADPCM_DTK,
    AV_CODEC_ID_ADPCM_IMA_RAD,
    AV_CODEC_ID_ADPCM_G726LE,
    AV_CODEC_ID_ADPCM_THP_LE,
    AV_CODEC_ID_ADPCM_PSX,
    AV_CODEC_ID_ADPCM_AICA,
 
 
    AV_CODEC_ID_AMR_NB = 0x12000,
    AV_CODEC_ID_AMR_WB,
 
 
    AV_CODEC_ID_RA_144 = 0x13000,
    AV_CODEC_ID_RA_288,
 
 
    AV_CODEC_ID_ROQ_DPCM = 0x14000,
    AV_CODEC_ID_INTERPLAY_DPCM,
    AV_CODEC_ID_XAN_DPCM,
    AV_CODEC_ID_SOL_DPCM,
 
    AV_CODEC_ID_SDX2_DPCM = 0x14800,
 
 
    AV_CODEC_ID_MP2 = 0x15000,
    AV_CODEC_ID_MP3,
    AV_CODEC_ID_AAC,
    AV_CODEC_ID_AC3,
    AV_CODEC_ID_DTS,
    AV_CODEC_ID_VORBIS,
    AV_CODEC_ID_DVAUDIO,
    AV_CODEC_ID_WMAV1,
    AV_CODEC_ID_WMAV2,
    AV_CODEC_ID_MACE3,
    AV_CODEC_ID_MACE6,
    AV_CODEC_ID_VMDAUDIO,
    AV_CODEC_ID_FLAC,
    AV_CODEC_ID_MP3ADU,
    AV_CODEC_ID_MP3ON4,
    AV_CODEC_ID_SHORTEN,
    AV_CODEC_ID_ALAC,
    AV_CODEC_ID_WESTWOOD_SND1,
    AV_CODEC_ID_GSM,
    AV_CODEC_ID_QDM2,
    AV_CODEC_ID_COOK,
    AV_CODEC_ID_TRUESPEECH,
    AV_CODEC_ID_TTA,
    AV_CODEC_ID_SMACKAUDIO,
    AV_CODEC_ID_QCELP,
    AV_CODEC_ID_WAVPACK,
    AV_CODEC_ID_DSICINAUDIO,
    AV_CODEC_ID_IMC,
    AV_CODEC_ID_MUSEPACK7,
    AV_CODEC_ID_MLP,
    AV_CODEC_ID_GSM_MS,
    AV_CODEC_ID_ATRAC3,
 
    AV_CODEC_ID_VOXWARE,
 
    AV_CODEC_ID_APE,
    AV_CODEC_ID_NELLYMOSER,
    AV_CODEC_ID_MUSEPACK8,
    AV_CODEC_ID_SPEEX,
    AV_CODEC_ID_WMAVOICE,
    AV_CODEC_ID_WMAPRO,
    AV_CODEC_ID_WMALOSSLESS,
    AV_CODEC_ID_ATRAC3P,
    AV_CODEC_ID_EAC3,
    AV_CODEC_ID_SIPR,
    AV_CODEC_ID_MP1,
    AV_CODEC_ID_TWINVQ,
    AV_CODEC_ID_TRUEHD,
    AV_CODEC_ID_MP4ALS,
    AV_CODEC_ID_ATRAC1,
    AV_CODEC_ID_BINKAUDIO_RDFT,
    AV_CODEC_ID_BINKAUDIO_DCT,
    AV_CODEC_ID_AAC_LATM,
    AV_CODEC_ID_QDMC,
    AV_CODEC_ID_CELT,
    AV_CODEC_ID_G723_1,
    AV_CODEC_ID_G729,
    AV_CODEC_ID_8SVX_EXP,
    AV_CODEC_ID_8SVX_FIB,
    AV_CODEC_ID_BMV_AUDIO,
    AV_CODEC_ID_RALF,
    AV_CODEC_ID_IAC,
    AV_CODEC_ID_ILBC,
    AV_CODEC_ID_OPUS,
    AV_CODEC_ID_COMFORT_NOISE,
    AV_CODEC_ID_TAK,
    AV_CODEC_ID_METASOUND,
    AV_CODEC_ID_PAF_AUDIO,
    AV_CODEC_ID_ON2AVC,
    AV_CODEC_ID_DSS_SP,
 
    AV_CODEC_ID_FFWAVESYNTH = 0x15800,
    AV_CODEC_ID_SONIC,
    AV_CODEC_ID_SONIC_LS,
    AV_CODEC_ID_EVRC,
    AV_CODEC_ID_SMV,
    AV_CODEC_ID_DSD_LSBF,
    AV_CODEC_ID_DSD_MSBF,
    AV_CODEC_ID_DSD_LSBF_PLANAR,
    AV_CODEC_ID_DSD_MSBF_PLANAR,
    AV_CODEC_ID_4GV,
    AV_CODEC_ID_INTERPLAY_ACM,
    AV_CODEC_ID_XMA1,
    AV_CODEC_ID_XMA2,
 
 
    AV_CODEC_ID_FIRST_SUBTITLE = 0x17000,
    AV_CODEC_ID_DVD_SUBTITLE = 0x17000,
    AV_CODEC_ID_DVB_SUBTITLE,
    AV_CODEC_ID_TEXT,
    AV_CODEC_ID_XSUB,
    AV_CODEC_ID_SSA,
    AV_CODEC_ID_MOV_TEXT,
    AV_CODEC_ID_HDMV_PGS_SUBTITLE,
    AV_CODEC_ID_DVB_TELETEXT,
    AV_CODEC_ID_SRT,
 
    AV_CODEC_ID_MICRODVD = 0x17800,
    AV_CODEC_ID_EIA_608,
    AV_CODEC_ID_JACOSUB,
    AV_CODEC_ID_SAMI,
    AV_CODEC_ID_REALTEXT,
    AV_CODEC_ID_STL,
    AV_CODEC_ID_SUBVIEWER1,
    AV_CODEC_ID_SUBVIEWER,
    AV_CODEC_ID_SUBRIP,
    AV_CODEC_ID_WEBVTT,
    AV_CODEC_ID_MPL2,
    AV_CODEC_ID_VPLAYER,
    AV_CODEC_ID_PJS,
    AV_CODEC_ID_ASS,
    AV_CODEC_ID_HDMV_TEXT_SUBTITLE,
 
 
    AV_CODEC_ID_FIRST_UNKNOWN = 0x18000,
    AV_CODEC_ID_TTF = 0x18000,
 
    AV_CODEC_ID_BINTEXT = 0x18800,
    AV_CODEC_ID_XBIN,
    AV_CODEC_ID_IDF,
    AV_CODEC_ID_OTF,
    AV_CODEC_ID_SMPTE_KLV,
    AV_CODEC_ID_DVD_NAV,
    AV_CODEC_ID_TIMED_ID3,
    AV_CODEC_ID_BIN_DATA,
 
 
    AV_CODEC_ID_PROBE = 0x19000,
 
    AV_CODEC_ID_MPEG2TS = 0x20000,
 
    AV_CODEC_ID_MPEG4SYSTEMS = 0x20001,
 
    AV_CODEC_ID_FFMETADATA = 0x21000,
    AV_CODEC_ID_WRAPPED_AVFRAME = 0x21001,
};
 
 
 
 
 
 
typedef struct AVCodecDescriptor {
    enum AVCodecID id;
    enum AVMediaType type;
 
 
 
 
 
    const char *name;
 
 
 
    const char *long_name;
 
 
 
    int props;
 
 
 
 
 
    const char *const *mime_types;
 
 
 
 
    const struct AVProfile *profiles;
} AVCodecDescriptor;
# 662 "external/ffmpeg/libavcodec/avcodec.h"
enum Motion_Est_ID {
    ME_ZERO = 1,
    ME_FULL,
    ME_LOG,
    ME_PHODS,
    ME_EPZS,
    ME_X1,
    ME_HEX,
    ME_UMH,
    ME_TESA,
    ME_ITER=50,
};
 
 
 
 
 
enum AVDiscard{
 
 
    AVDISCARD_NONE =-16,
    AVDISCARD_DEFAULT = 0,
    AVDISCARD_NONREF = 8,
    AVDISCARD_BIDIR = 16,
    AVDISCARD_NONINTRA= 24,
    AVDISCARD_NONKEY = 32,
    AVDISCARD_ALL = 48,
};
 
enum AVAudioServiceType {
    AV_AUDIO_SERVICE_TYPE_MAIN = 0,
    AV_AUDIO_SERVICE_TYPE_EFFECTS = 1,
    AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED = 2,
    AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED = 3,
    AV_AUDIO_SERVICE_TYPE_DIALOGUE = 4,
    AV_AUDIO_SERVICE_TYPE_COMMENTARY = 5,
    AV_AUDIO_SERVICE_TYPE_EMERGENCY = 6,
    AV_AUDIO_SERVICE_TYPE_VOICE_OVER = 7,
    AV_AUDIO_SERVICE_TYPE_KARAOKE = 8,
    AV_AUDIO_SERVICE_TYPE_NB ,
};
 
 
 
 
typedef struct RcOverride{
    int start_frame;
    int end_frame;
    int qscale;
    float quality_factor;
} RcOverride;
# 1169 "external/ffmpeg/libavcodec/avcodec.h"
typedef struct AVPanScan{
 
 
 
 
 
    int id;
 
 
 
 
 
 
    int width;
    int height;
 
 
 
 
 
 
    int16_t position[3][2];
}AVPanScan;
 
 
 
 
 
 
typedef struct AVCPBProperties {
 
 
 
 
    int max_bitrate;
 
 
 
 
    int min_bitrate;
 
 
 
 
    int avg_bitrate;
 
 
 
 
 
    int buffer_size;
# 1228 "external/ffmpeg/libavcodec/avcodec.h"
    uint64_t vbv_delay;
} AVCPBProperties;
# 1249 "external/ffmpeg/libavcodec/avcodec.h"
enum AVPacketSideDataType {
    AV_PKT_DATA_PALETTE,
    AV_PKT_DATA_NEW_EXTRADATA,
# 1268 "external/ffmpeg/libavcodec/avcodec.h"
    AV_PKT_DATA_PARAM_CHANGE,
# 1289 "external/ffmpeg/libavcodec/avcodec.h"
    AV_PKT_DATA_H263_MB_INFO,
 
 
 
 
 
    AV_PKT_DATA_REPLAYGAIN,
# 1304 "external/ffmpeg/libavcodec/avcodec.h"
    AV_PKT_DATA_DISPLAYMATRIX,
 
 
 
 
 
    AV_PKT_DATA_STEREO3D,
 
 
 
 
 
    AV_PKT_DATA_AUDIO_SERVICE_TYPE,
# 1328 "external/ffmpeg/libavcodec/avcodec.h"
    AV_PKT_DATA_QUALITY_STATS,
 
 
 
 
 
 
 
    AV_PKT_DATA_FALLBACK_TRACK,
 
 
 
 
    AV_PKT_DATA_CPB_PROPERTIES,
# 1352 "external/ffmpeg/libavcodec/avcodec.h"
    AV_PKT_DATA_SKIP_SAMPLES=70,
# 1362 "external/ffmpeg/libavcodec/avcodec.h"
    AV_PKT_DATA_JP_DUALMONO,
 
 
 
 
 
    AV_PKT_DATA_STRINGS_METADATA,
# 1379 "external/ffmpeg/libavcodec/avcodec.h"
    AV_PKT_DATA_SUBTITLE_POSITION,
 
 
 
 
 
 
 
    AV_PKT_DATA_MATROSKA_BLOCKADDITIONAL,
 
 
 
 
    AV_PKT_DATA_WEBVTT_IDENTIFIER,
 
 
 
 
 
    AV_PKT_DATA_WEBVTT_SETTINGS,
 
 
 
 
 
 
    AV_PKT_DATA_METADATA_UPDATE,
# 1415 "external/ffmpeg/libavcodec/avcodec.h"
    AV_PKT_DATA_NB
};
 
 
 
typedef struct AVPacketSideData {
    uint8_t *data;
    int size;
    enum AVPacketSideDataType type;
} AVPacketSideData;
# 1454 "external/ffmpeg/libavcodec/avcodec.h"
typedef struct AVPacket {
 
 
 
 
 
    AVBufferRef *buf;
# 1470 "external/ffmpeg/libavcodec/avcodec.h"
    int64_t pts;
 
 
 
 
 
    int64_t dts;
    uint8_t *data;
    int size;
    int stream_index;
 
 
 
    int flags;
 
 
 
 
    AVPacketSideData *side_data;
    int side_data_elems;
 
 
 
 
 
    int64_t duration;
 
    int64_t pos;
 
 
 
 
 
 
 
    __attribute__((deprecated))
    int64_t convergence_duration;
 
} AVPacket;
 
 
 
enum AVSideDataParamChangeFlags {
    AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_COUNT = 0x0001,
    AV_SIDE_DATA_PARAM_CHANGE_CHANNEL_LAYOUT = 0x0002,
    AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE = 0x0004,
    AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS = 0x0008,
};
 
 
 
 
struct AVCodecInternal;
 
enum AVFieldOrder {
    AV_FIELD_UNKNOWN,
    AV_FIELD_PROGRESSIVE,
    AV_FIELD_TT,
    AV_FIELD_BB,
    AV_FIELD_TB,
    AV_FIELD_BT,
};
# 1542 "external/ffmpeg/libavcodec/avcodec.h"
typedef struct AVCodecContext {
 
 
 
 
    const AVClass *av_class;
    int log_level_offset;
 
    enum AVMediaType codec_type;
    const struct AVCodec *codec;
 
 
 
 
    __attribute__((deprecated))
    char codec_name[32];
 
    enum AVCodecID codec_id;
# 1574 "external/ffmpeg/libavcodec/avcodec.h"
    unsigned int codec_tag;
 
 
 
 
 
    __attribute__((deprecated))
    unsigned int stream_codec_tag;
 
 
    void *priv_data;
 
 
 
 
 
 
 
    struct AVCodecInternal *internal;
 
 
 
 
 
 
    void *opaque;
 
 
 
 
 
 
 
    int64_t bit_rate;
 
 
 
 
 
 
 
    int bit_rate_tolerance;
 
 
 
 
 
 
 
    int global_quality;
 
 
 
 
 
    int compression_level;
 
 
 
 
 
 
 
    int flags;
 
 
 
 
 
 
    int flags2;
# 1657 "external/ffmpeg/libavcodec/avcodec.h"
    uint8_t *extradata;
    int extradata_size;
# 1671 "external/ffmpeg/libavcodec/avcodec.h"
    AVRational time_base;
# 1680 "external/ffmpeg/libavcodec/avcodec.h"
    int ticks_per_frame;
# 1704 "external/ffmpeg/libavcodec/avcodec.h"
    int delay;
# 1721 "external/ffmpeg/libavcodec/avcodec.h"
    int width, height;
# 1736 "external/ffmpeg/libavcodec/avcodec.h"
    int coded_width, coded_height;
# 1747 "external/ffmpeg/libavcodec/avcodec.h"
    int gop_size;
# 1762 "external/ffmpeg/libavcodec/avcodec.h"
    enum AVPixelFormat pix_fmt;
 
 
 
 
 
 
    __attribute__((deprecated)) int me_method;
# 1795 "external/ffmpeg/libavcodec/avcodec.h"
    void (*draw_horiz_band)(struct AVCodecContext *s,
                            const AVFrame *src, int offset[8],
                            int y, int type, int height);
# 1812 "external/ffmpeg/libavcodec/avcodec.h"
    enum AVPixelFormat (*get_format)(struct AVCodecContext *s, const enum AVPixelFormat * fmt);
 
 
 
 
 
 
 
    int max_b_frames;
# 1829 "external/ffmpeg/libavcodec/avcodec.h"
    float b_quant_factor;
 
 
 
    __attribute__((deprecated)) int rc_strategy;
 
 
 
 
 
    __attribute__((deprecated))
    int b_frame_strategy;
 
 
 
 
 
 
 
    float b_quant_offset;
 
 
 
 
 
 
 
    int has_b_frames;
 
 
 
    __attribute__((deprecated))
    int mpeg_quant;
# 1871 "external/ffmpeg/libavcodec/avcodec.h"
    float i_quant_factor;
 
 
 
 
 
 
    float i_quant_offset;
 
 
 
 
 
 
    float lumi_masking;
 
 
 
 
 
 
    float temporal_cplx_masking;
 
 
 
 
 
 
    float spatial_cplx_masking;
 
 
 
 
 
 
    float p_masking;
 
 
 
 
 
 
    float dark_masking;
 
 
 
 
 
 
    int slice_count;
 
 
 
    __attribute__((deprecated))
     int prediction_method;
# 1936 "external/ffmpeg/libavcodec/avcodec.h"
    int *slice_offset;
# 1945 "external/ffmpeg/libavcodec/avcodec.h"
    AVRational sample_aspect_ratio;
 
 
 
 
 
 
    int me_cmp;
 
 
 
 
 
    int me_sub_cmp;
 
 
 
 
 
    int mb_cmp;
 
 
 
 
 
    int ildct_cmp;
# 1993 "external/ffmpeg/libavcodec/avcodec.h"
    int dia_size;
 
 
 
 
 
 
    int last_predictor_count;
 
 
 
    __attribute__((deprecated))
    int pre_me;
 
 
 
 
 
 
 
    int me_pre_cmp;
 
 
 
 
 
 
    int pre_dia_size;
 
 
 
 
 
 
    int me_subpel_quality;
# 2039 "external/ffmpeg/libavcodec/avcodec.h"
    __attribute__((deprecated)) int dtg_active_format;
# 2056 "external/ffmpeg/libavcodec/avcodec.h"
    int me_range;
 
 
 
 
 
    __attribute__((deprecated)) int intra_quant_bias;
 
 
 
 
 
    __attribute__((deprecated)) int inter_quant_bias;
 
 
 
 
 
 
 
    int slice_flags;
# 2088 "external/ffmpeg/libavcodec/avcodec.h"
    __attribute__((deprecated)) int xvmc_acceleration;
 
 
 
 
 
 
 
    int mb_decision;
# 2106 "external/ffmpeg/libavcodec/avcodec.h"
    uint16_t *intra_matrix;
 
 
 
 
 
 
    uint16_t *inter_matrix;
 
 
 
    __attribute__((deprecated))
    int scenechange_threshold;
 
 
    __attribute__((deprecated))
    int noise_reduction;
 
 
 
 
 
 
    __attribute__((deprecated))
    int me_threshold;
 
 
 
 
    __attribute__((deprecated))
    int mb_threshold;
 
 
 
 
 
 
 
    int intra_dc_precision;
 
 
 
 
 
 
    int skip_top;
 
 
 
 
 
 
    int skip_bottom;
 
 
 
 
 
    __attribute__((deprecated))
    float border_masking;
 
 
 
 
 
 
 
    int mb_lmin;
 
 
 
 
 
 
    int mb_lmax;
 
 
 
 
 
    __attribute__((deprecated))
    int me_penalty_compensation;
 
 
 
 
 
 
 
    int bidir_refine;
 
 
 
    __attribute__((deprecated))
    int brd_scale;
 
 
 
 
 
 
 
    int keyint_min;
 
 
 
 
 
 
    int refs;
 
 
 
    __attribute__((deprecated))
    int chromaoffset;
# 2229 "external/ffmpeg/libavcodec/avcodec.h"
    __attribute__((deprecated)) int scenechange_factor;
# 2238 "external/ffmpeg/libavcodec/avcodec.h"
    int mv0_threshold;
 
 
 
    __attribute__((deprecated))
    int b_sensitivity;
 
 
 
 
 
 
 
    enum AVColorPrimaries color_primaries;
 
 
 
 
 
 
    enum AVColorTransferCharacteristic color_trc;
 
 
 
 
 
 
    enum AVColorSpace colorspace;
 
 
 
 
 
 
    enum AVColorRange color_range;
 
 
 
 
 
 
    enum AVChromaLocation chroma_sample_location;
# 2288 "external/ffmpeg/libavcodec/avcodec.h"
    int slices;
 
 
 
 
 
    enum AVFieldOrder field_order;
 
 
    int sample_rate;
    int channels;
 
 
 
 
 
 
    enum AVSampleFormat sample_fmt;
# 2317 "external/ffmpeg/libavcodec/avcodec.h"
    int frame_size;
# 2328 "external/ffmpeg/libavcodec/avcodec.h"
    int frame_number;
 
 
 
 
 
    int block_align;
 
 
 
 
 
 
    int cutoff;
 
 
 
 
 
 
    uint64_t channel_layout;
 
 
 
 
 
 
    uint64_t request_channel_layout;
 
 
 
 
 
 
    enum AVAudioServiceType audio_service_type;
 
 
 
 
 
 
 
    enum AVSampleFormat request_sample_fmt;
# 2452 "external/ffmpeg/libavcodec/avcodec.h"
    int (*get_buffer2)(struct AVCodecContext *s, AVFrame *frame, int flags);
# 2465 "external/ffmpeg/libavcodec/avcodec.h"
    int refcounted_frames;
 
 
    float qcompress;
    float qblur;
 
 
 
 
 
 
    int qmin;
 
 
 
 
 
 
    int qmax;
 
 
 
 
 
 
    int max_qdiff;
 
 
 
 
 
    __attribute__((deprecated))
    float rc_qsquish;
 
    __attribute__((deprecated))
    float rc_qmod_amp;
    __attribute__((deprecated))
    int rc_qmod_freq;
 
 
 
 
 
 
 
    int rc_buffer_size;
 
 
 
 
 
 
    int rc_override_count;
    RcOverride *rc_override;
 
 
 
 
 
    __attribute__((deprecated))
    const char *rc_eq;
 
 
 
 
 
 
 
    int64_t rc_max_rate;
 
 
 
 
 
 
    int64_t rc_min_rate;
 
 
 
 
 
    __attribute__((deprecated))
    float rc_buffer_aggressivity;
 
    __attribute__((deprecated))
    float rc_initial_cplx;
 
 
 
 
 
 
 
    float rc_max_available_vbv_use;
 
 
 
 
 
 
    float rc_min_vbv_overflow_use;
 
 
 
 
 
 
    int rc_initial_buffer_occupancy;
# 2585 "external/ffmpeg/libavcodec/avcodec.h"
    __attribute__((deprecated))
    int coder_type;
 
 
 
 
    __attribute__((deprecated))
    int context_model;
 
 
 
 
 
 
    __attribute__((deprecated))
    int lmin;
 
 
 
 
    __attribute__((deprecated))
    int lmax;
 
 
 
 
    __attribute__((deprecated))
    int frame_skip_threshold;
 
 
    __attribute__((deprecated))
    int frame_skip_factor;
 
 
    __attribute__((deprecated))
    int frame_skip_exp;
 
 
    __attribute__((deprecated))
    int frame_skip_cmp;
 
 
 
 
 
 
 
    int trellis;
 
 
 
    __attribute__((deprecated))
    int min_prediction_order;
 
 
    __attribute__((deprecated))
    int max_prediction_order;
 
 
    __attribute__((deprecated))
    int64_t timecode_frame_start;
# 2658 "external/ffmpeg/libavcodec/avcodec.h"
    __attribute__((deprecated))
    void (*rtp_callback)(struct AVCodecContext *avctx, void *data, int size, int mb_nb);
 
 
 
 
    __attribute__((deprecated))
    int rtp_payload_size;
# 2675 "external/ffmpeg/libavcodec/avcodec.h"
    __attribute__((deprecated))
    int mv_bits;
    __attribute__((deprecated))
    int header_bits;
    __attribute__((deprecated))
    int i_tex_bits;
    __attribute__((deprecated))
    int p_tex_bits;
    __attribute__((deprecated))
    int i_count;
    __attribute__((deprecated))
    int p_count;
    __attribute__((deprecated))
    int skip_count;
    __attribute__((deprecated))
    int misc_bits;
 
 
    __attribute__((deprecated))
    int frame_bits;
 
 
 
 
 
 
 
    char *stats_out;
 
 
 
 
 
 
 
    char *stats_in;
 
 
 
 
 
 
    int workaround_bugs;
# 2751 "external/ffmpeg/libavcodec/avcodec.h"
    int strict_std_compliance;
# 2763 "external/ffmpeg/libavcodec/avcodec.h"
    int error_concealment;
# 2773 "external/ffmpeg/libavcodec/avcodec.h"
    int debug;
# 2810 "external/ffmpeg/libavcodec/avcodec.h"
    int debug_mv;
# 2821 "external/ffmpeg/libavcodec/avcodec.h"
    int err_recognition;
# 2846 "external/ffmpeg/libavcodec/avcodec.h"
    int64_t reordered_opaque;
 
 
 
 
 
 
    struct AVHWAccel *hwaccel;
# 2865 "external/ffmpeg/libavcodec/avcodec.h"
    void *hwaccel_context;
 
 
 
 
 
 
    uint64_t error[8];
 
 
 
 
 
 
    int dct_algo;
# 2892 "external/ffmpeg/libavcodec/avcodec.h"
    int idct_algo;
# 2927 "external/ffmpeg/libavcodec/avcodec.h"
     int bits_per_coded_sample;
 
 
 
 
 
 
    int bits_per_raw_sample;
# 2944 "external/ffmpeg/libavcodec/avcodec.h"
     int lowres;
# 2955 "external/ffmpeg/libavcodec/avcodec.h"
    __attribute__((deprecated)) AVFrame *coded_frame;
# 2964 "external/ffmpeg/libavcodec/avcodec.h"
    int thread_count;
# 2974 "external/ffmpeg/libavcodec/avcodec.h"
    int thread_type;
# 2983 "external/ffmpeg/libavcodec/avcodec.h"
    int active_thread_type;
# 2993 "external/ffmpeg/libavcodec/avcodec.h"
    int thread_safe_callbacks;
# 3004 "external/ffmpeg/libavcodec/avcodec.h"
    int (*execute)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg), void *arg2, int *ret, int count, int size);
# 3024 "external/ffmpeg/libavcodec/avcodec.h"
    int (*execute2)(struct AVCodecContext *c, int (*func)(struct AVCodecContext *c2, void *arg, int jobnr, int threadnr), void *arg2, int *ret, int count);
 
 
 
 
 
 
     int nsse_weight;
 
 
 
 
 
 
     int profile;
# 3127 "external/ffmpeg/libavcodec/avcodec.h"
     int level;
 
 
 
 
 
 
 
    enum AVDiscard skip_loop_filter;
 
 
 
 
 
 
    enum AVDiscard skip_idct;
 
 
 
 
 
 
    enum AVDiscard skip_frame;
# 3159 "external/ffmpeg/libavcodec/avcodec.h"
    uint8_t *subtitle_header;
    int subtitle_header_size;
 
 
 
 
 
 
    __attribute__((deprecated))
    int error_rate;
# 3180 "external/ffmpeg/libavcodec/avcodec.h"
    __attribute__((deprecated))
    uint64_t vbv_delay;
# 3195 "external/ffmpeg/libavcodec/avcodec.h"
    __attribute__((deprecated))
    int side_data_only_packets;
# 3214 "external/ffmpeg/libavcodec/avcodec.h"
    int initial_padding;
 
 
 
 
 
 
 
    AVRational framerate;
 
 
 
 
 
 
    enum AVPixelFormat sw_pix_fmt;
# 3238 "external/ffmpeg/libavcodec/avcodec.h"
    AVRational pkt_timebase;
# 3247 "external/ffmpeg/libavcodec/avcodec.h"
    const AVCodecDescriptor *codec_descriptor;
# 3265 "external/ffmpeg/libavcodec/avcodec.h"
    int64_t pts_correction_num_faulty_pts;
    int64_t pts_correction_num_faulty_dts;
    int64_t pts_correction_last_pts;
    int64_t pts_correction_last_dts;
 
 
 
 
 
 
    char *sub_charenc;
 
 
 
 
 
 
 
    int sub_charenc_mode;
# 3301 "external/ffmpeg/libavcodec/avcodec.h"
    int skip_alpha;
 
 
 
 
 
 
    int seek_preroll;
# 3329 "external/ffmpeg/libavcodec/avcodec.h"
    uint16_t *chroma_intra_matrix;
# 3339 "external/ffmpeg/libavcodec/avcodec.h"
    uint8_t *dump_separator;
 
 
 
 
 
 
 
    char *codec_whitelist;
 
 
 
 
 
 
 
    unsigned properties;
# 3365 "external/ffmpeg/libavcodec/avcodec.h"
    AVPacketSideData *coded_side_data;
    int nb_coded_side_data;
 
} AVCodecContext;
 
AVRational av_codec_get_pkt_timebase (const AVCodecContext *avctx);
void av_codec_set_pkt_timebase (AVCodecContext *avctx, AVRational val);
 
const AVCodecDescriptor *av_codec_get_codec_descriptor(const AVCodecContext *avctx);
void av_codec_set_codec_descriptor(AVCodecContext *avctx, const AVCodecDescriptor *desc);
 
unsigned av_codec_get_codec_properties(const AVCodecContext *avctx);
 
int av_codec_get_lowres(const AVCodecContext *avctx);
void av_codec_set_lowres(AVCodecContext *avctx, int val);
 
int av_codec_get_seek_preroll(const AVCodecContext *avctx);
void av_codec_set_seek_preroll(AVCodecContext *avctx, int val);
 
uint16_t *av_codec_get_chroma_intra_matrix(const AVCodecContext *avctx);
void av_codec_set_chroma_intra_matrix(AVCodecContext *avctx, uint16_t *val);
 
 
 
 
typedef struct AVProfile {
    int profile;
    const char *name;
} AVProfile;
 
typedef struct AVCodecDefault AVCodecDefault;
 
struct AVSubtitle;
 
 
 
 
typedef struct AVCodec {
 
 
 
 
 
 
    const char *name;
 
 
 
 
    const char *long_name;
    enum AVMediaType type;
    enum AVCodecID id;
 
 
 
 
    int capabilities;
    const AVRational *supported_framerates;
    const enum AVPixelFormat *pix_fmts;
    const int *supported_samplerates;
    const enum AVSampleFormat *sample_fmts;
    const uint64_t *channel_layouts;
    uint8_t max_lowres;
    const AVClass *priv_class;
    const AVProfile *profiles;
# 3438 "external/ffmpeg/libavcodec/avcodec.h"
    int priv_data_size;
    struct AVCodec *next;
# 3449 "external/ffmpeg/libavcodec/avcodec.h"
    int (*init_thread_copy)(AVCodecContext *);
 
 
 
 
 
 
 
    int (*update_thread_context)(AVCodecContext *dst, const AVCodecContext *src);
 
 
 
 
 
    const AVCodecDefault *defaults;
 
 
 
 
    void (*init_static_data)(struct AVCodec *codec);
 
    int (*init)(AVCodecContext *);
    int (*encode_sub)(AVCodecContext *, uint8_t *buf, int buf_size,
                      const struct AVSubtitle *sub);
# 3483 "external/ffmpeg/libavcodec/avcodec.h"
    int (*encode2)(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame,
                   int *got_packet_ptr);
    int (*decode)(AVCodecContext *, void *outdata, int *outdata_size, AVPacket *avpkt);
    int (*close)(AVCodecContext *);
 
 
 
 
    void (*flush)(AVCodecContext *);
 
 
 
 
    int caps_internal;
} AVCodec;
 
int av_codec_get_max_lowres(const AVCodec *codec);
 
struct MpegEncContext;
 
 
 
 
 
typedef struct AVHWAccel {
 
 
 
 
 
    const char *name;
 
 
 
 
 
 
    enum AVMediaType type;
 
 
 
 
 
 
    enum AVCodecID id;
 
 
 
 
 
 
    enum AVPixelFormat pix_fmt;
 
 
 
 
 
    int capabilities;
# 3549 "external/ffmpeg/libavcodec/avcodec.h"
    struct AVHWAccel *next;
 
 
 
 
    int (*alloc_frame)(AVCodecContext *avctx, AVFrame *frame);
# 3570 "external/ffmpeg/libavcodec/avcodec.h"
    int (*start_frame)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
# 3584 "external/ffmpeg/libavcodec/avcodec.h"
    int (*decode_slice)(AVCodecContext *avctx, const uint8_t *buf, uint32_t buf_size);
# 3595 "external/ffmpeg/libavcodec/avcodec.h"
    int (*end_frame)(AVCodecContext *avctx);
# 3604 "external/ffmpeg/libavcodec/avcodec.h"
    int frame_priv_data_size;
# 3615 "external/ffmpeg/libavcodec/avcodec.h"
    void (*decode_mb)(struct MpegEncContext *s);
# 3624 "external/ffmpeg/libavcodec/avcodec.h"
    int (*init)(AVCodecContext *avctx);
 
 
 
 
 
 
 
    int (*uninit)(AVCodecContext *avctx);
 
 
 
 
 
    int priv_data_size;
} AVHWAccel;
# 3676 "external/ffmpeg/libavcodec/avcodec.h"
typedef struct AVPicture {
    __attribute__((deprecated))
    uint8_t *data[8];
    __attribute__((deprecated))
    int linesize[8];
} AVPicture;
 
 
 
 
 
 
enum AVSubtitleType {
    SUBTITLE_NONE,
 
    SUBTITLE_BITMAP,
 
 
 
 
 
    SUBTITLE_TEXT,
 
 
 
 
 
    SUBTITLE_ASS,
};
 
 
 
typedef struct AVSubtitleRect {
    int x;
    int y;
    int w;
    int h;
    int nb_colors;
 
 
 
 
 
    __attribute__((deprecated))
    AVPicture pict;
 
 
 
 
 
    uint8_t *data[4];
    int linesize[4];
 
    enum AVSubtitleType type;
 
    char *text;
 
 
 
 
 
 
    char *ass;
 
    int flags;
} AVSubtitleRect;
 
typedef struct AVSubtitle {
    uint16_t format;
    uint32_t start_display_time;
    uint32_t end_display_time;
    unsigned num_rects;
    AVSubtitleRect **rects;
    int64_t pts;
} AVSubtitle;
 
 
 
 
 
 
AVCodec *av_codec_next(const AVCodec *c);
 
 
 
 
unsigned avcodec_version(void);
 
 
 
 
const char *avcodec_configuration(void);
 
 
 
 
const char *avcodec_license(void);
# 3782 "external/ffmpeg/libavcodec/avcodec.h"
void avcodec_register(AVCodec *codec);
# 3794 "external/ffmpeg/libavcodec/avcodec.h"
void avcodec_register_all(void);
# 3810 "external/ffmpeg/libavcodec/avcodec.h"
AVCodecContext *avcodec_alloc_context3(const AVCodec *codec);
 
 
 
 
 
void avcodec_free_context(AVCodecContext **avctx);
# 3827 "external/ffmpeg/libavcodec/avcodec.h"
int avcodec_get_context_defaults3(AVCodecContext *s, const AVCodec *codec);
 
 
 
 
 
 
 
const AVClass *avcodec_get_class(void);
 
 
 
 
 
 
 
const AVClass *avcodec_get_frame_class(void);
 
 
 
 
 
 
 
const AVClass *avcodec_get_subtitle_rect_class(void);
# 3864 "external/ffmpeg/libavcodec/avcodec.h"
int avcodec_copy_context(AVCodecContext *dest, const AVCodecContext *src);
# 3905 "external/ffmpeg/libavcodec/avcodec.h"
int avcodec_open2(AVCodecContext *avctx, const AVCodec *codec, AVDictionary **options);
# 3916 "external/ffmpeg/libavcodec/avcodec.h"
int avcodec_close(AVCodecContext *avctx);
 
 
 
 
 
 
void avsubtitle_free(AVSubtitle *sub);
# 3945 "external/ffmpeg/libavcodec/avcodec.h"
AVPacket *av_packet_alloc(void);
# 3957 "external/ffmpeg/libavcodec/avcodec.h"
AVPacket *av_packet_clone(AVPacket *src);
# 3966 "external/ffmpeg/libavcodec/avcodec.h"
void av_packet_free(AVPacket **pkt);
# 3976 "external/ffmpeg/libavcodec/avcodec.h"
void av_init_packet(AVPacket *pkt);
# 3986 "external/ffmpeg/libavcodec/avcodec.h"
int av_new_packet(AVPacket *pkt, int size);
 
 
 
 
 
 
 
void av_shrink_packet(AVPacket *pkt, int size);
 
 
 
 
 
 
 
int av_grow_packet(AVPacket *pkt, int grow_by);
# 4017 "external/ffmpeg/libavcodec/avcodec.h"
int av_packet_from_data(AVPacket *pkt, uint8_t *data, int size);
# 4026 "external/ffmpeg/libavcodec/avcodec.h"
__attribute__((deprecated))
int av_dup_packet(AVPacket *pkt);
 
 
 
 
 
int av_copy_packet(AVPacket *dst, const AVPacket *src);
 
 
 
 
 
 
int av_copy_packet_side_data(AVPacket *dst, const AVPacket *src);
# 4049 "external/ffmpeg/libavcodec/avcodec.h"
__attribute__((deprecated))
void av_free_packet(AVPacket *pkt);
# 4060 "external/ffmpeg/libavcodec/avcodec.h"
uint8_t* av_packet_new_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
                                 int size);
# 4076 "external/ffmpeg/libavcodec/avcodec.h"
int av_packet_add_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
                            uint8_t *data, size_t size);
# 4087 "external/ffmpeg/libavcodec/avcodec.h"
int av_packet_shrink_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
                               int size);
# 4098 "external/ffmpeg/libavcodec/avcodec.h"
uint8_t* av_packet_get_side_data(AVPacket *pkt, enum AVPacketSideDataType type,
                                 int *size);
 
int av_packet_merge_side_data(AVPacket *pkt);
 
int av_packet_split_side_data(AVPacket *pkt);
 
const char *av_packet_side_data_name(enum AVPacketSideDataType type);
# 4114 "external/ffmpeg/libavcodec/avcodec.h"
uint8_t *av_packet_pack_dictionary(AVDictionary *dict, int *size);
# 4123 "external/ffmpeg/libavcodec/avcodec.h"
int av_packet_unpack_dictionary(const uint8_t *data, int size, AVDictionary **dict);
# 4132 "external/ffmpeg/libavcodec/avcodec.h"
void av_packet_free_side_data(AVPacket *pkt);
# 4150 "external/ffmpeg/libavcodec/avcodec.h"
int av_packet_ref(AVPacket *dst, const AVPacket *src);
# 4160 "external/ffmpeg/libavcodec/avcodec.h"
void av_packet_unref(AVPacket *pkt);
# 4170 "external/ffmpeg/libavcodec/avcodec.h"
void av_packet_move_ref(AVPacket *dst, AVPacket *src);
# 4184 "external/ffmpeg/libavcodec/avcodec.h"
int av_packet_copy_props(AVPacket *dst, const AVPacket *src);
# 4197 "external/ffmpeg/libavcodec/avcodec.h"
void av_packet_rescale_ts(AVPacket *pkt, AVRational tb_src, AVRational tb_dst);
# 4214 "external/ffmpeg/libavcodec/avcodec.h"
AVCodec *avcodec_find_decoder(enum AVCodecID id);
 
 
 
 
 
 
 
AVCodec *avcodec_find_decoder_by_name(const char *name);
 
 
 
 
 
 
int avcodec_default_get_buffer2(AVCodecContext *s, AVFrame *frame, int flags);
# 4242 "external/ffmpeg/libavcodec/avcodec.h"
__attribute__((deprecated))
unsigned avcodec_get_edge_width(void);
# 4253 "external/ffmpeg/libavcodec/avcodec.h"
void avcodec_align_dimensions(AVCodecContext *s, int *width, int *height);
# 4262 "external/ffmpeg/libavcodec/avcodec.h"
void avcodec_align_dimensions2(AVCodecContext *s, int *width, int *height,
                               int linesize_align[8]);
# 4274 "external/ffmpeg/libavcodec/avcodec.h"
int avcodec_enum_to_chroma_pos(int *xpos, int *ypos, enum AVChromaLocation pos);
# 4285 "external/ffmpeg/libavcodec/avcodec.h"
enum AVChromaLocation avcodec_chroma_pos_to_enum(int xpos, int ypos);
# 4338 "external/ffmpeg/libavcodec/avcodec.h"
int avcodec_decode_audio4(AVCodecContext *avctx, AVFrame *frame,
                          int *got_frame_ptr, const AVPacket *avpkt);
# 4384 "external/ffmpeg/libavcodec/avcodec.h"
int avcodec_decode_video2(AVCodecContext *avctx, AVFrame *picture,
                         int *got_picture_ptr,
                         const AVPacket *avpkt);
# 4415 "external/ffmpeg/libavcodec/avcodec.h"
int avcodec_decode_subtitle2(AVCodecContext *avctx, AVSubtitle *sub,
                            int *got_sub_ptr,
                            AVPacket *avpkt);
 
 
 
 
 
 
enum AVPictureStructure {
    AV_PICTURE_STRUCTURE_UNKNOWN,
    AV_PICTURE_STRUCTURE_TOP_FIELD,
    AV_PICTURE_STRUCTURE_BOTTOM_FIELD,
    AV_PICTURE_STRUCTURE_FRAME,
};
 
typedef struct AVCodecParserContext {
    void *priv_data;
    struct AVCodecParser *parser;
    int64_t frame_offset;
    int64_t cur_offset;
 
    int64_t next_frame_offset;
 
    int pict_type;
# 4449 "external/ffmpeg/libavcodec/avcodec.h"
    int repeat_pict;
    int64_t pts;
    int64_t dts;
 
 
    int64_t last_pts;
    int64_t last_dts;
    int fetch_timestamp;
 
 
    int cur_frame_start_index;
    int64_t cur_frame_offset[4];
    int64_t cur_frame_pts[4];
    int64_t cur_frame_dts[4];
 
    int flags;
 
 
 
 
 
 
    int64_t offset;
    int64_t cur_frame_end[4];
 
 
 
 
 
 
 
    int key_frame;
 
 
 
 
 
    __attribute__((deprecated))
    int64_t convergence_duration;
# 4500 "external/ffmpeg/libavcodec/avcodec.h"
    int dts_sync_point;
# 4515 "external/ffmpeg/libavcodec/avcodec.h"
    int dts_ref_dts_delta;
# 4529 "external/ffmpeg/libavcodec/avcodec.h"
    int pts_dts_delta;
 
 
 
 
 
 
    int64_t cur_frame_pos[4];
 
 
 
 
    int64_t pos;
 
 
 
 
    int64_t last_pos;
 
 
 
 
 
 
    int duration;
 
    enum AVFieldOrder field_order;
# 4565 "external/ffmpeg/libavcodec/avcodec.h"
    enum AVPictureStructure picture_structure;
 
 
 
 
 
 
 
    int output_picture_number;
 
 
 
 
    int width;
    int height;
 
 
 
 
    int coded_width;
    int coded_height;
# 4595 "external/ffmpeg/libavcodec/avcodec.h"
    int format;
} AVCodecParserContext;
 
typedef struct AVCodecParser {
    int codec_ids[5];
    int priv_data_size;
    int (*parser_init)(AVCodecParserContext *s);
 
 
    int (*parser_parse)(AVCodecParserContext *s,
                        AVCodecContext *avctx,
                        const uint8_t **poutbuf, int *poutbuf_size,
                        const uint8_t *buf, int buf_size);
    void (*parser_close)(AVCodecParserContext *s);
    int (*split)(AVCodecContext *avctx, const uint8_t *buf, int buf_size);
    struct AVCodecParser *next;
} AVCodecParser;
 
AVCodecParser *av_parser_next(const AVCodecParser *c);
 
void av_register_codec_parser(AVCodecParser *parser);
AVCodecParserContext *av_parser_init(int codec_id);
# 4646 "external/ffmpeg/libavcodec/avcodec.h"
int av_parser_parse2(AVCodecParserContext *s,
                     AVCodecContext *avctx,
                     uint8_t **poutbuf, int *poutbuf_size,
                     const uint8_t *buf, int buf_size,
                     int64_t pts, int64_t dts,
                     int64_t pos);
 
 
 
 
 
int av_parser_change(AVCodecParserContext *s,
                     AVCodecContext *avctx,
                     uint8_t **poutbuf, int *poutbuf_size,
                     const uint8_t *buf, int buf_size, int keyframe);
void av_parser_close(AVCodecParserContext *s);
# 4679 "external/ffmpeg/libavcodec/avcodec.h"
AVCodec *avcodec_find_encoder(enum AVCodecID id);
 
 
 
 
 
 
 
AVCodec *avcodec_find_encoder_by_name(const char *name);
# 4727 "external/ffmpeg/libavcodec/avcodec.h"
int avcodec_encode_audio2(AVCodecContext *avctx, AVPacket *avpkt,
                          const AVFrame *frame, int *got_packet_ptr);
# 4763 "external/ffmpeg/libavcodec/avcodec.h"
int avcodec_encode_video2(AVCodecContext *avctx, AVPacket *avpkt,
                          const AVFrame *frame, int *got_packet_ptr);
 
int avcodec_encode_subtitle(AVCodecContext *avctx, uint8_t *buf, int buf_size,
                            const AVSubtitle *sub);
# 4782 "external/ffmpeg/libavcodec/avcodec.h"
struct ReSampleContext;
struct AVResampleContext;
 
typedef struct ReSampleContext ReSampleContext;
# 4803 "external/ffmpeg/libavcodec/avcodec.h"
__attribute__((deprecated))
ReSampleContext *av_audio_resample_init(int output_channels, int input_channels,
                                        int output_rate, int input_rate,
                                        enum AVSampleFormat sample_fmt_out,
                                        enum AVSampleFormat sample_fmt_in,
                                        int filter_length, int log2_phase_count,
                                        int linear, double cutoff);
 
__attribute__((deprecated))
int audio_resample(ReSampleContext *s, short *output, short *input, int nb_samples);
 
 
 
 
 
 
 
__attribute__((deprecated))
void audio_resample_close(ReSampleContext *s);
# 4833 "external/ffmpeg/libavcodec/avcodec.h"
__attribute__((deprecated))
struct AVResampleContext *av_resample_init(int out_rate, int in_rate, int filter_length, int log2_phase_count, int linear, double cutoff);
# 4845 "external/ffmpeg/libavcodec/avcodec.h"
__attribute__((deprecated))
int av_resample(struct AVResampleContext *c, short *dst, short *src, int *consumed, int src_size, int dst_size, int update_ctx);
# 4861 "external/ffmpeg/libavcodec/avcodec.h"
__attribute__((deprecated))
void av_resample_compensate(struct AVResampleContext *c, int sample_delta, int compensation_distance);
__attribute__((deprecated))
void av_resample_close(struct AVResampleContext *c);
# 4880 "external/ffmpeg/libavcodec/avcodec.h"
__attribute__((deprecated))
int avpicture_alloc(AVPicture *picture, enum AVPixelFormat pix_fmt, int width, int height);
 
 
 
 
__attribute__((deprecated))
void avpicture_free(AVPicture *picture);
 
 
 
 
__attribute__((deprecated))
int avpicture_fill(AVPicture *picture, const uint8_t *ptr,
                   enum AVPixelFormat pix_fmt, int width, int height);
 
 
 
 
__attribute__((deprecated))
int avpicture_layout(const AVPicture *src, enum AVPixelFormat pix_fmt,
                     int width, int height,
                     unsigned char *dest, int dest_size);
 
 
 
 
__attribute__((deprecated))
int avpicture_get_size(enum AVPixelFormat pix_fmt, int width, int height);
 
 
 
 
__attribute__((deprecated))
void av_picture_copy(AVPicture *dst, const AVPicture *src,
                     enum AVPixelFormat pix_fmt, int width, int height);
 
 
 
 
__attribute__((deprecated))
int av_picture_crop(AVPicture *dst, const AVPicture *src,
                    enum AVPixelFormat pix_fmt, int top_band, int left_band);
 
 
 
 
__attribute__((deprecated))
int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, enum AVPixelFormat pix_fmt,
            int padtop, int padbottom, int padleft, int padright, int *color);
# 4967 "external/ffmpeg/libavcodec/avcodec.h"
void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift);
 
 
 
 
 
 
unsigned int avcodec_pix_fmt_to_codec_tag(enum AVPixelFormat pix_fmt);
 
 
 
 
int avcodec_get_pix_fmt_loss(enum AVPixelFormat dst_pix_fmt, enum AVPixelFormat src_pix_fmt,
                             int has_alpha);
# 4999 "external/ffmpeg/libavcodec/avcodec.h"
enum AVPixelFormat avcodec_find_best_pix_fmt_of_list(const enum AVPixelFormat *pix_fmt_list,
                                            enum AVPixelFormat src_pix_fmt,
                                            int has_alpha, int *loss_ptr);
 
 
 
 
enum AVPixelFormat avcodec_find_best_pix_fmt_of_2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2,
                                            enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr);
 
__attribute__((deprecated))
 
 
 
 
 
enum AVPixelFormat avcodec_find_best_pix_fmt2(enum AVPixelFormat dst_pix_fmt1, enum AVPixelFormat dst_pix_fmt2,
                                            enum AVPixelFormat src_pix_fmt, int has_alpha, int *loss_ptr);
 
 
 
enum AVPixelFormat avcodec_default_get_format(struct AVCodecContext *s, const enum AVPixelFormat * fmt);
# 5030 "external/ffmpeg/libavcodec/avcodec.h"
__attribute__((deprecated))
void avcodec_set_dimensions(AVCodecContext *s, int width, int height);
# 5043 "external/ffmpeg/libavcodec/avcodec.h"
size_t av_get_codec_tag_string(char *buf, size_t buf_size, unsigned int codec_tag);
 
void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode);
# 5054 "external/ffmpeg/libavcodec/avcodec.h"
const char *av_get_profile_name(const AVCodec *codec, int profile);
# 5067 "external/ffmpeg/libavcodec/avcodec.h"
const char *avcodec_profile_name(enum AVCodecID codec_id, int profile);
 
int avcodec_default_execute(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2),void *arg, int *ret, int count, int size);
int avcodec_default_execute2(AVCodecContext *c, int (*func)(AVCodecContext *c2, void *arg2, int, int),void *arg, int *ret, int count);
# 5096 "external/ffmpeg/libavcodec/avcodec.h"
int avcodec_fill_audio_frame(AVFrame *frame, int nb_channels,
                             enum AVSampleFormat sample_fmt, const uint8_t *buf,
                             int buf_size, int align);
# 5109 "external/ffmpeg/libavcodec/avcodec.h"
void avcodec_flush_buffers(AVCodecContext *avctx);
 
 
 
 
 
 
 
int av_get_bits_per_sample(enum AVCodecID codec_id);
 
 
 
 
 
 
 
enum AVCodecID av_get_pcm_codec(enum AVSampleFormat fmt, int be);
# 5135 "external/ffmpeg/libavcodec/avcodec.h"
int av_get_exact_bits_per_sample(enum AVCodecID codec_id);
# 5145 "external/ffmpeg/libavcodec/avcodec.h"
int av_get_audio_frame_duration(AVCodecContext *avctx, int frame_bytes);
 
 
typedef struct AVBitStreamFilterContext {
    void *priv_data;
    struct AVBitStreamFilter *filter;
    AVCodecParserContext *parser;
    struct AVBitStreamFilterContext *next;
 
 
 
 
    char *args;
} AVBitStreamFilterContext;
 
 
typedef struct AVBitStreamFilter {
    const char *name;
    int priv_data_size;
    int (*filter)(AVBitStreamFilterContext *bsfc,
                  AVCodecContext *avctx, const char *args,
                  uint8_t **poutbuf, int *poutbuf_size,
                  const uint8_t *buf, int buf_size, int keyframe);
    void (*close)(AVBitStreamFilterContext *bsfc);
    struct AVBitStreamFilter *next;
} AVBitStreamFilter;
# 5181 "external/ffmpeg/libavcodec/avcodec.h"
void av_register_bitstream_filter(AVBitStreamFilter *bsf);
# 5193 "external/ffmpeg/libavcodec/avcodec.h"
AVBitStreamFilterContext *av_bitstream_filter_init(const char *name);
# 5223 "external/ffmpeg/libavcodec/avcodec.h"
int av_bitstream_filter_filter(AVBitStreamFilterContext *bsfc,
                               AVCodecContext *avctx, const char *args,
                               uint8_t **poutbuf, int *poutbuf_size,
                               const uint8_t *buf, int buf_size, int keyframe);
 
 
 
 
 
 
 
void av_bitstream_filter_close(AVBitStreamFilterContext *bsf);
# 5244 "external/ffmpeg/libavcodec/avcodec.h"
AVBitStreamFilter *av_bitstream_filter_next(const AVBitStreamFilter *f);
# 5255 "external/ffmpeg/libavcodec/avcodec.h"
void av_fast_padded_malloc(void *ptr, unsigned int *size, size_t min_size);
 
 
 
 
 
void av_fast_padded_mallocz(void *ptr, unsigned int *size, size_t min_size);
# 5270 "external/ffmpeg/libavcodec/avcodec.h"
unsigned int av_xiphlacing(unsigned char *s, unsigned int v);
# 5286 "external/ffmpeg/libavcodec/avcodec.h"
__attribute__((deprecated))
void av_log_missing_feature(void *avc, const char *feature, int want_sample);
# 5298 "external/ffmpeg/libavcodec/avcodec.h"
__attribute__((deprecated))
void av_log_ask_for_sample(void *avc, const char *msg, ...) __attribute__((__format__(__printf__, 2, 3)));
 
 
 
 
 
void av_register_hwaccel(AVHWAccel *hwaccel);
 
 
 
 
 
 
AVHWAccel *av_hwaccel_next(const AVHWAccel *hwaccel);
 
 
 
 
 
enum AVLockOp {
  AV_LOCK_CREATE,
  AV_LOCK_OBTAIN,
  AV_LOCK_RELEASE,
  AV_LOCK_DESTROY,
};
# 5348 "external/ffmpeg/libavcodec/avcodec.h"
int av_lockmgr_register(int (*cb)(void **mutex, enum AVLockOp op));
 
 
 
 
enum AVMediaType avcodec_get_type(enum AVCodecID codec_id);
 
 
 
 
 
const char *avcodec_get_name(enum AVCodecID id);
 
 
 
 
 
int avcodec_is_open(AVCodecContext *s);
 
 
 
 
int av_codec_is_encoder(const AVCodec *codec);
 
 
 
 
int av_codec_is_decoder(const AVCodec *codec);
 
 
 
 
const AVCodecDescriptor *avcodec_descriptor_get(enum AVCodecID id);
# 5389 "external/ffmpeg/libavcodec/avcodec.h"
const AVCodecDescriptor *avcodec_descriptor_next(const AVCodecDescriptor *prev);
 
 
 
 
 
const AVCodecDescriptor *avcodec_descriptor_get_by_name(const char *name);
# 5406 "external/ffmpeg/libavcodec/avcodec.h"
AVCPBProperties *av_cpb_properties_alloc(size_t *size);
# 34 "external/ffmpeg/libavcodec/thread.h" 2
 
typedef struct ThreadFrame {
    AVFrame *f;
    AVCodecContext *owner;
 
 
    AVBufferRef *progress;
} ThreadFrame;
 
 
 
 
 
 
 
void ff_thread_flush(AVCodecContext *avctx);
# 61 "external/ffmpeg/libavcodec/thread.h"
int ff_thread_decode_frame(AVCodecContext *avctx, AVFrame *picture,
                           int *got_picture_ptr, AVPacket *avpkt);
# 72 "external/ffmpeg/libavcodec/thread.h"
void ff_thread_finish_setup(AVCodecContext *avctx);
# 84 "external/ffmpeg/libavcodec/thread.h"
void ff_thread_report_progress(ThreadFrame *f, int progress, int field);
# 98 "external/ffmpeg/libavcodec/thread.h"
void ff_thread_await_progress(ThreadFrame *f, int progress, int field);
# 108 "external/ffmpeg/libavcodec/thread.h"
enum AVPixelFormat ff_thread_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt);
# 118 "external/ffmpeg/libavcodec/thread.h"
int ff_thread_get_buffer(AVCodecContext *avctx, ThreadFrame *f, int flags);
# 131 "external/ffmpeg/libavcodec/thread.h"
void ff_thread_release_buffer(AVCodecContext *avctx, ThreadFrame *f);
 
int ff_thread_ref_frame(ThreadFrame *dst, ThreadFrame *src);
 
int ff_thread_init(AVCodecContext *s);
void ff_thread_free(AVCodecContext *s);
 
int ff_alloc_entries(AVCodecContext *avctx, int count);
void ff_reset_entries(AVCodecContext *avctx);
void ff_thread_report_progress2(AVCodecContext *avctx, int field, int thread, int n);
void ff_thread_await_progress2(AVCodecContext *avctx, int field, int thread, int shift);
# 30 "external/ffmpeg/libavcodec/vp9.h" 2
# 1 "external/ffmpeg/libavcodec/vp56.h" 1
# 29 "external/ffmpeg/libavcodec/vp56.h"
# 1 "external/ffmpeg/libavcodec/get_bits.h" 1
# 31 "external/ffmpeg/libavcodec/get_bits.h"
# 1 "external/ffmpeg/libavcodec/../libavutil/common.h" 1
# 32 "external/ffmpeg/libavcodec/get_bits.h" 2
 
 
# 1 "external/ffmpeg/libavcodec/../libavutil/avassert.h" 1
# 35 "external/ffmpeg/libavcodec/get_bits.h" 2
# 54 "external/ffmpeg/libavcodec/get_bits.h"
typedef struct GetBitContext {
    const uint8_t *buffer, *buffer_end;
    int index;
    int size_in_bits;
    int size_in_bits_plus8;
} GetBitContext;
 
 
 
typedef struct VLC {
    int bits;
    int16_t (*table)[2];
    int table_size, table_allocated;
} VLC;
 
typedef struct RL_VLC_ELEM {
    int16_t level;
    int8_t len;
    uint8_t run;
} RL_VLC_ELEM;
# 212 "external/ffmpeg/libavcodec/get_bits.h"
static inline int get_bits_count(const GetBitContext *s)
{
    return s->index;
}
 
static inline void skip_bits_long(GetBitContext *s, int n)
{
 
 
 
    s->index += av_clip_c(n, -s->index, s->size_in_bits_plus8 - s->index);
 
}
 
 
 
 
 
 
static inline int get_xbits(GetBitContext *s, int n)
{
    register int sign;
    register int32_t cache;
    unsigned int re_index = (s)->index; unsigned int __attribute__((unused)) re_cache; unsigned int re_size_plus8 = (s)->size_in_bits_plus8;
    ((void)0);
    re_cache = av_bswap32((((const union unaligned_32 *) ((s)->buffer + (re_index >> 3)))->l)) << (re_index & 7);
    cache = ((uint32_t) re_cache);
    sign = ~cache >> 31;
    re_index = ((re_size_plus8) > (re_index + (n)) ? (re_index + (n)) : (re_size_plus8));
    (s)->index = re_index;
    return ((((uint32_t)(sign ^ cache))>>(32-(n))) ^ sign) - sign;
}
 
static inline int get_sbits(GetBitContext *s, int n)
{
    register int tmp;
    unsigned int re_index = (s)->index; unsigned int __attribute__((unused)) re_cache; unsigned int re_size_plus8 = (s)->size_in_bits_plus8;
    ((void)0);
    re_cache = av_bswap32((((const union unaligned_32 *) ((s)->buffer + (re_index >> 3)))->l)) << (re_index & 7);
    tmp = ((( int32_t)(re_cache))>>(32-(n)));
    re_index = ((re_size_plus8) > (re_index + (n)) ? (re_index + (n)) : (re_size_plus8));
    (s)->index = re_index;
    return tmp;
}
 
 
 
 
static inline unsigned int get_bits(GetBitContext *s, int n)
{
    register int tmp;
    unsigned int re_index = (s)->index; unsigned int __attribute__((unused)) re_cache; unsigned int re_size_plus8 = (s)->size_in_bits_plus8;
    ((void)0);
    re_cache = av_bswap32((((const union unaligned_32 *) ((s)->buffer + (re_index >> 3)))->l)) << (re_index & 7);
    tmp = (((uint32_t)(re_cache))>>(32-(n)));
    re_index = ((re_size_plus8) > (re_index + (n)) ? (re_index + (n)) : (re_size_plus8));
    (s)->index = re_index;
    return tmp;
}
 
 
 
 
static __attribute__((always_inline)) inline int get_bitsz(GetBitContext *s, int n)
{
    return n ? get_bits(s, n) : 0;
}
 
static inline unsigned int get_bits_le(GetBitContext *s, int n)
{
    register int tmp;
    unsigned int re_index = (s)->index; unsigned int __attribute__((unused)) re_cache; unsigned int re_size_plus8 = (s)->size_in_bits_plus8;
    ((void)0);
    re_cache = (((const union unaligned_32 *) ((s)->buffer + (re_index >> 3)))->l) >> (re_index & 7);
    tmp = zero_extend(re_cache, n);
    re_index = ((re_size_plus8) > (re_index + (n)) ? (re_index + (n)) : (re_size_plus8));
    (s)->index = re_index;
    return tmp;
}
 
 
 
 
static inline unsigned int show_bits(GetBitContext *s, int n)
{
    register int tmp;
    unsigned int re_index = (s)->index; unsigned int __attribute__((unused)) re_cache;
    ((void)0);
    re_cache = av_bswap32((((const union unaligned_32 *) ((s)->buffer + (re_index >> 3)))->l)) << (re_index & 7);
    tmp = (((uint32_t)(re_cache))>>(32-(n)));
    return tmp;
}
 
static inline void skip_bits(GetBitContext *s, int n)
{
    unsigned int re_index = (s)->index; unsigned int __attribute__((unused)) re_cache; unsigned int re_size_plus8 = (s)->size_in_bits_plus8;
    re_index = ((re_size_plus8) > (re_index + (n)) ? (re_index + (n)) : (re_size_plus8));
    (s)->index = re_index;
}
 
static inline unsigned int get_bits1(GetBitContext *s)
{
    unsigned int index = s->index;
    uint8_t result = s->buffer[index >> 3];
 
 
 
 
    result <<= index & 7;
    result >>= 8 - 1;
 
 
    if (s->index < s->size_in_bits_plus8)
 
        index++;
    s->index = index;
 
    return result;
}
 
static inline unsigned int show_bits1(GetBitContext *s)
{
    return show_bits(s, 1);
}
 
static inline void skip_bits1(GetBitContext *s)
{
    skip_bits(s, 1);
}
 
 
 
 
static inline unsigned int get_bits_long(GetBitContext *s, int n)
{
    if (!n) {
        return 0;
    } else if (n <= 25) {
        return get_bits(s, n);
    } else {
 
 
 
 
        unsigned ret = get_bits(s, 16) << (n - 16);
        return ret | get_bits(s, n - 16);
 
    }
}
 
 
 
 
static inline uint64_t get_bits64(GetBitContext *s, int n)
{
    if (n <= 32) {
        return get_bits_long(s, n);
    } else {
 
 
 
 
        uint64_t ret = (uint64_t) get_bits_long(s, n - 32) << 32;
        return ret | get_bits_long(s, 32);
 
    }
}
 
 
 
 
static inline int get_sbits_long(GetBitContext *s, int n)
{
 
    if (!n)
        return 0;
 
    return sign_extend(get_bits_long(s, n), n);
}
 
 
 
 
static inline unsigned int show_bits_long(GetBitContext *s, int n)
{
    if (n <= 25) {
        return show_bits(s, n);
    } else {
        GetBitContext gb = *s;
        return get_bits_long(&gb, n);
    }
}
 
static inline int check_marker(GetBitContext *s, const char *msg)
{
    int bit = get_bits1(s);
    if (!bit)
        av_log(((void*)0), 32, "Marker bit missing at %d of %d %s\n", get_bits_count(s) - 1, s->size_in_bits, msg);
 
    return bit;
}
# 422 "external/ffmpeg/libavcodec/get_bits.h"
static inline int init_get_bits(GetBitContext *s, const uint8_t *buffer,
                                int bit_size)
{
    int buffer_size;
    int ret = 0;
 
    if (bit_size >= 0x7fffffff - 7 || bit_size < 0 || !buffer) {
        bit_size = 0;
        buffer = ((void*)0);
        ret = (-(int)(('I') | (('N') << 8) | (('D') << 16) | ((unsigned)('A') << 24)));
    }
 
    buffer_size = (bit_size + 7) >> 3;
 
    s->buffer = buffer;
    s->size_in_bits = bit_size;
    s->size_in_bits_plus8 = bit_size + 8;
    s->buffer_end = buffer + buffer_size;
    s->index = 0;
 
    return ret;
}
# 453 "external/ffmpeg/libavcodec/get_bits.h"
static inline int init_get_bits8(GetBitContext *s, const uint8_t *buffer,
                                 int byte_size)
{
    if (byte_size > 0x7fffffff / 8 || byte_size < 0)
        byte_size = -1;
    return init_get_bits(s, buffer, byte_size * 8);
}
 
static inline const uint8_t *align_get_bits(GetBitContext *s)
{
    int n = -get_bits_count(s) & 7;
    if (n)
        skip_bits(s, n);
    return s->buffer + (s->index >> 3);
}
# 478 "external/ffmpeg/libavcodec/get_bits.h"
int ff_init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes,
                       const void *bits, int bits_wrap, int bits_size,
                       const void *codes, int codes_wrap, int codes_size,
                       const void *symbols, int symbols_wrap, int symbols_size,
                       int flags);
void ff_free_vlc(VLC *vlc);
# 578 "external/ffmpeg/libavcodec/get_bits.h"
static __attribute__((always_inline)) inline int get_vlc2(GetBitContext *s, int16_t (*table)[2],
                                     int bits, int max_depth)
{
    int code;
 
    unsigned int re_index = (s)->index; unsigned int __attribute__((unused)) re_cache; unsigned int re_size_plus8 = (s)->size_in_bits_plus8;
    re_cache = av_bswap32((((const union unaligned_32 *) ((s)->buffer + (re_index >> 3)))->l)) << (re_index & 7);
 
    do { int n, nb_bits; unsigned int index; index = (((uint32_t)(re_cache))>>(32-(bits))); code = table[index][0]; n = table[index][1]; if (max_depth > 1 && n < 0) { re_index = ((re_size_plus8) > (re_index + (bits)) ? (re_index + (bits)) : (re_size_plus8)); re_cache = av_bswap32((((const union unaligned_32 *) ((s)->buffer + (re_index >> 3)))->l)) << (re_index & 7); nb_bits = -n; index = (((uint32_t)(re_cache))>>(32-(nb_bits))) + code; code = table[index][0]; n = table[index][1]; if (max_depth > 2 && n < 0) { re_index = ((re_size_plus8) > (re_index + (nb_bits)) ? (re_index + (nb_bits)) : (re_size_plus8)); re_cache = av_bswap32((((const union unaligned_32 *) ((s)->buffer + (re_index >> 3)))->l)) << (re_index & 7); nb_bits = -n; index = (((uint32_t)(re_cache))>>(32-(nb_bits))) + code; code = table[index][0]; n = table[index][1]; } } do { re_cache <<= (n); re_index = ((re_size_plus8) > (re_index + (n)) ? (re_index + (n)) : (re_size_plus8)); } while (0); } while (0);
 
    (s)->index = re_index;
 
    return code;
}
 
static inline int decode012(GetBitContext *gb)
{
    int n;
    n = get_bits1(gb);
    if (n == 0)
        return 0;
    else
        return get_bits1(gb) + 1;
}
 
static inline int decode210(GetBitContext *gb)
{
    if (get_bits1(gb))
        return 0;
    else
        return 2 - get_bits1(gb);
}
 
static inline int get_bits_left(GetBitContext *gb)
{
    return gb->size_in_bits - get_bits_count(gb);
}
 
static inline int skip_1stop_8data_bits(GetBitContext *gb)
{
    if (get_bits_left(gb) <= 0)
        return (-(int)(('I') | (('N') << 8) | (('D') << 16) | ((unsigned)('A') << 24)));
 
    while (get_bits1(gb)) {
        skip_bits(gb, 8);
        if (get_bits_left(gb) <= 0)
            return (-(int)(('I') | (('N') << 8) | (('D') << 16) | ((unsigned)('A') << 24)));
    }
 
    return 0;
}
# 30 "external/ffmpeg/libavcodec/vp56.h" 2
# 1 "external/ffmpeg/libavcodec/hpeldsp.h" 1
# 32 "external/ffmpeg/libavcodec/hpeldsp.h"
# 1 "prebuilts/clang/linux-x86/host/sdclang-3.8/bin/../lib/clang/3.8.4/include/stddef.h" 1 3
# 33 "external/ffmpeg/libavcodec/hpeldsp.h" 2
 
 
 
 
 
typedef void (*op_pixels_func)(uint8_t *block ,
                               const uint8_t *pixels ,
                               ptrdiff_t line_size, int h);
 
 
 
 
typedef struct HpelDSPContext {
# 56 "external/ffmpeg/libavcodec/hpeldsp.h"
    op_pixels_func put_pixels_tab[4][4];
# 68 "external/ffmpeg/libavcodec/hpeldsp.h"
    op_pixels_func avg_pixels_tab[4][4];
# 80 "external/ffmpeg/libavcodec/hpeldsp.h"
    op_pixels_func put_no_rnd_pixels_tab[4][4];
# 92 "external/ffmpeg/libavcodec/hpeldsp.h"
    op_pixels_func avg_no_rnd_pixels_tab[4];
} HpelDSPContext;
 
void ff_hpeldsp_init(HpelDSPContext *c, int flags);
 
void ff_hpeldsp_init_aarch64(HpelDSPContext *c, int flags);
void ff_hpeldsp_init_alpha(HpelDSPContext *c, int flags);
void ff_hpeldsp_init_arm(HpelDSPContext *c, int flags);
void ff_hpeldsp_init_ppc(HpelDSPContext *c, int flags);
void ff_hpeldsp_init_x86(HpelDSPContext *c, int flags);
void ff_hpeldsp_init_mips(HpelDSPContext *c, int flags);
# 31 "external/ffmpeg/libavcodec/vp56.h" 2
# 1 "external/ffmpeg/libavcodec/bytestream.h" 1
# 30 "external/ffmpeg/libavcodec/bytestream.h"
# 1 "external/ffmpeg/libavcodec/../libavutil/common.h" 1
# 31 "external/ffmpeg/libavcodec/bytestream.h" 2
 
 
typedef struct GetByteContext {
    const uint8_t *buffer, *buffer_end, *buffer_start;
} GetByteContext;
 
typedef struct PutByteContext {
    uint8_t *buffer, *buffer_end, *buffer_start;
    int eof;
} PutByteContext;
# 87 "external/ffmpeg/libavcodec/bytestream.h"
static __attribute__((always_inline)) inline uint64_t bytestream_get_le64(const uint8_t **b) { (*b) += 8; return (((const union unaligned_64 *) (*b - 8))->l); } static __attribute__((always_inline)) inline void bytestream_put_le64(uint8_t **b, const uint64_t value) { ((((union unaligned_64 *) (*b))->l) = (value)); (*b) += 8; } static __attribute__((always_inline)) inline void bytestream2_put_le64u(PutByteContext *p, const uint64_t value) { bytestream_put_le64(&p->buffer, value); } static __attribute__((always_inline)) inline void bytestream2_put_le64(PutByteContext *p, const uint64_t value) { if (!p->eof && (p->buffer_end - p->buffer >= 8)) { ((((union unaligned_64 *) (p->buffer))->l) = (value)); p->buffer += 8; } else p->eof = 1; } static __attribute__((always_inline)) inline uint64_t bytestream2_get_le64u(GetByteContext *g) { return bytestream_get_le64(&g->buffer); } static __attribute__((always_inline)) inline uint64_t bytestream2_get_le64(GetByteContext *g) { if (g->buffer_end - g->buffer < 8) { g->buffer = g->buffer_end; return 0; } return bytestream2_get_le64u(g); } static __attribute__((always_inline)) inline uint64_t bytestream2_peek_le64(GetByteContext *g) { if (g->buffer_end - g->buffer < 8) return 0; return (((const union unaligned_64 *) (g->buffer))->l); }
static __attribute__((always_inline)) inline unsigned int bytestream_get_le32(const uint8_t **b) { (*b) += 4; return (((const union unaligned_32 *) (*b - 4))->l); } static __attribute__((always_inline)) inline void bytestream_put_le32(uint8_t **b, const unsigned int value) { ((((union unaligned_32 *) (*b))->l) = (value)); (*b) += 4; } static __attribute__((always_inline)) inline void bytestream2_put_le32u(PutByteContext *p, const unsigned int value) { bytestream_put_le32(&p->buffer, value); } static __attribute__((always_inline)) inline void bytestream2_put_le32(PutByteContext *p, const unsigned int value) { if (!p->eof && (p->buffer_end - p->buffer >= 4)) { ((((union unaligned_32 *) (p->buffer))->l) = (value)); p->buffer += 4; } else p->eof = 1; } static __attribute__((always_inline)) inline unsigned int bytestream2_get_le32u(GetByteContext *g) { return bytestream_get_le32(&g->buffer); } static __attribute__((always_inline)) inline unsigned int bytestream2_get_le32(GetByteContext *g) { if (g->buffer_end - g->buffer < 4) { g->buffer = g->buffer_end; return 0; } return bytestream2_get_le32u(g); } static __attribute__((always_inline)) inline unsigned int bytestream2_peek_le32(GetByteContext *g) { if (g->buffer_end - g->buffer < 4) return 0; return (((const union unaligned_32 *) (g->buffer))->l); }
static __attribute__((always_inline)) inline unsigned int bytestream_get_le24(const uint8_t **b) { (*b) += 3; return ((((const uint8_t*)(*b - 3))[2] << 16) | (((const uint8_t*)(*b - 3))[1] << 8) | ((const uint8_t*)(*b - 3))[0]); } static __attribute__((always_inline)) inline void bytestream_put_le24(uint8_t **b, const unsigned int value) { do { ((uint8_t*)(*b))[0] = (value); ((uint8_t*)(*b))[1] = (value)>>8; ((uint8_t*)(*b))[2] = (value)>>16; } while(0); (*b) += 3; } static __attribute__((always_inline)) inline void bytestream2_put_le24u(PutByteContext *p, const unsigned int value) { bytestream_put_le24(&p->buffer, value); } static __attribute__((always_inline)) inline void bytestream2_put_le24(PutByteContext *p, const unsigned int value) { if (!p->eof && (p->buffer_end - p->buffer >= 3)) { do { ((uint8_t*)(p->buffer))[0] = (value); ((uint8_t*)(p->buffer))[1] = (value)>>8; ((uint8_t*)(p->buffer))[2] = (value)>>16; } while(0); p->buffer += 3; } else p->eof = 1; } static __attribute__((always_inline)) inline unsigned int bytestream2_get_le24u(GetByteContext *g) { return bytestream_get_le24(&g->buffer); } static __attribute__((always_inline)) inline unsigned int bytestream2_get_le24(GetByteContext *g) { if (g->buffer_end - g->buffer < 3) { g->buffer = g->buffer_end; return 0; } return bytestream2_get_le24u(g); } static __attribute__((always_inline)) inline unsigned int bytestream2_peek_le24(GetByteContext *g) { if (g->buffer_end - g->buffer < 3) return 0; return ((((const uint8_t*)(g->buffer))[2] << 16) | (((const uint8_t*)(g->buffer))[1] << 8) | ((const uint8_t*)(g->buffer))[0]); }
static __attribute__((always_inline)) inline unsigned int bytestream_get_le16(const uint8_t **b) { (*b) += 2; return (((const union unaligned_16 *) (*b - 2))->l); } static __attribute__((always_inline)) inline void bytestream_put_le16(uint8_t **b, const unsigned int value) { ((((union unaligned_16 *) (*b))->l) = (value)); (*b) += 2; } static __attribute__((always_inline)) inline void bytestream2_put_le16u(PutByteContext *p, const unsigned int value) { bytestream_put_le16(&p->buffer, value); } static __attribute__((always_inline)) inline void bytestream2_put_le16(PutByteContext *p, const unsigned int value) { if (!p->eof && (p->buffer_end - p->buffer >= 2)) { ((((union unaligned_16 *) (p->buffer))->l) = (value)); p->buffer += 2; } else p->eof = 1; } static __attribute__((always_inline)) inline unsigned int bytestream2_get_le16u(GetByteContext *g) { return bytestream_get_le16(&g->buffer); } static __attribute__((always_inline)) inline unsigned int bytestream2_get_le16(GetByteContext *g) { if (g->buffer_end - g->buffer < 2) { g->buffer = g->buffer_end; return 0; } return bytestream2_get_le16u(g); } static __attribute__((always_inline)) inline unsigned int bytestream2_peek_le16(GetByteContext *g) { if (g->buffer_end - g->buffer < 2) return 0; return (((const union unaligned_16 *) (g->buffer))->l); }
static __attribute__((always_inline)) inline uint64_t bytestream_get_be64(const uint8_t **b) { (*b) += 8; return av_bswap64((((const union unaligned_64 *) (*b - 8))->l)); } static __attribute__((always_inline)) inline void bytestream_put_be64(uint8_t **b, const uint64_t value) { ((((union unaligned_64 *) (*b))->l) = (av_bswap64(value))); (*b) += 8; } static __attribute__((always_inline)) inline void bytestream2_put_be64u(PutByteContext *p, const uint64_t value) { bytestream_put_be64(&p->buffer, value); } static __attribute__((always_inline)) inline void bytestream2_put_be64(PutByteContext *p, const uint64_t value) { if (!p->eof && (p->buffer_end - p->buffer >= 8)) { ((((union unaligned_64 *) (p->buffer))->l) = (av_bswap64(value))); p->buffer += 8; } else p->eof = 1; } static __attribute__((always_inline)) inline uint64_t bytestream2_get_be64u(GetByteContext *g) { return bytestream_get_be64(&g->buffer); } static __attribute__((always_inline)) inline uint64_t bytestream2_get_be64(GetByteContext *g) { if (g->buffer_end - g->buffer < 8) { g->buffer = g->buffer_end; return 0; } return bytestream2_get_be64u(g); } static __attribute__((always_inline)) inline uint64_t bytestream2_peek_be64(GetByteContext *g) { if (g->buffer_end - g->buffer < 8) return 0; return av_bswap64((((const union unaligned_64 *) (g->buffer))->l)); }
static __attribute__((always_inline)) inline unsigned int bytestream_get_be32(const uint8_t **b) { (*b) += 4; return av_bswap32((((const union unaligned_32 *) (*b - 4))->l)); } static __attribute__((always_inline)) inline void bytestream_put_be32(uint8_t **b, const unsigned int value) { ((((union unaligned_32 *) (*b))->l) = (av_bswap32(value))); (*b) += 4; } static __attribute__((always_inline)) inline void bytestream2_put_be32u(PutByteContext *p, const unsigned int value) { bytestream_put_be32(&p->buffer, value); } static __attribute__((always_inline)) inline void bytestream2_put_be32(PutByteContext *p, const unsigned int value) { if (!p->eof && (p->buffer_end - p->buffer >= 4)) { ((((union unaligned_32 *) (p->buffer))->l) = (av_bswap32(value))); p->buffer += 4; } else p->eof = 1; } static __attribute__((always_inline)) inline unsigned int bytestream2_get_be32u(GetByteContext *g) { return bytestream_get_be32(&g->buffer); } static __attribute__((always_inline)) inline unsigned int bytestream2_get_be32(GetByteContext *g) { if (g->buffer_end - g->buffer < 4) { g->buffer = g->buffer_end; return 0; } return bytestream2_get_be32u(g); } static __attribute__((always_inline)) inline unsigned int bytestream2_peek_be32(GetByteContext *g) { if (g->buffer_end - g->buffer < 4) return 0; return av_bswap32((((const union unaligned_32 *) (g->buffer))->l)); }
static __attribute__((always_inline)) inline unsigned int bytestream_get_be24(const uint8_t **b) { (*b) += 3; return ((((const uint8_t*)(*b - 3))[0] << 16) | (((const uint8_t*)(*b - 3))[1] << 8) | ((const uint8_t*)(*b - 3))[2]); } static __attribute__((always_inline)) inline void bytestream_put_be24(uint8_t **b, const unsigned int value) { do { ((uint8_t*)(*b))[2] = (value); ((uint8_t*)(*b))[1] = (value)>>8; ((uint8_t*)(*b))[0] = (value)>>16; } while(0); (*b) += 3; } static __attribute__((always_inline)) inline void bytestream2_put_be24u(PutByteContext *p, const unsigned int value) { bytestream_put_be24(&p->buffer, value); } static __attribute__((always_inline)) inline void bytestream2_put_be24(PutByteContext *p, const unsigned int value) { if (!p->eof && (p->buffer_end - p->buffer >= 3)) { do { ((uint8_t*)(p->buffer))[2] = (value); ((uint8_t*)(p->buffer))[1] = (value)>>8; ((uint8_t*)(p->buffer))[0] = (value)>>16; } while(0); p->buffer += 3; } else p->eof = 1; } static __attribute__((always_inline)) inline unsigned int bytestream2_get_be24u(GetByteContext *g) { return bytestream_get_be24(&g->buffer); } static __attribute__((always_inline)) inline unsigned int bytestream2_get_be24(GetByteContext *g) { if (g->buffer_end - g->buffer < 3) { g->buffer = g->buffer_end; return 0; } return bytestream2_get_be24u(g); } static __attribute__((always_inline)) inline unsigned int bytestream2_peek_be24(GetByteContext *g) { if (g->buffer_end - g->buffer < 3) return 0; return ((((const uint8_t*)(g->buffer))[0] << 16) | (((const uint8_t*)(g->buffer))[1] << 8) | ((const uint8_t*)(g->buffer))[2]); }
static __attribute__((always_inline)) inline unsigned int bytestream_get_be16(const uint8_t **b) { (*b) += 2; return av_bswap16((((const union unaligned_16 *) (*b - 2))->l)); } static __attribute__((always_inline)) inline void bytestream_put_be16(uint8_t **b, const unsigned int value) { ((((union unaligned_16 *) (*b))->l) = (av_bswap16(value))); (*b) += 2; } static __attribute__((always_inline)) inline void bytestream2_put_be16u(PutByteContext *p, const unsigned int value) { bytestream_put_be16(&p->buffer, value); } static __attribute__((always_inline)) inline void bytestream2_put_be16(PutByteContext *p, const unsigned int value) { if (!p->eof && (p->buffer_end - p->buffer >= 2)) { ((((union unaligned_16 *) (p->buffer))->l) = (av_bswap16(value))); p->buffer += 2; } else p->eof = 1; } static __attribute__((always_inline)) inline unsigned int bytestream2_get_be16u(GetByteContext *g) { return bytestream_get_be16(&g->buffer); } static __attribute__((always_inline)) inline unsigned int bytestream2_get_be16(GetByteContext *g) { if (g->buffer_end - g->buffer < 2) { g->buffer = g->buffer_end; return 0; } return bytestream2_get_be16u(g); } static __attribute__((always_inline)) inline unsigned int bytestream2_peek_be16(GetByteContext *g) { if (g->buffer_end - g->buffer < 2) return 0; return av_bswap16((((const union unaligned_16 *) (g->buffer))->l)); }
static __attribute__((always_inline)) inline unsigned int bytestream_get_byte(const uint8_t **b) { (*b) += 1; return (((const uint8_t*)(*b - 1))[0]); } static __attribute__((always_inline)) inline void bytestream_put_byte(uint8_t **b, const unsigned int value) { do { ((uint8_t*)(*b))[0] = (value); } while(0); (*b) += 1; } static __attribute__((always_inline)) inline void bytestream2_put_byteu(PutByteContext *p, const unsigned int value) { bytestream_put_byte(&p->buffer, value); } static __attribute__((always_inline)) inline void bytestream2_put_byte(PutByteContext *p, const unsigned int value) { if (!p->eof && (p->buffer_end - p->buffer >= 1)) { do { ((uint8_t*)(p->buffer))[0] = (value); } while(0); p->buffer += 1; } else p->eof = 1; } static __attribute__((always_inline)) inline unsigned int bytestream2_get_byteu(GetByteContext *g) { return bytestream_get_byte(&g->buffer); } static __attribute__((always_inline)) inline unsigned int bytestream2_get_byte(GetByteContext *g) { if (g->buffer_end - g->buffer < 1) { g->buffer = g->buffer_end; return 0; } return bytestream2_get_byteu(g); } static __attribute__((always_inline)) inline unsigned int bytestream2_peek_byte(GetByteContext *g) { if (g->buffer_end - g->buffer < 1) return 0; return (((const uint8_t*)(g->buffer))[0]); }
# 133 "external/ffmpeg/libavcodec/bytestream.h"
static __attribute__((always_inline)) inline void bytestream2_init(GetByteContext *g,
                                              const uint8_t *buf,
                                              int buf_size)
{
    do { if (!(buf_size >= 0)) { av_log(((void*)0), 0, "Assertion %s failed at %s:%d\n", "buf_size >= 0", "external/ffmpeg/libavcodec/bytestream.h", 137); abort(); } } while (0);
    g->buffer = buf;
    g->buffer_start = buf;
    g->buffer_end = buf + buf_size;
}
 
static __attribute__((always_inline)) inline void bytestream2_init_writer(PutByteContext *p,
                                                     uint8_t *buf,
                                                     int buf_size)
{
    do { if (!(buf_size >= 0)) { av_log(((void*)0), 0, "Assertion %s failed at %s:%d\n", "buf_size >= 0", "external/ffmpeg/libavcodec/bytestream.h", 147); abort(); } } while (0);
    p->buffer = buf;
    p->buffer_start = buf;
    p->buffer_end = buf + buf_size;
    p->eof = 0;
}
 
static __attribute__((always_inline)) inline unsigned int bytestream2_get_bytes_left(GetByteContext *g)
{
    return g->buffer_end - g->buffer;
}
 
static __attribute__((always_inline)) inline unsigned int bytestream2_get_bytes_left_p(PutByteContext *p)
{
    return p->buffer_end - p->buffer;
}
 
static __attribute__((always_inline)) inline void bytestream2_skip(GetByteContext *g,
                                              unsigned int size)
{
    g->buffer += ((g->buffer_end - g->buffer) > (size) ? (size) : (g->buffer_end - g->buffer));
}
 
static __attribute__((always_inline)) inline void bytestream2_skipu(GetByteContext *g,
                                               unsigned int size)
{
    g->buffer += size;
}
 
static __attribute__((always_inline)) inline void bytestream2_skip_p(PutByteContext *p,
                                                unsigned int size)
{
    int size2;
    if (p->eof)
        return;
    size2 = ((p->buffer_end - p->buffer) > (size) ? (size) : (p->buffer_end - p->buffer));
    if (size2 != size)
        p->eof = 1;
    p->buffer += size2;
}
 
static __attribute__((always_inline)) inline int bytestream2_tell(GetByteContext *g)
{
    return (int)(g->buffer - g->buffer_start);
}
 
static __attribute__((always_inline)) inline int bytestream2_tell_p(PutByteContext *p)
{
    return (int)(p->buffer - p->buffer_start);
}
 
static __attribute__((always_inline)) inline int bytestream2_size(GetByteContext *g)
{
    return (int)(g->buffer_end - g->buffer_start);
}
 
static __attribute__((always_inline)) inline int bytestream2_size_p(PutByteContext *p)
{
    return (int)(p->buffer_end - p->buffer_start);
}
 
static __attribute__((always_inline)) inline int bytestream2_seek(GetByteContext *g,
                                             int offset,
                                             int whence)
{
    switch (whence) {
    case 1:
        offset = av_clip_c(offset, -(g->buffer - g->buffer_start),
                             g->buffer_end - g->buffer);
        g->buffer += offset;
        break;
    case 2:
        offset = av_clip_c(offset, -(g->buffer_end - g->buffer_start), 0);
        g->buffer = g->buffer_end + offset;
        break;
    case 0:
        offset = av_clip_c(offset, 0, g->buffer_end - g->buffer_start);
        g->buffer = g->buffer_start + offset;
        break;
    default:
        return (-(22));
    }
    return bytestream2_tell(g);
}
 
static __attribute__((always_inline)) inline int bytestream2_seek_p(PutByteContext *p,
                                               int offset,
                                               int whence)
{
    p->eof = 0;
    switch (whence) {
    case 1:
        if (p->buffer_end - p->buffer < offset)
            p->eof = 1;
        offset = av_clip_c(offset, -(p->buffer - p->buffer_start),
                             p->buffer_end - p->buffer);
        p->buffer += offset;
        break;
    case 2:
        if (offset > 0)
            p->eof = 1;
        offset = av_clip_c(offset, -(p->buffer_end - p->buffer_start), 0);
        p->buffer = p->buffer_end + offset;
        break;
    case 0:
        if (p->buffer_end - p->buffer_start < offset)
            p->eof = 1;
        offset = av_clip_c(offset, 0, p->buffer_end - p->buffer_start);
        p->buffer = p->buffer_start + offset;
        break;
    default:
        return (-(22));
    }
    return bytestream2_tell_p(p);
}
 
static __attribute__((always_inline)) inline unsigned int bytestream2_get_buffer(GetByteContext *g,
                                                            uint8_t *dst,
                                                            unsigned int size)
{
    int size2 = ((g->buffer_end - g->buffer) > (size) ? (size) : (g->buffer_end - g->buffer));
    memcpy(dst, g->buffer, size2);
    g->buffer += size2;
    return size2;
}
 
static __attribute__((always_inline)) inline unsigned int bytestream2_get_bufferu(GetByteContext *g,
                                                             uint8_t *dst,
                                                             unsigned int size)
{
    memcpy(dst, g->buffer, size);
    g->buffer += size;
    return size;
}
 
static __attribute__((always_inline)) inline unsigned int bytestream2_put_buffer(PutByteContext *p,
                                                            const uint8_t *src,
                                                            unsigned int size)
{
    int size2;
    if (p->eof)
        return 0;
    size2 = ((p->buffer_end - p->buffer) > (size) ? (size) : (p->buffer_end - p->buffer));
    if (size2 != size)
        p->eof = 1;
    memcpy(p->buffer, src, size2);
    p->buffer += size2;
    return size2;
}
 
static __attribute__((always_inline)) inline unsigned int bytestream2_put_bufferu(PutByteContext *p,
                                                             const uint8_t *src,
                                                             unsigned int size)
{
    memcpy(p->buffer, src, size);
    p->buffer += size;
    return size;
}
 
static __attribute__((always_inline)) inline void bytestream2_set_buffer(PutByteContext *p,
                                                    const uint8_t c,
                                                    unsigned int size)
{
    int size2;
    if (p->eof)
        return;
    size2 = ((p->buffer_end - p->buffer) > (size) ? (size) : (p->buffer_end - p->buffer));
    if (size2 != size)
        p->eof = 1;
    memset(p->buffer, c, size2);
    p->buffer += size2;
}
 
static __attribute__((always_inline)) inline void bytestream2_set_bufferu(PutByteContext *p,
                                                     const uint8_t c,
                                                     unsigned int size)
{
    memset(p->buffer, c, size);
    p->buffer += size;
}
 
static __attribute__((always_inline)) inline unsigned int bytestream2_get_eof(PutByteContext *p)
{
    return p->eof;
}
 
static __attribute__((always_inline)) inline unsigned int bytestream2_copy_bufferu(PutByteContext *p,
                                                              GetByteContext *g,
                                                              unsigned int size)
{
    memcpy(p->buffer, g->buffer, size);
    p->buffer += size;
    g->buffer += size;
    return size;
}
 
static __attribute__((always_inline)) inline unsigned int bytestream2_copy_buffer(PutByteContext *p,
                                                             GetByteContext *g,
                                                             unsigned int size)
{
    int size2;
 
    if (p->eof)
        return 0;
    size = ((g->buffer_end - g->buffer) > (size) ? (size) : (g->buffer_end - g->buffer));
    size2 = ((p->buffer_end - p->buffer) > (size) ? (size) : (p->buffer_end - p->buffer));
    if (size2 != size)
        p->eof = 1;
 
    return bytestream2_copy_bufferu(p, g, size2);
}
 
static __attribute__((always_inline)) inline unsigned int bytestream_get_buffer(const uint8_t **b,
                                                           uint8_t *dst,
                                                           unsigned int size)
{
    memcpy(dst, *b, size);
    (*b) += size;
    return size;
}
 
static __attribute__((always_inline)) inline void bytestream_put_buffer(uint8_t **b,
                                                   const uint8_t *src,
                                                   unsigned int size)
{
    memcpy(*b, src, size);
    (*b) += size;
}
# 32 "external/ffmpeg/libavcodec/vp56.h" 2
# 1 "external/ffmpeg/libavcodec/h264chroma.h" 1
# 24 "external/ffmpeg/libavcodec/h264chroma.h"
typedef void (*h264_chroma_mc_func)(uint8_t *dst , uint8_t *src , int srcStride, int h, int x, int y);
 
typedef struct H264ChromaContext {
    h264_chroma_mc_func put_h264_chroma_pixels_tab[4];
    h264_chroma_mc_func avg_h264_chroma_pixels_tab[4];
} H264ChromaContext;
 
void ff_h264chroma_init(H264ChromaContext *c, int bit_depth);
 
void ff_h264chroma_init_aarch64(H264ChromaContext *c, int bit_depth);
void ff_h264chroma_init_arm(H264ChromaContext *c, int bit_depth);
void ff_h264chroma_init_ppc(H264ChromaContext *c, int bit_depth);
void ff_h264chroma_init_x86(H264ChromaContext *c, int bit_depth);
void ff_h264chroma_init_mips(H264ChromaContext *c, int bit_depth);
# 33 "external/ffmpeg/libavcodec/vp56.h" 2
# 1 "external/ffmpeg/libavcodec/videodsp.h" 1
# 29 "external/ffmpeg/libavcodec/videodsp.h"
# 1 "prebuilts/clang/linux-x86/host/sdclang-3.8/bin/../lib/clang/3.8.4/include/stddef.h" 1 3
# 30 "external/ffmpeg/libavcodec/videodsp.h" 2
 
 
 
 
 
 
 
 
void ff_emulated_edge_mc_8(uint8_t *dst, const uint8_t *src, ptrdiff_t dst_stride, ptrdiff_t src_stride, int block_w, int block_h, int src_x, int src_y, int w, int h);
void ff_emulated_edge_mc_16(uint8_t *dst, const uint8_t *src, ptrdiff_t dst_stride, ptrdiff_t src_stride, int block_w, int block_h, int src_x, int src_y, int w, int h);
 
typedef struct VideoDSPContext {
# 63 "external/ffmpeg/libavcodec/videodsp.h"
    void (*emulated_edge_mc)(uint8_t *dst, const uint8_t *src,
                             ptrdiff_t dst_linesize,
                             ptrdiff_t src_linesize,
                             int block_w, int block_h,
                             int src_x, int src_y, int w, int h);
# 76 "external/ffmpeg/libavcodec/videodsp.h"
    void (*prefetch)(uint8_t *buf, ptrdiff_t stride, int h);
} VideoDSPContext;
 
void ff_videodsp_init(VideoDSPContext *ctx, int bpc);
 
 
void ff_videodsp_init_aarch64(VideoDSPContext *ctx, int bpc);
void ff_videodsp_init_arm(VideoDSPContext *ctx, int bpc);
void ff_videodsp_init_ppc(VideoDSPContext *ctx, int bpc);
void ff_videodsp_init_x86(VideoDSPContext *ctx, int bpc);
# 34 "external/ffmpeg/libavcodec/vp56.h" 2
# 1 "external/ffmpeg/libavcodec/vp3dsp.h" 1
# 22 "external/ffmpeg/libavcodec/vp3dsp.h"
# 1 "prebuilts/clang/linux-x86/host/sdclang-3.8/bin/../lib/clang/3.8.4/include/stddef.h" 1 3
# 23 "external/ffmpeg/libavcodec/vp3dsp.h" 2
 
 
typedef struct VP3DSPContext {
# 36 "external/ffmpeg/libavcodec/vp3dsp.h"
    void (*put_no_rnd_pixels_l2)(uint8_t *dst,
                                 const uint8_t *a,
                                 const uint8_t *b,
                                 ptrdiff_t stride, int h);
 
    void (*idct_put)(uint8_t *dest, int line_size, int16_t *block);
    void (*idct_add)(uint8_t *dest, int line_size, int16_t *block);
    void (*idct_dc_add)(uint8_t *dest, int line_size, int16_t *block);
    void (*v_loop_filter)(uint8_t *src, int stride, int *bounding_values);
    void (*h_loop_filter)(uint8_t *src, int stride, int *bounding_values);
} VP3DSPContext;
 
void ff_vp3dsp_init(VP3DSPContext *c, int flags);
void ff_vp3dsp_init_arm(VP3DSPContext *c, int flags);
void ff_vp3dsp_init_ppc(VP3DSPContext *c, int flags);
void ff_vp3dsp_init_x86(VP3DSPContext *c, int flags);
# 35 "external/ffmpeg/libavcodec/vp56.h" 2
# 1 "external/ffmpeg/libavcodec/vp56dsp.h" 1
# 27 "external/ffmpeg/libavcodec/vp56dsp.h"
typedef struct VP56DSPContext {
    void (*edge_filter_hor)(uint8_t *yuv, int stride, int t);
    void (*edge_filter_ver)(uint8_t *yuv, int stride, int t);
 
    void (*vp6_filter_diag4)(uint8_t *dst, uint8_t *src, int stride,
                             const int16_t *h_weights,const int16_t *v_weights);
} VP56DSPContext;
 
void ff_vp6_filter_diag4_c(uint8_t *dst, uint8_t *src, int stride,
                           const int16_t *h_weights, const int16_t *v_weights);
 
void ff_vp56dsp_init(VP56DSPContext *s, enum AVCodecID codec);
void ff_vp6dsp_init_arm(VP56DSPContext *s, enum AVCodecID codec);
void ff_vp6dsp_init_x86(VP56DSPContext* c, enum AVCodecID codec);
# 36 "external/ffmpeg/libavcodec/vp56.h" 2
 
typedef struct vp56_context VP56Context;
 
typedef enum {
    VP56_FRAME_NONE =-1,
    VP56_FRAME_CURRENT = 0,
    VP56_FRAME_PREVIOUS = 1,
    VP56_FRAME_GOLDEN = 2,
    VP56_FRAME_GOLDEN2 = 3,
} VP56Frame;
 
typedef enum {
    VP56_MB_INTER_NOVEC_PF = 0,
    VP56_MB_INTRA = 1,
    VP56_MB_INTER_DELTA_PF = 2,
    VP56_MB_INTER_V1_PF = 3,
    VP56_MB_INTER_V2_PF = 4,
    VP56_MB_INTER_NOVEC_GF = 5,
    VP56_MB_INTER_DELTA_GF = 6,
    VP56_MB_INTER_4V = 7,
    VP56_MB_INTER_V1_GF = 8,
    VP56_MB_INTER_V2_GF = 9,
} VP56mb;
 
typedef struct VP56Tree {
  int8_t val;
  int8_t prob_idx;
} VP56Tree;
 
typedef struct VP56mv {
    int16_t __attribute__ ((aligned (4))) x;
    int16_t y;
} VP56mv;
 
 
 
typedef void (*VP56ParseVectorAdjustment)(VP56Context *s,
                                          VP56mv *vect);
typedef void (*VP56Filter)(VP56Context *s, uint8_t *dst, uint8_t *src,
                           int offset1, int offset2, int stride,
                           VP56mv mv, int mask, int select, int luma);
typedef int (*VP56ParseCoeff)(VP56Context *s);
typedef void (*VP56DefaultModelsInit)(VP56Context *s);
typedef void (*VP56ParseVectorModels)(VP56Context *s);
typedef int (*VP56ParseCoeffModels)(VP56Context *s);
typedef int (*VP56ParseHeader)(VP56Context *s, const uint8_t *buf,
                                int buf_size);
 
typedef struct VP56RangeCoder {
    int high;
    int bits;
 
    const uint8_t *buffer;
    const uint8_t *end;
    unsigned int code_word;
} VP56RangeCoder;
 
typedef struct VP56RefDc {
    uint8_t not_null_dc;
    VP56Frame ref_frame;
    int16_t dc_coeff;
} VP56RefDc;
 
typedef struct VP56Macroblock {
    uint8_t type;
    VP56mv mv;
} VP56Macroblock;
 
typedef struct VP56Model {
    uint8_t coeff_reorder[64];
    uint8_t coeff_index_to_pos[64];
    uint8_t vector_sig[2];
    uint8_t vector_dct[2];
    uint8_t vector_pdi[2][2];
    uint8_t vector_pdv[2][7];
    uint8_t vector_fdv[2][8];
    uint8_t coeff_dccv[2][11];
    uint8_t coeff_ract[2][3][6][11];
    uint8_t coeff_acct[2][3][3][6][5];
    uint8_t coeff_dcct[2][36][5];
    uint8_t coeff_runv[2][14];
    uint8_t mb_type[3][10][10];
    uint8_t mb_types_stats[3][10][2];
} VP56Model;
 
struct vp56_context {
    AVCodecContext *avctx;
    H264ChromaContext h264chroma;
    HpelDSPContext hdsp;
    VideoDSPContext vdsp;
    VP3DSPContext vp3dsp;
    VP56DSPContext vp56dsp;
    uint8_t idct_scantable[64];
    AVFrame *frames[4];
    uint8_t *edge_emu_buffer_alloc;
    uint8_t *edge_emu_buffer;
    VP56RangeCoder c;
    VP56RangeCoder cc;
    VP56RangeCoder *ccp;
    int sub_version;
 
 
    int golden_frame;
    int plane_width[4];
    int plane_height[4];
    int mb_width;
    int mb_height;
    int block_offset[6];
 
    int quantizer;
    uint16_t dequant_dc;
    uint16_t dequant_ac;
 
 
    VP56RefDc *above_blocks;
    VP56RefDc left_block[4];
    int above_block_idx[6];
    int16_t prev_dc[3][3];
 
 
    VP56mb mb_type;
    VP56Macroblock *macroblocks;
    int16_t __attribute__ ((aligned (16))) block_coeff[6][64];
 
 
    VP56mv mv[6];
    VP56mv vector_candidate[2];
    int vector_candidate_pos;
 
 
    int filter_header;
    int deblock_filtering;
    int filter_selection;
    int filter_mode;
    int max_vector_length;
    int sample_variance_threshold;
 
    uint8_t coeff_ctx[4][64];
    uint8_t coeff_ctx_last[4];
 
    int has_alpha;
 
 
    int flip;
    int frbi;
    int srbi;
    int stride[4];
 
    const uint8_t *vp56_coord_div;
    VP56ParseVectorAdjustment parse_vector_adjustment;
    VP56Filter filter;
    VP56ParseCoeff parse_coeff;
    VP56DefaultModelsInit default_models_init;
    VP56ParseVectorModels parse_vector_models;
    VP56ParseCoeffModels parse_coeff_models;
    VP56ParseHeader parse_header;
 
 
    VP56Context *alpha_context;
 
    VP56Model *modelp;
    VP56Model model;
 
 
    int use_huffman;
    GetBitContext gb;
    VLC dccv_vlc[2];
    VLC runv_vlc[2];
    VLC ract_vlc[2][3][6];
    unsigned int nb_null[2][2];
 
    int have_undamaged_frame;
    int discard_frame;
};
 
 
int ff_vp56_init(AVCodecContext *avctx, int flip, int has_alpha);
int ff_vp56_init_context(AVCodecContext *avctx, VP56Context *s,
                          int flip, int has_alpha);
int ff_vp56_free(AVCodecContext *avctx);
int ff_vp56_free_context(VP56Context *s);
void ff_vp56_init_dequant(VP56Context *s, int quantizer);
int ff_vp56_decode_frame(AVCodecContext *avctx, void *data, int *got_frame,
                         AVPacket *avpkt);
 
 
 
 
 
 
extern const uint8_t ff_vp56_norm_shift[256];
int ff_vp56_init_range_decoder(VP56RangeCoder *c, const uint8_t *buf, int buf_size);
 
static __attribute__((always_inline)) inline unsigned int vp56_rac_renorm(VP56RangeCoder *c)
{
    int shift = ff_vp56_norm_shift[c->high];
    int bits = c->bits;
    unsigned int code_word = c->code_word;
 
    c->high <<= shift;
    code_word <<= shift;
    bits += shift;
    if(bits >= 0 && c->buffer < c->end) {
        code_word |= bytestream_get_be16(&c->buffer) << bits;
        bits -= 16;
    }
    c->bits = bits;
    return code_word;
}
# 254 "external/ffmpeg/libavcodec/vp56.h"
static __attribute__((always_inline)) inline int vp56_rac_get_prob(VP56RangeCoder *c, uint8_t prob)
{
    unsigned int code_word = vp56_rac_renorm(c);
    unsigned int low = 1 + (((c->high - 1) * prob) >> 8);
    unsigned int low_shift = low << 16;
    int bit = code_word >= low_shift;
 
    c->high = bit ? c->high - low : low;
    c->code_word = bit ? code_word - low_shift : code_word;
 
    return bit;
}
 
 
 
 
static __attribute__((always_inline)) inline int vp56_rac_get_prob_branchy(VP56RangeCoder *c, int prob)
{
    unsigned long code_word = vp56_rac_renorm(c);
    unsigned low = 1 + (((c->high - 1) * prob) >> 8);
    unsigned low_shift = low << 16;
 
    if (code_word >= low_shift) {
        c->high -= low;
        c->code_word = code_word - low_shift;
        return 1;
    }
 
    c->high = low;
    c->code_word = code_word;
    return 0;
}
 
 
static __attribute__((always_inline)) inline int vp56_rac_get(VP56RangeCoder *c)
{
    unsigned int code_word = vp56_rac_renorm(c);
 
    int low = (c->high + 1) >> 1;
    unsigned int low_shift = low << 16;
    int bit = code_word >= low_shift;
    if (bit) {
        c->high -= low;
        code_word -= low_shift;
    } else {
        c->high = low;
    }
 
    c->code_word = code_word;
    return bit;
}
 
 
static __attribute__((always_inline)) inline int vp8_rac_get(VP56RangeCoder *c)
{
    return vp56_rac_get_prob(c, 128);
}
 
static int vp56_rac_gets(VP56RangeCoder *c, int bits)
{
    int value = 0;
 
    while (bits--) {
        value = (value << 1) | vp56_rac_get(c);
    }
 
    return value;
}
 
static int vp8_rac_get_uint(VP56RangeCoder *c, int bits)
{
    int value = 0;
 
    while (bits--) {
        value = (value << 1) | vp8_rac_get(c);
    }
 
    return value;
}
 
 
static __attribute__((unused)) int vp8_rac_get_sint(VP56RangeCoder *c, int bits)
{
    int v;
 
    if (!vp8_rac_get(c))
        return 0;
 
    v = vp8_rac_get_uint(c, bits);
 
    if (vp8_rac_get(c))
        v = -v;
 
    return v;
}
 
 
static __attribute__((unused)) int vp56_rac_gets_nn(VP56RangeCoder *c, int bits)
{
    int v = vp56_rac_gets(c, 7) << 1;
    return v + !v;
}
 
static __attribute__((unused)) int vp8_rac_get_nn(VP56RangeCoder *c)
{
    int v = vp8_rac_get_uint(c, 7) << 1;
    return v + !v;
}
 
static __attribute__((always_inline)) inline
int vp56_rac_get_tree(VP56RangeCoder *c,
                      const VP56Tree *tree,
                      const uint8_t *probs)
{
    while (tree->val > 0) {
        if (vp56_rac_get_prob_branchy(c, probs[tree->prob_idx]))
            tree += tree->val;
        else
            tree++;
    }
    return -tree->val;
}
 
 
 
static __attribute__((always_inline)) inline int vp8_rac_get_tree(VP56RangeCoder *c, const int8_t (*tree)[2],
                                   const uint8_t *probs)
{
    int i = 0;
 
    do {
        i = tree[i][vp56_rac_get_prob(c, probs[i])];
    } while (i > 0);
 
    return -i;
}
 
 
static __attribute__((always_inline)) inline int vp8_rac_get_coeff(VP56RangeCoder *c, const uint8_t *prob)
{
    int v = 0;
 
    do {
        v = (v<<1) + vp56_rac_get_prob(c, *prob++);
    } while (*prob);
 
    return v;
}
# 31 "external/ffmpeg/libavcodec/vp9.h" 2
 
enum BlockLevel {
    BL_64X64,
    BL_32X32,
    BL_16X16,
    BL_8X8,
};
 
enum BlockPartition {
    PARTITION_NONE,
    PARTITION_H,
    PARTITION_V,
    PARTITION_SPLIT,
};
 
enum BlockSize {
    BS_64x64,
    BS_64x32,
    BS_32x64,
    BS_32x32,
    BS_32x16,
    BS_16x32,
    BS_16x16,
    BS_16x8,
    BS_8x16,
    BS_8x8,
    BS_8x4,
    BS_4x8,
    BS_4x4,
    N_BS_SIZES,
};
 
enum TxfmMode {
    TX_4X4,
    TX_8X8,
    TX_16X16,
    TX_32X32,
    N_TXFM_SIZES,
    TX_SWITCHABLE = N_TXFM_SIZES,
    N_TXFM_MODES
};
 
enum TxfmType {
    DCT_DCT,
    DCT_ADST,
    ADST_DCT,
    ADST_ADST,
    N_TXFM_TYPES
};
 
enum IntraPredMode {
    VERT_PRED,
    HOR_PRED,
    DC_PRED,
    DIAG_DOWN_LEFT_PRED,
    DIAG_DOWN_RIGHT_PRED,
    VERT_RIGHT_PRED,
    HOR_DOWN_PRED,
    VERT_LEFT_PRED,
    HOR_UP_PRED,
    TM_VP8_PRED,
    LEFT_DC_PRED,
    TOP_DC_PRED,
    DC_128_PRED,
    DC_127_PRED,
    DC_129_PRED,
    N_INTRA_PRED_MODES
};
 
enum InterPredMode {
    NEARESTMV = 10,
    NEARMV = 11,
    ZEROMV = 12,
    NEWMV = 13,
};
 
enum FilterMode {
    FILTER_8TAP_SMOOTH,
    FILTER_8TAP_REGULAR,
    FILTER_8TAP_SHARP,
    FILTER_BILINEAR,
    FILTER_SWITCHABLE,
};
 
enum CompPredMode {
    PRED_SINGLEREF,
    PRED_COMPREF,
    PRED_SWITCHABLE,
};
 
struct VP9mvrefPair {
    VP56mv mv[2];
    int8_t ref[2];
};
 
typedef struct VP9Frame {
    ThreadFrame tf;
    AVBufferRef *extradata;
    uint8_t *segmentation_map;
    struct VP9mvrefPair *mv;
    int uses_2pass;
 
    AVBufferRef *hwaccel_priv_buf;
    void *hwaccel_picture_private;
} VP9Frame;
 
typedef struct VP9BitstreamHeader {
 
    uint8_t profile;
    uint8_t keyframe;
    uint8_t invisible;
    uint8_t errorres;
    uint8_t intraonly;
    uint8_t resetctx;
    uint8_t refreshrefmask;
    uint8_t highprecisionmvs;
    enum FilterMode filtermode;
    uint8_t allowcompinter;
    uint8_t refreshctx;
    uint8_t parallelmode;
    uint8_t framectxid;
    uint8_t use_last_frame_mvs;
    uint8_t refidx[3];
    uint8_t signbias[3];
    uint8_t fixcompref;
    uint8_t varcompref[2];
    struct {
        uint8_t level;
        int8_t sharpness;
    } filter;
    struct {
        uint8_t enabled;
        uint8_t updated;
        int8_t mode[2];
        int8_t ref[4];
    } lf_delta;
    uint8_t yac_qi;
    int8_t ydc_qdelta, uvdc_qdelta, uvac_qdelta;
    uint8_t lossless;
 
    struct {
        uint8_t enabled;
        uint8_t temporal;
        uint8_t absolute_vals;
        uint8_t update_map;
        uint8_t prob[7];
        uint8_t pred_prob[3];
        struct {
            uint8_t q_enabled;
            uint8_t lf_enabled;
            uint8_t ref_enabled;
            uint8_t skip_enabled;
            uint8_t ref_val;
            int16_t q_val;
            int8_t lf_val;
            int16_t qmul[2][2];
            uint8_t lflvl[4][2];
        } feat[8];
    } segmentation;
    enum TxfmMode txfmmode;
    enum CompPredMode comppredmode;
    struct {
        unsigned log2_tile_cols, log2_tile_rows;
        unsigned tile_cols, tile_rows;
    } tiling;
 
    int uncompressed_header_size;
    int compressed_header_size;
} VP9BitstreamHeader;
 
typedef struct VP9SharedContext {
    VP9BitstreamHeader h;
 
    ThreadFrame refs[8];
 
 
 
    VP9Frame frames[3];
} VP9SharedContext;
# 31 "external/ffmpeg/libavcodec/vp9dsp.h" 2
 
typedef void (*vp9_mc_func)(uint8_t *dst, ptrdiff_t dst_stride,
                            const uint8_t *ref, ptrdiff_t ref_stride,
                            int h, int mx, int my);
typedef void (*vp9_scaled_mc_func)(uint8_t *dst, ptrdiff_t dst_stride,
                                   const uint8_t *ref, ptrdiff_t ref_stride,
                                   int h, int mx, int my, int dx, int dy);
 
typedef struct VP9DSPContext {
# 51 "external/ffmpeg/libavcodec/vp9dsp.h"
    void (*intra_pred[N_TXFM_SIZES][N_INTRA_PRED_MODES])(uint8_t *dst,
                                                         ptrdiff_t stride,
                                                         const uint8_t *left,
                                                         const uint8_t *top);
# 70 "external/ffmpeg/libavcodec/vp9dsp.h"
    void (*itxfm_add[N_TXFM_SIZES + 1][N_TXFM_TYPES])(uint8_t *dst,
                                                      ptrdiff_t stride,
                                                      int16_t *block, int eob);
 
 
 
 
 
 
 
    void (*loop_filter_8[3][2])(uint8_t *dst, ptrdiff_t stride,
                                int mb_lim, int lim, int hev_thr);
 
 
 
 
 
 
    void (*loop_filter_16[2])(uint8_t *dst, ptrdiff_t stride,
                              int mb_lim, int lim, int hev_thr);
# 102 "external/ffmpeg/libavcodec/vp9dsp.h"
    void (*loop_filter_mix2[2][2][2])(uint8_t *dst, ptrdiff_t stride,
                                      int mb_lim, int lim, int hev_thr);
# 114 "external/ffmpeg/libavcodec/vp9dsp.h"
    vp9_mc_func mc[5][4][2][2][2];
 
 
 
 
 
    vp9_scaled_mc_func smc[5][4][2];
} VP9DSPContext;
 
void ff_vp9dsp_init(VP9DSPContext *dsp, int bpp, int bitexact);
 
void ff_vp9dsp_init_8(VP9DSPContext *dsp);
void ff_vp9dsp_init_10(VP9DSPContext *dsp);
void ff_vp9dsp_init_12(VP9DSPContext *dsp);
 
void ff_vp9dsp_init_x86(VP9DSPContext *dsp, int bpp, int bitexact);
void ff_vp9dsp_init_mips(VP9DSPContext *dsp, int bpp);
# 27 "external/ffmpeg/libavcodec/vp9dsp_template.c" 2
 
 
 
 
 
 
static void vert_4x4_c(uint8_t *_dst, ptrdiff_t stride,
                       const uint8_t *left, const uint8_t *_top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *top = (const uint8_t *) _top;
    uint32_t p4 = (((const av_alias32*)(top))->u32);
 
    stride /= sizeof(uint8_t);
    (((av_alias32*)(dst + stride * 0))->u32 = (p4));
    (((av_alias32*)(dst + stride * 1))->u32 = (p4));
    (((av_alias32*)(dst + stride * 2))->u32 = (p4));
    (((av_alias32*)(dst + stride * 3))->u32 = (p4));
}
 
static void vert_8x8_c(uint8_t *_dst, ptrdiff_t stride,
                       const uint8_t *left, const uint8_t *_top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *top = (const uint8_t *) _top;
    uint32_t p4a = (((const av_alias32*)(top + 0))->u32);
    uint32_t p4b = (((const av_alias32*)(top + 4))->u32);
    int y;
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 8; y++) {
        (((av_alias32*)(dst + 0))->u32 = (p4a));
        (((av_alias32*)(dst + 4))->u32 = (p4b));
        dst += stride;
    }
}
 
static void vert_16x16_c(uint8_t *_dst, ptrdiff_t stride,
                         const uint8_t *left, const uint8_t *_top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *top = (const uint8_t *) _top;
    uint32_t p4a = (((const av_alias32*)(top + 0))->u32);
    uint32_t p4b = (((const av_alias32*)(top + 4))->u32);
    uint32_t p4c = (((const av_alias32*)(top + 8))->u32);
    uint32_t p4d = (((const av_alias32*)(top + 12))->u32);
    int y;
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 16; y++) {
        (((av_alias32*)(dst + 0))->u32 = (p4a));
        (((av_alias32*)(dst + 4))->u32 = (p4b));
        (((av_alias32*)(dst + 8))->u32 = (p4c));
        (((av_alias32*)(dst + 12))->u32 = (p4d));
        dst += stride;
    }
}
 
static void vert_32x32_c(uint8_t *_dst, ptrdiff_t stride,
                         const uint8_t *left, const uint8_t *_top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *top = (const uint8_t *) _top;
    uint32_t p4a = (((const av_alias32*)(top + 0))->u32);
    uint32_t p4b = (((const av_alias32*)(top + 4))->u32);
    uint32_t p4c = (((const av_alias32*)(top + 8))->u32);
    uint32_t p4d = (((const av_alias32*)(top + 12))->u32);
    uint32_t p4e = (((const av_alias32*)(top + 16))->u32);
    uint32_t p4f = (((const av_alias32*)(top + 20))->u32);
    uint32_t p4g = (((const av_alias32*)(top + 24))->u32);
    uint32_t p4h = (((const av_alias32*)(top + 28))->u32);
    int y;
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 32; y++) {
        (((av_alias32*)(dst + 0))->u32 = (p4a));
        (((av_alias32*)(dst + 4))->u32 = (p4b));
        (((av_alias32*)(dst + 8))->u32 = (p4c));
        (((av_alias32*)(dst + 12))->u32 = (p4d));
        (((av_alias32*)(dst + 16))->u32 = (p4e));
        (((av_alias32*)(dst + 20))->u32 = (p4f));
        (((av_alias32*)(dst + 24))->u32 = (p4g));
        (((av_alias32*)(dst + 28))->u32 = (p4h));
        dst += stride;
    }
}
 
static void hor_4x4_c(uint8_t *_dst, ptrdiff_t stride,
                      const uint8_t *_left, const uint8_t *top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *left = (const uint8_t *) _left;
 
    stride /= sizeof(uint8_t);
    (((av_alias32*)(dst + stride * 0))->u32 = (((left[3])*0x01010101U)));
    (((av_alias32*)(dst + stride * 1))->u32 = (((left[2])*0x01010101U)));
    (((av_alias32*)(dst + stride * 2))->u32 = (((left[1])*0x01010101U)));
    (((av_alias32*)(dst + stride * 3))->u32 = (((left[0])*0x01010101U)));
}
 
static void hor_8x8_c(uint8_t *_dst, ptrdiff_t stride,
                      const uint8_t *_left, const uint8_t *top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *left = (const uint8_t *) _left;
    int y;
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 8; y++) {
        uint32_t p4 = ((left[7 - y])*0x01010101U);
 
        (((av_alias32*)(dst + 0))->u32 = (p4));
        (((av_alias32*)(dst + 4))->u32 = (p4));
        dst += stride;
    }
}
 
static void hor_16x16_c(uint8_t *_dst, ptrdiff_t stride,
                        const uint8_t *_left, const uint8_t *top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *left = (const uint8_t *) _left;
    int y;
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 16; y++) {
        uint32_t p4 = ((left[15 - y])*0x01010101U);
 
        (((av_alias32*)(dst + 0))->u32 = (p4));
        (((av_alias32*)(dst + 4))->u32 = (p4));
        (((av_alias32*)(dst + 8))->u32 = (p4));
        (((av_alias32*)(dst + 12))->u32 = (p4));
        dst += stride;
    }
}
 
static void hor_32x32_c(uint8_t *_dst, ptrdiff_t stride,
                        const uint8_t *_left, const uint8_t *top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *left = (const uint8_t *) _left;
    int y;
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 32; y++) {
        uint32_t p4 = ((left[31 - y])*0x01010101U);
 
        (((av_alias32*)(dst + 0))->u32 = (p4));
        (((av_alias32*)(dst + 4))->u32 = (p4));
        (((av_alias32*)(dst + 8))->u32 = (p4));
        (((av_alias32*)(dst + 12))->u32 = (p4));
        (((av_alias32*)(dst + 16))->u32 = (p4));
        (((av_alias32*)(dst + 20))->u32 = (p4));
        (((av_alias32*)(dst + 24))->u32 = (p4));
        (((av_alias32*)(dst + 28))->u32 = (p4));
        dst += stride;
    }
}
 
 
 
static void tm_4x4_c(uint8_t *_dst, ptrdiff_t stride,
                     const uint8_t *_left, const uint8_t *_top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *left = (const uint8_t *) _left;
    const uint8_t *top = (const uint8_t *) _top;
    int y, tl = top[-1];
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 4; y++) {
        int l_m_tl = left[3 - y] - tl;
 
        dst[0] = av_clip_uint8_c(top[0] + l_m_tl);
        dst[1] = av_clip_uint8_c(top[1] + l_m_tl);
        dst[2] = av_clip_uint8_c(top[2] + l_m_tl);
        dst[3] = av_clip_uint8_c(top[3] + l_m_tl);
        dst += stride;
    }
}
 
static void tm_8x8_c(uint8_t *_dst, ptrdiff_t stride,
                     const uint8_t *_left, const uint8_t *_top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *left = (const uint8_t *) _left;
    const uint8_t *top = (const uint8_t *) _top;
    int y, tl = top[-1];
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 8; y++) {
        int l_m_tl = left[7 - y] - tl;
 
        dst[0] = av_clip_uint8_c(top[0] + l_m_tl);
        dst[1] = av_clip_uint8_c(top[1] + l_m_tl);
        dst[2] = av_clip_uint8_c(top[2] + l_m_tl);
        dst[3] = av_clip_uint8_c(top[3] + l_m_tl);
        dst[4] = av_clip_uint8_c(top[4] + l_m_tl);
        dst[5] = av_clip_uint8_c(top[5] + l_m_tl);
        dst[6] = av_clip_uint8_c(top[6] + l_m_tl);
        dst[7] = av_clip_uint8_c(top[7] + l_m_tl);
        dst += stride;
    }
}
 
static void tm_16x16_c(uint8_t *_dst, ptrdiff_t stride,
                       const uint8_t *_left, const uint8_t *_top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *left = (const uint8_t *) _left;
    const uint8_t *top = (const uint8_t *) _top;
    int y, tl = top[-1];
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 16; y++) {
        int l_m_tl = left[15 - y] - tl;
 
        dst[ 0] = av_clip_uint8_c(top[ 0] + l_m_tl);
        dst[ 1] = av_clip_uint8_c(top[ 1] + l_m_tl);
        dst[ 2] = av_clip_uint8_c(top[ 2] + l_m_tl);
        dst[ 3] = av_clip_uint8_c(top[ 3] + l_m_tl);
        dst[ 4] = av_clip_uint8_c(top[ 4] + l_m_tl);
        dst[ 5] = av_clip_uint8_c(top[ 5] + l_m_tl);
        dst[ 6] = av_clip_uint8_c(top[ 6] + l_m_tl);
        dst[ 7] = av_clip_uint8_c(top[ 7] + l_m_tl);
        dst[ 8] = av_clip_uint8_c(top[ 8] + l_m_tl);
        dst[ 9] = av_clip_uint8_c(top[ 9] + l_m_tl);
        dst[10] = av_clip_uint8_c(top[10] + l_m_tl);
        dst[11] = av_clip_uint8_c(top[11] + l_m_tl);
        dst[12] = av_clip_uint8_c(top[12] + l_m_tl);
        dst[13] = av_clip_uint8_c(top[13] + l_m_tl);
        dst[14] = av_clip_uint8_c(top[14] + l_m_tl);
        dst[15] = av_clip_uint8_c(top[15] + l_m_tl);
        dst += stride;
    }
}
 
static void tm_32x32_c(uint8_t *_dst, ptrdiff_t stride,
                       const uint8_t *_left, const uint8_t *_top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *left = (const uint8_t *) _left;
    const uint8_t *top = (const uint8_t *) _top;
    int y, tl = top[-1];
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 32; y++) {
        int l_m_tl = left[31 - y] - tl;
 
        dst[ 0] = av_clip_uint8_c(top[ 0] + l_m_tl);
        dst[ 1] = av_clip_uint8_c(top[ 1] + l_m_tl);
        dst[ 2] = av_clip_uint8_c(top[ 2] + l_m_tl);
        dst[ 3] = av_clip_uint8_c(top[ 3] + l_m_tl);
        dst[ 4] = av_clip_uint8_c(top[ 4] + l_m_tl);
        dst[ 5] = av_clip_uint8_c(top[ 5] + l_m_tl);
        dst[ 6] = av_clip_uint8_c(top[ 6] + l_m_tl);
        dst[ 7] = av_clip_uint8_c(top[ 7] + l_m_tl);
        dst[ 8] = av_clip_uint8_c(top[ 8] + l_m_tl);
        dst[ 9] = av_clip_uint8_c(top[ 9] + l_m_tl);
        dst[10] = av_clip_uint8_c(top[10] + l_m_tl);
        dst[11] = av_clip_uint8_c(top[11] + l_m_tl);
        dst[12] = av_clip_uint8_c(top[12] + l_m_tl);
        dst[13] = av_clip_uint8_c(top[13] + l_m_tl);
        dst[14] = av_clip_uint8_c(top[14] + l_m_tl);
        dst[15] = av_clip_uint8_c(top[15] + l_m_tl);
        dst[16] = av_clip_uint8_c(top[16] + l_m_tl);
        dst[17] = av_clip_uint8_c(top[17] + l_m_tl);
        dst[18] = av_clip_uint8_c(top[18] + l_m_tl);
        dst[19] = av_clip_uint8_c(top[19] + l_m_tl);
        dst[20] = av_clip_uint8_c(top[20] + l_m_tl);
        dst[21] = av_clip_uint8_c(top[21] + l_m_tl);
        dst[22] = av_clip_uint8_c(top[22] + l_m_tl);
        dst[23] = av_clip_uint8_c(top[23] + l_m_tl);
        dst[24] = av_clip_uint8_c(top[24] + l_m_tl);
        dst[25] = av_clip_uint8_c(top[25] + l_m_tl);
        dst[26] = av_clip_uint8_c(top[26] + l_m_tl);
        dst[27] = av_clip_uint8_c(top[27] + l_m_tl);
        dst[28] = av_clip_uint8_c(top[28] + l_m_tl);
        dst[29] = av_clip_uint8_c(top[29] + l_m_tl);
        dst[30] = av_clip_uint8_c(top[30] + l_m_tl);
        dst[31] = av_clip_uint8_c(top[31] + l_m_tl);
        dst += stride;
    }
}
 
 
 
static void dc_4x4_c(uint8_t *_dst, ptrdiff_t stride,
                     const uint8_t *_left, const uint8_t *_top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *left = (const uint8_t *) _left;
    const uint8_t *top = (const uint8_t *) _top;
    uint32_t dc = (((left[0] + left[1] + left[2] + left[3] + top[0] + top[1] + top[2] + top[3] + 4) >> 3)*0x01010101U);
 
 
    stride /= sizeof(uint8_t);
    (((av_alias32*)(dst + stride * 0))->u32 = (dc));
    (((av_alias32*)(dst + stride * 1))->u32 = (dc));
    (((av_alias32*)(dst + stride * 2))->u32 = (dc));
    (((av_alias32*)(dst + stride * 3))->u32 = (dc));
}
 
static void dc_8x8_c(uint8_t *_dst, ptrdiff_t stride,
                     const uint8_t *_left, const uint8_t *_top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *left = (const uint8_t *) _left;
    const uint8_t *top = (const uint8_t *) _top;
    uint32_t dc = (((left[0] + left[1] + left[2] + left[3] + left[4] + left[5] + left[6] + left[7] + top[0] + top[1] + top[2] + top[3] + top[4] + top[5] + top[6] + top[7] + 8) >> 4)*0x01010101U);
 
 
 
    int y;
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 8; y++) {
        (((av_alias32*)(dst + 0))->u32 = (dc));
        (((av_alias32*)(dst + 4))->u32 = (dc));
        dst += stride;
    }
}
 
static void dc_16x16_c(uint8_t *_dst, ptrdiff_t stride,
                       const uint8_t *_left, const uint8_t *_top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *left = (const uint8_t *) _left;
    const uint8_t *top = (const uint8_t *) _top;
    uint32_t dc = (((left[0] + left[1] + left[2] + left[3] + left[4] + left[5] + left[6] + left[7] + left[8] + left[9] + left[10] + left[11] + left[12] + left[13] + left[14] + left[15] + top[0] + top[1] + top[2] + top[3] + top[4] + top[5] + top[6] + top[7] + top[8] + top[9] + top[10] + top[11] + top[12] + top[13] + top[14] + top[15] + 16) >> 5)*0x01010101U);
 
 
 
 
 
    int y;
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 16; y++) {
        (((av_alias32*)(dst + 0))->u32 = (dc));
        (((av_alias32*)(dst + 4))->u32 = (dc));
        (((av_alias32*)(dst + 8))->u32 = (dc));
        (((av_alias32*)(dst + 12))->u32 = (dc));
        dst += stride;
    }
}
 
static void dc_32x32_c(uint8_t *_dst, ptrdiff_t stride,
                       const uint8_t *_left, const uint8_t *_top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *left = (const uint8_t *) _left;
    const uint8_t *top = (const uint8_t *) _top;
    uint32_t dc = (((left[0] + left[1] + left[2] + left[3] + left[4] + left[5] + left[6] + left[7] + left[8] + left[9] + left[10] + left[11] + left[12] + left[13] + left[14] + left[15] + left[16] + left[17] + left[18] + left[19] + left[20] + left[21] + left[22] + left[23] + left[24] + left[25] + left[26] + left[27] + left[28] + left[29] + left[30] + left[31] + top[0] + top[1] + top[2] + top[3] + top[4] + top[5] + top[6] + top[7] + top[8] + top[9] + top[10] + top[11] + top[12] + top[13] + top[14] + top[15] + top[16] + top[17] + top[18] + top[19] + top[20] + top[21] + top[22] + top[23] + top[24] + top[25] + top[26] + top[27] + top[28] + top[29] + top[30] + top[31] + 32) >> 6)*0x01010101U);
# 391 "external/ffmpeg/libavcodec/vp9dsp_template.c"
    int y;
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 32; y++) {
        (((av_alias32*)(dst + 0))->u32 = (dc));
        (((av_alias32*)(dst + 4))->u32 = (dc));
        (((av_alias32*)(dst + 8))->u32 = (dc));
        (((av_alias32*)(dst + 12))->u32 = (dc));
        (((av_alias32*)(dst + 16))->u32 = (dc));
        (((av_alias32*)(dst + 20))->u32 = (dc));
        (((av_alias32*)(dst + 24))->u32 = (dc));
        (((av_alias32*)(dst + 28))->u32 = (dc));
        dst += stride;
    }
}
 
static void dc_left_4x4_c(uint8_t *_dst, ptrdiff_t stride,
                          const uint8_t *_left, const uint8_t *top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *left = (const uint8_t *) _left;
    uint32_t dc = (((left[0] + left[1] + left[2] + left[3] + 2) >> 2)*0x01010101U);
 
    stride /= sizeof(uint8_t);
    (((av_alias32*)(dst + stride * 0))->u32 = (dc));
    (((av_alias32*)(dst + stride * 1))->u32 = (dc));
    (((av_alias32*)(dst + stride * 2))->u32 = (dc));
    (((av_alias32*)(dst + stride * 3))->u32 = (dc));
}
 
static void dc_left_8x8_c(uint8_t *_dst, ptrdiff_t stride,
                          const uint8_t *_left, const uint8_t *top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *left = (const uint8_t *) _left;
    uint32_t dc = (((left[0] + left[1] + left[2] + left[3] + left[4] + left[5] + left[6] + left[7] + 4) >> 3)*0x01010101U);
 
 
    int y;
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 8; y++) {
        (((av_alias32*)(dst + 0))->u32 = (dc));
        (((av_alias32*)(dst + 4))->u32 = (dc));
        dst += stride;
    }
}
 
static void dc_left_16x16_c(uint8_t *_dst, ptrdiff_t stride,
                            const uint8_t *_left, const uint8_t *top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *left = (const uint8_t *) _left;
    uint32_t dc = (((left[0] + left[1] + left[2] + left[3] + left[4] + left[5] + left[6] + left[7] + left[8] + left[9] + left[10] + left[11] + left[12] + left[13] + left[14] + left[15] + 8) >> 4)*0x01010101U);
 
 
 
    int y;
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 16; y++) {
        (((av_alias32*)(dst + 0))->u32 = (dc));
        (((av_alias32*)(dst + 4))->u32 = (dc));
        (((av_alias32*)(dst + 8))->u32 = (dc));
        (((av_alias32*)(dst + 12))->u32 = (dc));
        dst += stride;
    }
}
 
static void dc_left_32x32_c(uint8_t *_dst, ptrdiff_t stride,
                            const uint8_t *_left, const uint8_t *top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *left = (const uint8_t *) _left;
    uint32_t dc = (((left[0] + left[1] + left[2] + left[3] + left[4] + left[5] + left[6] + left[7] + left[8] + left[9] + left[10] + left[11] + left[12] + left[13] + left[14] + left[15] + left[16] + left[17] + left[18] + left[19] + left[20] + left[21] + left[22] + left[23] + left[24] + left[25] + left[26] + left[27] + left[28] + left[29] + left[30] + left[31] + 16) >> 5)*0x01010101U);
 
 
 
 
 
 
    int y;
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 32; y++) {
        (((av_alias32*)(dst + 0))->u32 = (dc));
        (((av_alias32*)(dst + 4))->u32 = (dc));
        (((av_alias32*)(dst + 8))->u32 = (dc));
        (((av_alias32*)(dst + 12))->u32 = (dc));
        (((av_alias32*)(dst + 16))->u32 = (dc));
        (((av_alias32*)(dst + 20))->u32 = (dc));
        (((av_alias32*)(dst + 24))->u32 = (dc));
        (((av_alias32*)(dst + 28))->u32 = (dc));
        dst += stride;
    }
}
 
static void dc_top_4x4_c(uint8_t *_dst, ptrdiff_t stride,
                         const uint8_t *left, const uint8_t *_top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *top = (const uint8_t *) _top;
    uint32_t dc = (((top[0] + top[1] + top[2] + top[3] + 2) >> 2)*0x01010101U);
 
    stride /= sizeof(uint8_t);
    (((av_alias32*)(dst + stride * 0))->u32 = (dc));
    (((av_alias32*)(dst + stride * 1))->u32 = (dc));
    (((av_alias32*)(dst + stride * 2))->u32 = (dc));
    (((av_alias32*)(dst + stride * 3))->u32 = (dc));
}
 
static void dc_top_8x8_c(uint8_t *_dst, ptrdiff_t stride,
                         const uint8_t *left, const uint8_t *_top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *top = (const uint8_t *) _top;
    uint32_t dc = (((top[0] + top[1] + top[2] + top[3] + top[4] + top[5] + top[6] + top[7] + 4) >> 3)*0x01010101U);
 
 
    int y;
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 8; y++) {
        (((av_alias32*)(dst + 0))->u32 = (dc));
        (((av_alias32*)(dst + 4))->u32 = (dc));
        dst += stride;
    }
}
 
static void dc_top_16x16_c(uint8_t *_dst, ptrdiff_t stride,
                           const uint8_t *left, const uint8_t *_top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *top = (const uint8_t *) _top;
    uint32_t dc = (((top[0] + top[1] + top[2] + top[3] + top[4] + top[5] + top[6] + top[7] + top[8] + top[9] + top[10] + top[11] + top[12] + top[13] + top[14] + top[15] + 8) >> 4)*0x01010101U);
 
 
 
    int y;
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 16; y++) {
        (((av_alias32*)(dst + 0))->u32 = (dc));
        (((av_alias32*)(dst + 4))->u32 = (dc));
        (((av_alias32*)(dst + 8))->u32 = (dc));
        (((av_alias32*)(dst + 12))->u32 = (dc));
        dst += stride;
    }
}
 
static void dc_top_32x32_c(uint8_t *_dst, ptrdiff_t stride,
                           const uint8_t *left, const uint8_t *_top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *top = (const uint8_t *) _top;
    uint32_t dc = (((top[0] + top[1] + top[2] + top[3] + top[4] + top[5] + top[6] + top[7] + top[8] + top[9] + top[10] + top[11] + top[12] + top[13] + top[14] + top[15] + top[16] + top[17] + top[18] + top[19] + top[20] + top[21] + top[22] + top[23] + top[24] + top[25] + top[26] + top[27] + top[28] + top[29] + top[30] + top[31] + 16) >> 5)*0x01010101U);
 
 
 
 
 
 
    int y;
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 32; y++) {
        (((av_alias32*)(dst + 0))->u32 = (dc));
        (((av_alias32*)(dst + 4))->u32 = (dc));
        (((av_alias32*)(dst + 8))->u32 = (dc));
        (((av_alias32*)(dst + 12))->u32 = (dc));
        (((av_alias32*)(dst + 16))->u32 = (dc));
        (((av_alias32*)(dst + 20))->u32 = (dc));
        (((av_alias32*)(dst + 24))->u32 = (dc));
        (((av_alias32*)(dst + 28))->u32 = (dc));
        dst += stride;
    }
}
 
 
 
static void dc_128_4x4_c(uint8_t *_dst, ptrdiff_t stride,
                         const uint8_t *left, const uint8_t *top)
{
    uint8_t *dst = (uint8_t *) _dst;
    uint32_t val = ((128 << (8 - 8))*0x01010101U);
 
    stride /= sizeof(uint8_t);
    (((av_alias32*)(dst + stride * 0))->u32 = (val));
    (((av_alias32*)(dst + stride * 1))->u32 = (val));
    (((av_alias32*)(dst + stride * 2))->u32 = (val));
    (((av_alias32*)(dst + stride * 3))->u32 = (val));
}
 
static void dc_128_8x8_c(uint8_t *_dst, ptrdiff_t stride,
                         const uint8_t *left, const uint8_t *top)
{
    uint8_t *dst = (uint8_t *) _dst;
    uint32_t val = ((128 << (8 - 8))*0x01010101U);
    int y;
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 8; y++) {
        (((av_alias32*)(dst + 0))->u32 = (val));
        (((av_alias32*)(dst + 4))->u32 = (val));
        dst += stride;
    }
}
 
static void dc_128_16x16_c(uint8_t *_dst, ptrdiff_t stride,
                           const uint8_t *left, const uint8_t *top)
{
    uint8_t *dst = (uint8_t *) _dst;
    uint32_t val = ((128 << (8 - 8))*0x01010101U);
    int y;
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 16; y++) {
        (((av_alias32*)(dst + 0))->u32 = (val));
        (((av_alias32*)(dst + 4))->u32 = (val));
        (((av_alias32*)(dst + 8))->u32 = (val));
        (((av_alias32*)(dst + 12))->u32 = (val));
        dst += stride;
    }
}
 
static void dc_128_32x32_c(uint8_t *_dst, ptrdiff_t stride,
                           const uint8_t *left, const uint8_t *top)
{
    uint8_t *dst = (uint8_t *) _dst;
    uint32_t val = ((128 << (8 - 8))*0x01010101U);
    int y;
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 32; y++) {
        (((av_alias32*)(dst + 0))->u32 = (val));
        (((av_alias32*)(dst + 4))->u32 = (val));
        (((av_alias32*)(dst + 8))->u32 = (val));
        (((av_alias32*)(dst + 12))->u32 = (val));
        (((av_alias32*)(dst + 16))->u32 = (val));
        (((av_alias32*)(dst + 20))->u32 = (val));
        (((av_alias32*)(dst + 24))->u32 = (val));
        (((av_alias32*)(dst + 28))->u32 = (val));
        dst += stride;
    }
}
 
static void dc_127_4x4_c(uint8_t *_dst, ptrdiff_t stride,
                         const uint8_t *left, const uint8_t *top)
{
    uint8_t *dst = (uint8_t *) _dst;
    uint32_t val = (((128 << (8 - 8)) - 1)*0x01010101U);
 
    stride /= sizeof(uint8_t);
    (((av_alias32*)(dst + stride * 0))->u32 = (val));
    (((av_alias32*)(dst + stride * 1))->u32 = (val));
    (((av_alias32*)(dst + stride * 2))->u32 = (val));
    (((av_alias32*)(dst + stride * 3))->u32 = (val));}
 
static void dc_127_8x8_c(uint8_t *_dst, ptrdiff_t stride,
                         const uint8_t *left, const uint8_t *top)
{
    uint8_t *dst = (uint8_t *) _dst;
    uint32_t val = (((128 << (8 - 8)) - 1)*0x01010101U);
    int y;
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 8; y++) {
        (((av_alias32*)(dst + 0))->u32 = (val));
        (((av_alias32*)(dst + 4))->u32 = (val));
        dst += stride;
    }
}
 
static void dc_127_16x16_c(uint8_t *_dst, ptrdiff_t stride,
                           const uint8_t *left, const uint8_t *top)
{
    uint8_t *dst = (uint8_t *) _dst;
    uint32_t val = (((128 << (8 - 8)) - 1)*0x01010101U);
    int y;
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 16; y++) {
        (((av_alias32*)(dst + 0))->u32 = (val));
        (((av_alias32*)(dst + 4))->u32 = (val));
        (((av_alias32*)(dst + 8))->u32 = (val));
        (((av_alias32*)(dst + 12))->u32 = (val));
        dst += stride;
    }
}
 
static void dc_127_32x32_c(uint8_t *_dst, ptrdiff_t stride,
                           const uint8_t *left, const uint8_t *top)
{
    uint8_t *dst = (uint8_t *) _dst;
    uint32_t val = (((128 << (8 - 8)) - 1)*0x01010101U);
    int y;
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 32; y++) {
        (((av_alias32*)(dst + 0))->u32 = (val));
        (((av_alias32*)(dst + 4))->u32 = (val));
        (((av_alias32*)(dst + 8))->u32 = (val));
        (((av_alias32*)(dst + 12))->u32 = (val));
        (((av_alias32*)(dst + 16))->u32 = (val));
        (((av_alias32*)(dst + 20))->u32 = (val));
        (((av_alias32*)(dst + 24))->u32 = (val));
        (((av_alias32*)(dst + 28))->u32 = (val));
        dst += stride;
    }
}
 
static void dc_129_4x4_c(uint8_t *_dst, ptrdiff_t stride,
                         const uint8_t *left, const uint8_t *top)
{
    uint8_t *dst = (uint8_t *) _dst;
    uint32_t val = (((128 << (8 - 8)) + 1)*0x01010101U);
 
    stride /= sizeof(uint8_t);
    (((av_alias32*)(dst + stride * 0))->u32 = (val));
    (((av_alias32*)(dst + stride * 1))->u32 = (val));
    (((av_alias32*)(dst + stride * 2))->u32 = (val));
    (((av_alias32*)(dst + stride * 3))->u32 = (val));
}
 
static void dc_129_8x8_c(uint8_t *_dst, ptrdiff_t stride,
                         const uint8_t *left, const uint8_t *top)
{
    uint8_t *dst = (uint8_t *) _dst;
    uint32_t val = (((128 << (8 - 8)) + 1)*0x01010101U);
    int y;
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 8; y++) {
        (((av_alias32*)(dst + 0))->u32 = (val));
        (((av_alias32*)(dst + 4))->u32 = (val));
        dst += stride;
    }
}
 
static void dc_129_16x16_c(uint8_t *_dst, ptrdiff_t stride,
                           const uint8_t *left, const uint8_t *top)
{
    uint8_t *dst = (uint8_t *) _dst;
    uint32_t val = (((128 << (8 - 8)) + 1)*0x01010101U);
    int y;
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 16; y++) {
        (((av_alias32*)(dst + 0))->u32 = (val));
        (((av_alias32*)(dst + 4))->u32 = (val));
        (((av_alias32*)(dst + 8))->u32 = (val));
        (((av_alias32*)(dst + 12))->u32 = (val));
        dst += stride;
    }
}
 
static void dc_129_32x32_c(uint8_t *_dst, ptrdiff_t stride,
                           const uint8_t *left, const uint8_t *top)
{
    uint8_t *dst = (uint8_t *) _dst;
    uint32_t val = (((128 << (8 - 8)) + 1)*0x01010101U);
    int y;
 
    stride /= sizeof(uint8_t);
    for (y = 0; y < 32; y++) {
        (((av_alias32*)(dst + 0))->u32 = (val));
        (((av_alias32*)(dst + 4))->u32 = (val));
        (((av_alias32*)(dst + 8))->u32 = (val));
        (((av_alias32*)(dst + 12))->u32 = (val));
        (((av_alias32*)(dst + 16))->u32 = (val));
        (((av_alias32*)(dst + 20))->u32 = (val));
        (((av_alias32*)(dst + 24))->u32 = (val));
        (((av_alias32*)(dst + 28))->u32 = (val));
        dst += stride;
    }
}
# 783 "external/ffmpeg/libavcodec/vp9dsp_template.c"
static void diag_downleft_4x4_c(uint8_t *_dst, ptrdiff_t stride,
                                const uint8_t *left, const uint8_t *_top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *top = (const uint8_t *) _top;
    int a0 = top[0], a1 = top[1], a2 = top[2], a3 = top[3],
        a4 = top[4], a5 = top[5], a6 = top[6], a7 = top[7];
 
    stride /= sizeof(uint8_t);
    dst[(0) + (0) * stride] = (a0 + a1 * 2 + a2 + 2) >> 2;
    dst[(1) + (0) * stride] = dst[(0) + (1) * stride] = (a1 + a2 * 2 + a3 + 2) >> 2;
    dst[(2) + (0) * stride] = dst[(1) + (1) * stride] = dst[(0) + (2) * stride] = (a2 + a3 * 2 + a4 + 2) >> 2;
    dst[(3) + (0) * stride] = dst[(2) + (1) * stride] = dst[(1) + (2) * stride] = dst[(0) + (3) * stride] = (a3 + a4 * 2 + a5 + 2) >> 2;
    dst[(3) + (1) * stride] = dst[(2) + (2) * stride] = dst[(1) + (3) * stride] = (a4 + a5 * 2 + a6 + 2) >> 2;
    dst[(3) + (2) * stride] = dst[(2) + (3) * stride] = (a5 + a6 * 2 + a7 + 2) >> 2;
    dst[(3) + (3) * stride] = a7;
}
# 821 "external/ffmpeg/libavcodec/vp9dsp_template.c"
static void diag_downleft_8x8_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *_top) { uint8_t *dst = (uint8_t *) _dst; const uint8_t *top = (const uint8_t *) _top; int i, j; uint8_t v[8 - 1]; stride /= sizeof(uint8_t); for (i = 0; i < 8 - 2; i++) v[i] = (top[i] + top[i + 1] * 2 + top[i + 2] + 2) >> 2; v[8 - 2] = (top[8 - 2] + top[8 - 1] * 3 + 2) >> 2; for (j = 0; j < 8; j++) { memcpy(dst + j*stride, v + j, (8 - 1 - j) * sizeof(uint8_t)); memset(dst + j*stride + 8 - 1 - j, top[8 - 1], j + 1); } }
static void diag_downleft_16x16_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *_top) { uint8_t *dst = (uint8_t *) _dst; const uint8_t *top = (const uint8_t *) _top; int i, j; uint8_t v[16 - 1]; stride /= sizeof(uint8_t); for (i = 0; i < 16 - 2; i++) v[i] = (top[i] + top[i + 1] * 2 + top[i + 2] + 2) >> 2; v[16 - 2] = (top[16 - 2] + top[16 - 1] * 3 + 2) >> 2; for (j = 0; j < 16; j++) { memcpy(dst + j*stride, v + j, (16 - 1 - j) * sizeof(uint8_t)); memset(dst + j*stride + 16 - 1 - j, top[16 - 1], j + 1); } }
static void diag_downleft_32x32_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *_top) { uint8_t *dst = (uint8_t *) _dst; const uint8_t *top = (const uint8_t *) _top; int i, j; uint8_t v[32 - 1]; stride /= sizeof(uint8_t); for (i = 0; i < 32 - 2; i++) v[i] = (top[i] + top[i + 1] * 2 + top[i + 2] + 2) >> 2; v[32 - 2] = (top[32 - 2] + top[32 - 1] * 3 + 2) >> 2; for (j = 0; j < 32; j++) { memcpy(dst + j*stride, v + j, (32 - 1 - j) * sizeof(uint8_t)); memset(dst + j*stride + 32 - 1 - j, top[32 - 1], j + 1); } }
 
static void diag_downright_4x4_c(uint8_t *_dst, ptrdiff_t stride,
                                 const uint8_t *_left, const uint8_t *_top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *top = (const uint8_t *) _top;
    const uint8_t *left = (const uint8_t *) _left;
    int tl = top[-1], a0 = top[0], a1 = top[1], a2 = top[2], a3 = top[3],
        l0 = left[3], l1 = left[2], l2 = left[1], l3 = left[0];
 
    stride /= sizeof(uint8_t);
    dst[(0) + (3) * stride] = (l1 + l2 * 2 + l3 + 2) >> 2;
    dst[(0) + (2) * stride] = dst[(1) + (3) * stride] = (l0 + l1 * 2 + l2 + 2) >> 2;
    dst[(0) + (1) * stride] = dst[(1) + (2) * stride] = dst[(2) + (3) * stride] = (tl + l0 * 2 + l1 + 2) >> 2;
    dst[(0) + (0) * stride] = dst[(1) + (1) * stride] = dst[(2) + (2) * stride] = dst[(3) + (3) * stride] = (l0 + tl * 2 + a0 + 2) >> 2;
    dst[(1) + (0) * stride] = dst[(2) + (1) * stride] = dst[(3) + (2) * stride] = (tl + a0 * 2 + a1 + 2) >> 2;
    dst[(2) + (0) * stride] = dst[(3) + (1) * stride] = (a0 + a1 * 2 + a2 + 2) >> 2;
    dst[(3) + (0) * stride] = (a1 + a2 * 2 + a3 + 2) >> 2;
}
# 867 "external/ffmpeg/libavcodec/vp9dsp_template.c"
static void diag_downright_8x8_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *_top) { uint8_t *dst = (uint8_t *) _dst; const uint8_t *top = (const uint8_t *) _top; const uint8_t *left = (const uint8_t *) _left; int i, j; uint8_t v[8 + 8 - 1]; stride /= sizeof(uint8_t); for (i = 0; i < 8 - 2; i++) { v[i ] = (left[i] + left[i + 1] * 2 + left[i + 2] + 2) >> 2; v[8 + 1 + i] = (top[i] + top[i + 1] * 2 + top[i + 2] + 2) >> 2; } v[8 - 2] = (left[8 - 2] + left[8 - 1] * 2 + top[-1] + 2) >> 2; v[8 - 1] = (left[8 - 1] + top[-1] * 2 + top[ 0] + 2) >> 2; v[8 ] = (top[-1] + top[0] * 2 + top[ 1] + 2) >> 2; for (j = 0; j < 8; j++) memcpy(dst + j*stride, v + 8 - 1 - j, 8 * sizeof(uint8_t)); }
static void diag_downright_16x16_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *_top) { uint8_t *dst = (uint8_t *) _dst; const uint8_t *top = (const uint8_t *) _top; const uint8_t *left = (const uint8_t *) _left; int i, j; uint8_t v[16 + 16 - 1]; stride /= sizeof(uint8_t); for (i = 0; i < 16 - 2; i++) { v[i ] = (left[i] + left[i + 1] * 2 + left[i + 2] + 2) >> 2; v[16 + 1 + i] = (top[i] + top[i + 1] * 2 + top[i + 2] + 2) >> 2; } v[16 - 2] = (left[16 - 2] + left[16 - 1] * 2 + top[-1] + 2) >> 2; v[16 - 1] = (left[16 - 1] + top[-1] * 2 + top[ 0] + 2) >> 2; v[16 ] = (top[-1] + top[0] * 2 + top[ 1] + 2) >> 2; for (j = 0; j < 16; j++) memcpy(dst + j*stride, v + 16 - 1 - j, 16 * sizeof(uint8_t)); }
static void diag_downright_32x32_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *_top) { uint8_t *dst = (uint8_t *) _dst; const uint8_t *top = (const uint8_t *) _top; const uint8_t *left = (const uint8_t *) _left; int i, j; uint8_t v[32 + 32 - 1]; stride /= sizeof(uint8_t); for (i = 0; i < 32 - 2; i++) { v[i ] = (left[i] + left[i + 1] * 2 + left[i + 2] + 2) >> 2; v[32 + 1 + i] = (top[i] + top[i + 1] * 2 + top[i + 2] + 2) >> 2; } v[32 - 2] = (left[32 - 2] + left[32 - 1] * 2 + top[-1] + 2) >> 2; v[32 - 1] = (left[32 - 1] + top[-1] * 2 + top[ 0] + 2) >> 2; v[32 ] = (top[-1] + top[0] * 2 + top[ 1] + 2) >> 2; for (j = 0; j < 32; j++) memcpy(dst + j*stride, v + 32 - 1 - j, 32 * sizeof(uint8_t)); }
 
static void vert_right_4x4_c(uint8_t *_dst, ptrdiff_t stride,
                             const uint8_t *_left, const uint8_t *_top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *top = (const uint8_t *) _top;
    const uint8_t *left = (const uint8_t *) _left;
    int tl = top[-1], a0 = top[0], a1 = top[1], a2 = top[2], a3 = top[3],
        l0 = left[3], l1 = left[2], l2 = left[1];
 
    stride /= sizeof(uint8_t);
    dst[(0) + (3) * stride] = (l0 + l1 * 2 + l2 + 2) >> 2;
    dst[(0) + (2) * stride] = (tl + l0 * 2 + l1 + 2) >> 2;
    dst[(0) + (0) * stride] = dst[(1) + (2) * stride] = (tl + a0 + 1) >> 1;
    dst[(0) + (1) * stride] = dst[(1) + (3) * stride] = (l0 + tl * 2 + a0 + 2) >> 2;
    dst[(1) + (0) * stride] = dst[(2) + (2) * stride] = (a0 + a1 + 1) >> 1;
    dst[(1) + (1) * stride] = dst[(2) + (3) * stride] = (tl + a0 * 2 + a1 + 2) >> 2;
    dst[(2) + (0) * stride] = dst[(3) + (2) * stride] = (a1 + a2 + 1) >> 1;
    dst[(2) + (1) * stride] = dst[(3) + (3) * stride] = (a0 + a1 * 2 + a2 + 2) >> 2;
    dst[(3) + (0) * stride] = (a2 + a3 + 1) >> 1;
    dst[(3) + (1) * stride] = (a1 + a2 * 2 + a3 + 2) >> 2;
}
# 924 "external/ffmpeg/libavcodec/vp9dsp_template.c"
static void vert_right_8x8_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *_top) { uint8_t *dst = (uint8_t *) _dst; const uint8_t *top = (const uint8_t *) _top; const uint8_t *left = (const uint8_t *) _left; int i, j; uint8_t ve[8 + 8/2 - 1], vo[8 + 8/2 - 1]; stride /= sizeof(uint8_t); for (i = 0; i < 8/2 - 2; i++) { vo[i] = (left[i*2 + 3] + left[i*2 + 2] * 2 + left[i*2 + 1] + 2) >> 2; ve[i] = (left[i*2 + 4] + left[i*2 + 3] * 2 + left[i*2 + 2] + 2) >> 2; } vo[8/2 - 2] = (left[8 - 1] + left[8 - 2] * 2 + left[8 - 3] + 2) >> 2; ve[8/2 - 2] = (top[-1] + left[8 - 1] * 2 + left[8 - 2] + 2) >> 2; ve[8/2 - 1] = (top[-1] + top[0] + 1) >> 1; vo[8/2 - 1] = (left[8 - 1] + top[-1] * 2 + top[0] + 2) >> 2; for (i = 0; i < 8 - 1; i++) { ve[8/2 + i] = (top[i] + top[i + 1] + 1) >> 1; vo[8/2 + i] = (top[i - 1] + top[i] * 2 + top[i + 1] + 2) >> 2; } for (j = 0; j < 8 / 2; j++) { memcpy(dst + j*2 *stride, ve + 8/2 - 1 - j, 8 * sizeof(uint8_t)); memcpy(dst + (j*2 + 1)*stride, vo + 8/2 - 1 - j, 8 * sizeof(uint8_t)); } }
static void vert_right_16x16_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *_top) { uint8_t *dst = (uint8_t *) _dst; const uint8_t *top = (const uint8_t *) _top; const uint8_t *left = (const uint8_t *) _left; int i, j; uint8_t ve[16 + 16/2 - 1], vo[16 + 16/2 - 1]; stride /= sizeof(uint8_t); for (i = 0; i < 16/2 - 2; i++) { vo[i] = (left[i*2 + 3] + left[i*2 + 2] * 2 + left[i*2 + 1] + 2) >> 2; ve[i] = (left[i*2 + 4] + left[i*2 + 3] * 2 + left[i*2 + 2] + 2) >> 2; } vo[16/2 - 2] = (left[16 - 1] + left[16 - 2] * 2 + left[16 - 3] + 2) >> 2; ve[16/2 - 2] = (top[-1] + left[16 - 1] * 2 + left[16 - 2] + 2) >> 2; ve[16/2 - 1] = (top[-1] + top[0] + 1) >> 1; vo[16/2 - 1] = (left[16 - 1] + top[-1] * 2 + top[0] + 2) >> 2; for (i = 0; i < 16 - 1; i++) { ve[16/2 + i] = (top[i] + top[i + 1] + 1) >> 1; vo[16/2 + i] = (top[i - 1] + top[i] * 2 + top[i + 1] + 2) >> 2; } for (j = 0; j < 16 / 2; j++) { memcpy(dst + j*2 *stride, ve + 16/2 - 1 - j, 16 * sizeof(uint8_t)); memcpy(dst + (j*2 + 1)*stride, vo + 16/2 - 1 - j, 16 * sizeof(uint8_t)); } }
static void vert_right_32x32_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *_top) { uint8_t *dst = (uint8_t *) _dst; const uint8_t *top = (const uint8_t *) _top; const uint8_t *left = (const uint8_t *) _left; int i, j; uint8_t ve[32 + 32/2 - 1], vo[32 + 32/2 - 1]; stride /= sizeof(uint8_t); for (i = 0; i < 32/2 - 2; i++) { vo[i] = (left[i*2 + 3] + left[i*2 + 2] * 2 + left[i*2 + 1] + 2) >> 2; ve[i] = (left[i*2 + 4] + left[i*2 + 3] * 2 + left[i*2 + 2] + 2) >> 2; } vo[32/2 - 2] = (left[32 - 1] + left[32 - 2] * 2 + left[32 - 3] + 2) >> 2; ve[32/2 - 2] = (top[-1] + left[32 - 1] * 2 + left[32 - 2] + 2) >> 2; ve[32/2 - 1] = (top[-1] + top[0] + 1) >> 1; vo[32/2 - 1] = (left[32 - 1] + top[-1] * 2 + top[0] + 2) >> 2; for (i = 0; i < 32 - 1; i++) { ve[32/2 + i] = (top[i] + top[i + 1] + 1) >> 1; vo[32/2 + i] = (top[i - 1] + top[i] * 2 + top[i + 1] + 2) >> 2; } for (j = 0; j < 32 / 2; j++) { memcpy(dst + j*2 *stride, ve + 32/2 - 1 - j, 32 * sizeof(uint8_t)); memcpy(dst + (j*2 + 1)*stride, vo + 32/2 - 1 - j, 32 * sizeof(uint8_t)); } }
 
static void hor_down_4x4_c(uint8_t *_dst, ptrdiff_t stride,
                           const uint8_t *_left, const uint8_t *_top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *top = (const uint8_t *) _top;
    const uint8_t *left = (const uint8_t *) _left;
    int l0 = left[3], l1 = left[2], l2 = left[1], l3 = left[0],
        tl = top[-1], a0 = top[0], a1 = top[1], a2 = top[2];
 
    stride /= sizeof(uint8_t);
    dst[(2) + (0) * stride] = (tl + a0 * 2 + a1 + 2) >> 2;
    dst[(3) + (0) * stride] = (a0 + a1 * 2 + a2 + 2) >> 2;
    dst[(0) + (0) * stride] = dst[(2) + (1) * stride] = (tl + l0 + 1) >> 1;
    dst[(1) + (0) * stride] = dst[(3) + (1) * stride] = (a0 + tl * 2 + l0 + 2) >> 2;
    dst[(0) + (1) * stride] = dst[(2) + (2) * stride] = (l0 + l1 + 1) >> 1;
    dst[(1) + (1) * stride] = dst[(3) + (2) * stride] = (tl + l0 * 2 + l1 + 2) >> 2;
    dst[(0) + (2) * stride] = dst[(2) + (3) * stride] = (l1 + l2 + 1) >> 1;
    dst[(1) + (2) * stride] = dst[(3) + (3) * stride] = (l0 + l1 * 2 + l2 + 2) >> 2;
    dst[(0) + (3) * stride] = (l2 + l3 + 1) >> 1;
    dst[(1) + (3) * stride] = (l1 + l2 * 2 + l3 + 2) >> 2;
}
# 975 "external/ffmpeg/libavcodec/vp9dsp_template.c"
static void hor_down_8x8_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *_top) { uint8_t *dst = (uint8_t *) _dst; const uint8_t *top = (const uint8_t *) _top; const uint8_t *left = (const uint8_t *) _left; int i, j; uint8_t v[8 * 3 - 2]; stride /= sizeof(uint8_t); for (i = 0; i < 8 - 2; i++) { v[i*2 ] = (left[i + 1] + left[i + 0] + 1) >> 1; v[i*2 + 1] = (left[i + 2] + left[i + 1] * 2 + left[i + 0] + 2) >> 2; v[8*2 + i] = (top[i - 1] + top[i] * 2 + top[i + 1] + 2) >> 2; } v[8*2 - 2] = (top[-1] + left[8 - 1] + 1) >> 1; v[8*2 - 4] = (left[8 - 1] + left[8 - 2] + 1) >> 1; v[8*2 - 1] = (top[0] + top[-1] * 2 + left[8 - 1] + 2) >> 2; v[8*2 - 3] = (top[-1] + left[8 - 1] * 2 + left[8 - 2] + 2) >> 2; for (j = 0; j < 8; j++) memcpy(dst + j*stride, v + 8*2 - 2 - j*2, 8 * sizeof(uint8_t)); }
static void hor_down_16x16_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *_top) { uint8_t *dst = (uint8_t *) _dst; const uint8_t *top = (const uint8_t *) _top; const uint8_t *left = (const uint8_t *) _left; int i, j; uint8_t v[16 * 3 - 2]; stride /= sizeof(uint8_t); for (i = 0; i < 16 - 2; i++) { v[i*2 ] = (left[i + 1] + left[i + 0] + 1) >> 1; v[i*2 + 1] = (left[i + 2] + left[i + 1] * 2 + left[i + 0] + 2) >> 2; v[16*2 + i] = (top[i - 1] + top[i] * 2 + top[i + 1] + 2) >> 2; } v[16*2 - 2] = (top[-1] + left[16 - 1] + 1) >> 1; v[16*2 - 4] = (left[16 - 1] + left[16 - 2] + 1) >> 1; v[16*2 - 1] = (top[0] + top[-1] * 2 + left[16 - 1] + 2) >> 2; v[16*2 - 3] = (top[-1] + left[16 - 1] * 2 + left[16 - 2] + 2) >> 2; for (j = 0; j < 16; j++) memcpy(dst + j*stride, v + 16*2 - 2 - j*2, 16 * sizeof(uint8_t)); }
static void hor_down_32x32_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *_top) { uint8_t *dst = (uint8_t *) _dst; const uint8_t *top = (const uint8_t *) _top; const uint8_t *left = (const uint8_t *) _left; int i, j; uint8_t v[32 * 3 - 2]; stride /= sizeof(uint8_t); for (i = 0; i < 32 - 2; i++) { v[i*2 ] = (left[i + 1] + left[i + 0] + 1) >> 1; v[i*2 + 1] = (left[i + 2] + left[i + 1] * 2 + left[i + 0] + 2) >> 2; v[32*2 + i] = (top[i - 1] + top[i] * 2 + top[i + 1] + 2) >> 2; } v[32*2 - 2] = (top[-1] + left[32 - 1] + 1) >> 1; v[32*2 - 4] = (left[32 - 1] + left[32 - 2] + 1) >> 1; v[32*2 - 1] = (top[0] + top[-1] * 2 + left[32 - 1] + 2) >> 2; v[32*2 - 3] = (top[-1] + left[32 - 1] * 2 + left[32 - 2] + 2) >> 2; for (j = 0; j < 32; j++) memcpy(dst + j*stride, v + 32*2 - 2 - j*2, 32 * sizeof(uint8_t)); }
 
static void vert_left_4x4_c(uint8_t *_dst, ptrdiff_t stride,
                            const uint8_t *left, const uint8_t *_top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *top = (const uint8_t *) _top;
    int a0 = top[0], a1 = top[1], a2 = top[2], a3 = top[3],
        a4 = top[4], a5 = top[5], a6 = top[6];
 
    stride /= sizeof(uint8_t);
    dst[(0) + (0) * stride] = (a0 + a1 + 1) >> 1;
    dst[(0) + (1) * stride] = (a0 + a1 * 2 + a2 + 2) >> 2;
    dst[(1) + (0) * stride] = dst[(0) + (2) * stride] = (a1 + a2 + 1) >> 1;
    dst[(1) + (1) * stride] = dst[(0) + (3) * stride] = (a1 + a2 * 2 + a3 + 2) >> 2;
    dst[(2) + (0) * stride] = dst[(1) + (2) * stride] = (a2 + a3 + 1) >> 1;
    dst[(2) + (1) * stride] = dst[(1) + (3) * stride] = (a2 + a3 * 2 + a4 + 2) >> 2;
    dst[(3) + (0) * stride] = dst[(2) + (2) * stride] = (a3 + a4 + 1) >> 1;
    dst[(3) + (1) * stride] = dst[(2) + (3) * stride] = (a3 + a4 * 2 + a5 + 2) >> 2;
    dst[(3) + (2) * stride] = (a4 + a5 + 1) >> 1;
    dst[(3) + (3) * stride] = (a4 + a5 * 2 + a6 + 2) >> 2;
}
# 1025 "external/ffmpeg/libavcodec/vp9dsp_template.c"
static void vert_left_8x8_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *_top) { uint8_t *dst = (uint8_t *) _dst; const uint8_t *top = (const uint8_t *) _top; int i, j; uint8_t ve[8 - 1], vo[8 - 1]; stride /= sizeof(uint8_t); for (i = 0; i < 8 - 2; i++) { ve[i] = (top[i] + top[i + 1] + 1) >> 1; vo[i] = (top[i] + top[i + 1] * 2 + top[i + 2] + 2) >> 2; } ve[8 - 2] = (top[8 - 2] + top[8 - 1] + 1) >> 1; vo[8 - 2] = (top[8 - 2] + top[8 - 1] * 3 + 2) >> 2; for (j = 0; j < 8 / 2; j++) { memcpy(dst + j*2 * stride, ve + j, (8 - j - 1) * sizeof(uint8_t)); memset(dst + j*2 * stride + 8 - j - 1, top[8 - 1], j + 1); memcpy(dst + (j*2 + 1) * stride, vo + j, (8 - j - 1) * sizeof(uint8_t)); memset(dst + (j*2 + 1) * stride + 8 - j - 1, top[8 - 1], j + 1); } }
static void vert_left_16x16_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *_top) { uint8_t *dst = (uint8_t *) _dst; const uint8_t *top = (const uint8_t *) _top; int i, j; uint8_t ve[16 - 1], vo[16 - 1]; stride /= sizeof(uint8_t); for (i = 0; i < 16 - 2; i++) { ve[i] = (top[i] + top[i + 1] + 1) >> 1; vo[i] = (top[i] + top[i + 1] * 2 + top[i + 2] + 2) >> 2; } ve[16 - 2] = (top[16 - 2] + top[16 - 1] + 1) >> 1; vo[16 - 2] = (top[16 - 2] + top[16 - 1] * 3 + 2) >> 2; for (j = 0; j < 16 / 2; j++) { memcpy(dst + j*2 * stride, ve + j, (16 - j - 1) * sizeof(uint8_t)); memset(dst + j*2 * stride + 16 - j - 1, top[16 - 1], j + 1); memcpy(dst + (j*2 + 1) * stride, vo + j, (16 - j - 1) * sizeof(uint8_t)); memset(dst + (j*2 + 1) * stride + 16 - j - 1, top[16 - 1], j + 1); } }
static void vert_left_32x32_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *left, const uint8_t *_top) { uint8_t *dst = (uint8_t *) _dst; const uint8_t *top = (const uint8_t *) _top; int i, j; uint8_t ve[32 - 1], vo[32 - 1]; stride /= sizeof(uint8_t); for (i = 0; i < 32 - 2; i++) { ve[i] = (top[i] + top[i + 1] + 1) >> 1; vo[i] = (top[i] + top[i + 1] * 2 + top[i + 2] + 2) >> 2; } ve[32 - 2] = (top[32 - 2] + top[32 - 1] + 1) >> 1; vo[32 - 2] = (top[32 - 2] + top[32 - 1] * 3 + 2) >> 2; for (j = 0; j < 32 / 2; j++) { memcpy(dst + j*2 * stride, ve + j, (32 - j - 1) * sizeof(uint8_t)); memset(dst + j*2 * stride + 32 - j - 1, top[32 - 1], j + 1); memcpy(dst + (j*2 + 1) * stride, vo + j, (32 - j - 1) * sizeof(uint8_t)); memset(dst + (j*2 + 1) * stride + 32 - j - 1, top[32 - 1], j + 1); } }
 
static void hor_up_4x4_c(uint8_t *_dst, ptrdiff_t stride,
                         const uint8_t *_left, const uint8_t *top)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *left = (const uint8_t *) _left;
    int l0 = left[0], l1 = left[1], l2 = left[2], l3 = left[3];
 
    stride /= sizeof(uint8_t);
    dst[(0) + (0) * stride] = (l0 + l1 + 1) >> 1;
    dst[(1) + (0) * stride] = (l0 + l1 * 2 + l2 + 2) >> 2;
    dst[(0) + (1) * stride] = dst[(2) + (0) * stride] = (l1 + l2 + 1) >> 1;
    dst[(1) + (1) * stride] = dst[(3) + (0) * stride] = (l1 + l2 * 2 + l3 + 2) >> 2;
    dst[(0) + (2) * stride] = dst[(2) + (1) * stride] = (l2 + l3 + 1) >> 1;
    dst[(1) + (2) * stride] = dst[(3) + (1) * stride] = (l2 + l3 * 3 + 2) >> 2;
    dst[(0) + (3) * stride] = dst[(1) + (3) * stride] = dst[(2) + (2) * stride] = dst[(2) + (3) * stride] = dst[(3) + (2) * stride] = dst[(3) + (3) * stride] = l3;
}
# 1072 "external/ffmpeg/libavcodec/vp9dsp_template.c"
static void hor_up_8x8_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *top) { uint8_t *dst = (uint8_t *) _dst; const uint8_t *left = (const uint8_t *) _left; int i, j; uint8_t v[8*2 - 2]; stride /= sizeof(uint8_t); for (i = 0; i < 8 - 2; i++) { v[i*2 ] = (left[i] + left[i + 1] + 1) >> 1; v[i*2 + 1] = (left[i] + left[i + 1] * 2 + left[i + 2] + 2) >> 2; } v[8*2 - 4] = (left[8 - 2] + left[8 - 1] + 1) >> 1; v[8*2 - 3] = (left[8 - 2] + left[8 - 1] * 3 + 2) >> 2; for (j = 0; j < 8 / 2; j++) memcpy(dst + j*stride, v + j*2, 8 * sizeof(uint8_t)); for (j = 8 / 2; j < 8; j++) { memcpy(dst + j*stride, v + j*2, (8*2 - 2 - j*2) * sizeof(uint8_t)); memset(dst + j*stride + 8*2 - 2 - j*2, left[8 - 1], 2 + j*2 - 8); } }
static void hor_up_16x16_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *top) { uint8_t *dst = (uint8_t *) _dst; const uint8_t *left = (const uint8_t *) _left; int i, j; uint8_t v[16*2 - 2]; stride /= sizeof(uint8_t); for (i = 0; i < 16 - 2; i++) { v[i*2 ] = (left[i] + left[i + 1] + 1) >> 1; v[i*2 + 1] = (left[i] + left[i + 1] * 2 + left[i + 2] + 2) >> 2; } v[16*2 - 4] = (left[16 - 2] + left[16 - 1] + 1) >> 1; v[16*2 - 3] = (left[16 - 2] + left[16 - 1] * 3 + 2) >> 2; for (j = 0; j < 16 / 2; j++) memcpy(dst + j*stride, v + j*2, 16 * sizeof(uint8_t)); for (j = 16 / 2; j < 16; j++) { memcpy(dst + j*stride, v + j*2, (16*2 - 2 - j*2) * sizeof(uint8_t)); memset(dst + j*stride + 16*2 - 2 - j*2, left[16 - 1], 2 + j*2 - 16); } }
static void hor_up_32x32_c(uint8_t *_dst, ptrdiff_t stride, const uint8_t *_left, const uint8_t *top) { uint8_t *dst = (uint8_t *) _dst; const uint8_t *left = (const uint8_t *) _left; int i, j; uint8_t v[32*2 - 2]; stride /= sizeof(uint8_t); for (i = 0; i < 32 - 2; i++) { v[i*2 ] = (left[i] + left[i + 1] + 1) >> 1; v[i*2 + 1] = (left[i] + left[i + 1] * 2 + left[i + 2] + 2) >> 2; } v[32*2 - 4] = (left[32 - 2] + left[32 - 1] + 1) >> 1; v[32*2 - 3] = (left[32 - 2] + left[32 - 1] * 3 + 2) >> 2; for (j = 0; j < 32 / 2; j++) memcpy(dst + j*stride, v + j*2, 32 * sizeof(uint8_t)); for (j = 32 / 2; j < 32; j++) { memcpy(dst + j*stride, v + j*2, (32*2 - 2 - j*2) * sizeof(uint8_t)); memset(dst + j*stride + 32*2 - 2 - j*2, left[32 - 1], 2 + j*2 - 32); } }
# 1084 "external/ffmpeg/libavcodec/vp9dsp_template.c"
static
 
        void ff_vp9dsp_intrapred_init_8(VP9DSPContext *dsp)
{
# 1114 "external/ffmpeg/libavcodec/vp9dsp_template.c"
    dsp->intra_pred[TX_4X4][VERT_PRED] = vert_4x4_c; dsp->intra_pred[TX_4X4][HOR_PRED] = hor_4x4_c; dsp->intra_pred[TX_4X4][DC_PRED] = dc_4x4_c; dsp->intra_pred[TX_4X4][DIAG_DOWN_LEFT_PRED] = diag_downleft_4x4_c; dsp->intra_pred[TX_4X4][DIAG_DOWN_RIGHT_PRED] = diag_downright_4x4_c; dsp->intra_pred[TX_4X4][VERT_RIGHT_PRED] = vert_right_4x4_c; dsp->intra_pred[TX_4X4][HOR_DOWN_PRED] = hor_down_4x4_c; dsp->intra_pred[TX_4X4][VERT_LEFT_PRED] = vert_left_4x4_c; dsp->intra_pred[TX_4X4][HOR_UP_PRED] = hor_up_4x4_c; dsp->intra_pred[TX_4X4][LEFT_DC_PRED] = dc_left_4x4_c; dsp->intra_pred[TX_4X4][TOP_DC_PRED] = dc_top_4x4_c; dsp->intra_pred[TX_4X4][TM_VP8_PRED] = tm_4x4_c; dsp->intra_pred[TX_4X4][DC_128_PRED] = dc_128_4x4_c; dsp->intra_pred[TX_4X4][DC_127_PRED] = dc_127_4x4_c; dsp->intra_pred[TX_4X4][DC_129_PRED] = dc_129_4x4_c;
    dsp->intra_pred[TX_8X8][VERT_PRED] = vert_8x8_c; dsp->intra_pred[TX_8X8][HOR_PRED] = hor_8x8_c; dsp->intra_pred[TX_8X8][DC_PRED] = dc_8x8_c; dsp->intra_pred[TX_8X8][DIAG_DOWN_LEFT_PRED] = diag_downleft_8x8_c; dsp->intra_pred[TX_8X8][DIAG_DOWN_RIGHT_PRED] = diag_downright_8x8_c; dsp->intra_pred[TX_8X8][VERT_RIGHT_PRED] = vert_right_8x8_c; dsp->intra_pred[TX_8X8][HOR_DOWN_PRED] = hor_down_8x8_c; dsp->intra_pred[TX_8X8][VERT_LEFT_PRED] = vert_left_8x8_c; dsp->intra_pred[TX_8X8][HOR_UP_PRED] = hor_up_8x8_c; dsp->intra_pred[TX_8X8][LEFT_DC_PRED] = dc_left_8x8_c; dsp->intra_pred[TX_8X8][TOP_DC_PRED] = dc_top_8x8_c; dsp->intra_pred[TX_8X8][TM_VP8_PRED] = tm_8x8_c; dsp->intra_pred[TX_8X8][DC_128_PRED] = dc_128_8x8_c; dsp->intra_pred[TX_8X8][DC_127_PRED] = dc_127_8x8_c; dsp->intra_pred[TX_8X8][DC_129_PRED] = dc_129_8x8_c;
    dsp->intra_pred[TX_16X16][VERT_PRED] = vert_16x16_c; dsp->intra_pred[TX_16X16][HOR_PRED] = hor_16x16_c; dsp->intra_pred[TX_16X16][DC_PRED] = dc_16x16_c; dsp->intra_pred[TX_16X16][DIAG_DOWN_LEFT_PRED] = diag_downleft_16x16_c; dsp->intra_pred[TX_16X16][DIAG_DOWN_RIGHT_PRED] = diag_downright_16x16_c; dsp->intra_pred[TX_16X16][VERT_RIGHT_PRED] = vert_right_16x16_c; dsp->intra_pred[TX_16X16][HOR_DOWN_PRED] = hor_down_16x16_c; dsp->intra_pred[TX_16X16][VERT_LEFT_PRED] = vert_left_16x16_c; dsp->intra_pred[TX_16X16][HOR_UP_PRED] = hor_up_16x16_c; dsp->intra_pred[TX_16X16][LEFT_DC_PRED] = dc_left_16x16_c; dsp->intra_pred[TX_16X16][TOP_DC_PRED] = dc_top_16x16_c; dsp->intra_pred[TX_16X16][TM_VP8_PRED] = tm_16x16_c; dsp->intra_pred[TX_16X16][DC_128_PRED] = dc_128_16x16_c; dsp->intra_pred[TX_16X16][DC_127_PRED] = dc_127_16x16_c; dsp->intra_pred[TX_16X16][DC_129_PRED] = dc_129_16x16_c;
    dsp->intra_pred[TX_32X32][VERT_PRED] = vert_32x32_c; dsp->intra_pred[TX_32X32][HOR_PRED] = hor_32x32_c; dsp->intra_pred[TX_32X32][DC_PRED] = dc_32x32_c; dsp->intra_pred[TX_32X32][DIAG_DOWN_LEFT_PRED] = diag_downleft_32x32_c; dsp->intra_pred[TX_32X32][DIAG_DOWN_RIGHT_PRED] = diag_downright_32x32_c; dsp->intra_pred[TX_32X32][VERT_RIGHT_PRED] = vert_right_32x32_c; dsp->intra_pred[TX_32X32][HOR_DOWN_PRED] = hor_down_32x32_c; dsp->intra_pred[TX_32X32][VERT_LEFT_PRED] = vert_left_32x32_c; dsp->intra_pred[TX_32X32][HOR_UP_PRED] = hor_up_32x32_c; dsp->intra_pred[TX_32X32][LEFT_DC_PRED] = dc_left_32x32_c; dsp->intra_pred[TX_32X32][TOP_DC_PRED] = dc_top_32x32_c; dsp->intra_pred[TX_32X32][TM_VP8_PRED] = tm_32x32_c; dsp->intra_pred[TX_32X32][DC_128_PRED] = dc_128_32x32_c; dsp->intra_pred[TX_32X32][DC_127_PRED] = dc_127_32x32_c; dsp->intra_pred[TX_32X32][DC_129_PRED] = dc_129_32x32_c;
 
 
 
}
# 1170 "external/ffmpeg/libavcodec/vp9dsp_template.c"
static __attribute__((always_inline)) inline void idct4_1d(const int16_t *in, ptrdiff_t stride,
                                      int16_t *out, int pass)
{
    int t0, t1, t2, t3;
 
    t0 = ((((int) in[(0) * stride]) + ((int) in[(2) * stride])) * 11585 + (1 << 13)) >> 14;
    t1 = ((((int) in[(0) * stride]) - ((int) in[(2) * stride])) * 11585 + (1 << 13)) >> 14;
    t2 = (((int) in[(1) * stride]) * 6270 - ((int) in[(3) * stride]) * 15137 + (1 << 13)) >> 14;
    t3 = (((int) in[(1) * stride]) * 15137 + ((int) in[(3) * stride]) * 6270 + (1 << 13)) >> 14;
 
    out[0] = t0 + t3;
    out[1] = t1 + t2;
    out[2] = t1 - t2;
    out[3] = t0 - t3;
}
 
static __attribute__((always_inline)) inline void iadst4_1d(const int16_t *in, ptrdiff_t stride,
                                       int16_t *out, int pass)
{
    int t0, t1, t2, t3;
 
    t0 = 5283 * ((int) in[(0) * stride]) + 15212 * ((int) in[(2) * stride]) + 9929 * ((int) in[(3) * stride]);
    t1 = 9929 * ((int) in[(0) * stride]) - 5283 * ((int) in[(2) * stride]) - 15212 * ((int) in[(3) * stride]);
    t2 = 13377 * (((int) in[(0) * stride]) - ((int) in[(2) * stride]) + ((int) in[(3) * stride]));
    t3 = 13377 * ((int) in[(1) * stride]);
 
    out[0] = (t0 + t3 + (1 << 13)) >> 14;
    out[1] = (t1 + t3 + (1 << 13)) >> 14;
    out[2] = (t2 + (1 << 13)) >> 14;
    out[3] = (t0 + t1 - t3 + (1 << 13)) >> 14;
}
 
static void idct_idct_4x4_add_c(uint8_t *_dst, ptrdiff_t stride, int16_t *_block, int eob) { int i, j; uint8_t *dst = (uint8_t *) _dst; int16_t *block = (int16_t *) _block, tmp[4 * 4], out[4]; stride /= sizeof(uint8_t); if (1 && eob == 1) { const int t = ((((int) block[0] * 11585 + (1 << 13)) >> 14) * 11585 + (1 << 13)) >> 14; block[0] = 0; for (i = 0; i < 4; i++) { for (j = 0; j < 4; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (4 ? (t + (1 << (4 - 1))) >> 4 : t)); dst++; } return; } for (i = 0; i < 4; i++) idct4_1d(block + i, 4, tmp + i * 4, 0); memset(block, 0, 4 * 4 * sizeof(*block)); for (i = 0; i < 4; i++) { idct4_1d(tmp + i, 4, out, 1); for (j = 0; j < 4; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (4 ? (out[j] + (1 << (4 - 1))) >> 4 : out[j])); dst++; } } static void iadst_idct_4x4_add_c(uint8_t *_dst, ptrdiff_t stride, int16_t *_block, int eob) { int i, j; uint8_t *dst = (uint8_t *) _dst; int16_t *block = (int16_t *) _block, tmp[4 * 4], out[4]; stride /= sizeof(uint8_t); if (0 && eob == 1) { const int t = ((((int) block[0] * 11585 + (1 << 13)) >> 14) * 11585 + (1 << 13)) >> 14; block[0] = 0; for (i = 0; i < 4; i++) { for (j = 0; j < 4; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (4 ? (t + (1 << (4 - 1))) >> 4 : t)); dst++; } return; } for (i = 0; i < 4; i++) iadst4_1d(block + i, 4, tmp + i * 4, 0); memset(block, 0, 4 * 4 * sizeof(*block)); for (i = 0; i < 4; i++) { idct4_1d(tmp + i, 4, out, 1); for (j = 0; j < 4; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (4 ? (out[j] + (1 << (4 - 1))) >> 4 : out[j])); dst++; } } static void idct_iadst_4x4_add_c(uint8_t *_dst, ptrdiff_t stride, int16_t *_block, int eob) { int i, j; uint8_t *dst = (uint8_t *) _dst; int16_t *block = (int16_t *) _block, tmp[4 * 4], out[4]; stride /= sizeof(uint8_t); if (0 && eob == 1) { const int t = ((((int) block[0] * 11585 + (1 << 13)) >> 14) * 11585 + (1 << 13)) >> 14; block[0] = 0; for (i = 0; i < 4; i++) { for (j = 0; j < 4; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (4 ? (t + (1 << (4 - 1))) >> 4 : t)); dst++; } return; } for (i = 0; i < 4; i++) idct4_1d(block + i, 4, tmp + i * 4, 0); memset(block, 0, 4 * 4 * sizeof(*block)); for (i = 0; i < 4; i++) { iadst4_1d(tmp + i, 4, out, 1); for (j = 0; j < 4; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (4 ? (out[j] + (1 << (4 - 1))) >> 4 : out[j])); dst++; } } static void iadst_iadst_4x4_add_c(uint8_t *_dst, ptrdiff_t stride, int16_t *_block, int eob) { int i, j; uint8_t *dst = (uint8_t *) _dst; int16_t *block = (int16_t *) _block, tmp[4 * 4], out[4]; stride /= sizeof(uint8_t); if (0 && eob == 1) { const int t = ((((int) block[0] * 11585 + (1 << 13)) >> 14) * 11585 + (1 << 13)) >> 14; block[0] = 0; for (i = 0; i < 4; i++) { for (j = 0; j < 4; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (4 ? (t + (1 << (4 - 1))) >> 4 : t)); dst++; } return; } for (i = 0; i < 4; i++) iadst4_1d(block + i, 4, tmp + i * 4, 0); memset(block, 0, 4 * 4 * sizeof(*block)); for (i = 0; i < 4; i++) { iadst4_1d(tmp + i, 4, out, 1); for (j = 0; j < 4; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (4 ? (out[j] + (1 << (4 - 1))) >> 4 : out[j])); dst++; } }
 
static __attribute__((always_inline)) inline void idct8_1d(const int16_t *in, ptrdiff_t stride,
                                      int16_t *out, int pass)
{
    int t0, t0a, t1, t1a, t2, t2a, t3, t3a, t4, t4a, t5, t5a, t6, t6a, t7, t7a;
 
    t0a = ((((int) in[(0) * stride]) + ((int) in[(4) * stride])) * 11585 + (1 << 13)) >> 14;
    t1a = ((((int) in[(0) * stride]) - ((int) in[(4) * stride])) * 11585 + (1 << 13)) >> 14;
    t2a = (((int) in[(2) * stride]) * 6270 - ((int) in[(6) * stride]) * 15137 + (1 << 13)) >> 14;
    t3a = (((int) in[(2) * stride]) * 15137 + ((int) in[(6) * stride]) * 6270 + (1 << 13)) >> 14;
    t4a = (((int) in[(1) * stride]) * 3196 - ((int) in[(7) * stride]) * 16069 + (1 << 13)) >> 14;
    t5a = (((int) in[(5) * stride]) * 13623 - ((int) in[(3) * stride]) * 9102 + (1 << 13)) >> 14;
    t6a = (((int) in[(5) * stride]) * 9102 + ((int) in[(3) * stride]) * 13623 + (1 << 13)) >> 14;
    t7a = (((int) in[(1) * stride]) * 16069 + ((int) in[(7) * stride]) * 3196 + (1 << 13)) >> 14;
 
    t0 = t0a + t3a;
    t1 = t1a + t2a;
    t2 = t1a - t2a;
    t3 = t0a - t3a;
    t4 = t4a + t5a;
    t5a = t4a - t5a;
    t7 = t7a + t6a;
    t6a = t7a - t6a;
 
    t5 = ((t6a - t5a) * 11585 + (1 << 13)) >> 14;
    t6 = ((t6a + t5a) * 11585 + (1 << 13)) >> 14;
 
    out[0] = t0 + t7;
    out[1] = t1 + t6;
    out[2] = t2 + t5;
    out[3] = t3 + t4;
    out[4] = t3 - t4;
    out[5] = t2 - t5;
    out[6] = t1 - t6;
    out[7] = t0 - t7;
}
 
static __attribute__((always_inline)) inline void iadst8_1d(const int16_t *in, ptrdiff_t stride,
                                       int16_t *out, int pass)
{
    int t0, t0a, t1, t1a, t2, t2a, t3, t3a, t4, t4a, t5, t5a, t6, t6a, t7, t7a;
 
    t0a = 16305 * ((int) in[(7) * stride]) + 1606 * ((int) in[(0) * stride]);
    t1a = 1606 * ((int) in[(7) * stride]) - 16305 * ((int) in[(0) * stride]);
    t2a = 14449 * ((int) in[(5) * stride]) + 7723 * ((int) in[(2) * stride]);
    t3a = 7723 * ((int) in[(5) * stride]) - 14449 * ((int) in[(2) * stride]);
    t4a = 10394 * ((int) in[(3) * stride]) + 12665 * ((int) in[(4) * stride]);
    t5a = 12665 * ((int) in[(3) * stride]) - 10394 * ((int) in[(4) * stride]);
    t6a = 4756 * ((int) in[(1) * stride]) + 15679 * ((int) in[(6) * stride]);
    t7a = 15679 * ((int) in[(1) * stride]) - 4756 * ((int) in[(6) * stride]);
 
    t0 = (t0a + t4a + (1 << 13)) >> 14;
    t1 = (t1a + t5a + (1 << 13)) >> 14;
    t2 = (t2a + t6a + (1 << 13)) >> 14;
    t3 = (t3a + t7a + (1 << 13)) >> 14;
    t4 = (t0a - t4a + (1 << 13)) >> 14;
    t5 = (t1a - t5a + (1 << 13)) >> 14;
    t6 = (t2a - t6a + (1 << 13)) >> 14;
    t7 = (t3a - t7a + (1 << 13)) >> 14;
 
    t4a = 15137 * t4 + 6270 * t5;
    t5a = 6270 * t4 - 15137 * t5;
    t6a = 15137 * t7 - 6270 * t6;
    t7a = 6270 * t7 + 15137 * t6;
 
    out[0] = t0 + t2;
    out[7] = -(t1 + t3);
    t2 = t0 - t2;
    t3 = t1 - t3;
 
    out[1] = -((t4a + t6a + (1 << 13)) >> 14);
    out[6] = (t5a + t7a + (1 << 13)) >> 14;
    t6 = (t4a - t6a + (1 << 13)) >> 14;
    t7 = (t5a - t7a + (1 << 13)) >> 14;
 
    out[3] = -(((t2 + t3) * 11585 + (1 << 13)) >> 14);
    out[4] = ((t2 - t3) * 11585 + (1 << 13)) >> 14;
    out[2] = ((t6 + t7) * 11585 + (1 << 13)) >> 14;
    out[5] = -(((t6 - t7) * 11585 + (1 << 13)) >> 14);
}
 
static void idct_idct_8x8_add_c(uint8_t *_dst, ptrdiff_t stride, int16_t *_block, int eob) { int i, j; uint8_t *dst = (uint8_t *) _dst; int16_t *block = (int16_t *) _block, tmp[8 * 8], out[8]; stride /= sizeof(uint8_t); if (1 && eob == 1) { const int t = ((((int) block[0] * 11585 + (1 << 13)) >> 14) * 11585 + (1 << 13)) >> 14; block[0] = 0; for (i = 0; i < 8; i++) { for (j = 0; j < 8; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (5 ? (t + (1 << (5 - 1))) >> 5 : t)); dst++; } return; } for (i = 0; i < 8; i++) idct8_1d(block + i, 8, tmp + i * 8, 0); memset(block, 0, 8 * 8 * sizeof(*block)); for (i = 0; i < 8; i++) { idct8_1d(tmp + i, 8, out, 1); for (j = 0; j < 8; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (5 ? (out[j] + (1 << (5 - 1))) >> 5 : out[j])); dst++; } } static void iadst_idct_8x8_add_c(uint8_t *_dst, ptrdiff_t stride, int16_t *_block, int eob) { int i, j; uint8_t *dst = (uint8_t *) _dst; int16_t *block = (int16_t *) _block, tmp[8 * 8], out[8]; stride /= sizeof(uint8_t); if (0 && eob == 1) { const int t = ((((int) block[0] * 11585 + (1 << 13)) >> 14) * 11585 + (1 << 13)) >> 14; block[0] = 0; for (i = 0; i < 8; i++) { for (j = 0; j < 8; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (5 ? (t + (1 << (5 - 1))) >> 5 : t)); dst++; } return; } for (i = 0; i < 8; i++) iadst8_1d(block + i, 8, tmp + i * 8, 0); memset(block, 0, 8 * 8 * sizeof(*block)); for (i = 0; i < 8; i++) { idct8_1d(tmp + i, 8, out, 1); for (j = 0; j < 8; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (5 ? (out[j] + (1 << (5 - 1))) >> 5 : out[j])); dst++; } } static void idct_iadst_8x8_add_c(uint8_t *_dst, ptrdiff_t stride, int16_t *_block, int eob) { int i, j; uint8_t *dst = (uint8_t *) _dst; int16_t *block = (int16_t *) _block, tmp[8 * 8], out[8]; stride /= sizeof(uint8_t); if (0 && eob == 1) { const int t = ((((int) block[0] * 11585 + (1 << 13)) >> 14) * 11585 + (1 << 13)) >> 14; block[0] = 0; for (i = 0; i < 8; i++) { for (j = 0; j < 8; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (5 ? (t + (1 << (5 - 1))) >> 5 : t)); dst++; } return; } for (i = 0; i < 8; i++) idct8_1d(block + i, 8, tmp + i * 8, 0); memset(block, 0, 8 * 8 * sizeof(*block)); for (i = 0; i < 8; i++) { iadst8_1d(tmp + i, 8, out, 1); for (j = 0; j < 8; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (5 ? (out[j] + (1 << (5 - 1))) >> 5 : out[j])); dst++; } } static void iadst_iadst_8x8_add_c(uint8_t *_dst, ptrdiff_t stride, int16_t *_block, int eob) { int i, j; uint8_t *dst = (uint8_t *) _dst; int16_t *block = (int16_t *) _block, tmp[8 * 8], out[8]; stride /= sizeof(uint8_t); if (0 && eob == 1) { const int t = ((((int) block[0] * 11585 + (1 << 13)) >> 14) * 11585 + (1 << 13)) >> 14; block[0] = 0; for (i = 0; i < 8; i++) { for (j = 0; j < 8; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (5 ? (t + (1 << (5 - 1))) >> 5 : t)); dst++; } return; } for (i = 0; i < 8; i++) iadst8_1d(block + i, 8, tmp + i * 8, 0); memset(block, 0, 8 * 8 * sizeof(*block)); for (i = 0; i < 8; i++) { iadst8_1d(tmp + i, 8, out, 1); for (j = 0; j < 8; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (5 ? (out[j] + (1 << (5 - 1))) >> 5 : out[j])); dst++; } }
 
static __attribute__((always_inline)) inline void idct16_1d(const int16_t *in, ptrdiff_t stride,
                                       int16_t *out, int pass)
{
    int t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15;
    int t0a, t1a, t2a, t3a, t4a, t5a, t6a, t7a;
    int t8a, t9a, t10a, t11a, t12a, t13a, t14a, t15a;
 
    t0a = ((((int) in[(0) * stride]) + ((int) in[(8) * stride])) * 11585 + (1 << 13)) >> 14;
    t1a = ((((int) in[(0) * stride]) - ((int) in[(8) * stride])) * 11585 + (1 << 13)) >> 14;
    t2a = (((int) in[(4) * stride]) * 6270 - ((int) in[(12) * stride]) * 15137 + (1 << 13)) >> 14;
    t3a = (((int) in[(4) * stride]) * 15137 + ((int) in[(12) * stride]) * 6270 + (1 << 13)) >> 14;
    t4a = (((int) in[(2) * stride]) * 3196 - ((int) in[(14) * stride]) * 16069 + (1 << 13)) >> 14;
    t7a = (((int) in[(2) * stride]) * 16069 + ((int) in[(14) * stride]) * 3196 + (1 << 13)) >> 14;
    t5a = (((int) in[(10) * stride]) * 13623 - ((int) in[(6) * stride]) * 9102 + (1 << 13)) >> 14;
    t6a = (((int) in[(10) * stride]) * 9102 + ((int) in[(6) * stride]) * 13623 + (1 << 13)) >> 14;
    t8a = (((int) in[(1) * stride]) * 1606 - ((int) in[(15) * stride]) * 16305 + (1 << 13)) >> 14;
    t15a = (((int) in[(1) * stride]) * 16305 + ((int) in[(15) * stride]) * 1606 + (1 << 13)) >> 14;
    t9a = (((int) in[(9) * stride]) * 12665 - ((int) in[(7) * stride]) * 10394 + (1 << 13)) >> 14;
    t14a = (((int) in[(9) * stride]) * 10394 + ((int) in[(7) * stride]) * 12665 + (1 << 13)) >> 14;
    t10a = (((int) in[(5) * stride]) * 7723 - ((int) in[(11) * stride]) * 14449 + (1 << 13)) >> 14;
    t13a = (((int) in[(5) * stride]) * 14449 + ((int) in[(11) * stride]) * 7723 + (1 << 13)) >> 14;
    t11a = (((int) in[(13) * stride]) * 15679 - ((int) in[(3) * stride]) * 4756 + (1 << 13)) >> 14;
    t12a = (((int) in[(13) * stride]) * 4756 + ((int) in[(3) * stride]) * 15679 + (1 << 13)) >> 14;
 
    t0 = t0a + t3a;
    t1 = t1a + t2a;
    t2 = t1a - t2a;
    t3 = t0a - t3a;
    t4 = t4a + t5a;
    t5 = t4a - t5a;
    t6 = t7a - t6a;
    t7 = t7a + t6a;
    t8 = t8a + t9a;
    t9 = t8a - t9a;
    t10 = t11a - t10a;
    t11 = t11a + t10a;
    t12 = t12a + t13a;
    t13 = t12a - t13a;
    t14 = t15a - t14a;
    t15 = t15a + t14a;
 
    t5a = ((t6 - t5) * 11585 + (1 << 13)) >> 14;
    t6a = ((t6 + t5) * 11585 + (1 << 13)) >> 14;
    t9a = ( t14 * 6270 - t9 * 15137 + (1 << 13)) >> 14;
    t14a = ( t14 * 15137 + t9 * 6270 + (1 << 13)) >> 14;
    t10a = (-(t13 * 15137 + t10 * 6270) + (1 << 13)) >> 14;
    t13a = ( t13 * 6270 - t10 * 15137 + (1 << 13)) >> 14;
 
    t0a = t0 + t7;
    t1a = t1 + t6a;
    t2a = t2 + t5a;
    t3a = t3 + t4;
    t4 = t3 - t4;
    t5 = t2 - t5a;
    t6 = t1 - t6a;
    t7 = t0 - t7;
    t8a = t8 + t11;
    t9 = t9a + t10a;
    t10 = t9a - t10a;
    t11a = t8 - t11;
    t12a = t15 - t12;
    t13 = t14a - t13a;
    t14 = t14a + t13a;
    t15a = t15 + t12;
 
    t10a = ((t13 - t10) * 11585 + (1 << 13)) >> 14;
    t13a = ((t13 + t10) * 11585 + (1 << 13)) >> 14;
    t11 = ((t12a - t11a) * 11585 + (1 << 13)) >> 14;
    t12 = ((t12a + t11a) * 11585 + (1 << 13)) >> 14;
 
    out[ 0] = t0a + t15a;
    out[ 1] = t1a + t14;
    out[ 2] = t2a + t13a;
    out[ 3] = t3a + t12;
    out[ 4] = t4 + t11;
    out[ 5] = t5 + t10a;
    out[ 6] = t6 + t9;
    out[ 7] = t7 + t8a;
    out[ 8] = t7 - t8a;
    out[ 9] = t6 - t9;
    out[10] = t5 - t10a;
    out[11] = t4 - t11;
    out[12] = t3a - t12;
    out[13] = t2a - t13a;
    out[14] = t1a - t14;
    out[15] = t0a - t15a;
}
 
static __attribute__((always_inline)) inline void iadst16_1d(const int16_t *in, ptrdiff_t stride,
                                        int16_t *out, int pass)
{
    int t0, t1, t2, t3, t4, t5, t6, t7, t8, t9, t10, t11, t12, t13, t14, t15;
    int t0a, t1a, t2a, t3a, t4a, t5a, t6a, t7a;
    int t8a, t9a, t10a, t11a, t12a, t13a, t14a, t15a;
 
    t0 = ((int) in[(15) * stride]) * 16364 + ((int) in[(0) * stride]) * 804;
    t1 = ((int) in[(15) * stride]) * 804 - ((int) in[(0) * stride]) * 16364;
    t2 = ((int) in[(13) * stride]) * 15893 + ((int) in[(2) * stride]) * 3981;
    t3 = ((int) in[(13) * stride]) * 3981 - ((int) in[(2) * stride]) * 15893;
    t4 = ((int) in[(11) * stride]) * 14811 + ((int) in[(4) * stride]) * 7005;
    t5 = ((int) in[(11) * stride]) * 7005 - ((int) in[(4) * stride]) * 14811;
    t6 = ((int) in[(9) * stride]) * 13160 + ((int) in[(6) * stride]) * 9760;
    t7 = ((int) in[(9) * stride]) * 9760 - ((int) in[(6) * stride]) * 13160;
    t8 = ((int) in[(7) * stride]) * 11003 + ((int) in[(8) * stride]) * 12140;
    t9 = ((int) in[(7) * stride]) * 12140 - ((int) in[(8) * stride]) * 11003;
    t10 = ((int) in[(5) * stride]) * 8423 + ((int) in[(10) * stride]) * 14053;
    t11 = ((int) in[(5) * stride]) * 14053 - ((int) in[(10) * stride]) * 8423;
    t12 = ((int) in[(3) * stride]) * 5520 + ((int) in[(12) * stride]) * 15426;
    t13 = ((int) in[(3) * stride]) * 15426 - ((int) in[(12) * stride]) * 5520;
    t14 = ((int) in[(1) * stride]) * 2404 + ((int) in[(14) * stride]) * 16207;
    t15 = ((int) in[(1) * stride]) * 16207 - ((int) in[(14) * stride]) * 2404;
 
    t0a = (t0 + t8 + (1 << 13)) >> 14;
    t1a = (t1 + t9 + (1 << 13)) >> 14;
    t2a = (t2 + t10 + (1 << 13)) >> 14;
    t3a = (t3 + t11 + (1 << 13)) >> 14;
    t4a = (t4 + t12 + (1 << 13)) >> 14;
    t5a = (t5 + t13 + (1 << 13)) >> 14;
    t6a = (t6 + t14 + (1 << 13)) >> 14;
    t7a = (t7 + t15 + (1 << 13)) >> 14;
    t8a = (t0 - t8 + (1 << 13)) >> 14;
    t9a = (t1 - t9 + (1 << 13)) >> 14;
    t10a = (t2 - t10 + (1 << 13)) >> 14;
    t11a = (t3 - t11 + (1 << 13)) >> 14;
    t12a = (t4 - t12 + (1 << 13)) >> 14;
    t13a = (t5 - t13 + (1 << 13)) >> 14;
    t14a = (t6 - t14 + (1 << 13)) >> 14;
    t15a = (t7 - t15 + (1 << 13)) >> 14;
 
    t8 = t8a * 16069 + t9a * 3196;
    t9 = t8a * 3196 - t9a * 16069;
    t10 = t10a * 9102 + t11a * 13623;
    t11 = t10a * 13623 - t11a * 9102;
    t12 = t13a * 16069 - t12a * 3196;
    t13 = t13a * 3196 + t12a * 16069;
    t14 = t15a * 9102 - t14a * 13623;
    t15 = t15a * 13623 + t14a * 9102;
 
    t0 = t0a + t4a;
    t1 = t1a + t5a;
    t2 = t2a + t6a;
    t3 = t3a + t7a;
    t4 = t0a - t4a;
    t5 = t1a - t5a;
    t6 = t2a - t6a;
    t7 = t3a - t7a;
    t8a = (t8 + t12 + (1 << 13)) >> 14;
    t9a = (t9 + t13 + (1 << 13)) >> 14;
    t10a = (t10 + t14 + (1 << 13)) >> 14;
    t11a = (t11 + t15 + (1 << 13)) >> 14;
    t12a = (t8 - t12 + (1 << 13)) >> 14;
    t13a = (t9 - t13 + (1 << 13)) >> 14;
    t14a = (t10 - t14 + (1 << 13)) >> 14;
    t15a = (t11 - t15 + (1 << 13)) >> 14;
 
    t4a = t4 * 15137 + t5 * 6270;
    t5a = t4 * 6270 - t5 * 15137;
    t6a = t7 * 15137 - t6 * 6270;
    t7a = t7 * 6270 + t6 * 15137;
    t12 = t12a * 15137 + t13a * 6270;
    t13 = t12a * 6270 - t13a * 15137;
    t14 = t15a * 15137 - t14a * 6270;
    t15 = t15a * 6270 + t14a * 15137;
 
    out[ 0] = t0 + t2;
    out[15] = -(t1 + t3);
    t2a = t0 - t2;
    t3a = t1 - t3;
    out[ 3] = -((t4a + t6a + (1 << 13)) >> 14);
    out[12] = (t5a + t7a + (1 << 13)) >> 14;
    t6 = (t4a - t6a + (1 << 13)) >> 14;
    t7 = (t5a - t7a + (1 << 13)) >> 14;
    out[ 1] = -(t8a + t10a);
    out[14] = t9a + t11a;
    t10 = t8a - t10a;
    t11 = t9a - t11a;
    out[ 2] = (t12 + t14 + (1 << 13)) >> 14;
    out[13] = -((t13 + t15 + (1 << 13)) >> 14);
    t14a = (t12 - t14 + (1 << 13)) >> 14;
    t15a = (t13 - t15 + (1 << 13)) >> 14;
 
    out[ 7] = ((t2a + t3a) * -11585 + (1 << 13)) >> 14;
    out[ 8] = ((t2a - t3a) * 11585 + (1 << 13)) >> 14;
    out[ 4] = ((t7 + t6) * 11585 + (1 << 13)) >> 14;
    out[11] = ((t7 - t6) * 11585 + (1 << 13)) >> 14;
    out[ 6] = ((t11 + t10) * 11585 + (1 << 13)) >> 14;
    out[ 9] = ((t11 - t10) * 11585 + (1 << 13)) >> 14;
    out[ 5] = ((t14a + t15a) * -11585 + (1 << 13)) >> 14;
    out[10] = ((t14a - t15a) * 11585 + (1 << 13)) >> 14;
}
 
static void idct_idct_16x16_add_c(uint8_t *_dst, ptrdiff_t stride, int16_t *_block, int eob) { int i, j; uint8_t *dst = (uint8_t *) _dst; int16_t *block = (int16_t *) _block, tmp[16 * 16], out[16]; stride /= sizeof(uint8_t); if (1 && eob == 1) { const int t = ((((int) block[0] * 11585 + (1 << 13)) >> 14) * 11585 + (1 << 13)) >> 14; block[0] = 0; for (i = 0; i < 16; i++) { for (j = 0; j < 16; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (6 ? (t + (1 << (6 - 1))) >> 6 : t)); dst++; } return; } for (i = 0; i < 16; i++) idct16_1d(block + i, 16, tmp + i * 16, 0); memset(block, 0, 16 * 16 * sizeof(*block)); for (i = 0; i < 16; i++) { idct16_1d(tmp + i, 16, out, 1); for (j = 0; j < 16; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (6 ? (out[j] + (1 << (6 - 1))) >> 6 : out[j])); dst++; } } static void iadst_idct_16x16_add_c(uint8_t *_dst, ptrdiff_t stride, int16_t *_block, int eob) { int i, j; uint8_t *dst = (uint8_t *) _dst; int16_t *block = (int16_t *) _block, tmp[16 * 16], out[16]; stride /= sizeof(uint8_t); if (0 && eob == 1) { const int t = ((((int) block[0] * 11585 + (1 << 13)) >> 14) * 11585 + (1 << 13)) >> 14; block[0] = 0; for (i = 0; i < 16; i++) { for (j = 0; j < 16; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (6 ? (t + (1 << (6 - 1))) >> 6 : t)); dst++; } return; } for (i = 0; i < 16; i++) iadst16_1d(block + i, 16, tmp + i * 16, 0); memset(block, 0, 16 * 16 * sizeof(*block)); for (i = 0; i < 16; i++) { idct16_1d(tmp + i, 16, out, 1); for (j = 0; j < 16; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (6 ? (out[j] + (1 << (6 - 1))) >> 6 : out[j])); dst++; } } static void idct_iadst_16x16_add_c(uint8_t *_dst, ptrdiff_t stride, int16_t *_block, int eob) { int i, j; uint8_t *dst = (uint8_t *) _dst; int16_t *block = (int16_t *) _block, tmp[16 * 16], out[16]; stride /= sizeof(uint8_t); if (0 && eob == 1) { const int t = ((((int) block[0] * 11585 + (1 << 13)) >> 14) * 11585 + (1 << 13)) >> 14; block[0] = 0; for (i = 0; i < 16; i++) { for (j = 0; j < 16; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (6 ? (t + (1 << (6 - 1))) >> 6 : t)); dst++; } return; } for (i = 0; i < 16; i++) idct16_1d(block + i, 16, tmp + i * 16, 0); memset(block, 0, 16 * 16 * sizeof(*block)); for (i = 0; i < 16; i++) { iadst16_1d(tmp + i, 16, out, 1); for (j = 0; j < 16; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (6 ? (out[j] + (1 << (6 - 1))) >> 6 : out[j])); dst++; } } static void iadst_iadst_16x16_add_c(uint8_t *_dst, ptrdiff_t stride, int16_t *_block, int eob) { int i, j; uint8_t *dst = (uint8_t *) _dst; int16_t *block = (int16_t *) _block, tmp[16 * 16], out[16]; stride /= sizeof(uint8_t); if (0 && eob == 1) { const int t = ((((int) block[0] * 11585 + (1 << 13)) >> 14) * 11585 + (1 << 13)) >> 14; block[0] = 0; for (i = 0; i < 16; i++) { for (j = 0; j < 16; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (6 ? (t + (1 << (6 - 1))) >> 6 : t)); dst++; } return; } for (i = 0; i < 16; i++) iadst16_1d(block + i, 16, tmp + i * 16, 0); memset(block, 0, 16 * 16 * sizeof(*block)); for (i = 0; i < 16; i++) { iadst16_1d(tmp + i, 16, out, 1); for (j = 0; j < 16; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (6 ? (out[j] + (1 << (6 - 1))) >> 6 : out[j])); dst++; } }
 
static __attribute__((always_inline)) inline void idct32_1d(const int16_t *in, ptrdiff_t stride,
                                       int16_t *out, int pass)
{
    int t0a = ((((int) in[(0) * stride]) + ((int) in[(16) * stride])) * 11585 + (1 << 13)) >> 14;
    int t1a = ((((int) in[(0) * stride]) - ((int) in[(16) * stride])) * 11585 + (1 << 13)) >> 14;
    int t2a = (((int) in[(8) * stride]) * 6270 - ((int) in[(24) * stride]) * 15137 + (1 << 13)) >> 14;
    int t3a = (((int) in[(8) * stride]) * 15137 + ((int) in[(24) * stride]) * 6270 + (1 << 13)) >> 14;
    int t4a = (((int) in[(4) * stride]) * 3196 - ((int) in[(28) * stride]) * 16069 + (1 << 13)) >> 14;
    int t7a = (((int) in[(4) * stride]) * 16069 + ((int) in[(28) * stride]) * 3196 + (1 << 13)) >> 14;
    int t5a = (((int) in[(20) * stride]) * 13623 - ((int) in[(12) * stride]) * 9102 + (1 << 13)) >> 14;
    int t6a = (((int) in[(20) * stride]) * 9102 + ((int) in[(12) * stride]) * 13623 + (1 << 13)) >> 14;
    int t8a = (((int) in[(2) * stride]) * 1606 - ((int) in[(30) * stride]) * 16305 + (1 << 13)) >> 14;
    int t15a = (((int) in[(2) * stride]) * 16305 + ((int) in[(30) * stride]) * 1606 + (1 << 13)) >> 14;
    int t9a = (((int) in[(18) * stride]) * 12665 - ((int) in[(14) * stride]) * 10394 + (1 << 13)) >> 14;
    int t14a = (((int) in[(18) * stride]) * 10394 + ((int) in[(14) * stride]) * 12665 + (1 << 13)) >> 14;
    int t10a = (((int) in[(10) * stride]) * 7723 - ((int) in[(22) * stride]) * 14449 + (1 << 13)) >> 14;
    int t13a = (((int) in[(10) * stride]) * 14449 + ((int) in[(22) * stride]) * 7723 + (1 << 13)) >> 14;
    int t11a = (((int) in[(26) * stride]) * 15679 - ((int) in[(6) * stride]) * 4756 + (1 << 13)) >> 14;
    int t12a = (((int) in[(26) * stride]) * 4756 + ((int) in[(6) * stride]) * 15679 + (1 << 13)) >> 14;
    int t16a = (((int) in[(1) * stride]) * 804 - ((int) in[(31) * stride]) * 16364 + (1 << 13)) >> 14;
    int t31a = (((int) in[(1) * stride]) * 16364 + ((int) in[(31) * stride]) * 804 + (1 << 13)) >> 14;
    int t17a = (((int) in[(17) * stride]) * 12140 - ((int) in[(15) * stride]) * 11003 + (1 << 13)) >> 14;
    int t30a = (((int) in[(17) * stride]) * 11003 + ((int) in[(15) * stride]) * 12140 + (1 << 13)) >> 14;
    int t18a = (((int) in[(9) * stride]) * 7005 - ((int) in[(23) * stride]) * 14811 + (1 << 13)) >> 14;
    int t29a = (((int) in[(9) * stride]) * 14811 + ((int) in[(23) * stride]) * 7005 + (1 << 13)) >> 14;
    int t19a = (((int) in[(25) * stride]) * 15426 - ((int) in[(7) * stride]) * 5520 + (1 << 13)) >> 14;
    int t28a = (((int) in[(25) * stride]) * 5520 + ((int) in[(7) * stride]) * 15426 + (1 << 13)) >> 14;
    int t20a = (((int) in[(5) * stride]) * 3981 - ((int) in[(27) * stride]) * 15893 + (1 << 13)) >> 14;
    int t27a = (((int) in[(5) * stride]) * 15893 + ((int) in[(27) * stride]) * 3981 + (1 << 13)) >> 14;
    int t21a = (((int) in[(21) * stride]) * 14053 - ((int) in[(11) * stride]) * 8423 + (1 << 13)) >> 14;
    int t26a = (((int) in[(21) * stride]) * 8423 + ((int) in[(11) * stride]) * 14053 + (1 << 13)) >> 14;
    int t22a = (((int) in[(13) * stride]) * 9760 - ((int) in[(19) * stride]) * 13160 + (1 << 13)) >> 14;
    int t25a = (((int) in[(13) * stride]) * 13160 + ((int) in[(19) * stride]) * 9760 + (1 << 13)) >> 14;
    int t23a = (((int) in[(29) * stride]) * 16207 - ((int) in[(3) * stride]) * 2404 + (1 << 13)) >> 14;
    int t24a = (((int) in[(29) * stride]) * 2404 + ((int) in[(3) * stride]) * 16207 + (1 << 13)) >> 14;
 
    int t0 = t0a + t3a;
    int t1 = t1a + t2a;
    int t2 = t1a - t2a;
    int t3 = t0a - t3a;
    int t4 = t4a + t5a;
    int t5 = t4a - t5a;
    int t6 = t7a - t6a;
    int t7 = t7a + t6a;
    int t8 = t8a + t9a;
    int t9 = t8a - t9a;
    int t10 = t11a - t10a;
    int t11 = t11a + t10a;
    int t12 = t12a + t13a;
    int t13 = t12a - t13a;
    int t14 = t15a - t14a;
    int t15 = t15a + t14a;
    int t16 = t16a + t17a;
    int t17 = t16a - t17a;
    int t18 = t19a - t18a;
    int t19 = t19a + t18a;
    int t20 = t20a + t21a;
    int t21 = t20a - t21a;
    int t22 = t23a - t22a;
    int t23 = t23a + t22a;
    int t24 = t24a + t25a;
    int t25 = t24a - t25a;
    int t26 = t27a - t26a;
    int t27 = t27a + t26a;
    int t28 = t28a + t29a;
    int t29 = t28a - t29a;
    int t30 = t31a - t30a;
    int t31 = t31a + t30a;
 
    t5a = ((t6 - t5) * 11585 + (1 << 13)) >> 14;
    t6a = ((t6 + t5) * 11585 + (1 << 13)) >> 14;
    t9a = ( t14 * 6270 - t9 * 15137 + (1 << 13)) >> 14;
    t14a = ( t14 * 15137 + t9 * 6270 + (1 << 13)) >> 14;
    t10a = (-(t13 * 15137 + t10 * 6270) + (1 << 13)) >> 14;
    t13a = ( t13 * 6270 - t10 * 15137 + (1 << 13)) >> 14;
    t17a = ( t30 * 3196 - t17 * 16069 + (1 << 13)) >> 14;
    t30a = ( t30 * 16069 + t17 * 3196 + (1 << 13)) >> 14;
    t18a = (-(t29 * 16069 + t18 * 3196) + (1 << 13)) >> 14;
    t29a = ( t29 * 3196 - t18 * 16069 + (1 << 13)) >> 14;
    t21a = ( t26 * 13623 - t21 * 9102 + (1 << 13)) >> 14;
    t26a = ( t26 * 9102 + t21 * 13623 + (1 << 13)) >> 14;
    t22a = (-(t25 * 9102 + t22 * 13623) + (1 << 13)) >> 14;
    t25a = ( t25 * 13623 - t22 * 9102 + (1 << 13)) >> 14;
 
    t0a = t0 + t7;
    t1a = t1 + t6a;
    t2a = t2 + t5a;
    t3a = t3 + t4;
    t4a = t3 - t4;
    t5 = t2 - t5a;
    t6 = t1 - t6a;
    t7a = t0 - t7;
    t8a = t8 + t11;
    t9 = t9a + t10a;
    t10 = t9a - t10a;
    t11a = t8 - t11;
    t12a = t15 - t12;
    t13 = t14a - t13a;
    t14 = t14a + t13a;
    t15a = t15 + t12;
    t16a = t16 + t19;
    t17 = t17a + t18a;
    t18 = t17a - t18a;
    t19a = t16 - t19;
    t20a = t23 - t20;
    t21 = t22a - t21a;
    t22 = t22a + t21a;
    t23a = t23 + t20;
    t24a = t24 + t27;
    t25 = t25a + t26a;
    t26 = t25a - t26a;
    t27a = t24 - t27;
    t28a = t31 - t28;
    t29 = t30a - t29a;
    t30 = t30a + t29a;
    t31a = t31 + t28;
 
    t10a = ((t13 - t10) * 11585 + (1 << 13)) >> 14;
    t13a = ((t13 + t10) * 11585 + (1 << 13)) >> 14;
    t11 = ((t12a - t11a) * 11585 + (1 << 13)) >> 14;
    t12 = ((t12a + t11a) * 11585 + (1 << 13)) >> 14;
    t18a = ( t29 * 6270 - t18 * 15137 + (1 << 13)) >> 14;
    t29a = ( t29 * 15137 + t18 * 6270 + (1 << 13)) >> 14;
    t19 = ( t28a * 6270 - t19a * 15137 + (1 << 13)) >> 14;
    t28 = ( t28a * 15137 + t19a * 6270 + (1 << 13)) >> 14;
    t20 = (-(t27a * 15137 + t20a * 6270) + (1 << 13)) >> 14;
    t27 = ( t27a * 6270 - t20a * 15137 + (1 << 13)) >> 14;
    t21a = (-(t26 * 15137 + t21 * 6270) + (1 << 13)) >> 14;
    t26a = ( t26 * 6270 - t21 * 15137 + (1 << 13)) >> 14;
 
    t0 = t0a + t15a;
    t1 = t1a + t14;
    t2 = t2a + t13a;
    t3 = t3a + t12;
    t4 = t4a + t11;
    t5a = t5 + t10a;
    t6a = t6 + t9;
    t7 = t7a + t8a;
    t8 = t7a - t8a;
    t9a = t6 - t9;
    t10 = t5 - t10a;
    t11a = t4a - t11;
    t12a = t3a - t12;
    t13 = t2a - t13a;
    t14a = t1a - t14;
    t15 = t0a - t15a;
    t16 = t16a + t23a;
    t17a = t17 + t22;
    t18 = t18a + t21a;
    t19a = t19 + t20;
    t20a = t19 - t20;
    t21 = t18a - t21a;
    t22a = t17 - t22;
    t23 = t16a - t23a;
    t24 = t31a - t24a;
    t25a = t30 - t25;
    t26 = t29a - t26a;
    t27a = t28 - t27;
    t28a = t28 + t27;
    t29 = t29a + t26a;
    t30a = t30 + t25;
    t31 = t31a + t24a;
 
    t20 = ((t27a - t20a) * 11585 + (1 << 13)) >> 14;
    t27 = ((t27a + t20a) * 11585 + (1 << 13)) >> 14;
    t21a = ((t26 - t21 ) * 11585 + (1 << 13)) >> 14;
    t26a = ((t26 + t21 ) * 11585 + (1 << 13)) >> 14;
    t22 = ((t25a - t22a) * 11585 + (1 << 13)) >> 14;
    t25 = ((t25a + t22a) * 11585 + (1 << 13)) >> 14;
    t23a = ((t24 - t23 ) * 11585 + (1 << 13)) >> 14;
    t24a = ((t24 + t23 ) * 11585 + (1 << 13)) >> 14;
 
    out[ 0] = t0 + t31;
    out[ 1] = t1 + t30a;
    out[ 2] = t2 + t29;
    out[ 3] = t3 + t28a;
    out[ 4] = t4 + t27;
    out[ 5] = t5a + t26a;
    out[ 6] = t6a + t25;
    out[ 7] = t7 + t24a;
    out[ 8] = t8 + t23a;
    out[ 9] = t9a + t22;
    out[10] = t10 + t21a;
    out[11] = t11a + t20;
    out[12] = t12a + t19a;
    out[13] = t13 + t18;
    out[14] = t14a + t17a;
    out[15] = t15 + t16;
    out[16] = t15 - t16;
    out[17] = t14a - t17a;
    out[18] = t13 - t18;
    out[19] = t12a - t19a;
    out[20] = t11a - t20;
    out[21] = t10 - t21a;
    out[22] = t9a - t22;
    out[23] = t8 - t23a;
    out[24] = t7 - t24a;
    out[25] = t6a - t25;
    out[26] = t5a - t26a;
    out[27] = t4 - t27;
    out[28] = t3 - t28a;
    out[29] = t2 - t29;
    out[30] = t1 - t30a;
    out[31] = t0 - t31;
}
 
static void idct_idct_32x32_add_c(uint8_t *_dst, ptrdiff_t stride, int16_t *_block, int eob) { int i, j; uint8_t *dst = (uint8_t *) _dst; int16_t *block = (int16_t *) _block, tmp[32 * 32], out[32]; stride /= sizeof(uint8_t); if (1 && eob == 1) { const int t = ((((int) block[0] * 11585 + (1 << 13)) >> 14) * 11585 + (1 << 13)) >> 14; block[0] = 0; for (i = 0; i < 32; i++) { for (j = 0; j < 32; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (6 ? (t + (1 << (6 - 1))) >> 6 : t)); dst++; } return; } for (i = 0; i < 32; i++) idct32_1d(block + i, 32, tmp + i * 32, 0); memset(block, 0, 32 * 32 * sizeof(*block)); for (i = 0; i < 32; i++) { idct32_1d(tmp + i, 32, out, 1); for (j = 0; j < 32; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (6 ? (out[j] + (1 << (6 - 1))) >> 6 : out[j])); dst++; } }
 
static __attribute__((always_inline)) inline void iwht4_1d(const int16_t *in, ptrdiff_t stride,
                                      int16_t *out, int pass)
{
    int t0, t1, t2, t3, t4;
 
    if (pass == 0) {
        t0 = ((int) in[(0) * stride]) >> 2;
        t1 = ((int) in[(3) * stride]) >> 2;
        t2 = ((int) in[(1) * stride]) >> 2;
        t3 = ((int) in[(2) * stride]) >> 2;
    } else {
        t0 = ((int) in[(0) * stride]);
        t1 = ((int) in[(3) * stride]);
        t2 = ((int) in[(1) * stride]);
        t3 = ((int) in[(2) * stride]);
    }
 
    t0 += t2;
    t3 -= t1;
    t4 = (t0 - t3) >> 1;
    t1 = t4 - t1;
    t2 = t4 - t2;
    t0 -= t1;
    t3 += t2;
 
    out[0] = t0;
    out[1] = t1;
    out[2] = t2;
    out[3] = t3;
}
 
static void iwht_iwht_4x4_add_c(uint8_t *_dst, ptrdiff_t stride, int16_t *_block, int eob) { int i, j; uint8_t *dst = (uint8_t *) _dst; int16_t *block = (int16_t *) _block, tmp[4 * 4], out[4]; stride /= sizeof(uint8_t); if (0 && eob == 1) { const int t = ((((int) block[0] * 11585 + (1 << 13)) >> 14) * 11585 + (1 << 13)) >> 14; block[0] = 0; for (i = 0; i < 4; i++) { for (j = 0; j < 4; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (0 ? (t + (1 << (0 - 1))) >> 0 : t)); dst++; } return; } for (i = 0; i < 4; i++) iwht4_1d(block + i, 4, tmp + i * 4, 0); memset(block, 0, 4 * 4 * sizeof(*block)); for (i = 0; i < 4; i++) { iwht4_1d(tmp + i, 4, out, 1); for (j = 0; j < 4; j++) dst[j * stride] = av_clip_uint8_c(dst[j * stride] + (0 ? (out[j] + (1 << (0 - 1))) >> 0 : out[j])); dst++; } }
 
 
 
 
 
static void vp9dsp_itxfm_init(VP9DSPContext *dsp)
{
# 1738 "external/ffmpeg/libavcodec/vp9dsp_template.c"
    dsp->itxfm_add[TX_4X4][DCT_DCT] = idct_idct_4x4_add_c; dsp->itxfm_add[TX_4X4][DCT_ADST] = iadst_idct_4x4_add_c; dsp->itxfm_add[TX_4X4][ADST_DCT] = idct_iadst_4x4_add_c; dsp->itxfm_add[TX_4X4][ADST_ADST] = iadst_iadst_4x4_add_c;
    dsp->itxfm_add[TX_8X8][DCT_DCT] = idct_idct_8x8_add_c; dsp->itxfm_add[TX_8X8][DCT_ADST] = iadst_idct_8x8_add_c; dsp->itxfm_add[TX_8X8][ADST_DCT] = idct_iadst_8x8_add_c; dsp->itxfm_add[TX_8X8][ADST_ADST] = iadst_iadst_8x8_add_c;
    dsp->itxfm_add[TX_16X16][DCT_DCT] = idct_idct_16x16_add_c; dsp->itxfm_add[TX_16X16][DCT_ADST] = iadst_idct_16x16_add_c; dsp->itxfm_add[TX_16X16][ADST_DCT] = idct_iadst_16x16_add_c; dsp->itxfm_add[TX_16X16][ADST_ADST] = iadst_iadst_16x16_add_c;
    dsp->itxfm_add[TX_32X32][DCT_DCT] = dsp->itxfm_add[TX_32X32][ADST_DCT] = dsp->itxfm_add[TX_32X32][DCT_ADST] = dsp->itxfm_add[TX_32X32][ADST_ADST] = idct_idct_32x32_add_c;
    dsp->itxfm_add[4][DCT_DCT] = dsp->itxfm_add[4][ADST_DCT] = dsp->itxfm_add[4][DCT_ADST] = dsp->itxfm_add[4][ADST_ADST] = iwht_iwht_4x4_add_c;
 
 
 
}
 
static __attribute__((always_inline)) inline void loop_filter(uint8_t *dst, int E, int I, int H,
                                         ptrdiff_t stridea, ptrdiff_t strideb,
                                         int wd)
{
    int i, F = 1 << (8 - 8);
 
    E <<= (8 - 8);
    I <<= (8 - 8);
    H <<= (8 - 8);
    for (i = 0; i < 8; i++, dst += stridea) {
        int p7, p6, p5, p4;
        int p3 = dst[strideb * -4], p2 = dst[strideb * -3];
        int p1 = dst[strideb * -2], p0 = dst[strideb * -1];
        int q0 = dst[strideb * +0], q1 = dst[strideb * +1];
        int q2 = dst[strideb * +2], q3 = dst[strideb * +3];
        int q4, q5, q6, q7;
        int fm = ((p3 - p2) >= 0 ? (p3 - p2) : (-(p3 - p2))) <= I && ((p2 - p1) >= 0 ? (p2 - p1) : (-(p2 - p1))) <= I &&
                 ((p1 - p0) >= 0 ? (p1 - p0) : (-(p1 - p0))) <= I && ((q1 - q0) >= 0 ? (q1 - q0) : (-(q1 - q0))) <= I &&
                 ((q2 - q1) >= 0 ? (q2 - q1) : (-(q2 - q1))) <= I && ((q3 - q2) >= 0 ? (q3 - q2) : (-(q3 - q2))) <= I &&
                 ((p0 - q0) >= 0 ? (p0 - q0) : (-(p0 - q0))) * 2 + (((p1 - q1) >= 0 ? (p1 - q1) : (-(p1 - q1))) >> 1) <= E;
        int flat8out, flat8in;
 
        if (!fm)
            continue;
 
        if (wd >= 16) {
            p7 = dst[strideb * -8];
            p6 = dst[strideb * -7];
            p5 = dst[strideb * -6];
            p4 = dst[strideb * -5];
            q4 = dst[strideb * +4];
            q5 = dst[strideb * +5];
            q6 = dst[strideb * +6];
            q7 = dst[strideb * +7];
 
            flat8out = ((p7 - p0) >= 0 ? (p7 - p0) : (-(p7 - p0))) <= F && ((p6 - p0) >= 0 ? (p6 - p0) : (-(p6 - p0))) <= F &&
                       ((p5 - p0) >= 0 ? (p5 - p0) : (-(p5 - p0))) <= F && ((p4 - p0) >= 0 ? (p4 - p0) : (-(p4 - p0))) <= F &&
                       ((q4 - q0) >= 0 ? (q4 - q0) : (-(q4 - q0))) <= F && ((q5 - q0) >= 0 ? (q5 - q0) : (-(q5 - q0))) <= F &&
                       ((q6 - q0) >= 0 ? (q6 - q0) : (-(q6 - q0))) <= F && ((q7 - q0) >= 0 ? (q7 - q0) : (-(q7 - q0))) <= F;
        }
 
        if (wd >= 8)
            flat8in = ((p3 - p0) >= 0 ? (p3 - p0) : (-(p3 - p0))) <= F && ((p2 - p0) >= 0 ? (p2 - p0) : (-(p2 - p0))) <= F &&
                      ((p1 - p0) >= 0 ? (p1 - p0) : (-(p1 - p0))) <= F && ((q1 - q0) >= 0 ? (q1 - q0) : (-(q1 - q0))) <= F &&
                      ((q2 - q0) >= 0 ? (q2 - q0) : (-(q2 - q0))) <= F && ((q3 - q0) >= 0 ? (q3 - q0) : (-(q3 - q0))) <= F;
 
        if (wd >= 16 && flat8out && flat8in) {
            dst[strideb * -7] = (p7 + p7 + p7 + p7 + p7 + p7 + p7 + p6 * 2 +
                                 p5 + p4 + p3 + p2 + p1 + p0 + q0 + 8) >> 4;
            dst[strideb * -6] = (p7 + p7 + p7 + p7 + p7 + p7 + p6 + p5 * 2 +
                                 p4 + p3 + p2 + p1 + p0 + q0 + q1 + 8) >> 4;
            dst[strideb * -5] = (p7 + p7 + p7 + p7 + p7 + p6 + p5 + p4 * 2 +
                                 p3 + p2 + p1 + p0 + q0 + q1 + q2 + 8) >> 4;
            dst[strideb * -4] = (p7 + p7 + p7 + p7 + p6 + p5 + p4 + p3 * 2 +
                                 p2 + p1 + p0 + q0 + q1 + q2 + q3 + 8) >> 4;
            dst[strideb * -3] = (p7 + p7 + p7 + p6 + p5 + p4 + p3 + p2 * 2 +
                                 p1 + p0 + q0 + q1 + q2 + q3 + q4 + 8) >> 4;
            dst[strideb * -2] = (p7 + p7 + p6 + p5 + p4 + p3 + p2 + p1 * 2 +
                                 p0 + q0 + q1 + q2 + q3 + q4 + q5 + 8) >> 4;
            dst[strideb * -1] = (p7 + p6 + p5 + p4 + p3 + p2 + p1 + p0 * 2 +
                                 q0 + q1 + q2 + q3 + q4 + q5 + q6 + 8) >> 4;
            dst[strideb * +0] = (p6 + p5 + p4 + p3 + p2 + p1 + p0 + q0 * 2 +
                                 q1 + q2 + q3 + q4 + q5 + q6 + q7 + 8) >> 4;
            dst[strideb * +1] = (p5 + p4 + p3 + p2 + p1 + p0 + q0 + q1 * 2 +
                                 q2 + q3 + q4 + q5 + q6 + q7 + q7 + 8) >> 4;
            dst[strideb * +2] = (p4 + p3 + p2 + p1 + p0 + q0 + q1 + q2 * 2 +
                                 q3 + q4 + q5 + q6 + q7 + q7 + q7 + 8) >> 4;
            dst[strideb * +3] = (p3 + p2 + p1 + p0 + q0 + q1 + q2 + q3 * 2 +
                                 q4 + q5 + q6 + q7 + q7 + q7 + q7 + 8) >> 4;
            dst[strideb * +4] = (p2 + p1 + p0 + q0 + q1 + q2 + q3 + q4 * 2 +
                                 q5 + q6 + q7 + q7 + q7 + q7 + q7 + 8) >> 4;
            dst[strideb * +5] = (p1 + p0 + q0 + q1 + q2 + q3 + q4 + q5 * 2 +
                                 q6 + q7 + q7 + q7 + q7 + q7 + q7 + 8) >> 4;
            dst[strideb * +6] = (p0 + q0 + q1 + q2 + q3 + q4 + q5 + q6 * 2 +
                                 q7 + q7 + q7 + q7 + q7 + q7 + q7 + 8) >> 4;
        } else if (wd >= 8 && flat8in) {
            dst[strideb * -3] = (p3 + p3 + p3 + 2 * p2 + p1 + p0 + q0 + 4) >> 3;
            dst[strideb * -2] = (p3 + p3 + p2 + 2 * p1 + p0 + q0 + q1 + 4) >> 3;
            dst[strideb * -1] = (p3 + p2 + p1 + 2 * p0 + q0 + q1 + q2 + 4) >> 3;
            dst[strideb * +0] = (p2 + p1 + p0 + 2 * q0 + q1 + q2 + q3 + 4) >> 3;
            dst[strideb * +1] = (p1 + p0 + q0 + 2 * q1 + q2 + q3 + q3 + 4) >> 3;
            dst[strideb * +2] = (p0 + q0 + q1 + 2 * q2 + q3 + q3 + q3 + 4) >> 3;
        } else {
            int hev = ((p1 - p0) >= 0 ? (p1 - p0) : (-(p1 - p0))) > H || ((q1 - q0) >= 0 ? (q1 - q0) : (-(q1 - q0))) > H;
 
            if (hev) {
                int f = av_clip_intp2_c(p1 - q1, 8 - 1), f1, f2;
                f = av_clip_intp2_c(3 * (q0 - p0) + f, 8 - 1);
 
                f1 = ((f + 4) > ((1 << (8 - 1)) - 1) ? ((1 << (8 - 1)) - 1) : (f + 4)) >> 3;
                f2 = ((f + 3) > ((1 << (8 - 1)) - 1) ? ((1 << (8 - 1)) - 1) : (f + 3)) >> 3;
 
                dst[strideb * -1] = av_clip_uint8_c(p0 + f2);
                dst[strideb * +0] = av_clip_uint8_c(q0 - f1);
            } else {
                int f = av_clip_intp2_c(3 * (q0 - p0), 8 - 1), f1, f2;
 
                f1 = ((f + 4) > ((1 << (8 - 1)) - 1) ? ((1 << (8 - 1)) - 1) : (f + 4)) >> 3;
                f2 = ((f + 3) > ((1 << (8 - 1)) - 1) ? ((1 << (8 - 1)) - 1) : (f + 3)) >> 3;
 
                dst[strideb * -1] = av_clip_uint8_c(p0 + f2);
                dst[strideb * +0] = av_clip_uint8_c(q0 - f1);
 
                f = (f1 + 1) >> 1;
                dst[strideb * -2] = av_clip_uint8_c(p1 + f);
                dst[strideb * +1] = av_clip_uint8_c(q1 - f);
            }
        }
    }
}
# 1873 "external/ffmpeg/libavcodec/vp9dsp_template.c"
static void loop_filter_h_4_8_c(uint8_t *_dst, ptrdiff_t stride, int E, int I, int H) { uint8_t *dst = (uint8_t *) _dst; stride /= sizeof(uint8_t); loop_filter(dst, E, I, H, stride, 1, 4); } static void loop_filter_v_4_8_c(uint8_t *_dst, ptrdiff_t stride, int E, int I, int H) { uint8_t *dst = (uint8_t *) _dst; stride /= sizeof(uint8_t); loop_filter(dst, E, I, H, 1, stride, 4); }
static void loop_filter_h_8_8_c(uint8_t *_dst, ptrdiff_t stride, int E, int I, int H) { uint8_t *dst = (uint8_t *) _dst; stride /= sizeof(uint8_t); loop_filter(dst, E, I, H, stride, 1, 8); } static void loop_filter_v_8_8_c(uint8_t *_dst, ptrdiff_t stride, int E, int I, int H) { uint8_t *dst = (uint8_t *) _dst; stride /= sizeof(uint8_t); loop_filter(dst, E, I, H, 1, stride, 8); }
static void loop_filter_h_16_8_c(uint8_t *_dst, ptrdiff_t stride, int E, int I, int H) { uint8_t *dst = (uint8_t *) _dst; stride /= sizeof(uint8_t); loop_filter(dst, E, I, H, stride, 1, 16); } static void loop_filter_v_16_8_c(uint8_t *_dst, ptrdiff_t stride, int E, int I, int H) { uint8_t *dst = (uint8_t *) _dst; stride /= sizeof(uint8_t); loop_filter(dst, E, I, H, 1, stride, 16); }
# 1889 "external/ffmpeg/libavcodec/vp9dsp_template.c"
static void loop_filter_h_16_16_c(uint8_t *dst, ptrdiff_t stride, int E, int I, int H) { loop_filter_h_16_8_c(dst, stride, E, I, H); loop_filter_h_16_8_c(dst + 8 * stride, stride, E, I, H); }
static void loop_filter_v_16_16_c(uint8_t *dst, ptrdiff_t stride, int E, int I, int H) { loop_filter_v_16_8_c(dst, stride, E, I, H); loop_filter_v_16_8_c(dst + 8 * sizeof(uint8_t), stride, E, I, H); }
# 1907 "external/ffmpeg/libavcodec/vp9dsp_template.c"
static void loop_filter_h_44_16_c(uint8_t *dst, ptrdiff_t stride, int E, int I, int H) { loop_filter_h_4_8_c(dst, stride, E & 0xff, I & 0xff, H & 0xff); loop_filter_h_4_8_c(dst + 8 * stride, stride, E >> 8, I >> 8, H >> 8); } static void loop_filter_v_44_16_c(uint8_t *dst, ptrdiff_t stride, int E, int I, int H) { loop_filter_v_4_8_c(dst, stride, E & 0xff, I & 0xff, H & 0xff); loop_filter_v_4_8_c(dst + 8 * sizeof(uint8_t), stride, E >> 8, I >> 8, H >> 8); }
static void loop_filter_h_48_16_c(uint8_t *dst, ptrdiff_t stride, int E, int I, int H) { loop_filter_h_4_8_c(dst, stride, E & 0xff, I & 0xff, H & 0xff); loop_filter_h_8_8_c(dst + 8 * stride, stride, E >> 8, I >> 8, H >> 8); } static void loop_filter_v_48_16_c(uint8_t *dst, ptrdiff_t stride, int E, int I, int H) { loop_filter_v_4_8_c(dst, stride, E & 0xff, I & 0xff, H & 0xff); loop_filter_v_8_8_c(dst + 8 * sizeof(uint8_t), stride, E >> 8, I >> 8, H >> 8); }
static void loop_filter_h_84_16_c(uint8_t *dst, ptrdiff_t stride, int E, int I, int H) { loop_filter_h_8_8_c(dst, stride, E & 0xff, I & 0xff, H & 0xff); loop_filter_h_4_8_c(dst + 8 * stride, stride, E >> 8, I >> 8, H >> 8); } static void loop_filter_v_84_16_c(uint8_t *dst, ptrdiff_t stride, int E, int I, int H) { loop_filter_v_8_8_c(dst, stride, E & 0xff, I & 0xff, H & 0xff); loop_filter_v_4_8_c(dst + 8 * sizeof(uint8_t), stride, E >> 8, I >> 8, H >> 8); }
static void loop_filter_h_88_16_c(uint8_t *dst, ptrdiff_t stride, int E, int I, int H) { loop_filter_h_8_8_c(dst, stride, E & 0xff, I & 0xff, H & 0xff); loop_filter_h_8_8_c(dst + 8 * stride, stride, E >> 8, I >> 8, H >> 8); } static void loop_filter_v_88_16_c(uint8_t *dst, ptrdiff_t stride, int E, int I, int H) { loop_filter_v_8_8_c(dst, stride, E & 0xff, I & 0xff, H & 0xff); loop_filter_v_8_8_c(dst + 8 * sizeof(uint8_t), stride, E >> 8, I >> 8, H >> 8); }
 
 
 
 
static void vp9dsp_loopfilter_init(VP9DSPContext *dsp)
{
    dsp->loop_filter_8[0][0] = loop_filter_h_4_8_c;
    dsp->loop_filter_8[0][1] = loop_filter_v_4_8_c;
    dsp->loop_filter_8[1][0] = loop_filter_h_8_8_c;
    dsp->loop_filter_8[1][1] = loop_filter_v_8_8_c;
    dsp->loop_filter_8[2][0] = loop_filter_h_16_8_c;
    dsp->loop_filter_8[2][1] = loop_filter_v_16_8_c;
 
    dsp->loop_filter_16[0] = loop_filter_h_16_16_c;
    dsp->loop_filter_16[1] = loop_filter_v_16_16_c;
 
    dsp->loop_filter_mix2[0][0][0] = loop_filter_h_44_16_c;
    dsp->loop_filter_mix2[0][0][1] = loop_filter_v_44_16_c;
    dsp->loop_filter_mix2[0][1][0] = loop_filter_h_48_16_c;
    dsp->loop_filter_mix2[0][1][1] = loop_filter_v_48_16_c;
    dsp->loop_filter_mix2[1][0][0] = loop_filter_h_84_16_c;
    dsp->loop_filter_mix2[1][0][1] = loop_filter_v_84_16_c;
    dsp->loop_filter_mix2[1][1][0] = loop_filter_h_88_16_c;
    dsp->loop_filter_mix2[1][1][1] = loop_filter_v_88_16_c;
}
 
 
 
static __attribute__((always_inline)) inline void copy_c(uint8_t *dst, ptrdiff_t dst_stride,
                                    const uint8_t *src, ptrdiff_t src_stride,
                                    int w, int h)
{
    do {
        memcpy(dst, src, w * sizeof(uint8_t));
 
        dst += dst_stride;
        src += src_stride;
    } while (--h);
}
 
static __attribute__((always_inline)) inline void avg_c(uint8_t *_dst, ptrdiff_t dst_stride,
                                   const uint8_t *_src, ptrdiff_t src_stride,
                                   int w, int h)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *src = (const uint8_t *) _src;
 
    dst_stride /= sizeof(uint8_t);
    src_stride /= sizeof(uint8_t);
    do {
        int x;
 
        for (x = 0; x < w; x += 4)
            (((av_alias32*)(&dst[x]))->u32 = (rnd_avg32((((const av_alias32*)(&dst[x]))->u32), (((const union unaligned_32 *) (&src[x]))->l))));
 
        dst += dst_stride;
        src += src_stride;
    } while (--h);
}
# 1983 "external/ffmpeg/libavcodec/vp9dsp_template.c"
static void copy64_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { copy_c(dst, dst_stride, src, src_stride, 64, h); } static void avg64_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_c(dst, dst_stride, src, src_stride, 64, h); }
static void copy32_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { copy_c(dst, dst_stride, src, src_stride, 32, h); } static void avg32_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_c(dst, dst_stride, src, src_stride, 32, h); }
static void copy16_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { copy_c(dst, dst_stride, src, src_stride, 16, h); } static void avg16_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_c(dst, dst_stride, src, src_stride, 16, h); }
static void copy8_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { copy_c(dst, dst_stride, src, src_stride, 8, h); } static void avg8_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_c(dst, dst_stride, src, src_stride, 8, h); }
static void copy4_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { copy_c(dst, dst_stride, src, src_stride, 4, h); } static void avg4_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_c(dst, dst_stride, src, src_stride, 4, h); }
 
 
 
 
 
 
static const int16_t vp9_subpel_filters[3][16][8] = {
    [FILTER_8TAP_REGULAR] = {
        { 0, 0, 0, 128, 0, 0, 0, 0 },
        { 0, 1, -5, 126, 8, -3, 1, 0 },
        { -1, 3, -10, 122, 18, -6, 2, 0 },
        { -1, 4, -13, 118, 27, -9, 3, -1 },
        { -1, 4, -16, 112, 37, -11, 4, -1 },
        { -1, 5, -18, 105, 48, -14, 4, -1 },
        { -1, 5, -19, 97, 58, -16, 5, -1 },
        { -1, 6, -19, 88, 68, -18, 5, -1 },
        { -1, 6, -19, 78, 78, -19, 6, -1 },
        { -1, 5, -18, 68, 88, -19, 6, -1 },
        { -1, 5, -16, 58, 97, -19, 5, -1 },
        { -1, 4, -14, 48, 105, -18, 5, -1 },
        { -1, 4, -11, 37, 112, -16, 4, -1 },
        { -1, 3, -9, 27, 118, -13, 4, -1 },
        { 0, 2, -6, 18, 122, -10, 3, -1 },
        { 0, 1, -3, 8, 126, -5, 1, 0 },
    }, [FILTER_8TAP_SHARP] = {
        { 0, 0, 0, 128, 0, 0, 0, 0 },
        { -1, 3, -7, 127, 8, -3, 1, 0 },
        { -2, 5, -13, 125, 17, -6, 3, -1 },
        { -3, 7, -17, 121, 27, -10, 5, -2 },
        { -4, 9, -20, 115, 37, -13, 6, -2 },
        { -4, 10, -23, 108, 48, -16, 8, -3 },
        { -4, 10, -24, 100, 59, -19, 9, -3 },
        { -4, 11, -24, 90, 70, -21, 10, -4 },
        { -4, 11, -23, 80, 80, -23, 11, -4 },
        { -4, 10, -21, 70, 90, -24, 11, -4 },
        { -3, 9, -19, 59, 100, -24, 10, -4 },
        { -3, 8, -16, 48, 108, -23, 10, -4 },
        { -2, 6, -13, 37, 115, -20, 9, -4 },
        { -2, 5, -10, 27, 121, -17, 7, -3 },
        { -1, 3, -6, 17, 125, -13, 5, -2 },
        { 0, 1, -3, 8, 127, -7, 3, -1 },
    }, [FILTER_8TAP_SMOOTH] = {
        { 0, 0, 0, 128, 0, 0, 0, 0 },
        { -3, -1, 32, 64, 38, 1, -3, 0 },
        { -2, -2, 29, 63, 41, 2, -3, 0 },
        { -2, -2, 26, 63, 43, 4, -4, 0 },
        { -2, -3, 24, 62, 46, 5, -4, 0 },
        { -2, -3, 21, 60, 49, 7, -4, 0 },
        { -1, -4, 18, 59, 51, 9, -4, 0 },
        { -1, -4, 16, 57, 53, 12, -4, -1 },
        { -1, -4, 14, 55, 55, 14, -4, -1 },
        { -1, -4, 12, 53, 57, 16, -4, -1 },
        { 0, -4, 9, 51, 59, 18, -4, -1 },
        { 0, -4, 7, 49, 60, 21, -3, -2 },
        { 0, -4, 5, 46, 62, 24, -3, -2 },
        { 0, -4, 4, 43, 63, 26, -2, -2 },
        { 0, -3, 2, 41, 63, 29, -2, -2 },
        { 0, -3, 1, 38, 64, 32, -1, -3 },
    }
};
# 2059 "external/ffmpeg/libavcodec/vp9dsp_template.c"
static __attribute__((always_inline)) inline void do_8tap_1d_c(uint8_t *_dst, ptrdiff_t dst_stride,
                                          const uint8_t *_src, ptrdiff_t src_stride,
                                          int w, int h, ptrdiff_t ds,
                                          const int16_t *filter, int avg)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *src = (const uint8_t *) _src;
 
    dst_stride /= sizeof(uint8_t);
    src_stride /= sizeof(uint8_t);
    do {
        int x;
 
        for (x = 0; x < w; x++)
            if (avg) {
                dst[x] = (dst[x] + av_clip_uint8_c((filter[0] * src[x + -3 * ds] + filter[1] * src[x + -2 * ds] + filter[2] * src[x + -1 * ds] + filter[3] * src[x + +0 * ds] + filter[4] * src[x + +1 * ds] + filter[5] * src[x + +2 * ds] + filter[6] * src[x + +3 * ds] + filter[7] * src[x + +4 * ds] + 64) >> 7) + 1) >> 1;
            } else {
                dst[x] = av_clip_uint8_c((filter[0] * src[x + -3 * ds] + filter[1] * src[x + -2 * ds] + filter[2] * src[x + -1 * ds] + filter[3] * src[x + +0 * ds] + filter[4] * src[x + +1 * ds] + filter[5] * src[x + +2 * ds] + filter[6] * src[x + +3 * ds] + filter[7] * src[x + +4 * ds] + 64) >> 7);
            }
 
        dst += dst_stride;
        src += src_stride;
    } while (--h);
}
# 2092 "external/ffmpeg/libavcodec/vp9dsp_template.c"
static __attribute__((noinline)) void put_8tap_1d_v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int w, int h, const int16_t *filter) { do_8tap_1d_c(dst, dst_stride, src, src_stride, w, h, src_stride / sizeof(uint8_t), filter, 0); }
static __attribute__((noinline)) void put_8tap_1d_h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int w, int h, const int16_t *filter) { do_8tap_1d_c(dst, dst_stride, src, src_stride, w, h, 1, filter, 0); }
static __attribute__((noinline)) void avg_8tap_1d_v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int w, int h, const int16_t *filter) { do_8tap_1d_c(dst, dst_stride, src, src_stride, w, h, src_stride / sizeof(uint8_t), filter, 1); }
static __attribute__((noinline)) void avg_8tap_1d_h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int w, int h, const int16_t *filter) { do_8tap_1d_c(dst, dst_stride, src, src_stride, w, h, 1, filter, 1); }
 
 
 
static __attribute__((always_inline)) inline void do_8tap_2d_c(uint8_t *_dst, ptrdiff_t dst_stride,
                                          const uint8_t *_src, ptrdiff_t src_stride,
                                          int w, int h, const int16_t *filterx,
                                          const int16_t *filtery, int avg)
{
    int tmp_h = h + 7;
    uint8_t tmp[64 * 71], *tmp_ptr = tmp;
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *src = (const uint8_t *) _src;
 
    dst_stride /= sizeof(uint8_t);
    src_stride /= sizeof(uint8_t);
    src -= src_stride * 3;
    do {
        int x;
 
        for (x = 0; x < w; x++)
            tmp_ptr[x] = av_clip_uint8_c((filterx[0] * src[x + -3 * 1] + filterx[1] * src[x + -2 * 1] + filterx[2] * src[x + -1 * 1] + filterx[3] * src[x + +0 * 1] + filterx[4] * src[x + +1 * 1] + filterx[5] * src[x + +2 * 1] + filterx[6] * src[x + +3 * 1] + filterx[7] * src[x + +4 * 1] + 64) >> 7);
 
        tmp_ptr += 64;
        src += src_stride;
    } while (--tmp_h);
 
    tmp_ptr = tmp + 64 * 3;
    do {
        int x;
 
        for (x = 0; x < w; x++)
            if (avg) {
                dst[x] = (dst[x] + av_clip_uint8_c((filtery[0] * tmp_ptr[x + -3 * 64] + filtery[1] * tmp_ptr[x + -2 * 64] + filtery[2] * tmp_ptr[x + -1 * 64] + filtery[3] * tmp_ptr[x + +0 * 64] + filtery[4] * tmp_ptr[x + +1 * 64] + filtery[5] * tmp_ptr[x + +2 * 64] + filtery[6] * tmp_ptr[x + +3 * 64] + filtery[7] * tmp_ptr[x + +4 * 64] + 64) >> 7) + 1) >> 1;
            } else {
                dst[x] = av_clip_uint8_c((filtery[0] * tmp_ptr[x + -3 * 64] + filtery[1] * tmp_ptr[x + -2 * 64] + filtery[2] * tmp_ptr[x + -1 * 64] + filtery[3] * tmp_ptr[x + +0 * 64] + filtery[4] * tmp_ptr[x + +1 * 64] + filtery[5] * tmp_ptr[x + +2 * 64] + filtery[6] * tmp_ptr[x + +3 * 64] + filtery[7] * tmp_ptr[x + +4 * 64] + 64) >> 7);
            }
 
        tmp_ptr += 64;
        dst += dst_stride;
    } while (--h);
}
# 2147 "external/ffmpeg/libavcodec/vp9dsp_template.c"
static __attribute__((noinline)) void put_8tap_2d_hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int w, int h, const int16_t *filterx, const int16_t *filtery) { do_8tap_2d_c(dst, dst_stride, src, src_stride, w, h, filterx, filtery, 0); }
static __attribute__((noinline)) void avg_8tap_2d_hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int w, int h, const int16_t *filterx, const int16_t *filtery) { do_8tap_2d_c(dst, dst_stride, src, src_stride, w, h, filterx, filtery, 1); }
# 2176 "external/ffmpeg/libavcodec/vp9dsp_template.c"
static __attribute__((always_inline)) inline void do_bilin_1d_c(uint8_t *_dst, ptrdiff_t dst_stride,
                                           const uint8_t *_src, ptrdiff_t src_stride,
                                           int w, int h, ptrdiff_t ds, int mxy, int avg)
{
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *src = (const uint8_t *) _src;
 
    dst_stride /= sizeof(uint8_t);
    src_stride /= sizeof(uint8_t);
    do {
        int x;
 
        for (x = 0; x < w; x++)
            if (avg) {
                dst[x] = (dst[x] + (src[x] + ((mxy * (src[x + ds] - src[x]) + 8) >> 4)) + 1) >> 1;
            } else {
                dst[x] = (src[x] + ((mxy * (src[x + ds] - src[x]) + 8) >> 4));
            }
 
        dst += dst_stride;
        src += src_stride;
    } while (--h);
}
# 2208 "external/ffmpeg/libavcodec/vp9dsp_template.c"
static __attribute__((noinline)) void put_bilin_1d_v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int w, int h, int mxy) { do_bilin_1d_c(dst, dst_stride, src, src_stride, w, h, src_stride / sizeof(uint8_t), mxy, 0); }
static __attribute__((noinline)) void put_bilin_1d_h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int w, int h, int mxy) { do_bilin_1d_c(dst, dst_stride, src, src_stride, w, h, 1, mxy, 0); }
static __attribute__((noinline)) void avg_bilin_1d_v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int w, int h, int mxy) { do_bilin_1d_c(dst, dst_stride, src, src_stride, w, h, src_stride / sizeof(uint8_t), mxy, 1); }
static __attribute__((noinline)) void avg_bilin_1d_h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int w, int h, int mxy) { do_bilin_1d_c(dst, dst_stride, src, src_stride, w, h, 1, mxy, 1); }
 
 
 
static __attribute__((always_inline)) inline void do_bilin_2d_c(uint8_t *_dst, ptrdiff_t dst_stride,
                                           const uint8_t *_src, ptrdiff_t src_stride,
                                           int w, int h, int mx, int my, int avg)
{
    uint8_t tmp[64 * 65], *tmp_ptr = tmp;
    int tmp_h = h + 1;
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *src = (const uint8_t *) _src;
 
    dst_stride /= sizeof(uint8_t);
    src_stride /= sizeof(uint8_t);
    do {
        int x;
 
        for (x = 0; x < w; x++)
            tmp_ptr[x] = (src[x] + ((mx * (src[x + 1] - src[x]) + 8) >> 4));
 
        tmp_ptr += 64;
        src += src_stride;
    } while (--tmp_h);
 
    tmp_ptr = tmp;
    do {
        int x;
 
        for (x = 0; x < w; x++)
            if (avg) {
                dst[x] = (dst[x] + (tmp_ptr[x] + ((my * (tmp_ptr[x + 64] - tmp_ptr[x]) + 8) >> 4)) + 1) >> 1;
            } else {
                dst[x] = (tmp_ptr[x] + ((my * (tmp_ptr[x + 64] - tmp_ptr[x]) + 8) >> 4));
            }
 
        tmp_ptr += 64;
        dst += dst_stride;
    } while (--h);
}
# 2260 "external/ffmpeg/libavcodec/vp9dsp_template.c"
static __attribute__((noinline)) void put_bilin_2d_hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int w, int h, int mx, int my) { do_bilin_2d_c(dst, dst_stride, src, src_stride, w, h, mx, my, 0); }
static __attribute__((noinline)) void avg_bilin_2d_hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int w, int h, int mx, int my) { do_bilin_2d_c(dst, dst_stride, src, src_stride, w, h, mx, my, 1); }
# 2309 "external/ffmpeg/libavcodec/vp9dsp_template.c"
static void put_8tap_regular_64h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_h_c(dst, dst_stride, src, src_stride, 64, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][mx]); } static void put_8tap_regular_64v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_v_c(dst, dst_stride, src, src_stride, 64, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][my]); } static void put_8tap_regular_64hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 64, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][mx], vp9_subpel_filters[FILTER_8TAP_REGULAR][my]); } static void put_8tap_smooth_64h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_h_c(dst, dst_stride, src, src_stride, 64, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][mx]); } static void put_8tap_smooth_64v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_v_c(dst, dst_stride, src, src_stride, 64, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][my]); } static void put_8tap_smooth_64hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 64, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][mx], vp9_subpel_filters[FILTER_8TAP_SMOOTH][my]); } static void put_8tap_sharp_64h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_h_c(dst, dst_stride, src, src_stride, 64, h, vp9_subpel_filters[FILTER_8TAP_SHARP][mx]); } static void put_8tap_sharp_64v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_v_c(dst, dst_stride, src, src_stride, 64, h, vp9_subpel_filters[FILTER_8TAP_SHARP][my]); } static void put_8tap_sharp_64hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 64, h, vp9_subpel_filters[FILTER_8TAP_SHARP][mx], vp9_subpel_filters[FILTER_8TAP_SHARP][my]); } static void put_bilin_64h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_bilin_1d_h_c(dst, dst_stride, src, src_stride, 64, h, mx); } static void put_bilin_64v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_bilin_1d_v_c(dst, dst_stride, src, src_stride, 64, h, my); } static void put_bilin_64hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_bilin_2d_hv_c(dst, dst_stride, src, src_stride, 64, h, mx, my); } static void put_8tap_regular_32h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_h_c(dst, dst_stride, src, src_stride, 32, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][mx]); } static void put_8tap_regular_32v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_v_c(dst, dst_stride, src, src_stride, 32, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][my]); } static void put_8tap_regular_32hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 32, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][mx], vp9_subpel_filters[FILTER_8TAP_REGULAR][my]); } static void put_8tap_smooth_32h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_h_c(dst, dst_stride, src, src_stride, 32, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][mx]); } static void put_8tap_smooth_32v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_v_c(dst, dst_stride, src, src_stride, 32, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][my]); } static void put_8tap_smooth_32hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 32, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][mx], vp9_subpel_filters[FILTER_8TAP_SMOOTH][my]); } static void put_8tap_sharp_32h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_h_c(dst, dst_stride, src, src_stride, 32, h, vp9_subpel_filters[FILTER_8TAP_SHARP][mx]); } static void put_8tap_sharp_32v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_v_c(dst, dst_stride, src, src_stride, 32, h, vp9_subpel_filters[FILTER_8TAP_SHARP][my]); } static void put_8tap_sharp_32hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 32, h, vp9_subpel_filters[FILTER_8TAP_SHARP][mx], vp9_subpel_filters[FILTER_8TAP_SHARP][my]); } static void put_bilin_32h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_bilin_1d_h_c(dst, dst_stride, src, src_stride, 32, h, mx); } static void put_bilin_32v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_bilin_1d_v_c(dst, dst_stride, src, src_stride, 32, h, my); } static void put_bilin_32hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_bilin_2d_hv_c(dst, dst_stride, src, src_stride, 32, h, mx, my); } static void put_8tap_regular_16h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_h_c(dst, dst_stride, src, src_stride, 16, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][mx]); } static void put_8tap_regular_16v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_v_c(dst, dst_stride, src, src_stride, 16, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][my]); } static void put_8tap_regular_16hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 16, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][mx], vp9_subpel_filters[FILTER_8TAP_REGULAR][my]); } static void put_8tap_smooth_16h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_h_c(dst, dst_stride, src, src_stride, 16, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][mx]); } static void put_8tap_smooth_16v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_v_c(dst, dst_stride, src, src_stride, 16, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][my]); } static void put_8tap_smooth_16hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 16, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][mx], vp9_subpel_filters[FILTER_8TAP_SMOOTH][my]); } static void put_8tap_sharp_16h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_h_c(dst, dst_stride, src, src_stride, 16, h, vp9_subpel_filters[FILTER_8TAP_SHARP][mx]); } static void put_8tap_sharp_16v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_v_c(dst, dst_stride, src, src_stride, 16, h, vp9_subpel_filters[FILTER_8TAP_SHARP][my]); } static void put_8tap_sharp_16hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 16, h, vp9_subpel_filters[FILTER_8TAP_SHARP][mx], vp9_subpel_filters[FILTER_8TAP_SHARP][my]); } static void put_bilin_16h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_bilin_1d_h_c(dst, dst_stride, src, src_stride, 16, h, mx); } static void put_bilin_16v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_bilin_1d_v_c(dst, dst_stride, src, src_stride, 16, h, my); } static void put_bilin_16hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_bilin_2d_hv_c(dst, dst_stride, src, src_stride, 16, h, mx, my); } static void put_8tap_regular_8h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_h_c(dst, dst_stride, src, src_stride, 8, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][mx]); } static void put_8tap_regular_8v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_v_c(dst, dst_stride, src, src_stride, 8, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][my]); } static void put_8tap_regular_8hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 8, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][mx], vp9_subpel_filters[FILTER_8TAP_REGULAR][my]); } static void put_8tap_smooth_8h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_h_c(dst, dst_stride, src, src_stride, 8, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][mx]); } static void put_8tap_smooth_8v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_v_c(dst, dst_stride, src, src_stride, 8, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][my]); } static void put_8tap_smooth_8hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 8, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][mx], vp9_subpel_filters[FILTER_8TAP_SMOOTH][my]); } static void put_8tap_sharp_8h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_h_c(dst, dst_stride, src, src_stride, 8, h, vp9_subpel_filters[FILTER_8TAP_SHARP][mx]); } static void put_8tap_sharp_8v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_v_c(dst, dst_stride, src, src_stride, 8, h, vp9_subpel_filters[FILTER_8TAP_SHARP][my]); } static void put_8tap_sharp_8hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 8, h, vp9_subpel_filters[FILTER_8TAP_SHARP][mx], vp9_subpel_filters[FILTER_8TAP_SHARP][my]); } static void put_bilin_8h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_bilin_1d_h_c(dst, dst_stride, src, src_stride, 8, h, mx); } static void put_bilin_8v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_bilin_1d_v_c(dst, dst_stride, src, src_stride, 8, h, my); } static void put_bilin_8hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_bilin_2d_hv_c(dst, dst_stride, src, src_stride, 8, h, mx, my); } static void put_8tap_regular_4h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_h_c(dst, dst_stride, src, src_stride, 4, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][mx]); } static void put_8tap_regular_4v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_v_c(dst, dst_stride, src, src_stride, 4, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][my]); } static void put_8tap_regular_4hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 4, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][mx], vp9_subpel_filters[FILTER_8TAP_REGULAR][my]); } static void put_8tap_smooth_4h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_h_c(dst, dst_stride, src, src_stride, 4, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][mx]); } static void put_8tap_smooth_4v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_v_c(dst, dst_stride, src, src_stride, 4, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][my]); } static void put_8tap_smooth_4hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 4, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][mx], vp9_subpel_filters[FILTER_8TAP_SMOOTH][my]); } static void put_8tap_sharp_4h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_h_c(dst, dst_stride, src, src_stride, 4, h, vp9_subpel_filters[FILTER_8TAP_SHARP][mx]); } static void put_8tap_sharp_4v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_1d_v_c(dst, dst_stride, src, src_stride, 4, h, vp9_subpel_filters[FILTER_8TAP_SHARP][my]); } static void put_8tap_sharp_4hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 4, h, vp9_subpel_filters[FILTER_8TAP_SHARP][mx], vp9_subpel_filters[FILTER_8TAP_SHARP][my]); } static void put_bilin_4h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_bilin_1d_h_c(dst, dst_stride, src, src_stride, 4, h, mx); } static void put_bilin_4v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_bilin_1d_v_c(dst, dst_stride, src, src_stride, 4, h, my); } static void put_bilin_4hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { put_bilin_2d_hv_c(dst, dst_stride, src, src_stride, 4, h, mx, my); }
static void avg_8tap_regular_64h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_h_c(dst, dst_stride, src, src_stride, 64, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][mx]); } static void avg_8tap_regular_64v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_v_c(dst, dst_stride, src, src_stride, 64, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][my]); } static void avg_8tap_regular_64hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 64, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][mx], vp9_subpel_filters[FILTER_8TAP_REGULAR][my]); } static void avg_8tap_smooth_64h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_h_c(dst, dst_stride, src, src_stride, 64, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][mx]); } static void avg_8tap_smooth_64v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_v_c(dst, dst_stride, src, src_stride, 64, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][my]); } static void avg_8tap_smooth_64hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 64, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][mx], vp9_subpel_filters[FILTER_8TAP_SMOOTH][my]); } static void avg_8tap_sharp_64h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_h_c(dst, dst_stride, src, src_stride, 64, h, vp9_subpel_filters[FILTER_8TAP_SHARP][mx]); } static void avg_8tap_sharp_64v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_v_c(dst, dst_stride, src, src_stride, 64, h, vp9_subpel_filters[FILTER_8TAP_SHARP][my]); } static void avg_8tap_sharp_64hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 64, h, vp9_subpel_filters[FILTER_8TAP_SHARP][mx], vp9_subpel_filters[FILTER_8TAP_SHARP][my]); } static void avg_bilin_64h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_bilin_1d_h_c(dst, dst_stride, src, src_stride, 64, h, mx); } static void avg_bilin_64v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_bilin_1d_v_c(dst, dst_stride, src, src_stride, 64, h, my); } static void avg_bilin_64hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_bilin_2d_hv_c(dst, dst_stride, src, src_stride, 64, h, mx, my); } static void avg_8tap_regular_32h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_h_c(dst, dst_stride, src, src_stride, 32, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][mx]); } static void avg_8tap_regular_32v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_v_c(dst, dst_stride, src, src_stride, 32, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][my]); } static void avg_8tap_regular_32hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 32, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][mx], vp9_subpel_filters[FILTER_8TAP_REGULAR][my]); } static void avg_8tap_smooth_32h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_h_c(dst, dst_stride, src, src_stride, 32, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][mx]); } static void avg_8tap_smooth_32v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_v_c(dst, dst_stride, src, src_stride, 32, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][my]); } static void avg_8tap_smooth_32hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 32, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][mx], vp9_subpel_filters[FILTER_8TAP_SMOOTH][my]); } static void avg_8tap_sharp_32h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_h_c(dst, dst_stride, src, src_stride, 32, h, vp9_subpel_filters[FILTER_8TAP_SHARP][mx]); } static void avg_8tap_sharp_32v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_v_c(dst, dst_stride, src, src_stride, 32, h, vp9_subpel_filters[FILTER_8TAP_SHARP][my]); } static void avg_8tap_sharp_32hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 32, h, vp9_subpel_filters[FILTER_8TAP_SHARP][mx], vp9_subpel_filters[FILTER_8TAP_SHARP][my]); } static void avg_bilin_32h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_bilin_1d_h_c(dst, dst_stride, src, src_stride, 32, h, mx); } static void avg_bilin_32v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_bilin_1d_v_c(dst, dst_stride, src, src_stride, 32, h, my); } static void avg_bilin_32hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_bilin_2d_hv_c(dst, dst_stride, src, src_stride, 32, h, mx, my); } static void avg_8tap_regular_16h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_h_c(dst, dst_stride, src, src_stride, 16, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][mx]); } static void avg_8tap_regular_16v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_v_c(dst, dst_stride, src, src_stride, 16, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][my]); } static void avg_8tap_regular_16hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 16, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][mx], vp9_subpel_filters[FILTER_8TAP_REGULAR][my]); } static void avg_8tap_smooth_16h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_h_c(dst, dst_stride, src, src_stride, 16, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][mx]); } static void avg_8tap_smooth_16v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_v_c(dst, dst_stride, src, src_stride, 16, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][my]); } static void avg_8tap_smooth_16hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 16, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][mx], vp9_subpel_filters[FILTER_8TAP_SMOOTH][my]); } static void avg_8tap_sharp_16h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_h_c(dst, dst_stride, src, src_stride, 16, h, vp9_subpel_filters[FILTER_8TAP_SHARP][mx]); } static void avg_8tap_sharp_16v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_v_c(dst, dst_stride, src, src_stride, 16, h, vp9_subpel_filters[FILTER_8TAP_SHARP][my]); } static void avg_8tap_sharp_16hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 16, h, vp9_subpel_filters[FILTER_8TAP_SHARP][mx], vp9_subpel_filters[FILTER_8TAP_SHARP][my]); } static void avg_bilin_16h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_bilin_1d_h_c(dst, dst_stride, src, src_stride, 16, h, mx); } static void avg_bilin_16v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_bilin_1d_v_c(dst, dst_stride, src, src_stride, 16, h, my); } static void avg_bilin_16hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_bilin_2d_hv_c(dst, dst_stride, src, src_stride, 16, h, mx, my); } static void avg_8tap_regular_8h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_h_c(dst, dst_stride, src, src_stride, 8, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][mx]); } static void avg_8tap_regular_8v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_v_c(dst, dst_stride, src, src_stride, 8, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][my]); } static void avg_8tap_regular_8hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 8, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][mx], vp9_subpel_filters[FILTER_8TAP_REGULAR][my]); } static void avg_8tap_smooth_8h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_h_c(dst, dst_stride, src, src_stride, 8, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][mx]); } static void avg_8tap_smooth_8v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_v_c(dst, dst_stride, src, src_stride, 8, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][my]); } static void avg_8tap_smooth_8hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 8, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][mx], vp9_subpel_filters[FILTER_8TAP_SMOOTH][my]); } static void avg_8tap_sharp_8h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_h_c(dst, dst_stride, src, src_stride, 8, h, vp9_subpel_filters[FILTER_8TAP_SHARP][mx]); } static void avg_8tap_sharp_8v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_v_c(dst, dst_stride, src, src_stride, 8, h, vp9_subpel_filters[FILTER_8TAP_SHARP][my]); } static void avg_8tap_sharp_8hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 8, h, vp9_subpel_filters[FILTER_8TAP_SHARP][mx], vp9_subpel_filters[FILTER_8TAP_SHARP][my]); } static void avg_bilin_8h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_bilin_1d_h_c(dst, dst_stride, src, src_stride, 8, h, mx); } static void avg_bilin_8v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_bilin_1d_v_c(dst, dst_stride, src, src_stride, 8, h, my); } static void avg_bilin_8hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_bilin_2d_hv_c(dst, dst_stride, src, src_stride, 8, h, mx, my); } static void avg_8tap_regular_4h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_h_c(dst, dst_stride, src, src_stride, 4, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][mx]); } static void avg_8tap_regular_4v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_v_c(dst, dst_stride, src, src_stride, 4, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][my]); } static void avg_8tap_regular_4hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 4, h, vp9_subpel_filters[FILTER_8TAP_REGULAR][mx], vp9_subpel_filters[FILTER_8TAP_REGULAR][my]); } static void avg_8tap_smooth_4h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_h_c(dst, dst_stride, src, src_stride, 4, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][mx]); } static void avg_8tap_smooth_4v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_v_c(dst, dst_stride, src, src_stride, 4, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][my]); } static void avg_8tap_smooth_4hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 4, h, vp9_subpel_filters[FILTER_8TAP_SMOOTH][mx], vp9_subpel_filters[FILTER_8TAP_SMOOTH][my]); } static void avg_8tap_sharp_4h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_h_c(dst, dst_stride, src, src_stride, 4, h, vp9_subpel_filters[FILTER_8TAP_SHARP][mx]); } static void avg_8tap_sharp_4v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_1d_v_c(dst, dst_stride, src, src_stride, 4, h, vp9_subpel_filters[FILTER_8TAP_SHARP][my]); } static void avg_8tap_sharp_4hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_8tap_2d_hv_c(dst, dst_stride, src, src_stride, 4, h, vp9_subpel_filters[FILTER_8TAP_SHARP][mx], vp9_subpel_filters[FILTER_8TAP_SHARP][my]); } static void avg_bilin_4h_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_bilin_1d_h_c(dst, dst_stride, src, src_stride, 4, h, mx); } static void avg_bilin_4v_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_bilin_1d_v_c(dst, dst_stride, src, src_stride, 4, h, my); } static void avg_bilin_4hv_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my) { avg_bilin_2d_hv_c(dst, dst_stride, src, src_stride, 4, h, mx, my); }
# 2323 "external/ffmpeg/libavcodec/vp9dsp_template.c"
static
 
        void ff_vp9dsp_mc_init_8(VP9DSPContext *dsp)
{
# 2341 "external/ffmpeg/libavcodec/vp9dsp_template.c"
    dsp->mc[0][FILTER_8TAP_SMOOTH ][0][0][0] = copy64_c; dsp->mc[0][FILTER_8TAP_REGULAR][0][0][0] = copy64_c; dsp->mc[0][FILTER_8TAP_SHARP ][0][0][0] = copy64_c; dsp->mc[0][FILTER_BILINEAR ][0][0][0] = copy64_c; dsp->mc[0][FILTER_8TAP_SMOOTH ][1][0][0] = avg64_c; dsp->mc[0][FILTER_8TAP_REGULAR][1][0][0] = avg64_c; dsp->mc[0][FILTER_8TAP_SHARP ][1][0][0] = avg64_c; dsp->mc[0][FILTER_BILINEAR ][1][0][0] = avg64_c;
    dsp->mc[1][FILTER_8TAP_SMOOTH ][0][0][0] = copy32_c; dsp->mc[1][FILTER_8TAP_REGULAR][0][0][0] = copy32_c; dsp->mc[1][FILTER_8TAP_SHARP ][0][0][0] = copy32_c; dsp->mc[1][FILTER_BILINEAR ][0][0][0] = copy32_c; dsp->mc[1][FILTER_8TAP_SMOOTH ][1][0][0] = avg32_c; dsp->mc[1][FILTER_8TAP_REGULAR][1][0][0] = avg32_c; dsp->mc[1][FILTER_8TAP_SHARP ][1][0][0] = avg32_c; dsp->mc[1][FILTER_BILINEAR ][1][0][0] = avg32_c;
    dsp->mc[2][FILTER_8TAP_SMOOTH ][0][0][0] = copy16_c; dsp->mc[2][FILTER_8TAP_REGULAR][0][0][0] = copy16_c; dsp->mc[2][FILTER_8TAP_SHARP ][0][0][0] = copy16_c; dsp->mc[2][FILTER_BILINEAR ][0][0][0] = copy16_c; dsp->mc[2][FILTER_8TAP_SMOOTH ][1][0][0] = avg16_c; dsp->mc[2][FILTER_8TAP_REGULAR][1][0][0] = avg16_c; dsp->mc[2][FILTER_8TAP_SHARP ][1][0][0] = avg16_c; dsp->mc[2][FILTER_BILINEAR ][1][0][0] = avg16_c;
    dsp->mc[3][FILTER_8TAP_SMOOTH ][0][0][0] = copy8_c; dsp->mc[3][FILTER_8TAP_REGULAR][0][0][0] = copy8_c; dsp->mc[3][FILTER_8TAP_SHARP ][0][0][0] = copy8_c; dsp->mc[3][FILTER_BILINEAR ][0][0][0] = copy8_c; dsp->mc[3][FILTER_8TAP_SMOOTH ][1][0][0] = avg8_c; dsp->mc[3][FILTER_8TAP_REGULAR][1][0][0] = avg8_c; dsp->mc[3][FILTER_8TAP_SHARP ][1][0][0] = avg8_c; dsp->mc[3][FILTER_BILINEAR ][1][0][0] = avg8_c;
    dsp->mc[4][FILTER_8TAP_SMOOTH ][0][0][0] = copy4_c; dsp->mc[4][FILTER_8TAP_REGULAR][0][0][0] = copy4_c; dsp->mc[4][FILTER_8TAP_SHARP ][0][0][0] = copy4_c; dsp->mc[4][FILTER_BILINEAR ][0][0][0] = copy4_c; dsp->mc[4][FILTER_8TAP_SMOOTH ][1][0][0] = avg4_c; dsp->mc[4][FILTER_8TAP_REGULAR][1][0][0] = avg4_c; dsp->mc[4][FILTER_8TAP_SHARP ][1][0][0] = avg4_c; dsp->mc[4][FILTER_BILINEAR ][1][0][0] = avg4_c;
# 2377 "external/ffmpeg/libavcodec/vp9dsp_template.c"
    dsp->mc[0][FILTER_8TAP_SMOOTH ][0][1][1] = put_8tap_smooth_64hv_c; dsp->mc[0][FILTER_8TAP_REGULAR][0][1][1] = put_8tap_regular_64hv_c; dsp->mc[0][FILTER_8TAP_SHARP ][0][1][1] = put_8tap_sharp_64hv_c; dsp->mc[0][FILTER_BILINEAR ][0][1][1] = put_bilin_64hv_c; dsp->mc[1][FILTER_8TAP_SMOOTH ][0][1][1] = put_8tap_smooth_32hv_c; dsp->mc[1][FILTER_8TAP_REGULAR][0][1][1] = put_8tap_regular_32hv_c; dsp->mc[1][FILTER_8TAP_SHARP ][0][1][1] = put_8tap_sharp_32hv_c; dsp->mc[1][FILTER_BILINEAR ][0][1][1] = put_bilin_32hv_c; dsp->mc[2][FILTER_8TAP_SMOOTH ][0][1][1] = put_8tap_smooth_16hv_c; dsp->mc[2][FILTER_8TAP_REGULAR][0][1][1] = put_8tap_regular_16hv_c; dsp->mc[2][FILTER_8TAP_SHARP ][0][1][1] = put_8tap_sharp_16hv_c; dsp->mc[2][FILTER_BILINEAR ][0][1][1] = put_bilin_16hv_c; dsp->mc[3][FILTER_8TAP_SMOOTH ][0][1][1] = put_8tap_smooth_8hv_c; dsp->mc[3][FILTER_8TAP_REGULAR][0][1][1] = put_8tap_regular_8hv_c; dsp->mc[3][FILTER_8TAP_SHARP ][0][1][1] = put_8tap_sharp_8hv_c; dsp->mc[3][FILTER_BILINEAR ][0][1][1] = put_bilin_8hv_c; dsp->mc[4][FILTER_8TAP_SMOOTH ][0][1][1] = put_8tap_smooth_4hv_c; dsp->mc[4][FILTER_8TAP_REGULAR][0][1][1] = put_8tap_regular_4hv_c; dsp->mc[4][FILTER_8TAP_SHARP ][0][1][1] = put_8tap_sharp_4hv_c; dsp->mc[4][FILTER_BILINEAR ][0][1][1] = put_bilin_4hv_c; dsp->mc[0][FILTER_8TAP_SMOOTH ][0][0][1] = put_8tap_smooth_64v_c; dsp->mc[0][FILTER_8TAP_REGULAR][0][0][1] = put_8tap_regular_64v_c; dsp->mc[0][FILTER_8TAP_SHARP ][0][0][1] = put_8tap_sharp_64v_c; dsp->mc[0][FILTER_BILINEAR ][0][0][1] = put_bilin_64v_c; dsp->mc[1][FILTER_8TAP_SMOOTH ][0][0][1] = put_8tap_smooth_32v_c; dsp->mc[1][FILTER_8TAP_REGULAR][0][0][1] = put_8tap_regular_32v_c; dsp->mc[1][FILTER_8TAP_SHARP ][0][0][1] = put_8tap_sharp_32v_c; dsp->mc[1][FILTER_BILINEAR ][0][0][1] = put_bilin_32v_c; dsp->mc[2][FILTER_8TAP_SMOOTH ][0][0][1] = put_8tap_smooth_16v_c; dsp->mc[2][FILTER_8TAP_REGULAR][0][0][1] = put_8tap_regular_16v_c; dsp->mc[2][FILTER_8TAP_SHARP ][0][0][1] = put_8tap_sharp_16v_c; dsp->mc[2][FILTER_BILINEAR ][0][0][1] = put_bilin_16v_c; dsp->mc[3][FILTER_8TAP_SMOOTH ][0][0][1] = put_8tap_smooth_8v_c; dsp->mc[3][FILTER_8TAP_REGULAR][0][0][1] = put_8tap_regular_8v_c; dsp->mc[3][FILTER_8TAP_SHARP ][0][0][1] = put_8tap_sharp_8v_c; dsp->mc[3][FILTER_BILINEAR ][0][0][1] = put_bilin_8v_c; dsp->mc[4][FILTER_8TAP_SMOOTH ][0][0][1] = put_8tap_smooth_4v_c; dsp->mc[4][FILTER_8TAP_REGULAR][0][0][1] = put_8tap_regular_4v_c; dsp->mc[4][FILTER_8TAP_SHARP ][0][0][1] = put_8tap_sharp_4v_c; dsp->mc[4][FILTER_BILINEAR ][0][0][1] = put_bilin_4v_c; dsp->mc[0][FILTER_8TAP_SMOOTH ][0][1][0] = put_8tap_smooth_64h_c; dsp->mc[0][FILTER_8TAP_REGULAR][0][1][0] = put_8tap_regular_64h_c; dsp->mc[0][FILTER_8TAP_SHARP ][0][1][0] = put_8tap_sharp_64h_c; dsp->mc[0][FILTER_BILINEAR ][0][1][0] = put_bilin_64h_c; dsp->mc[1][FILTER_8TAP_SMOOTH ][0][1][0] = put_8tap_smooth_32h_c; dsp->mc[1][FILTER_8TAP_REGULAR][0][1][0] = put_8tap_regular_32h_c; dsp->mc[1][FILTER_8TAP_SHARP ][0][1][0] = put_8tap_sharp_32h_c; dsp->mc[1][FILTER_BILINEAR ][0][1][0] = put_bilin_32h_c; dsp->mc[2][FILTER_8TAP_SMOOTH ][0][1][0] = put_8tap_smooth_16h_c; dsp->mc[2][FILTER_8TAP_REGULAR][0][1][0] = put_8tap_regular_16h_c; dsp->mc[2][FILTER_8TAP_SHARP ][0][1][0] = put_8tap_sharp_16h_c; dsp->mc[2][FILTER_BILINEAR ][0][1][0] = put_bilin_16h_c; dsp->mc[3][FILTER_8TAP_SMOOTH ][0][1][0] = put_8tap_smooth_8h_c; dsp->mc[3][FILTER_8TAP_REGULAR][0][1][0] = put_8tap_regular_8h_c; dsp->mc[3][FILTER_8TAP_SHARP ][0][1][0] = put_8tap_sharp_8h_c; dsp->mc[3][FILTER_BILINEAR ][0][1][0] = put_bilin_8h_c; dsp->mc[4][FILTER_8TAP_SMOOTH ][0][1][0] = put_8tap_smooth_4h_c; dsp->mc[4][FILTER_8TAP_REGULAR][0][1][0] = put_8tap_regular_4h_c; dsp->mc[4][FILTER_8TAP_SHARP ][0][1][0] = put_8tap_sharp_4h_c; dsp->mc[4][FILTER_BILINEAR ][0][1][0] = put_bilin_4h_c;
    dsp->mc[0][FILTER_8TAP_SMOOTH ][1][1][1] = avg_8tap_smooth_64hv_c; dsp->mc[0][FILTER_8TAP_REGULAR][1][1][1] = avg_8tap_regular_64hv_c; dsp->mc[0][FILTER_8TAP_SHARP ][1][1][1] = avg_8tap_sharp_64hv_c; dsp->mc[0][FILTER_BILINEAR ][1][1][1] = avg_bilin_64hv_c; dsp->mc[1][FILTER_8TAP_SMOOTH ][1][1][1] = avg_8tap_smooth_32hv_c; dsp->mc[1][FILTER_8TAP_REGULAR][1][1][1] = avg_8tap_regular_32hv_c; dsp->mc[1][FILTER_8TAP_SHARP ][1][1][1] = avg_8tap_sharp_32hv_c; dsp->mc[1][FILTER_BILINEAR ][1][1][1] = avg_bilin_32hv_c; dsp->mc[2][FILTER_8TAP_SMOOTH ][1][1][1] = avg_8tap_smooth_16hv_c; dsp->mc[2][FILTER_8TAP_REGULAR][1][1][1] = avg_8tap_regular_16hv_c; dsp->mc[2][FILTER_8TAP_SHARP ][1][1][1] = avg_8tap_sharp_16hv_c; dsp->mc[2][FILTER_BILINEAR ][1][1][1] = avg_bilin_16hv_c; dsp->mc[3][FILTER_8TAP_SMOOTH ][1][1][1] = avg_8tap_smooth_8hv_c; dsp->mc[3][FILTER_8TAP_REGULAR][1][1][1] = avg_8tap_regular_8hv_c; dsp->mc[3][FILTER_8TAP_SHARP ][1][1][1] = avg_8tap_sharp_8hv_c; dsp->mc[3][FILTER_BILINEAR ][1][1][1] = avg_bilin_8hv_c; dsp->mc[4][FILTER_8TAP_SMOOTH ][1][1][1] = avg_8tap_smooth_4hv_c; dsp->mc[4][FILTER_8TAP_REGULAR][1][1][1] = avg_8tap_regular_4hv_c; dsp->mc[4][FILTER_8TAP_SHARP ][1][1][1] = avg_8tap_sharp_4hv_c; dsp->mc[4][FILTER_BILINEAR ][1][1][1] = avg_bilin_4hv_c; dsp->mc[0][FILTER_8TAP_SMOOTH ][1][0][1] = avg_8tap_smooth_64v_c; dsp->mc[0][FILTER_8TAP_REGULAR][1][0][1] = avg_8tap_regular_64v_c; dsp->mc[0][FILTER_8TAP_SHARP ][1][0][1] = avg_8tap_sharp_64v_c; dsp->mc[0][FILTER_BILINEAR ][1][0][1] = avg_bilin_64v_c; dsp->mc[1][FILTER_8TAP_SMOOTH ][1][0][1] = avg_8tap_smooth_32v_c; dsp->mc[1][FILTER_8TAP_REGULAR][1][0][1] = avg_8tap_regular_32v_c; dsp->mc[1][FILTER_8TAP_SHARP ][1][0][1] = avg_8tap_sharp_32v_c; dsp->mc[1][FILTER_BILINEAR ][1][0][1] = avg_bilin_32v_c; dsp->mc[2][FILTER_8TAP_SMOOTH ][1][0][1] = avg_8tap_smooth_16v_c; dsp->mc[2][FILTER_8TAP_REGULAR][1][0][1] = avg_8tap_regular_16v_c; dsp->mc[2][FILTER_8TAP_SHARP ][1][0][1] = avg_8tap_sharp_16v_c; dsp->mc[2][FILTER_BILINEAR ][1][0][1] = avg_bilin_16v_c; dsp->mc[3][FILTER_8TAP_SMOOTH ][1][0][1] = avg_8tap_smooth_8v_c; dsp->mc[3][FILTER_8TAP_REGULAR][1][0][1] = avg_8tap_regular_8v_c; dsp->mc[3][FILTER_8TAP_SHARP ][1][0][1] = avg_8tap_sharp_8v_c; dsp->mc[3][FILTER_BILINEAR ][1][0][1] = avg_bilin_8v_c; dsp->mc[4][FILTER_8TAP_SMOOTH ][1][0][1] = avg_8tap_smooth_4v_c; dsp->mc[4][FILTER_8TAP_REGULAR][1][0][1] = avg_8tap_regular_4v_c; dsp->mc[4][FILTER_8TAP_SHARP ][1][0][1] = avg_8tap_sharp_4v_c; dsp->mc[4][FILTER_BILINEAR ][1][0][1] = avg_bilin_4v_c; dsp->mc[0][FILTER_8TAP_SMOOTH ][1][1][0] = avg_8tap_smooth_64h_c; dsp->mc[0][FILTER_8TAP_REGULAR][1][1][0] = avg_8tap_regular_64h_c; dsp->mc[0][FILTER_8TAP_SHARP ][1][1][0] = avg_8tap_sharp_64h_c; dsp->mc[0][FILTER_BILINEAR ][1][1][0] = avg_bilin_64h_c; dsp->mc[1][FILTER_8TAP_SMOOTH ][1][1][0] = avg_8tap_smooth_32h_c; dsp->mc[1][FILTER_8TAP_REGULAR][1][1][0] = avg_8tap_regular_32h_c; dsp->mc[1][FILTER_8TAP_SHARP ][1][1][0] = avg_8tap_sharp_32h_c; dsp->mc[1][FILTER_BILINEAR ][1][1][0] = avg_bilin_32h_c; dsp->mc[2][FILTER_8TAP_SMOOTH ][1][1][0] = avg_8tap_smooth_16h_c; dsp->mc[2][FILTER_8TAP_REGULAR][1][1][0] = avg_8tap_regular_16h_c; dsp->mc[2][FILTER_8TAP_SHARP ][1][1][0] = avg_8tap_sharp_16h_c; dsp->mc[2][FILTER_BILINEAR ][1][1][0] = avg_bilin_16h_c; dsp->mc[3][FILTER_8TAP_SMOOTH ][1][1][0] = avg_8tap_smooth_8h_c; dsp->mc[3][FILTER_8TAP_REGULAR][1][1][0] = avg_8tap_regular_8h_c; dsp->mc[3][FILTER_8TAP_SHARP ][1][1][0] = avg_8tap_sharp_8h_c; dsp->mc[3][FILTER_BILINEAR ][1][1][0] = avg_bilin_8h_c; dsp->mc[4][FILTER_8TAP_SMOOTH ][1][1][0] = avg_8tap_smooth_4h_c; dsp->mc[4][FILTER_8TAP_REGULAR][1][1][0] = avg_8tap_regular_4h_c; dsp->mc[4][FILTER_8TAP_SHARP ][1][1][0] = avg_8tap_sharp_4h_c; dsp->mc[4][FILTER_BILINEAR ][1][1][0] = avg_bilin_4h_c;
 
 
 
 
 
}
 
static __attribute__((always_inline)) inline void do_scaled_8tap_c(uint8_t *_dst, ptrdiff_t dst_stride,
                                              const uint8_t *_src, ptrdiff_t src_stride,
                                              int w, int h, int mx, int my,
                                              int dx, int dy, int avg,
                                              const int16_t (*filters)[8])
{
    int tmp_h = (((h - 1) * dy + my) >> 4) + 8;
    uint8_t tmp[64 * 135], *tmp_ptr = tmp;
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *src = (const uint8_t *) _src;
 
    dst_stride /= sizeof(uint8_t);
    src_stride /= sizeof(uint8_t);
    src -= src_stride * 3;
    do {
        int x;
        int imx = mx, ioff = 0; 
 
        for (x = 0; x < w; x++) {
            tmp_ptr[x] = av_clip_uint8_c((filters[imx][0] * src[ioff + -3 * 1] + filters[imx][1] * src[ioff + -2 * 1] + filters[imx][2] * src[ioff + -1 * 1] + filters[imx][3] * src[ioff + +0 * 1] + filters[imx][4] * src[ioff + +1 * 1] + filters[imx][5] * src[ioff + +2 * 1] + filters[imx][6] * src[ioff + +3 * 1] + filters[imx][7] * src[ioff + +4 * 1] + 64) >> 7);
            imx += dx;
            ioff += imx >> 4;
            imx &= 0xf;
        }
 
        tmp_ptr += 64;
        src += src_stride;
    } while (--tmp_h);
 
    tmp_ptr = tmp + 64 * 3;
    do {
        int x;
        const int16_t *filter = filters[my];
 
        for (x = 0; x < w; x++)
            if (avg) {
                dst[x] = (dst[x] + av_clip_uint8_c((filter[0] * tmp_ptr[x + -3 * 64] + filter[1] * tmp_ptr[x + -2 * 64] + filter[2] * tmp_ptr[x + -1 * 64] + filter[3] * tmp_ptr[x + +0 * 64] + filter[4] * tmp_ptr[x + +1 * 64] + filter[5] * tmp_ptr[x + +2 * 64] + filter[6] * tmp_ptr[x + +3 * 64] + filter[7] * tmp_ptr[x + +4 * 64] + 64) >> 7) + 1) >> 1;
            } else {
                dst[x] = av_clip_uint8_c((filter[0] * tmp_ptr[x + -3 * 64] + filter[1] * tmp_ptr[x + -2 * 64] + filter[2] * tmp_ptr[x + -1 * 64] + filter[3] * tmp_ptr[x + +0 * 64] + filter[4] * tmp_ptr[x + +1 * 64] + filter[5] * tmp_ptr[x + +2 * 64] + filter[6] * tmp_ptr[x + +3 * 64] + filter[7] * tmp_ptr[x + +4 * 64] + 64) >> 7);
            }
 
        my += dy;
        tmp_ptr += (my >> 4) * 64;
        my &= 0xf;
        dst += dst_stride;
    } while (--h);
}
# 2444 "external/ffmpeg/libavcodec/vp9dsp_template.c"
static __attribute__((noinline)) void put_scaled_8tap_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int w, int h, int mx, int my, int dx, int dy, const int16_t (*filters)[8]) { do_scaled_8tap_c(dst, dst_stride, src, src_stride, w, h, mx, my, dx, dy, 0, filters); }
static __attribute__((noinline)) void avg_scaled_8tap_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int w, int h, int mx, int my, int dx, int dy, const int16_t (*filters)[8]) { do_scaled_8tap_c(dst, dst_stride, src, src_stride, w, h, mx, my, dx, dy, 1, filters); }
# 2462 "external/ffmpeg/libavcodec/vp9dsp_template.c"
static __attribute__((always_inline)) inline void do_scaled_bilin_c(uint8_t *_dst, ptrdiff_t dst_stride,
                                               const uint8_t *_src, ptrdiff_t src_stride,
                                               int w, int h, int mx, int my,
                                               int dx, int dy, int avg)
{
    uint8_t tmp[64 * 129], *tmp_ptr = tmp;
    int tmp_h = (((h - 1) * dy + my) >> 4) + 2;
    uint8_t *dst = (uint8_t *) _dst;
    const uint8_t *src = (const uint8_t *) _src;
 
    dst_stride /= sizeof(uint8_t);
    src_stride /= sizeof(uint8_t);
    do {
        int x;
        int imx = mx, ioff = 0;
 
        for (x = 0; x < w; x++) {
            tmp_ptr[x] = (src[ioff] + ((imx * (src[ioff + 1] - src[ioff]) + 8) >> 4));
            imx += dx;
            ioff += imx >> 4;
            imx &= 0xf;
        }
 
        tmp_ptr += 64;
        src += src_stride;
    } while (--tmp_h);
 
    tmp_ptr = tmp;
    do {
        int x;
 
        for (x = 0; x < w; x++)
            if (avg) {
                dst[x] = (dst[x] + (tmp_ptr[x] + ((my * (tmp_ptr[x + 64] - tmp_ptr[x]) + 8) >> 4)) + 1) >> 1;
            } else {
                dst[x] = (tmp_ptr[x] + ((my * (tmp_ptr[x + 64] - tmp_ptr[x]) + 8) >> 4));
            }
 
        my += dy;
        tmp_ptr += (my >> 4) * 64;
        my &= 0xf;
        dst += dst_stride;
    } while (--h);
}
# 2515 "external/ffmpeg/libavcodec/vp9dsp_template.c"
static __attribute__((noinline)) void put_scaled_bilin_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int w, int h, int mx, int my, int dx, int dy) { do_scaled_bilin_c(dst, dst_stride, src, src_stride, w, h, mx, my, dx, dy, 0); }
static __attribute__((noinline)) void avg_scaled_bilin_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int w, int h, int mx, int my, int dx, int dy) { do_scaled_bilin_c(dst, dst_stride, src, src_stride, w, h, mx, my, dx, dy, 1); }
# 2549 "external/ffmpeg/libavcodec/vp9dsp_template.c"
static void put_scaled_regular_64_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { put_scaled_8tap_c(dst, dst_stride, src, src_stride, 64, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_REGULAR]); } static void put_scaled_smooth_64_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { put_scaled_8tap_c(dst, dst_stride, src, src_stride, 64, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_SMOOTH]); } static void put_scaled_sharp_64_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { put_scaled_8tap_c(dst, dst_stride, src, src_stride, 64, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_SHARP]); } static void put_scaled_bilin_64_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { put_scaled_bilin_c(dst, dst_stride, src, src_stride, 64, h, mx, my, dx, dy); } static void put_scaled_regular_32_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { put_scaled_8tap_c(dst, dst_stride, src, src_stride, 32, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_REGULAR]); } static void put_scaled_smooth_32_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { put_scaled_8tap_c(dst, dst_stride, src, src_stride, 32, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_SMOOTH]); } static void put_scaled_sharp_32_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { put_scaled_8tap_c(dst, dst_stride, src, src_stride, 32, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_SHARP]); } static void put_scaled_bilin_32_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { put_scaled_bilin_c(dst, dst_stride, src, src_stride, 32, h, mx, my, dx, dy); } static void put_scaled_regular_16_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { put_scaled_8tap_c(dst, dst_stride, src, src_stride, 16, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_REGULAR]); } static void put_scaled_smooth_16_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { put_scaled_8tap_c(dst, dst_stride, src, src_stride, 16, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_SMOOTH]); } static void put_scaled_sharp_16_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { put_scaled_8tap_c(dst, dst_stride, src, src_stride, 16, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_SHARP]); } static void put_scaled_bilin_16_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { put_scaled_bilin_c(dst, dst_stride, src, src_stride, 16, h, mx, my, dx, dy); } static void put_scaled_regular_8_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { put_scaled_8tap_c(dst, dst_stride, src, src_stride, 8, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_REGULAR]); } static void put_scaled_smooth_8_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { put_scaled_8tap_c(dst, dst_stride, src, src_stride, 8, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_SMOOTH]); } static void put_scaled_sharp_8_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { put_scaled_8tap_c(dst, dst_stride, src, src_stride, 8, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_SHARP]); } static void put_scaled_bilin_8_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { put_scaled_bilin_c(dst, dst_stride, src, src_stride, 8, h, mx, my, dx, dy); } static void put_scaled_regular_4_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { put_scaled_8tap_c(dst, dst_stride, src, src_stride, 4, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_REGULAR]); } static void put_scaled_smooth_4_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { put_scaled_8tap_c(dst, dst_stride, src, src_stride, 4, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_SMOOTH]); } static void put_scaled_sharp_4_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { put_scaled_8tap_c(dst, dst_stride, src, src_stride, 4, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_SHARP]); } static void put_scaled_bilin_4_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { put_scaled_bilin_c(dst, dst_stride, src, src_stride, 4, h, mx, my, dx, dy); }
static void avg_scaled_regular_64_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { avg_scaled_8tap_c(dst, dst_stride, src, src_stride, 64, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_REGULAR]); } static void avg_scaled_smooth_64_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { avg_scaled_8tap_c(dst, dst_stride, src, src_stride, 64, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_SMOOTH]); } static void avg_scaled_sharp_64_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { avg_scaled_8tap_c(dst, dst_stride, src, src_stride, 64, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_SHARP]); } static void avg_scaled_bilin_64_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { avg_scaled_bilin_c(dst, dst_stride, src, src_stride, 64, h, mx, my, dx, dy); } static void avg_scaled_regular_32_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { avg_scaled_8tap_c(dst, dst_stride, src, src_stride, 32, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_REGULAR]); } static void avg_scaled_smooth_32_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { avg_scaled_8tap_c(dst, dst_stride, src, src_stride, 32, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_SMOOTH]); } static void avg_scaled_sharp_32_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { avg_scaled_8tap_c(dst, dst_stride, src, src_stride, 32, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_SHARP]); } static void avg_scaled_bilin_32_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { avg_scaled_bilin_c(dst, dst_stride, src, src_stride, 32, h, mx, my, dx, dy); } static void avg_scaled_regular_16_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { avg_scaled_8tap_c(dst, dst_stride, src, src_stride, 16, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_REGULAR]); } static void avg_scaled_smooth_16_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { avg_scaled_8tap_c(dst, dst_stride, src, src_stride, 16, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_SMOOTH]); } static void avg_scaled_sharp_16_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { avg_scaled_8tap_c(dst, dst_stride, src, src_stride, 16, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_SHARP]); } static void avg_scaled_bilin_16_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { avg_scaled_bilin_c(dst, dst_stride, src, src_stride, 16, h, mx, my, dx, dy); } static void avg_scaled_regular_8_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { avg_scaled_8tap_c(dst, dst_stride, src, src_stride, 8, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_REGULAR]); } static void avg_scaled_smooth_8_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { avg_scaled_8tap_c(dst, dst_stride, src, src_stride, 8, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_SMOOTH]); } static void avg_scaled_sharp_8_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { avg_scaled_8tap_c(dst, dst_stride, src, src_stride, 8, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_SHARP]); } static void avg_scaled_bilin_8_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { avg_scaled_bilin_c(dst, dst_stride, src, src_stride, 8, h, mx, my, dx, dy); } static void avg_scaled_regular_4_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { avg_scaled_8tap_c(dst, dst_stride, src, src_stride, 4, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_REGULAR]); } static void avg_scaled_smooth_4_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { avg_scaled_8tap_c(dst, dst_stride, src, src_stride, 4, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_SMOOTH]); } static void avg_scaled_sharp_4_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { avg_scaled_8tap_c(dst, dst_stride, src, src_stride, 4, h, mx, my, dx, dy, vp9_subpel_filters[FILTER_8TAP_SHARP]); } static void avg_scaled_bilin_4_c(uint8_t *dst, ptrdiff_t dst_stride, const uint8_t *src, ptrdiff_t src_stride, int h, int mx, int my, int dx, int dy) { avg_scaled_bilin_c(dst, dst_stride, src, src_stride, 4, h, mx, my, dx, dy); }
# 2561 "external/ffmpeg/libavcodec/vp9dsp_template.c"
static
 
        void ff_vp9dsp_scaled_mc_init_8(VP9DSPContext *dsp)
{
# 2583 "external/ffmpeg/libavcodec/vp9dsp_template.c"
    dsp->smc[0][FILTER_8TAP_SMOOTH ][0] = put_scaled_smooth_64_c; dsp->smc[0][FILTER_8TAP_REGULAR][0] = put_scaled_regular_64_c; dsp->smc[0][FILTER_8TAP_SHARP ][0] = put_scaled_sharp_64_c; dsp->smc[0][FILTER_BILINEAR ][0] = put_scaled_bilin_64_c; dsp->smc[0][FILTER_8TAP_SMOOTH ][1] = avg_scaled_smooth_64_c; dsp->smc[0][FILTER_8TAP_REGULAR][1] = avg_scaled_regular_64_c; dsp->smc[0][FILTER_8TAP_SHARP ][1] = avg_scaled_sharp_64_c; dsp->smc[0][FILTER_BILINEAR ][1] = avg_scaled_bilin_64_c;
    dsp->smc[1][FILTER_8TAP_SMOOTH ][0] = put_scaled_smooth_32_c; dsp->smc[1][FILTER_8TAP_REGULAR][0] = put_scaled_regular_32_c; dsp->smc[1][FILTER_8TAP_SHARP ][0] = put_scaled_sharp_32_c; dsp->smc[1][FILTER_BILINEAR ][0] = put_scaled_bilin_32_c; dsp->smc[1][FILTER_8TAP_SMOOTH ][1] = avg_scaled_smooth_32_c; dsp->smc[1][FILTER_8TAP_REGULAR][1] = avg_scaled_regular_32_c; dsp->smc[1][FILTER_8TAP_SHARP ][1] = avg_scaled_sharp_32_c; dsp->smc[1][FILTER_BILINEAR ][1] = avg_scaled_bilin_32_c;
    dsp->smc[2][FILTER_8TAP_SMOOTH ][0] = put_scaled_smooth_16_c; dsp->smc[2][FILTER_8TAP_REGULAR][0] = put_scaled_regular_16_c; dsp->smc[2][FILTER_8TAP_SHARP ][0] = put_scaled_sharp_16_c; dsp->smc[2][FILTER_BILINEAR ][0] = put_scaled_bilin_16_c; dsp->smc[2][FILTER_8TAP_SMOOTH ][1] = avg_scaled_smooth_16_c; dsp->smc[2][FILTER_8TAP_REGULAR][1] = avg_scaled_regular_16_c; dsp->smc[2][FILTER_8TAP_SHARP ][1] = avg_scaled_sharp_16_c; dsp->smc[2][FILTER_BILINEAR ][1] = avg_scaled_bilin_16_c;
    dsp->smc[3][FILTER_8TAP_SMOOTH ][0] = put_scaled_smooth_8_c; dsp->smc[3][FILTER_8TAP_REGULAR][0] = put_scaled_regular_8_c; dsp->smc[3][FILTER_8TAP_SHARP ][0] = put_scaled_sharp_8_c; dsp->smc[3][FILTER_BILINEAR ][0] = put_scaled_bilin_8_c; dsp->smc[3][FILTER_8TAP_SMOOTH ][1] = avg_scaled_smooth_8_c; dsp->smc[3][FILTER_8TAP_REGULAR][1] = avg_scaled_regular_8_c; dsp->smc[3][FILTER_8TAP_SHARP ][1] = avg_scaled_sharp_8_c; dsp->smc[3][FILTER_BILINEAR ][1] = avg_scaled_bilin_8_c;
    dsp->smc[4][FILTER_8TAP_SMOOTH ][0] = put_scaled_smooth_4_c; dsp->smc[4][FILTER_8TAP_REGULAR][0] = put_scaled_regular_4_c; dsp->smc[4][FILTER_8TAP_SHARP ][0] = put_scaled_sharp_4_c; dsp->smc[4][FILTER_BILINEAR ][0] = put_scaled_bilin_4_c; dsp->smc[4][FILTER_8TAP_SMOOTH ][1] = avg_scaled_smooth_4_c; dsp->smc[4][FILTER_8TAP_REGULAR][1] = avg_scaled_regular_4_c; dsp->smc[4][FILTER_8TAP_SHARP ][1] = avg_scaled_sharp_4_c; dsp->smc[4][FILTER_BILINEAR ][1] = avg_scaled_bilin_4_c;
 
 
 
 
}
 
        void ff_vp9dsp_init_8(VP9DSPContext *dsp)
{
    ff_vp9dsp_intrapred_init_8(dsp);
    vp9dsp_itxfm_init(dsp);
    vp9dsp_loopfilter_init(dsp);
    ff_vp9dsp_mc_init_8(dsp);
    ff_vp9dsp_scaled_mc_init_8(dsp);
}
# 27 "external/ffmpeg/libavcodec/vp9dsp_8bpp.c" 2
Thanks for your support,
Joseph
 
  • Up0
  • Down0
pstrong
Join Date: 12 May 16
Posts: 27
Posted: Mon, 2018-03-26 16:06
Hi Joseph,
 
Thanks for sending the pre-processed file (vp9dsp_8bpp.i ).  We confirmed that the error is in the Snapdragon 3.8.4 toolchain that is no longer supported.  We also verified that this issue has been fixed in the later Snapdragon 3.9 and 4.0 toolchains. 
 
We don't see the "macro expansion producing 'defined' has undefined behavior [-Werror,-Wexpansion-to-defined]" error in our Android builds. using the 4.0 toolchain.  You may want to add the '-Wno-error' or '-Wno-error=expansion-to-defined' flags to your build to enable you to debug further.
 
Paul
  • Up0
  • Down0
thegreatonimaster
Join Date: 10 Oct 17
Posts: 7
Posted: Wed, 2018-03-28 16:16

Dear Paul,

Thanks for you precious advice and for all the time spent on that file. Just to be sure: are you suggesting me to try to issue the build command with the 4.0.2 compiler set, plus adding the -Wno-error=expansion-to-defined option?

I'll check this out as soon as I can and post here my results.

Sincerely,

Joseph

  • Up0
  • Down0
pstrong
Join Date: 12 May 16
Posts: 27
Posted: Thu, 2018-03-29 11:32

Yes, I'm suggesting that you switch back to the SDLLVM 4.0.2 toolchain and use the '-Wno-error=xxx' flags to see if you can get further in the build experiment.

Paul

  • Up0
  • Down0
thegreatonimaster
Join Date: 10 Oct 17
Posts: 7
Posted: Fri, 2018-04-13 17:12

Dear Paul,

I changed my build environment and I built LineageOS 15.1, wich is based on Android 8.1, with the 4.0.2 LLVM set. The result is a working build, compiled without errors. However, how can I check if the OS was actually compiled with the QC LLVM?

Sincerely,

Joseph

 

 

  • Up0
  • Down0
pstrong
Join Date: 12 May 16
Posts: 27
Posted: Fri, 2018-04-20 16:38

Hi Joseph,

If you are buiding with the verbose option turned on, i.e., make showcommands, then you can verify by searching for the path to the Snapdragon LLVM compiler in the build log. 

If you didn't build with 'showcommands', you can also run the following command to verify the compiler version used on a representative OS '.o' or '.so' file.

$ readelf -p .comment out/target/product/...../libjpeg.so | grep "Snapdragon"

     [     1]  Snapdragon LLVM ARM Compiler 4.0.2 for Android NDK (based on llvm.org 4.0)

Paul

  • Up0
  • Down0
thegreatonimaster
Join Date: 10 Oct 17
Posts: 7
Posted: Wed, 2018-04-25 01:35

Hi Paul,

After some time spent trying to undestand if the LLVM was used in the build process, I couldn't find any trace both in the .so and .o files or in the log file of the build. I don't truly undestand why LineageOS 15.1 ignores the compiler. 

I would like to thank you for your support and for all the time you dedicated to my efforts. Guess that I'm going to pause this project for some time.

Sincerely,

Joseph  

  • Up0
  • Down0
ptaoubi
Join Date: 16 Jun 18
Posts: 3
Posted: Sat, 2018-06-16 15:02
thank you
  • Up0
  • Down0
Geekie12
Join Date: 21 May 18
Posts: 2
Posted: Sat, 2018-06-16 18:07

Hello,

With respect to this topic, I have used Snapdragon Qualcomm LLVM/clang in building Andrioid Linux ARM(32-bit) hammerhead kernel for my Nexus 5 smartphone and I have succeeded in building it as well as bringing it up on the same Nexus 5. For the interested ones, I have shared my successful research and accomplishment details here : Success: Bring-up of LLVM/clang-built Linux ARM(32-bit) kernel for Android - Nexus 5

Cheers

  • Up0
  • Down0

Pages

Showing 1 - 50 out of 56
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.