OSDN Git Service

android-x86/hardware-intel-common-vaapi.git
7 years agogen8: accept P010 as valid format
Víctor Manuel Jáquez Leal [Mon, 27 Mar 2017 16:05:40 +0000 (09:05 -0700)]
gen8: accept P010 as valid format

The functions gen8_gpe_set_surface2_state() and
gen8_gpe_media_chroma_surface_setup() asserts for the surface color
format, admiting only NV12.

Nonetheless, gen8 also can encoder surfaces with P010 color format.

This patch adds P010 color format in the assertion condition.

Fixes #106

7 years agointel-vaapi-driver 1.8.0.pre3
Xiang, Haihao [Mon, 27 Mar 2017 13:30:33 +0000 (21:30 +0800)]
intel-vaapi-driver 1.8.0.pre3

Update NEWS as well

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agoFix: WA the AVC B frame issue with high profile
Pengfei Qu [Mon, 27 Mar 2017 01:43:30 +0000 (09:43 +0800)]
Fix: WA the AVC B frame issue with high profile

this is WA to disable the transform_8x8_mode_flag in the driver.

Fixes #97

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
(cherry picked from commit 228e4fc197e2a180dcbfcaba4df2a0717f6ec853)

7 years agoFix: wrong type define and cause the memory access error
Pengfei Qu [Fri, 24 Mar 2017 08:09:24 +0000 (16:09 +0800)]
Fix: wrong type define and cause the memory access error

Fixes #101

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
(cherry picked from commit aaca4330a016b9e83c802389921f651ecafefcb5)

7 years agoEncoder: AVC encoder improved on KBL
Pengfei Qu [Mon, 20 Mar 2017 06:02:31 +0000 (14:02 +0800)]
Encoder: AVC encoder improved on KBL

v1:
add gtest support for quality range on KBL

Fixes #73

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
(cherry picked from commit c0ea9ac2f8f4742a1a038f2c1b2255cf4800c3e6)

7 years agoFix:code refine and replace 52 with Marco defines
Pengfei Qu [Mon, 20 Mar 2017 06:02:28 +0000 (14:02 +0800)]
Fix:code refine and replace 52 with Marco defines

Fixes #73

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
(cherry picked from commit ef9b655e057a641ad1767bb9c19038f4ed27819a)

7 years agoEncoder: add AVC encoder pipeline support on KBL
Pengfei Qu [Mon, 20 Mar 2017 06:02:24 +0000 (14:02 +0800)]
Encoder: add AVC encoder pipeline support on KBL

Fixes #73

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
(cherry picked from commit e9a0038f780bd4822ad472b1059ff1bee2fcd0be)

7 years agoENC: use common gpe structure in AVC encoder
Pengfei Qu [Mon, 20 Mar 2017 06:02:20 +0000 (14:02 +0800)]
ENC: use common gpe structure in AVC encoder

Fixes #73

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
(cherry picked from commit 91b79375b8c5550933ef90cf6b2b7c074ba3b818)

7 years agoEncoder: add mbenc structure for KBL
Pengfei Qu [Mon, 20 Mar 2017 06:02:17 +0000 (14:02 +0800)]
Encoder: add mbenc structure for KBL

Fixes #73

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
(cherry picked from commit beb8d637e80ee13bd98b00097b8799a77680d8a3)

7 years agoEncoder: add AVC const data for KBL
Pengfei Qu [Mon, 20 Mar 2017 06:02:13 +0000 (14:02 +0800)]
Encoder: add AVC const data for KBL

add member variable for KBL.

Fixes #73

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
(cherry picked from commit 011139fd3cf8c45a08ee90947df254473e12f79d)

7 years agoEncoder: add AVC kernel binary on KBL
Pengfei Qu [Mon, 20 Mar 2017 06:01:09 +0000 (14:01 +0800)]
Encoder: add AVC kernel binary on KBL

Fixes #73

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
(cherry picked from commit 4b7f68d39521dc3372b7874129c8a15c42aa2d11)

7 years agoFix: WA the AVC B frame issue with high profile
Pengfei Qu [Mon, 27 Mar 2017 01:43:30 +0000 (09:43 +0800)]
Fix: WA the AVC B frame issue with high profile

this is WA to disable the transform_8x8_mode_flag in the driver.

Fixes #97

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
7 years agoUpdate shaders for VP8 encoding
Xiang, Haihao [Thu, 23 Mar 2017 03:43:11 +0000 (11:43 +0800)]
Update shaders for VP8 encoding

This fixes https://github.com/01org/intel-vaapi-driver/issues/59

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit 52cf914f355a074933ffaf14071ca1405c98df97)

7 years agoFix: wrong type define and cause the memory access error
Pengfei Qu [Fri, 24 Mar 2017 08:09:24 +0000 (16:09 +0800)]
Fix: wrong type define and cause the memory access error

