diff mbox

[FFmpeg-devel,4/4] vp9: split out generic decoding skeleton interface API from VP9 types.

Message ID 1490650535-81794-4-git-send-email-rsbultje@gmail.com
State Superseded
Headers show

Commit Message

Ronald S. Bultje March 27, 2017, 9:35 p.m. UTC
This allows vp9dsp.h to only include the VP9 types header, and not the
decoder skeleton interface which is for hardware decoders (dxva2/vaapi).
---
 libavcodec/dxva2_vp9.c |   2 +-
 libavcodec/vaapi_vp9.c |   2 +-
 libavcodec/vp9.h       | 145 +-----------------------------------------
 libavcodec/vp9dec.h    |   1 +
 libavcodec/vp9dsp.h    |   4 +-
 libavcodec/vp9shared.h | 169 +++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 176 insertions(+), 147 deletions(-)
 create mode 100644 libavcodec/vp9shared.h

Comments

Michael Niedermayer March 28, 2017, 1:12 a.m. UTC | #1
On Mon, Mar 27, 2017 at 05:35:35PM -0400, Ronald S. Bultje wrote:
> This allows vp9dsp.h to only include the VP9 types header, and not the
> decoder skeleton interface which is for hardware decoders (dxva2/vaapi).
> ---
>  libavcodec/dxva2_vp9.c |   2 +-
>  libavcodec/vaapi_vp9.c |   2 +-
>  libavcodec/vp9.h       | 145 +-----------------------------------------
>  libavcodec/vp9dec.h    |   1 +
>  libavcodec/vp9dsp.h    |   4 +-
>  libavcodec/vp9shared.h | 169 +++++++++++++++++++++++++++++++++++++++++++++++++
>  6 files changed, 176 insertions(+), 147 deletions(-)
>  create mode 100644 libavcodec/vp9shared.h

breaks on arm

CC      libavcodec/arm/vp9dsp_init_10bpp_arm.o
In file included from src/libavcodec/arm/vp9dsp_init_10bpp_arm.c:23:0:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_regular64_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:1: error: implicit declaration of function ‘LOCAL_ALIGNED_16’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:158: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:244: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:244: note: each undeclared identifier is reported only once for each function it appears in
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_sharp64_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:550: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:634: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_smooth64_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:939: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:1024: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_regular64_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:1331: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:1417: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_sharp64_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:1723: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:1807: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_smooth64_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:2112: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:2197: error: ‘temp’ undeclared (first use in this function)
In file included from src/libavcodec/arm/vp9dsp_init_10bpp_arm.c:23:0:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_regular32_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:93:158: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:93:244: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_sharp32_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:93:550: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:93:634: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_smooth32_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:93:939: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:93:1024: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_regular32_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:93:1331: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:93:1417: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_sharp32_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:93:1723: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:93:1807: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_smooth32_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:93:2112: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:93:2197: error: ‘temp’ undeclared (first use in this function)
In file included from src/libavcodec/arm/vp9dsp_init_10bpp_arm.c:23:0:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_regular16_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:94:158: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:94:244: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_sharp16_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:94:550: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:94:634: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_smooth16_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:94:939: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:94:1024: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_regular16_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:94:1331: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:94:1417: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_sharp16_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:94:1723: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:94:1807: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_smooth16_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:94:2112: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:94:2197: error: ‘temp’ undeclared (first use in this function)
In file included from src/libavcodec/arm/vp9dsp_init_10bpp_arm.c:23:0:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_regular8_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:95:157: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:95:239: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_sharp8_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:95:540: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:95:620: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_smooth8_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:95:920: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:95:1001: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_regular8_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:95:1303: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:95:1385: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_sharp8_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:95:1686: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:95:1766: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_smooth8_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:95:2066: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:95:2147: error: ‘temp’ undeclared (first use in this function)
In file included from src/libavcodec/arm/vp9dsp_init_10bpp_arm.c:23:0:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_regular4_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:96:157: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:96:239: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_sharp4_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:96:540: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:96:620: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_smooth4_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:96:920: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:96:1001: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_regular4_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:96:1303: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:96:1385: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_sharp4_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:96:1686: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:96:1766: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_smooth4_hv_10_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:96:2066: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:96:2147: error: ‘temp’ undeclared (first use in this function)
make: *** [libavcodec/arm/vp9dsp_init_10bpp_arm.o] Error 1
CC      libavcodec/arm/vp9dsp_init_12bpp_arm.o
In file included from src/libavcodec/arm/vp9dsp_init_12bpp_arm.c:23:0:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_regular64_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:1: error: implicit declaration of function ‘LOCAL_ALIGNED_16’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:158: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:244: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:244: note: each undeclared identifier is reported only once for each function it appears in
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_sharp64_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:550: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:634: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_smooth64_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:939: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:1024: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_regular64_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:1331: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:1417: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_sharp64_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:1723: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:1807: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_smooth64_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:2112: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:2197: error: ‘temp’ undeclared (first use in this function)
In file included from src/libavcodec/arm/vp9dsp_init_12bpp_arm.c:23:0:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_regular32_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:93:158: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:93:244: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_sharp32_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:93:550: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:93:634: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_smooth32_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:93:939: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:93:1024: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_regular32_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:93:1331: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:93:1417: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_sharp32_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:93:1723: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:93:1807: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_smooth32_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:93:2112: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:93:2197: error: ‘temp’ undeclared (first use in this function)
In file included from src/libavcodec/arm/vp9dsp_init_12bpp_arm.c:23:0:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_regular16_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:94:158: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:94:244: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_sharp16_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:94:550: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:94:634: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_smooth16_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:94:939: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:94:1024: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_regular16_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:94:1331: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:94:1417: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_sharp16_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:94:1723: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:94:1807: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_smooth16_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:94:2112: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:94:2197: error: ‘temp’ undeclared (first use in this function)
In file included from src/libavcodec/arm/vp9dsp_init_12bpp_arm.c:23:0:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_regular8_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:95:157: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:95:239: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_sharp8_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:95:540: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:95:620: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_smooth8_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:95:920: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:95:1001: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_regular8_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:95:1303: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:95:1385: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_sharp8_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:95:1686: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:95:1766: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_smooth8_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:95:2066: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:95:2147: error: ‘temp’ undeclared (first use in this function)
In file included from src/libavcodec/arm/vp9dsp_init_12bpp_arm.c:23:0:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_regular4_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:96:157: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:96:239: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_sharp4_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:96:540: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:96:620: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘put_smooth4_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:96:920: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:96:1001: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_regular4_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:96:1303: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:96:1385: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_sharp4_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:96:1686: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:96:1766: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function ‘avg_smooth4_hv_12_neon’:
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:96:2066: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:96:2147: error: ‘temp’ undeclared (first use in this function)
make: *** [libavcodec/arm/vp9dsp_init_12bpp_arm.o] Error 1
CC      libavcodec/arm/vp9dsp_init_arm.o
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘put_regular64_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:91:1: error: implicit declaration of function ‘LOCAL_ALIGNED_16’
src/libavcodec/arm/vp9dsp_init_arm.c:91:155: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:91:234: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c:91:234: note: each undeclared identifier is reported only once for each function it appears in
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘put_sharp64_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:91:522: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:91:599: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘put_smooth64_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:91:886: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:91:964: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘avg_regular64_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:91:1253: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:91:1332: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘avg_sharp64_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:91:1620: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:91:1697: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘avg_smooth64_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:91:1984: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:91:2062: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘put_regular32_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:92:155: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:92:234: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘put_sharp32_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:92:522: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:92:599: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘put_smooth32_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:92:886: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:92:964: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘avg_regular32_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:92:1253: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:92:1332: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘avg_sharp32_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:92:1620: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:92:1697: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘avg_smooth32_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:92:1984: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:92:2062: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘put_regular16_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:93:155: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:93:234: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘put_sharp16_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:93:522: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:93:599: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘put_smooth16_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:93:886: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:93:964: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘avg_regular16_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:93:1253: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:93:1332: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘avg_sharp16_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:93:1620: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:93:1697: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘avg_smooth16_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:93:1984: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:93:2062: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘put_regular8_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:94:154: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:94:229: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘put_sharp8_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:94:512: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:94:585: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘put_smooth8_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:94:867: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:94:941: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘avg_regular8_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:94:1225: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:94:1300: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘avg_sharp8_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:94:1583: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:94:1656: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘avg_smooth8_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:94:1938: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:94:2012: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘put_regular4_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:95:154: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:95:229: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘put_sharp4_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:95:512: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:95:585: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘put_smooth4_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:95:867: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:95:941: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘avg_regular4_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:95:1225: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:95:1300: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘avg_sharp4_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:95:1583: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:95:1656: error: ‘temp’ undeclared (first use in this function)
src/libavcodec/arm/vp9dsp_init_arm.c: In function ‘avg_smooth4_hv_neon’:
src/libavcodec/arm/vp9dsp_init_arm.c:95:1938: error: expected expression before ‘uint8_t’
src/libavcodec/arm/vp9dsp_init_arm.c:95:2012: error: ‘temp’ undeclared (first use in this function)
make: *** [libavcodec/arm/vp9dsp_init_arm.o] Error 1
make: Target `all' not remade because of errors.

[...]
Ronald S. Bultje March 28, 2017, 2:06 a.m. UTC | #2
Hi,

On Mon, Mar 27, 2017 at 9:12 PM, Michael Niedermayer <michael@niedermayer.cc
> wrote:

> On Mon, Mar 27, 2017 at 05:35:35PM -0400, Ronald S. Bultje wrote:
> > This allows vp9dsp.h to only include the VP9 types header, and not the
> > decoder skeleton interface which is for hardware decoders (dxva2/vaapi).
> > ---
> >  libavcodec/dxva2_vp9.c |   2 +-
> >  libavcodec/vaapi_vp9.c |   2 +-
> >  libavcodec/vp9.h       | 145 +-----------------------------------------
> >  libavcodec/vp9dec.h    |   1 +
> >  libavcodec/vp9dsp.h    |   4 +-
> >  libavcodec/vp9shared.h | 169 ++++++++++++++++++++++++++++++
> +++++++++++++++++++
> >  6 files changed, 176 insertions(+), 147 deletions(-)
> >  create mode 100644 libavcodec/vp9shared.h
>
> breaks on arm
>
> CC      libavcodec/arm/vp9dsp_init_10bpp_arm.o
> In file included from src/libavcodec/arm/vp9dsp_init_10bpp_arm.c:23:0:
> src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c: In function
> ‘put_regular64_hv_10_neon’:
> src/libavcodec/arm/vp9dsp_init_16bpp_arm_template.c:92:1: error: implicit
> declaration of function ‘LOCAL_ALIGNED_16’


Fixed in new version. Thanks for testing.

Ronald
diff mbox

Patch

diff --git a/libavcodec/dxva2_vp9.c b/libavcodec/dxva2_vp9.c
index d53b327..fd7bd98 100644
--- a/libavcodec/dxva2_vp9.c
+++ b/libavcodec/dxva2_vp9.c
@@ -23,7 +23,7 @@ 
 #include "libavutil/avassert.h"
 #include "libavutil/pixdesc.h"
 
-#include "vp9.h"
+#include "vp9shared.h"
 
 // The headers above may include w32threads.h, which uses the original
 // _WIN32_WINNT define, while dxva2_internal.h redefines it to target a
diff --git a/libavcodec/vaapi_vp9.c b/libavcodec/vaapi_vp9.c
index 7374465..d8ece75 100644
--- a/libavcodec/vaapi_vp9.c
+++ b/libavcodec/vaapi_vp9.c
@@ -24,7 +24,7 @@ 
 
 #include "hwaccel.h"
 #include "vaapi_decode.h"
-#include "vp9.h"
+#include "vp9shared.h"
 
 static VASurfaceID vaapi_vp9_surface_id(const VP9Frame *vf)
 {
diff --git a/libavcodec/vp9.h b/libavcodec/vp9.h
index 6d2abaf..c8d07ad 100644
--- a/libavcodec/vp9.h
+++ b/libavcodec/vp9.h
@@ -24,13 +24,6 @@ 
 #ifndef AVCODEC_VP9_H
 #define AVCODEC_VP9_H
 
-#include <stddef.h>
-#include <stdint.h>
-
-#include "avcodec.h"
-#include "thread.h"
-#include "vp56.h"
-
 enum TxfmMode {
     TX_4X4,
     TX_8X8,
@@ -73,142 +66,8 @@  enum FilterMode {
     FILTER_8TAP_REGULAR,
     FILTER_8TAP_SHARP,
     FILTER_BILINEAR,
-    FILTER_SWITCHABLE,
-};
-
-enum BlockPartition {
-    PARTITION_NONE,    // [ ] <-.
-    PARTITION_H,       // [-]   |
-    PARTITION_V,       // [|]   |
-    PARTITION_SPLIT,   // [+] --'
-};
-
-enum InterPredMode {
-    NEARESTMV = 10,
-    NEARMV    = 11,
-    ZEROMV    = 12,
-    NEWMV     = 13,
-};
-
-enum CompPredMode {
-    PRED_SINGLEREF,
-    PRED_COMPREF,
-    PRED_SWITCHABLE,
+    N_FILTERS,
+    FILTER_SWITCHABLE = N_FILTERS,
 };
 
-typedef struct VP9mvrefPair {
-    VP56mv mv[2];
-    int8_t ref[2];
-} VP9mvrefPair;
-
-typedef struct VP9Frame {
-    ThreadFrame tf;
-    AVBufferRef *extradata;
-    uint8_t *segmentation_map;
-    VP9mvrefPair *mv;
-    int uses_2pass;
-
-    AVBufferRef *hwaccel_priv_buf;
-    void *hwaccel_picture_private;
-} VP9Frame;
-
-enum BlockLevel {
-    BL_64X64,
-    BL_32X32,
-    BL_16X16,
-    BL_8X8,
-};
-
-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,
-};
-
-typedef struct VP9BitstreamHeader {
-    // bitstream header
-    uint8_t profile;
-    uint8_t bpp;
-    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;
-#define MAX_SEGMENT 8
-    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[MAX_SEGMENT];
-    } 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];
-#define CUR_FRAME 0
-#define REF_FRAME_MVPAIR 1
-#define REF_FRAME_SEGMAP 2
-    VP9Frame frames[3];
-} VP9SharedContext;
-
 #endif /* AVCODEC_VP9_H */
diff --git a/libavcodec/vp9dec.h b/libavcodec/vp9dec.h
index f05e478..4002b3a 100644
--- a/libavcodec/vp9dec.h
+++ b/libavcodec/vp9dec.h
@@ -32,6 +32,7 @@ 
 
 #include "vp9.h"
 #include "vp9dsp.h"
+#include "vp9shared.h"
 
 enum MVJoint {
     MV_JOINT_ZERO,
diff --git a/libavcodec/vp9dsp.h b/libavcodec/vp9dsp.h
index d2c48b4..e225631 100644
--- a/libavcodec/vp9dsp.h
+++ b/libavcodec/vp9dsp.h
@@ -111,13 +111,13 @@  typedef struct VP9DSPContext {
      *
      * dst/stride are aligned by hsize
      */
-    vp9_mc_func mc[5][4][2][2][2];
+    vp9_mc_func mc[5][N_FILTERS][2][2][2];
 
     /*
      * for scalable MC, first 3 dimensions identical to above, the other two
      * don't exist since it changes per stepsize.
      */
-    vp9_scaled_mc_func smc[5][4][2];
+    vp9_scaled_mc_func smc[5][N_FILTERS][2];
 } VP9DSPContext;
 
 extern const int16_t ff_vp9_subpel_filters[3][16][8];
diff --git a/libavcodec/vp9shared.h b/libavcodec/vp9shared.h
new file mode 100644
index 0000000..54726df
--- /dev/null
+++ b/libavcodec/vp9shared.h
@@ -0,0 +1,169 @@ 
+/*
+ * VP9 compatible video decoder
+ *
+ * Copyright (C) 2013 Ronald S. Bultje <rsbultje gmail com>
+ * Copyright (C) 2013 Clément Bœsch <u pkh me>
+ *
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * FFmpeg is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with FFmpeg; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ */
+
+#ifndef AVCODEC_VP9SHARED_H
+#define AVCODEC_VP9SHARED_H
+
+#include <stddef.h>
+#include <stdint.h>
+
+#include "vp9.h"
+#include "thread.h"
+#include "vp56.h"
+
+enum BlockPartition {
+    PARTITION_NONE,    // [ ] <-.
+    PARTITION_H,       // [-]   |
+    PARTITION_V,       // [|]   |
+    PARTITION_SPLIT,   // [+] --'
+};
+
+enum InterPredMode {
+    NEARESTMV = 10,
+    NEARMV    = 11,
+    ZEROMV    = 12,
+    NEWMV     = 13,
+};
+
+enum CompPredMode {
+    PRED_SINGLEREF,
+    PRED_COMPREF,
+    PRED_SWITCHABLE,
+};
+
+typedef struct VP9mvrefPair {
+    VP56mv mv[2];
+    int8_t ref[2];
+} VP9mvrefPair;
+
+typedef struct VP9Frame {
+    ThreadFrame tf;
+    AVBufferRef *extradata;
+    uint8_t *segmentation_map;
+    VP9mvrefPair *mv;
+    int uses_2pass;
+
+    AVBufferRef *hwaccel_priv_buf;
+    void *hwaccel_picture_private;
+} VP9Frame;
+
+enum BlockLevel {
+    BL_64X64,
+    BL_32X32,
+    BL_16X16,
+    BL_8X8,
+};
+
+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,
+};
+
+typedef struct VP9BitstreamHeader {
+    // bitstream header
+    uint8_t profile;
+    uint8_t bpp;
+    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;
+#define MAX_SEGMENT 8
+    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[MAX_SEGMENT];
+    } 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];
+#define CUR_FRAME 0
+#define REF_FRAME_MVPAIR 1
+#define REF_FRAME_SEGMAP 2
+    VP9Frame frames[3];
+} VP9SharedContext;
+
+#endif /* AVCODEC_VP9SHARED_H */