Fixes #101

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
7 years agoUpdate shaders for VP8 encoding
Xiang, Haihao [Thu, 23 Mar 2017 03:43:11 +0000 (11:43 +0800)]
Update shaders for VP8 encoding

This fixes https://github.com/01org/intel-vaapi-driver/issues/59

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agoEncoder: AVC encoder improved on KBL
Pengfei Qu [Mon, 20 Mar 2017 06:02:31 +0000 (14:02 +0800)]
Encoder: AVC encoder improved on KBL

v1:
add gtest support for quality range on KBL

Fixes #73

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
7 years agoFix:code refine and replace 52 with Marco defines
Pengfei Qu [Mon, 20 Mar 2017 06:02:28 +0000 (14:02 +0800)]
Fix:code refine and replace 52 with Marco defines

Fixes #73

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
7 years agoEncoder: add AVC encoder pipeline support on KBL
Pengfei Qu [Mon, 20 Mar 2017 06:02:24 +0000 (14:02 +0800)]
Encoder: add AVC encoder pipeline support on KBL

Fixes #73

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
7 years agoENC: use common gpe structure in AVC encoder
Pengfei Qu [Mon, 20 Mar 2017 06:02:20 +0000 (14:02 +0800)]
ENC: use common gpe structure in AVC encoder

Fixes #73

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
7 years agoEncoder: add mbenc structure for KBL
Pengfei Qu [Mon, 20 Mar 2017 06:02:17 +0000 (14:02 +0800)]
Encoder: add mbenc structure for KBL

Fixes #73

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
7 years agoEncoder: add AVC const data for KBL
Pengfei Qu [Mon, 20 Mar 2017 06:02:13 +0000 (14:02 +0800)]
Encoder: add AVC const data for KBL

add member variable for KBL.

Fixes #73

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
7 years agoEncoder: add AVC kernel binary on KBL
Pengfei Qu [Mon, 20 Mar 2017 06:01:09 +0000 (14:01 +0800)]
Encoder: add AVC kernel binary on KBL

Fixes #73

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
7 years agointel-vaapi-driver 1.8.0.pre2
Xiang, Haihao [Thu, 16 Mar 2017 07:12:56 +0000 (15:12 +0800)]
intel-vaapi-driver 1.8.0.pre2

Update NEWS as well

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agoAvoid NULL pointer in avc_get_first_mb_bit_offset_with_epb()
Xiang, Haihao [Thu, 16 Mar 2017 05:32:13 +0000 (13:32 +0800)]
Avoid NULL pointer in avc_get_first_mb_bit_offset_with_epb()

This fixes https://github.com/01org/intel-vaapi-driver/issues/92

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit 1d43c90ae9f0cf40cabca11bd9f5abb06a31d8ef)

7 years agoAvoid NULL pointer in avc_get_first_mb_bit_offset_with_epb()
Xiang, Haihao [Thu, 16 Mar 2017 05:32:13 +0000 (13:32 +0800)]
Avoid NULL pointer in avc_get_first_mb_bit_offset_with_epb()

This fixes https://github.com/01org/intel-vaapi-driver/issues/92

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agoCheck pointers against NULL before using
Xiang, Haihao [Tue, 14 Mar 2017 07:18:37 +0000 (15:18 +0800)]
Check pointers against NULL before using

This fixes https://github.com/01org/intel-vaapi-driver/issues/90

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit ee5ccfbe72118a43c8f5da1a0304af4ca9fe15b7)

7 years agoCheck pointers against NULL before using
Xiang, Haihao [Tue, 14 Mar 2017 07:18:37 +0000 (15:18 +0800)]
Check pointers against NULL before using

This fixes https://github.com/01org/intel-vaapi-driver/issues/90

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agoFix:ROI number should be 4
Pengfei Qu [Wed, 15 Mar 2017 03:16:47 +0000 (11:16 +0800)]
Fix:ROI number should be 4

Fixes #88

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
(cherry picked from commit a0d92a8793028922ee1c1c0c2704c056e9a94a80)

7 years agoconfigure: change package tarball name to use hyphens
Daniel Charles [Mon, 13 Mar 2017 17:41:13 +0000 (10:41 -0700)]
configure: change package tarball name to use hyphens

Compilation scripts on different distributions (i.e. arch, gentoo) rely
on the tarball name to use hyphens between words.

This patch will create tarballs with hyphenated names and keep the
legacy package naming

TEST="make dist, should produce intel-vaapi-driver.tar.*"

Fixes #85

Signed-off-by: Daniel Charles <daniel.charles@intel.com>
(cherry picked from commit a06c385f99319abc541723b5e42f8e8db288a0f2)

7 years agoi965_decoder_utils: replace alloca(3) with malloc(3) and free(3)
Leonardo Taccari [Mon, 6 Mar 2017 21:40:25 +0000 (22:40 +0100)]
i965_decoder_utils: replace alloca(3) with malloc(3) and free(3)

alloca(3) usage is less portable than malloc(3)/free(3) (this fixes
issue #76 pointed out by building intel-vaapi-driver on NetBSD).

Suggested and thanks to @xhaihao and @yakuizhao via pull request #77.

Signed-off-by: Leonardo Taccari <iamleot@gmail.com>
(cherry picked from commit ef83d404e54cd797a9485ce0c4359ec0e6a8b759)

7 years agoAdd the support for GLK in the intel-driver
peng.chen [Fri, 10 Mar 2017 07:19:25 +0000 (02:19 -0500)]
Add the support for GLK in the intel-driver

Decoder and VPP are enabled with this patch.
Encoder will be enabled later.

Fix https://github.com/01org/intel-vaapi-driver/issues/80

Signed-off-by: Peng.Chen <peng.c.chen@intel.com>
Signed-off-by: Yu, JianKang <jiankang.yu@intel.com>
Signed-off-by: Wang, TianTian<tiantian.wang@intel.com>
7 years agoFix:ROI number should be 4
Pengfei Qu [Wed, 15 Mar 2017 03:16:47 +0000 (11:16 +0800)]
Fix:ROI number should be 4

Fixes #88

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
7 years agoconfigure: change package tarball name to use hyphens
Daniel Charles [Mon, 13 Mar 2017 17:41:13 +0000 (10:41 -0700)]
configure: change package tarball name to use hyphens

Compilation scripts on different distributions (i.e. arch, gentoo) rely
on the tarball name to use hyphens between words.

This patch will create tarballs with hyphenated names and keep the
legacy package naming

TEST="make dist, should produce intel-vaapi-driver.tar.*"

Fixes #85

Signed-off-by: Daniel Charles <daniel.charles@intel.com>
7 years agoi965_decoder_utils: replace alloca(3) with malloc(3) and free(3)
Leonardo Taccari [Mon, 6 Mar 2017 21:40:25 +0000 (22:40 +0100)]
i965_decoder_utils: replace alloca(3) with malloc(3) and free(3)

alloca(3) usage is less portable than malloc(3)/free(3) (this fixes
issue #76 pointed out by building intel-vaapi-driver on NetBSD).

Suggested and thanks to @xhaihao and @yakuizhao via pull request #77.

Signed-off-by: Leonardo Taccari <iamleot@gmail.com>
7 years agoFix src_obj_surf->orig_height assign to src_rect.height.
Lim Siew Hoon [Wed, 8 Mar 2017 11:51:22 +0000 (19:51 +0800)]
Fix src_obj_surf->orig_height assign to src_rect.height.

Fixes https://github.com/01org/intel-vaapi-driver/issues/79

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
7 years agoBump intel-vaapi-driver to 1.8.1.pre1 for development
Xiang, Haihao [Tue, 7 Mar 2017 15:53:17 +0000 (23:53 +0800)]
Bump intel-vaapi-driver to 1.8.1.pre1 for development

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agoUpdate NEWS for 1.8.0.pre1
Xiang, Haihao [Tue, 7 Mar 2017 06:37:49 +0000 (14:37 +0800)]
Update NEWS for 1.8.0.pre1

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agoFix the quality range regression issue
Pengfei Qu [Fri, 3 Mar 2017 09:46:19 +0000 (17:46 +0800)]
Fix the quality range regression issue

v1:
use bool to define the member
define the one map data for quality range according to the platform type

Fixed #72

For low quali# Please enter the commit message for your changes. Lines starting

7 years agoVDENC: Avoid using the first index reference frame for the invalid reference
Zhao Yakui [Mon, 6 Mar 2017 05:38:17 +0000 (13:38 +0800)]
VDENC: Avoid using the first index reference frame for the invalid reference

Maybe the ref_list_idx[0][X] is also initialized to zero even for the invalid
reference frame, which is also regarded as valid. In such case the
VDENC_PIPE_BUF will program the valid GPU address for the invalid reference.
   >For example: FWD Ref1 is invalid

Fix #70
https://github.com/01org/intel-vaapi-driver/issues/70

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoENC:support more quality level and switch to new AVC encoder solution on SKL/APL
Pengfei Qu [Tue, 14 Feb 2017 09:51:25 +0000 (17:51 +0800)]
ENC:support more quality level and switch to new AVC encoder solution on SKL/APL

v1:
add AVC encoder support on APL

Fixes #43

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
Reviewed-by: Sean V Kelley<seanvk@posteo.de>
7 years agoENC: add MFX pipeline for AVC encoder
Pengfei Qu [Tue, 14 Feb 2017 09:46:12 +0000 (17:46 +0800)]
ENC: add MFX pipeline for AVC encoder

MFX pipeline:
add MFX command for AVC encoder
add MFX Picture slice level command init for AVC
add MFX pipeline init prepare run for AVC encode
add VME/MFX context init for AVC encoder

v1:
set memory MOCS property

v2:
add Macro definition of the AVC quality level range

v3:
add check for the reference frame num.

Fixes #43

Reviewed-by: Sean V Kelley<seanvk@posteo.de>
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
7 years agoENC: add VME pipeline for AVC encoder
Pengfei Qu [Fri, 13 Jan 2017 05:56:04 +0000 (13:56 +0800)]
ENC: add VME pipeline for AVC encoder

VME pipeline:
add resource and surface allocation and free function
add init table for frame mbbrc update
add scaling kernel for AVC encoder
add BRC init reset kernel for AVC RC logic
add BRC frame update-kernel for AVC RC logic
add BRC MB level update kernel for AVC RC logic
add REF frame QA caculation and MB level const data
add MBENC kernel for AVC encoder
add ME kernel for AVC encoder
add WP/SFD kernel for AVC encoder
add kernel init/destroy function for AVC encoder
add kernel related parameter check function for AVC
add VME pipeline init prepare/run function for AVC encoder

v1:
allocate the 32x surface accordlingly.

Fixes #43

Reviewed-by: Sean V Kelley<seanvk@posteo.de>
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
7 years agoENC: add AVC common structure and functions
Pengfei Qu [Tue, 7 Feb 2017 08:55:40 +0000 (16:55 +0800)]
ENC: add AVC common structure and functions

v1:add kernel pointer for different platform

Fixes #43

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
Reviewed-by: Sean V Kelley<seanvk@posteo.de>
7 years agoENC: add kernel related structure and define for AVC
Pengfei Qu [Wed, 28 Dec 2016 02:17:02 +0000 (10:17 +0800)]
ENC: add kernel related structure and define for AVC

Fixes #43

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
Reviewed-by: Sean V Kelley<seanvk@posteo.de>
7 years agoENC: add AVC kernel binary on SKL
Pengfei Qu [Wed, 28 Dec 2016 02:13:35 +0000 (10:13 +0800)]
ENC: add AVC kernel binary on SKL

v1:move kernal array into the c file
v2:add file into Makefile.am
v3:use the Apache 2 license header for media kernel binary

Fixes #43

Reviewed-by: Sean V Kelley<seanvk@posteo.de>
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
7 years agoENC: add const data/table for AVC encoder
Pengfei Qu [Wed, 28 Dec 2016 02:10:06 +0000 (10:10 +0800)]
ENC: add const data/table for AVC encoder

v1:
add fies in the Makefile.am

Fixes #43

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
Reviewed-by: Sean V Kelley<seanvk@posteo.de>
7 years agoENC: add common structure for AVC encoder
Pengfei Qu [Wed, 28 Dec 2016 02:07:26 +0000 (10:07 +0800)]
ENC: add common structure for AVC encoder

v1:
add context init function for AVC encoder

v2:
add file in the Makefile.am

Fixes #43

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
Reviewed-by: Sean V Kelley<seanvk@posteo.de>
7 years agoENC: move gpe related function into src/i965_gpe_utils.h/c
Pengfei Qu [Wed, 28 Dec 2016 01:48:15 +0000 (09:48 +0800)]
ENC: move gpe related function into src/i965_gpe_utils.h/c

v1:
add align version for obj surface conversion to gpe surface
remove comments and enum value

v2:
use intel->media_mocs to configure the memory property

v3:
add maro definition for AVC status/ctl register

Fixes #43

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
Reviewed-by: Sean V Kelley<seanvk@posteo.de>
7 years agoUpdate license header for VP8/VP9 encoding kernels
Xiang, Haihao [Mon, 27 Feb 2017 04:58:55 +0000 (12:58 +0800)]
Update license header for VP8/VP9 encoding kernels

The VP8/VP9 encoding kernels are licensed under the Apache License, Version 2.0

This fixes https://github.com/01org/intel-vaapi-driver/issues/65

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agoJPEG Encoder: return supported pixel formats for vaQuerySurfaceAttributes
Hyunjun Ko [Wed, 22 Feb 2017 10:33:34 +0000 (19:33 +0900)]
JPEG Encoder: return supported pixel formats for vaQuerySurfaceAttributes

Since commit d540e43 landed, we can query with VAEntrypointEncPicture
entrypoint for jpeg encoder. But it doesn't still return some formats,
which jpeg encoder is capable of handling.

Fixes #60

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
7 years agoVDENC: Fix the incorrect shift in REF_IDX_STATE command
Zhao Yakui [Thu, 23 Feb 2017 08:27:43 +0000 (16:27 +0800)]
VDENC: Fix the incorrect shift in REF_IDX_STATE command

This is to fix the issue #63
https://github.com/01org/intel-vaapi-driver/issues/63

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoUpdate the README
Xiang, Haihao [Mon, 27 Feb 2017 02:41:34 +0000 (10:41 +0800)]
Update the README

Kaby Lake supports VP9 8bit encode and HEVC 10bit encode

This fixes https://github.com/01org/intel-vaapi-driver/issues/66

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agoconfigure: check for x11 on path
Daniel Charles [Tue, 21 Feb 2017 23:31:46 +0000 (15:31 -0800)]
configure: check for x11 on path

enable-x11 is set to yes by default and during configuration it has to
check for X11 header files on the path then the build system is prepared
to avoid compiling X11 related code if headers are not present.

Fixes #48

TEST="autogen.sh --prefix=<some prefix>, make sure X11 headers are not installed"
TEST="x11 should not print out as supported on the configure summary"

Signed-off-by: Daniel Charles <daniel.charles@intel.com>
7 years agoSet the pipeline to use the new VP8 encoding shaders on SKL/BXT/KBL
Xiang, Haihao [Tue, 10 Jan 2017 22:02:02 +0000 (14:02 -0800)]
Set the pipeline to use the new VP8 encoding shaders on SKL/BXT/KBL

v2: correct the license header in gen9_encoder_vp8.c

This is a portion of patches for VP8 rework on SKL/BXT/KBL

Fixes github.com/01org/intel-vaapi-driver/issues/40 now

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agoAdd new VP8 encoding shaders for SKL/BXT/KBL
Xiang, Haihao [Tue, 10 Jan 2017 22:02:01 +0000 (14:02 -0800)]
Add new VP8 encoding shaders for SKL/BXT/KBL

v2: add license header to each shader

This is a portion of patches for VP8 rework on SKL/BXT/KBL
github.com/01org/intel-vaapi-driver/issues/40

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoSet the pipeline to use the new VP8 encoding shaders on BSW
Xiang, Haihao [Tue, 10 Jan 2017 22:02:00 +0000 (14:02 -0800)]
Set the pipeline to use the new VP8 encoding shaders on BSW

Currently only one temporal layer is supported

v2:
Use OUT_RELOC64 instead of OUT_RELOC for 48 bits address
Fix the calculation of min_bit_rate in i965_encoder_vp8_get_misc_parameters()
Fix the calculation of average_bitrate and max_bitrate in i965_encoder_vp8_vme_brc_init_reset_set_curbe()
Move the constant tables copied & pasted from libvpx to separate files
Use the common MOCS state

v3:
Move all VP8 probability tables from a .h to a .c file
Rename vp8_quant.h to vpx_quant.h which can be used for both VP8 and VP9
Remove the unused search path in vp8_search_path and update the comment
Correct the license header in some files

v4:
Move all VP8 quantization tables from a .h to a .c file
Add 'static' or 'static const' to variables in local file scope
Free the private surface data if required

This is a portion of patches for VP8 rework on BSW

Fixes github.com/01org/intel-vaapi-driver/issues/39 now

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoAdd new VP8 encoding shaders for BSW
Xiang, Haihao [Tue, 10 Jan 2017 22:01:59 +0000 (14:01 -0800)]
Add new VP8 encoding shaders for BSW

v2: Add the license header to each shader

This is a portion of patches for VP8 rework on BSW
github.com/01org/intel-vaapi-driver/issues/39

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoFix the incorrect usage of buffer domain for VDENC
Zhao Yakui [Fri, 17 Feb 2017 07:55:12 +0000 (15:55 +0800)]
Fix the incorrect usage of buffer domain for VDENC

At the same time the cache is fixed for VDENC reference.

Fix the issue #56
https://github.com/01org/intel-vaapi-driver/issues/56

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agowayland: return error rather than assertion in case of invalid format
Hyunjun Ko [Fri, 17 Feb 2017 05:27:58 +0000 (14:27 +0900)]
wayland: return error rather than assertion in case of invalid format

return error instead of assertion, so that appilcation could handle
these cases.

Fixes #54

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
7 years agoMove the down-sampled NV12 surface handlers into the reconstructed surface's private...
peng.chen [Wed, 15 Feb 2017 05:17:15 +0000 (13:17 +0800)]
Move the down-sampled NV12 surface handlers into the reconstructed surface's private data from the input surface's for hevc encoder

Fixes #42.

Signed-off-by: peng.chen <peng.c.chen@intel.com>
7 years agoFix the linear P010 aborts bug for hevc main10 encoding.
peng.chen [Tue, 14 Feb 2017 01:07:44 +0000 (09:07 +0800)]
Fix the linear P010 aborts bug for hevc main10 encoding.

Fixes #41.

Signed-off-by: peng.chen <peng.c.chen@intel.com>
7 years agoWayland-drm: Fix not finding wl_drm_interface on systems with libglvnd
Hans de Goede [Wed, 15 Feb 2017 14:21:12 +0000 (15:21 +0100)]
Wayland-drm: Fix not finding wl_drm_interface on systems with libglvnd

We do not want just any libEGL.so.1 we want mesa's libEGL.so.1 as that
is the only way which defines the wl_drm_interface symbol we need,
one systems with libglvnd libEGL.so.1 is a dispatcher library provided
by libglvnd and the actual mesa libEGL we want is named libEGL_mesa.so.0
so try that first.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
7 years agoDo not return VA_STATUS_SUCCESS when checking (VAProfileVP9Profile0, VAEntrypointEncS...
Xiang, Haihao [Tue, 14 Feb 2017 06:25:51 +0000 (14:25 +0800)]
Do not return VA_STATUS_SUCCESS when checking (VAProfileVP9Profile0, VAEntrypointEncSlice) on SKL

SKL doesn't support VP9 hardware accelerated encoding, the hybrid driver also doesn't
support VP9 encoding.

This fixes https://github.com/01org/intel-vaapi-driver/issues/46

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agoQuery the Huc on APL/KBL to check whether VDENC BRC is supported
Zhao Yakui [Tue, 14 Feb 2017 06:52:40 +0000 (14:52 +0800)]
Query the Huc on APL/KBL to check whether VDENC BRC is supported

The VDENC BRC has the dependency on Huc. When the HUC is loaded,
it will return the corresponding BRC attribute.

Fix the issue #45
https://github.com/01org/intel-vaapi-driver/issues/44

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoFollow the HW requirement to configure VDENC on KBL
Zhao Yakui [Tue, 14 Feb 2017 06:52:40 +0000 (14:52 +0800)]
Follow the HW requirement to configure VDENC on KBL

V2->V3: Remove the write of MI_FLUSH between multi-slices
V1->V2: Save/Restore the macroblock_address for multi-slices
        Remove the unnecessary code of insert_one_zero_byte
    as the WA is always needed.

Fix the issue #44
https://github.com/01org/intel-vaapi-driver/issues/44

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoFix the incorrect ver-coord for VDENC encoding
Zhao Yakui [Tue, 14 Feb 2017 06:52:40 +0000 (14:52 +0800)]
Fix the incorrect ver-coord for VDENC encoding

Currently the ver-coord is wrong for VDENC command especially when multi-slices
are used.

Fix the issue #44
https://github.com/01org/intel-vaapi-driver/issues/44

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoVDENC: add the const prefix to avoid updating the const table
Zhao Yakui [Thu, 9 Feb 2017 09:20:46 +0000 (17:20 +0800)]
VDENC: add the const prefix to avoid updating the const table

Fix the issue #36
https://github.com/01org/intel-vaapi-driver/issues/36

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoJPEG Encoder: support vaQuerySurfaceAttributes() pixel format
Víctor Manuel Jáquez Leal [Wed, 8 Feb 2017 18:54:00 +0000 (19:54 +0100)]
JPEG Encoder: support vaQuerySurfaceAttributes() pixel format

When querying the surface attributes, using the JPEG encoder
(profile VAProfileJPEGBaseline, entrypoint VAEntrypointEncPicture)
the function doesn't return the available VASurfaceAttribPixelFormat
because it is not considered in the driver's code.

This patch returns the default pixel formats for encoders entry
points.

This error was reported in
https://bugzilla.gnome.org/show_bug.cgi?id=775490

Fixes #38

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
7 years agoconfig: Explicitly handle wayland-client pkgconfig
Sean V Kelley [Sat, 4 Feb 2017 08:04:44 +0000 (00:04 -0800)]
config: Explicitly handle wayland-client pkgconfig

Ensure deps are more robustly covered.

fixes #29

Signed-off-by: Sean V Kelley <seanvk@posteo.de>
7 years agoMerge pull request #28 from xhaihao/master
Sean V. Kelley [Sat, 4 Feb 2017 06:29:33 +0000 (22:29 -0800)]
Merge pull request #28 from xhaihao/master

1037U doesn't support encoding

7 years ago1037U doesn't support encoding
Xiang, Haihao [Fri, 3 Feb 2017 08:08:26 +0000 (16:08 +0800)]
1037U doesn't support encoding

1037U is recognized as Ivy Bridge, but actually 1037U doesn't
support encoding, so we have to add it into the cpu hook list.

Refer to https://github.com/01org/intel-vaapi-driver/issues/3 for more info.

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agoMerge pull request #25 from tmm1/add-missing-ifdef
Sean V. Kelley [Thu, 2 Feb 2017 20:05:22 +0000 (12:05 -0800)]
Merge pull request #25 from tmm1/add-missing-ifdef

i965: remove unnecessary code from i965_Terminate when compiling without HAVE_HYBRID_CODEC

7 years agoi965_drv: fix building with --enable-static
Aman Gupta [Thu, 2 Feb 2017 17:42:09 +0000 (09:42 -0800)]
i965_drv: fix building with --enable-static

Avoids compiling some unnecessary code in i965_Terminate when
building without HAVE_HYBRID_CODEC.

In particular, this removes the invocation to dlclose(), which
means the driver can be compiled without a dependency on libdl.
Previously, the generated libi965_drv_video.a could not be used
statically because it referenced dlclose(). The corresponding
dlopen() is already guarded behind the HAVE_HYBRID_CODEC flag.

Fixes #27

Signed-off-by: Aman Gupta <aman@tmm1.net>
7 years agoMerge pull request #23 from seanvk/remove_debiancontrols
Sean V. Kelley [Wed, 1 Feb 2017 23:56:02 +0000 (15:56 -0800)]
Merge pull request #23 from seanvk/remove_debiancontrols

debian: Remove legacy packaging

7 years agodebian: Remove legacy packaging
Sean V Kelley [Wed, 1 Feb 2017 19:44:10 +0000 (11:44 -0800)]
debian: Remove legacy packaging

debian control files are maintained by packagers

Yes there is a "convenience" factor to roll your
own debian package, but this is not maintained by
us and represents a fork from debian packagers.
As with the bit rot of libva.spec, remove this.

fixes #22

Signed-off-by: Sean V Kelley <seanvk@posteo.de>
7 years agoconfig: Update for github
Sean V Kelley [Wed, 1 Feb 2017 04:52:48 +0000 (20:52 -0800)]
config: Update for github

Signed-off-by: Sean V Kelley <seanvk@posteo.de>
7 years agoconfig: Update project name
Sean V Kelley [Wed, 1 Feb 2017 04:12:21 +0000 (20:12 -0800)]
config: Update project name

Signed-off-by: Sean V Kelley <seanvk@posteo.de>
7 years agotravis: Added new security list for scans
Sean V Kelley [Tue, 31 Jan 2017 05:40:07 +0000 (21:40 -0800)]
travis: Added new security list for scans

Signed-off-by: Sean V Kelley <seanvk@posteo.de>
7 years agogithub: Removed coveralls integration
Sean V Kelley [Tue, 31 Jan 2017 05:08:05 +0000 (21:08 -0800)]
github: Removed coveralls integration

Signed-off-by: Sean V Kelley <seanvk@posteo.de>
7 years agogithub: Added slack team info
Sean V Kelley [Tue, 31 Jan 2017 04:51:32 +0000 (20:51 -0800)]
github: Added slack team info

Signed-off-by: Sean V Kelley <seanvk@posteo.de>
7 years agotravis: Add support for coverity scan to travis
Sean V Kelley [Sun, 29 Jan 2017 23:05:58 +0000 (15:05 -0800)]
travis: Add support for coverity scan to travis

Signed-off-by: Sean V Kelley <seanvk@posteo.de>
7 years agogithub: Updated name for kanban
Sean V Kelley [Sun, 29 Jan 2017 02:18:30 +0000 (18:18 -0800)]
github: Updated name for kanban

Signed-off-by: Sean V Kelley <seanvk@posteo.de>
7 years agogithub: Updated mailing list
Sean V Kelley [Thu, 26 Jan 2017 23:10:19 +0000 (15:10 -0800)]
github: Updated mailing list

Also corrected link to filing new issues.

Signed-off-by: Sean V Kelley <seanvk@posteo.de>
7 years agogithub: Update contact info
Sean V Kelley [Thu, 26 Jan 2017 22:43:53 +0000 (14:43 -0800)]
github: Update contact info

Update with new mailing list and irc channel.

Signed-off-by: Sean V Kelley <seanvk@posteo.de>
7 years agotravis: Add hook to slack
Sean V Kelley [Mon, 23 Jan 2017 04:21:31 +0000 (20:21 -0800)]
travis: Add hook to slack

Add notifications for travis to slack

Signed-off-by: Sean V Kelley <seanvk@posteo.de>
7 years agogithub : Corrected project names
Sean V Kelley [Mon, 23 Jan 2017 02:22:16 +0000 (18:22 -0800)]
github : Corrected project names

Switched from interface to driver

Signed-off-by: Sean V Kelley <seanvk@posteo.de>
7 years agogithub: Add badges for github services
Sean V Kelley [Mon, 23 Jan 2017 02:17:42 +0000 (18:17 -0800)]
github: Add badges for github services

Add badges for waffle.io, travis, and coveralls

Signed-off-by: Sean V Kelley <seanvk@posteo.de>
7 years agotravis: Removed libva-dev from deps
Sean V Kelley [Mon, 23 Jan 2017 02:03:07 +0000 (18:03 -0800)]
travis: Removed libva-dev from deps

Building it locally, also had a typo.

Signed-off-by: Sean V Kelley <seanvk@posteo.de>
7 years agotravis: Added preliminary travis yml file
Sean V Kelley [Mon, 23 Jan 2017 01:56:48 +0000 (17:56 -0800)]
travis: Added preliminary travis yml file

This is a simple travis file.

Signed-off-by: Sean V Kelley <seanvk@posteo.de>
7 years agointel-vaapi-driver: Add github docs
Sean V Kelley [Mon, 23 Jan 2017 01:22:05 +0000 (17:22 -0800)]
intel-vaapi-driver: Add github docs

Adding documentation for the github site.

Signed-off-by: Sean V Kelley <seanvk@posteo.de>
7 years agolibva-intel-driver: fix i965 encoder wrong bits shift operation
Kuang-che Wu [Wed, 18 Jan 2017 18:51:29 +0000 (10:51 -0800)]
libva-intel-driver: fix i965 encoder wrong bits shift operation

shift uint32_t by 32 bits is undefined behavior.

For this particular case: when invoke avc_bitstream_put_ui() with 32
bits value at byte position of multiple of 4, existing 32 bits garbage
data in the buffer may be retained instead of cleared. The result is,
the position of NALU start code (0x00000001) looks like overwritten by
garbage value.

Patch has been tested and used upstream:
https://chromium-review.googlesource.com/#/c/410541/

Signed-off-by: Kuang-che Wu <kcwu@chromium.org>
Signed-off-by: Sean V Kelley <seanvk@posteo.de>
Reviewed-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agoFix the incorrect reference count of reconstructed_object for VP9 enc
Zhao Yakui [Tue, 17 Jan 2017 00:40:20 +0000 (08:40 +0800)]
Fix the incorrect reference count of reconstructed_object for VP9 enc

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoFix the incorrect 48-bit address reallocation
Zhao Yakui [Tue, 17 Jan 2017 00:40:19 +0000 (08:40 +0800)]
Fix the incorrect 48-bit address reallocation

Currently it works well for 32-bit address. But it will cause that the
upper 32-bit address is incorrect  if the 48-bit address buffer is allocated.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoFollow the HW spec to configure the buffer cache on Gen9+
Zhao Yakui [Tue, 17 Jan 2017 00:40:18 +0000 (08:40 +0800)]
Follow the HW spec to configure the buffer cache on Gen9+

The MOCS field is used to define the cache type for the given buffer. From the
SKL+, the MOCS field is interpreted as the index that is used to find the corresponding
cache type in kernel driver. The current MOCS setting causes that buffer uses
the wrong cache type.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Sean V Kelley <sean.v.kelley@intel.com>
7 years agoFix the incorrect configuration of media_pipeline power domain
Zhao Yakui [Tue, 17 Jan 2017 00:40:17 +0000 (08:40 +0800)]
Fix the incorrect configuration of media_pipeline power domain

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoH264 Encoding:Free aux_batchbuffer to configure access domain correctly for PAK_OBJ...
Zhao Yakui [Tue, 17 Jan 2017 00:40:16 +0000 (08:40 +0800)]
H264 Encoding:Free aux_batchbuffer to configure access domain correctly for PAK_OBJ command buffer

The access domain is not configured correctly for PAK_OBJ command buffer.
And it causes that the buffer content is not synchronized correctly.

At the same time the 64-byte is aligned for the boundary between
CPU and GPU access instead of 16-byte.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoRevert "ENC: move gpe related function into src/i965_gpe_utils.h/c"
Sean V Kelley [Tue, 17 Jan 2017 23:01:36 +0000 (15:01 -0800)]
Revert "ENC: move gpe related function into src/i965_gpe_utils.h/c"

This reverts commit e1783804bcb35385ffabaeeeb8b4cc3c03d513e0.

7 years agoRevert "ENC: add common structure for AVC/HEVC encoder"
Sean V Kelley [Tue, 17 Jan 2017 23:01:35 +0000 (15:01 -0800)]
Revert "ENC: add common structure for AVC/HEVC encoder"

This reverts commit d710462a41cac9b6d12aefab89734674084ab15f.

7 years agoRevert "ENC:add context init function for AVC/HEVC encoder"
Sean V Kelley [Tue, 17 Jan 2017 23:01:34 +0000 (15:01 -0800)]
Revert "ENC:add context init function for AVC/HEVC encoder"

This reverts commit 4679bb2de3d9f00287535c2abc5d5f16b389b69b.

7 years agoRevert "ENC: add const data/table for AVC encoder"
Sean V Kelley [Tue, 17 Jan 2017 23:01:34 +0000 (15:01 -0800)]
Revert "ENC: add const data/table for AVC encoder"

This reverts commit 4587664eba64f8ad4ed63c2b2dade8e0216a043f.