OSDN Git Service

android-x86/hardware-intel-common-vaapi.git
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

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

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/HEVC encoder
Pengfei Qu [Wed, 28 Dec 2016 02:07:26 +0000 (10:07 +0800)]
ENC: add common structure for AVC/HEVC encoder

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

Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoH.264 encoder: add a simple reactive VBR rate control mode
Mark Thompson [Tue, 10 Jan 2017 00:04:43 +0000 (00:04 +0000)]
H.264 encoder: add a simple reactive VBR rate control mode

This implements a simple reactive VBR rate control mode for single-layer H.264.
The primary aim here is to avoid the problematic behaviour that the CBR rate
controller displays on scene changes, where the QP can get pushed up by a large
amount in a short period and compromise the quality of following frames to a
very visible degree.

The main idea, then, is to try to keep the HRD buffering above the target level
most of the time, so that when a large frame is generated (on a scene change or
when the stream complexity increases) we have plenty of slack to be able to
encode the more difficult region without compromising quality immediately on
the following frames.   It is optimistic about the complexity of future frames,
so even after generating one or more large frames on a significant change it
will try to keep the QP at its current level until the HRD buffer bounds force
a change to maintain the intended rate.

Compared to the CBR rate controller, it keeps the quality level much more
stable - QP does not always spike up as large frames are generated when the
complexity of the stream increases transiently, but equally it does not reduce
as quickly when the complexity of the stream decreases.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
7 years ago1.8.0.pre1 for development
Xiang, Haihao [Mon, 9 Jan 2017 07:00:24 +0000 (15:00 +0800)]
1.8.0.pre1 for development

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agoMerge branch 'v1.7-branch' into fdo--master
Xiang, Haihao [Mon, 9 Jan 2017 06:00:06 +0000 (14:00 +0800)]
Merge branch 'v1.7-branch' into fdo--master

Conflicts:
configure.ac
src/gen6_mfc.h
src/gen6_mfc_common.c
src/gen75_picture_process.c
src/gen75_vpp_vebox.h
src/gen8_mfc.c
src/gen9_mfc_hevc.c
src/gen9_vdenc.c
src/gen9_vme.c
src/gen9_vp9_encoder.c
src/i965_drv_video.c
src/i965_drv_video.h
src/i965_encoder.c
src/i965_encoder.h
src/intel_driver.c
src/intel_driver.h
test/i965_avcd_config_test.cpp
test/i965_avce_config_test.cpp
test/i965_jpegd_config_test.cpp
test/i965_jpege_config_test.cpp

7 years agoEncoder: release all misc parameter buffers
Xiang, Haihao [Wed, 4 Jan 2017 01:40:48 +0000 (09:40 +0800)]
Encoder: release all misc parameter buffers

User can still use the old setting if needed because the setting is
stored in a common structure now.

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Mark Thompson <sw@jkqxz.net>
Tested-by: Mark Thompson <sw@jkqxz.net>
7 years agoAVC encoder: use generic ROI parameters
Xiang, Haihao [Wed, 4 Jan 2017 01:40:47 +0000 (09:40 +0800)]
AVC encoder: use generic ROI parameters

Presently ROI parameters are stored in the common structure, each
codec can use these parameters.

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agoH.264 encoder: respect initial QP setting
Mark Thompson [Wed, 4 Jan 2017 09:15:06 +0000 (09:15 +0000)]
H.264 encoder: respect initial QP setting

Signed-off-by: Mark Thompson <sw@jkqxz.net>
Reviewed-by: Xiang, Haihao<haihao.xiang@intel.com>
7 years agoH.264 encoder: respect min QP setting
Mark Thompson [Tue, 3 Jan 2017 23:43:38 +0000 (23:43 +0000)]
H.264 encoder: respect min QP setting

Signed-off-by: Mark Thompson <sw@jkqxz.net>
Reviewed-by: Xiang, Haihao<haihao.xiang@intel.com>
7 years agoInitialize some buffers to 0 when created
Xiang, Haihao [Fri, 30 Dec 2016 07:21:59 +0000 (15:21 +0800)]
Initialize some buffers to 0 when created

Sometimes user doesn't assign a proper value to each field in a buffer
when calling vaRenderPicture(), which will result in random issues
if we want to use these fields in the future. E.g. recently we used
window_size in VAEncMiscParameterRateControl for bitrate control.

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoNeedn't reset brc if the bitrate setting isn't changed in the Begin/Render/End sequence
Xiang, Haihao [Wed, 14 Dec 2016 03:03:59 +0000 (11:03 +0800)]
Needn't reset brc if the bitrate setting isn't changed in the Begin/Render/End sequence

User can use VAEncMiscParameterRateControl to update bitrate, so we should ignore
the bitrate in the sequence parameter if VAEncMiscParameterRateControl is present.
Hence it is not needed to reset brc if VAEncMiscParameterRateControl doesn't change
the used bitrate.

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoAdd new sequence flag check for HEVC/VP9 Encoding
Zhao Yakui [Wed, 28 Dec 2016 05:45:28 +0000 (13:45 +0800)]
Add new sequence flag check for HEVC/VP9 Encoding

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Xiang, Haihao<haihao.xiang@intel.com>
7 years agoSupport AVC VDEnc on KBL
Xiang, Haihao [Fri, 23 Dec 2016 16:58:04 +0000 (00:58 +0800)]
Support AVC VDEnc on KBL

I verified AVC VDEnc on KBL with the HuC loading patch from
https://patchwork.freedesktop.org/api/1.0/series/16584/revisions/1/mbox/

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Kelley, Sean V <sean.v.kelley@intel.com>
Tested-by: Tang, FuweiX <fuweix.tang@intel.com>
7 years agoEnable AVC VDEnc on BXT
Xiang, Haihao [Fri, 16 Dec 2016 07:21:43 +0000 (15:21 +0800)]
Enable AVC VDEnc on BXT

I verified AVC VDEnc with the HuC loading patch from
https://patchwork.freedesktop.org/api/1.0/series/16584/revisions/1/mbox/

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Tang, FuweiX <fuweix.tang@intel.com>
7 years agoVDEnc: update the constant buffer
Xiang, Haihao [Fri, 23 Dec 2016 16:01:53 +0000 (00:01 +0800)]
VDEnc: update the constant buffer

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Kelley, Sean V <sean.v.kelley@intel.com>
7 years agoVDEnc: update the value of inter rounding for CQP mode
Xiang, Haihao [Fri, 23 Dec 2016 16:01:52 +0000 (00:01 +0800)]
VDEnc: update the value of inter rounding for CQP mode

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Kelley, Sean V <sean.v.kelley@intel.com>
7 years agoVDEnc: update the MFX_AVC_IMG_STATE command
Xiang, Haihao [Fri, 23 Dec 2016 16:01:51 +0000 (00:01 +0800)]
VDEnc: update the MFX_AVC_IMG_STATE command

Don't enable brc domain rate control if HuC is not used.

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Kelley, Sean V <sean.v.kelley@intel.com>
7 years agoVDEnc: always enable bitrate control per mb
Xiang, Haihao [Fri, 23 Dec 2016 16:01:50 +0000 (00:01 +0800)]
VDEnc: always enable bitrate control per mb

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Kelley, Sean V <sean.v.kelley@intel.com>
7 years agoVP9 encoder: use generic rate control parameters
Mark Thompson [Fri, 23 Dec 2016 01:11:38 +0000 (01:11 +0000)]
VP9 encoder: use generic rate control parameters

Also adds support for fractional framerate.

Signed-off-by: Mark Thompson <sw@jkqxz.net>
Reviewed-by: Xiang, Haihao<haihao.xiang@intel.com>
7 years agoVP8 encoder: use generic rate control parameters
Mark Thompson [Fri, 23 Dec 2016 01:10:49 +0000 (01:10 +0000)]
VP8 encoder: use generic rate control parameters

Signed-off-by: Mark Thompson <sw@jkqxz.net>
Reviewed-by: Xiang, Haihao<haihao.xiang@intel.com>
7 years agoHEVC encoder: use generic rate control parameters
Mark Thompson [Fri, 23 Dec 2016 01:10:04 +0000 (01:10 +0000)]
HEVC encoder: use generic rate control parameters

Signed-off-by: Mark Thompson <sw@jkqxz.net>
Reviewed-by: Xiang, Haihao<haihao.xiang@intel.com>
7 years agoi965_encoder: consistently represent framerate as a fraction
Mark Thompson [Fri, 23 Dec 2016 01:08:27 +0000 (01:08 +0000)]
i965_encoder: consistently represent framerate as a fraction

Update references in both H.264 encoders (gen6_mfc and gen9_vdenc).

Signed-off-by: Mark Thompson <sw@jkqxz.net>
Reviewed-by: Xiang, Haihao<haihao.xiang@intel.com>
7 years agoH.265 main 10 encoder supports only 10bpp render targets
Mark Thompson [Mon, 5 Dec 2016 17:54:58 +0000 (17:54 +0000)]
H.265 main 10 encoder supports only 10bpp render targets

Signed-off-by: Mark Thompson <sw@jkqxz.net>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoCheck VP8 brc parameters in the common function
Xiang, Haihao [Mon, 28 Nov 2016 07:35:21 +0000 (15:35 +0800)]
Check VP8 brc parameters in the common function

These parameters are irrelative to platforms

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agoAdd a function table for used GPE functions
Xiang, Haihao [Fri, 18 Nov 2016 07:01:37 +0000 (15:01 +0800)]
Add a function table for used GPE functions

It is useful for sharing GPE based code between different platforms
Currently it is available on GEN8+

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoRename gen9_gpe_mi_load_register_xxx() to gen8_gpe_mi_load_register_xxx()
Xiang, Haihao [Tue, 29 Nov 2016 05:22:18 +0000 (13:22 +0800)]
Rename gen9_gpe_mi_load_register_xxx() to gen8_gpe_mi_load_register_xxx()

xxx is mem/imm/reg and the 3 functions can be used for GEN8 too

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agoDon't parse Misc parameters in VDEnc
Xiang, Haihao [Tue, 22 Nov 2016 07:46:22 +0000 (15:46 +0800)]
Don't parse Misc parameters in VDEnc

Instead we can use the parameters saved in the common encoder context.
It also corrects frame rate used in VDEnc

v2: Align the ROI region and fix compile error after rebase

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoSave other bitrate control parameters in the common encoder context
peng.chen [Mon, 21 Nov 2016 07:41:37 +0000 (15:41 +0800)]
Save other bitrate control parameters in the common encoder context

These parameters can be used for all codecs

v2: Save mb_rate_control/target_percentage per layer too

Signed-off-by: peng.chen <peng.c.chen@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoSave ROI parameters in the common encoder context
peng.chen [Fri, 18 Nov 2016 02:47:01 +0000 (10:47 +0800)]
Save ROI parameters in the common encoder context

These parameters can be used for all codecs

v2: Don't align ROI region, each codec might have
special requirement

Signed-off-by: peng.chen <peng.c.chen@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoRewrite Media_kernel to optimize the YUV420 8Bit-scaling on Gen8
Zhao Yakui [Thu, 24 Nov 2016 01:04:12 +0000 (20:04 -0500)]
Rewrite Media_kernel to optimize the YUV420 8Bit-scaling on Gen8

The following conversion is supported:
NV12->NV12
NV12->I420
I420->NV12
I420->I420

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Xiang, Haihao<haihao.xiang@intel.com>
7 years agoRewrite Media_kernel to optimize the YUV420 8Bit-scaling on Gen9+
Zhao Yakui [Thu, 24 Nov 2016 01:04:11 +0000 (20:04 -0500)]
Rewrite Media_kernel to optimize the YUV420 8Bit-scaling on Gen9+

V1->V2: Add the support of clearing background color for NV12

The following conversion is supported:
NV12->NV12
NV12->I420
I420->NV12
I420->I420

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Xiang, Haihao<haihao.xiang@intel.com>
7 years agoMove some VPP structures/functions into the common files to support more platforms
Zhao Yakui [Thu, 24 Nov 2016 01:04:10 +0000 (20:04 -0500)]
Move some VPP structures/functions into the common files to support more platforms

This is to define some common structures/functions so that they can
be used on more platforms when adding new VPP functions.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Xiang, Haihao<haihao.xiang@intel.com>
7 years agoi965_GetDisplayAttributes: propagate flags from src to dst
Daniel Charles [Tue, 22 Nov 2016 00:23:27 +0000 (16:23 -0800)]
i965_GetDisplayAttributes: propagate flags from src to dst

flags need to be propagated for user to know which flags
are supported by VADisplayAttribType.

When only VA_DISPLAY_ATTRIB_SETTABLE is reported as flag
then it has to be propagated back to user.  The rest of the
values should be left untouched

Signed-off-by: Daniel Charles <daniel.charles@intel.com>
7 years agoAdd the 10bit-scaling conversion for I010 format
Zhao Yakui [Sun, 20 Nov 2016 19:41:45 +0000 (14:41 -0500)]
Add the 10bit-scaling conversion for I010 format

I010 format is another kind of 10-bit surface. And its layout is similar to I420.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoAdd the support of 10bit I010 surface
Zhao Yakui [Sun, 20 Nov 2016 19:41:44 +0000 (14:41 -0500)]
Add the support of 10bit I010 surface

And it is treated as non-tiling for I010 surfaces, which is like I420.
Every pixel also uses two bytes like P010 but it occupies the lower 10-bit.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoUse obtained eu_counts to configure GPU media pipeline on Gen8/Gen9
Zhao Yakui [Sun, 20 Nov 2016 19:41:43 +0000 (14:41 -0500)]
Use obtained eu_counts to configure GPU media pipeline on Gen8/Gen9

If it is not supported, it will fall back to the original config.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Charles Daniel <daniel.charles@intel.com>
7 years agoQuery the kernel API to check the EU counts of GPU device
Zhao Yakui [Sun, 20 Nov 2016 19:41:42 +0000 (14:41 -0500)]
Query the kernel API to check the EU counts of GPU device

This info can be used to configure the max EU threads of GPU device.
>eu_total * 6

V2->V3: Refresh the patches again.
V1->V2: Remove the extra bit_field of has_eu_flag. Instead the eu_total > 0
can be used.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Charles Daniel <daniel.charles@intel.com>
7 years agoAdd a new gpe function gen8_gpe_pipe_control() for GEN8
Xiang, Haihao [Thu, 10 Nov 2016 17:42:44 +0000 (01:42 +0800)]
Add a new gpe function gen8_gpe_pipe_control() for GEN8

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoAdd a new gpe function gen8_gpe_mi_conditional_batch_buffer_end() for GEN8
Xiang, Haihao [Thu, 10 Nov 2016 14:13:44 +0000 (22:13 +0800)]
Add a new gpe function gen8_gpe_mi_conditional_batch_buffer_end() for GEN8

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoAdd a new gpe function gen8_gpe_context_add_surface() to set surface state on GEN8
Xiang, Haihao [Thu, 10 Nov 2016 15:48:06 +0000 (23:48 +0800)]
Add a new gpe function gen8_gpe_context_add_surface() to set surface state on GEN8

v2: Add support for override_offset, clean up the code for 2D surface.

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoAdd a new gpe function gen8_gpe_reset_binding_table() to reset binging table
Xiang, Haihao [Thu, 10 Nov 2016 14:05:26 +0000 (22:05 +0800)]
Add a new gpe function gen8_gpe_reset_binding_table() to reset binging table

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoRename gen9_gpe_mi_store_register_mem() to gen8_gpe_mi_store_register_mem()
Xiang, Haihao [Thu, 10 Nov 2016 16:49:28 +0000 (00:49 +0800)]
Rename gen9_gpe_mi_store_register_mem() to gen8_gpe_mi_store_register_mem()

This function can be used on GEN8 too

v2: rebased

v3: Fix commit log

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoRename gen9_gpe_mi_flush_dw() to gen8_gpe_mi_flush_dw()
Xiang, Haihao [Thu, 10 Nov 2016 16:48:51 +0000 (00:48 +0800)]
Rename gen9_gpe_mi_flush_dw() to gen8_gpe_mi_flush_dw()

This function can be used on GEN8 too

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoRename gen9_gpe_mi_store_data_imm() to gen8_gpe_mi_store_data_imm()
Xiang, Haihao [Thu, 10 Nov 2016 16:48:02 +0000 (00:48 +0800)]
Rename gen9_gpe_mi_store_data_imm() to gen8_gpe_mi_store_data_imm()

This function can be used on GEN8 too

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoRename gen9_gpe_mi_batch_buffer_start() to gen8_gpe_mi_batch_buffer_start()
Xiang, Haihao [Thu, 10 Nov 2016 16:16:06 +0000 (00:16 +0800)]
Rename gen9_gpe_mi_batch_buffer_start() to gen8_gpe_mi_batch_buffer_start()

This function can be used on GEN8 too

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoRename gen9_gpe_media_object_walker() to gen8_gpe_media_object_walker()
Xiang, Haihao [Thu, 10 Nov 2016 16:30:50 +0000 (00:30 +0800)]
Rename gen9_gpe_media_object_walker() to gen8_gpe_media_object_walker()

This function can be used on GEN8 too

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoRename i965_gpe_dri_object_to_2d_gpe_resource() to i965_dri_object_to_2d_gpe_resource()
Xiang, Haihao [Tue, 25 Oct 2016 07:32:49 +0000 (15:32 +0800)]
Rename i965_gpe_dri_object_to_2d_gpe_resource() to i965_dri_object_to_2d_gpe_resource()

Like as i965_dri_object_to_buffer_gpe_resource(), use i965_ instead of i965_gpe_ as prefix

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoRename gen8p_gpe_context_map_curbe()/gen8p_gpe_context_unmap_curbe() to i965_gpe_cont...
Xiang, Haihao [Tue, 25 Oct 2016 07:25:15 +0000 (15:25 +0800)]
Rename gen8p_gpe_context_map_curbe()/gen8p_gpe_context_unmap_curbe() to i965_gpe_context_map_curbe()/i965_gpe_context_unmap_curbe()

gpe_context->curbe.bo always points to the curbe buffer now, and the two functions
can be used on all platforms

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoFix curbe length in CMD_MEDIA_CURBE_LOAD on GEN8+
Xiang, Haihao [Thu, 9 Apr 2015 01:52:44 +0000 (09:52 +0800)]
Fix curbe length in CMD_MEDIA_CURBE_LOAD on GEN8+

It is multiple of 64 bytes

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoFix the size calculation of the required memory for dynamic state buffer
Xiang, Haihao [Thu, 9 Apr 2015 01:52:44 +0000 (09:52 +0800)]
Fix the size calculation of the required memory for dynamic state buffer

Make sure the size for each part in dynamic state buffer is multiple of 64 bytes.

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoMove sampler state related settings to the inner structure in i965_gpe_context
Xiang, Haihao [Wed, 8 Apr 2015 08:10:25 +0000 (16:10 +0800)]
Move sampler state related settings to the inner structure in i965_gpe_context

User can set sampler entry size and the number of sampler entries now. sampler.bo is
always set even if the sampler state is a part of the dynamic state buffer, hence we
can use the corresponding settings no matter sampler state is a part of the dynamic
state buffer or not.

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoMove interface descriptor remapping table related settings to the inner structure...
Xiang, Haihao [Wed, 8 Apr 2015 07:58:35 +0000 (15:58 +0800)]
Move interface descriptor remapping table related settings to the inner structure in i965_gpe_context

This patch delete idrt_size and use (idrt.max_entries * idrt.entry_size) instead.
idrt.bo is always set even if the interface descriptor remapping table is a part of
the dynamic state buffer, hence we can use the corresponding settings no matter this
table is a part of the dynamic state buffer or not.

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoMove all curbe related settings to the inner structure in i965_gpe_context
Xiang, Haihao [Wed, 8 Apr 2015 07:42:17 +0000 (15:42 +0800)]
Move all curbe related settings to the inner structure in i965_gpe_context

To avoid confusion between curbe.length and curbe_size, this patch uses
curbe.length only. curbe.bo is always set even if curbe is a part of the
dynamic state buffer, hence we can use curbe related settings no matter
it is a part of the dynamic state buffer or not.

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoChange the size calculation of the required memory for all GPE kernels
Xiang, Haihao [Tue, 7 Apr 2015 07:40:30 +0000 (15:40 +0800)]
Change the size calculation of the required memory for all GPE kernels

Make sure the size is multiple of 64 bytes

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoi965_driver_info: add vp9_enc_profiles
Daniel Charles [Thu, 17 Nov 2016 01:20:02 +0000 (17:20 -0800)]
i965_driver_info: add vp9_enc_profiles

Not all profiles for vp9 are supported by the encoder and user needs
to know about it

Signed-off-by: Daniel Charles <daniel.charles@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
7 years agoAlign coordinate/width of DST rect for 10-bit VPP conversion
Zhao Yakui [Wed, 16 Nov 2016 17:23:44 +0000 (12:23 -0500)]
Align coordinate/width of DST rect for 10-bit VPP conversion

This is the HW requirement and it is handled internally.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Xiang, Haihao<haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoExecute the 10-bit scaling for P010 surface on Gen9+
Zhao Yakui [Wed, 16 Nov 2016 17:23:43 +0000 (12:23 -0500)]
Execute the 10-bit scaling for P010 surface on Gen9+

Now the 10-bit scaling based on GPU shader is supported on Gen9+. In such
case it will use the 10-bit scaling based on GPU shader instead of three-step
conversions, which leverages the VEBOX(P010->NV12->Scale NV12->P010). Of
course when the size is not changed, it still falls back to VEBOX.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Xiang, Haihao<haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoVPP select the appropriate fourcc for deferred surface based on expected format
Zhao Yakui [Wed, 16 Nov 2016 17:23:42 +0000 (12:23 -0500)]
VPP select the appropriate fourcc for deferred surface based on expected format

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Xiang, Haihao<haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoInitialize one 10bit-scaling gpe_context for Gen9
Zhao Yakui [Wed, 16 Nov 2016 17:23:41 +0000 (12:23 -0500)]
Initialize one 10bit-scaling gpe_context for Gen9

V1->V2: Add the conv_p010.g9b shader into the dist list

V3: remove the compiler warnings

gen9_vme.c: In function 'gen9_intel_init_hevc_surface':
gen9_vme.c:1836:9: warning: implicit declaration of function 'i965_image_processing' [-Wimplicit-function-declaration]

i965_render.c: In function 'intel_render_put_surface':
i965_render.c:3079:5: warning: implicit declaration of function 'i965_post_processing' [-Wimplicit-function-declaration]

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoInitialize internal context based on Render ring earlier
Zhao Yakui [Wed, 16 Nov 2016 17:23:40 +0000 (12:23 -0500)]
Initialize internal context based on Render ring earlier

V1->V2: Remove the unnecessary implicit initialization in gen75_vpp_fmt_cvt
as it is already initalized.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoAdd one API to initialize MEDIA_OBJECT_WALKER parameter for video post-processing
Zhao Yakui [Wed, 16 Nov 2016 17:23:39 +0000 (12:23 -0500)]
Add one API to initialize MEDIA_OBJECT_WALKER parameter for video post-processing

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Xiang, Haihao<haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoAdd the 10-bit flag for MEDIA_BLOCK_RW operation on P010 surface
Zhao Yakui [Wed, 16 Nov 2016 17:23:38 +0000 (12:23 -0500)]
Add the 10-bit flag for MEDIA_BLOCK_RW operation on P010 surface

V1->V2: Use the is_16bpp instead of is_10bit

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoFix the incorrect sampler_state offset for INTERFACE_DESCRIPTOR_DATA on BDW+
Zhao Yakui [Wed, 16 Nov 2016 17:23:37 +0000 (12:23 -0500)]
Fix the incorrect sampler_state offset for INTERFACE_DESCRIPTOR_DATA on BDW+

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Xiang, Haihao<haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoavoid asserts when color convertion fails
Víctor Manuel Jáquez Leal [Mon, 14 Nov 2016 14:44:29 +0000 (15:44 +0100)]
avoid asserts when color convertion fails

This patch exposes the color convertion failure in this case

gst-play-1.0 HPCAMOLQ_BRCM_B.264 --videosink=xvimagesink

This pipeline will ask to the VPP to convert from GRAY8 to YV12,
which is the negotiated format with the XV renderer.

But this conversion fails. Without this patch, an assert will show
up:

i965_proc_picture(VADriverContextP, VAProfile, union codec_state *,
struct hw_context *): Assertion `status == 0x00000000' failed.

With this patch, the error is handled correctly, throwing a
meaningful error in GStreamer:

0:00:00.802303348  3584 0x7feff0003400 ERROR          vaapipostproc
gstvaapipostproc.c:805:gst_vaapipostproc_process_vpp:<vaapipostproc0>
failed to apply VPP filters (error 2)

Though, the correct fix implies to enable VPP with this color
conversion.

Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoi965_test_config: return properly unsupported profile
Daniel Charles [Thu, 10 Nov 2016 23:08:20 +0000 (15:08 -0800)]
i965_test_config: return properly unsupported profile

jpege/jpegd and avce/avcd config tests to check against all supported
entrypoints for a profile.  UNSUPPORTED_PROFILE is expected
when no entrypoints are available for a given profile, else
expect UNSUPPORTED_ENTRYPOINT.

Signed-off-by: Daniel Charles <daniel.charles@intel.com>
Reviewed-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
7 years agoi965_validate_config: return unsupported profile
Daniel Charles [Thu, 10 Nov 2016 23:08:19 +0000 (15:08 -0800)]
i965_validate_config: return unsupported profile

When all the profiles are not supported return
VA_STATUS_ERROR_UNSUPPORTED_PROFILE instead of
VA_STATUS_ERROR_UNSUPPORTED_ENTRYPOINT.

Also change the style on the code modified to be common
on all cases

Signed-off-by: Daniel Charles <daniel.charles@intel.com>
Reviewed-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
7 years agoAdd the missing filename to the list
Xiang, Haihao [Thu, 10 Nov 2016 02:29:55 +0000 (10:29 +0800)]
Add the missing filename to the list

Otherwise the package created by 'make dist' doesn't include the
missing file

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit ed6baee7d523d512ac296d71132c26b37c0d818a)

7 years agolibva-intel-driver 1.7.3
Xiang, Haihao [Thu, 10 Nov 2016 01:43:06 +0000 (09:43 +0800)]
libva-intel-driver 1.7.3

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agoAdd the missing filename to the list
Xiang, Haihao [Thu, 10 Nov 2016 02:29:55 +0000 (10:29 +0800)]
Add the missing filename to the list

Otherwise the package created by 'make dist' doesn't include the
missing file

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
7 years ago1.7.4.pre1 for development
Xiang, Haihao [Thu, 10 Nov 2016 00:39:56 +0000 (08:39 +0800)]
1.7.4.pre1 for development

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agoUpdate NEWS
Xiang, Haihao [Mon, 31 Oct 2016 05:57:30 +0000 (13:57 +0800)]
Update NEWS

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agotest: use YUVImage in JPEG encode tests
U. Artie Eoff [Wed, 26 Oct 2016 20:24:19 +0000 (13:24 -0700)]
test: use YUVImage in JPEG encode tests

The YUVImage class allows for more efficient (faster)
operations on the YUV input/output of these tests.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 77ff763fa44c36d3154ee9267e9eb940dd4c10fc)

7 years agotest: streamable valarray
U. Artie Eoff [Wed, 26 Oct 2016 20:24:18 +0000 (13:24 -0700)]
test: streamable valarray

Add stream operators for std::valarray.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 2bbdc90be2f41198619c073ce1409dc5c64334dc)

7 years agotest: add YUVImage class
U. Artie Eoff [Wed, 26 Oct 2016 20:24:17 +0000 (13:24 -0700)]
test: add YUVImage class

Add a class that employs std::valarray and std::slice
to manage YUV input/output data.  Using valarray's and
slice's are generally more efficient than std::vector
in most test use cases where YUV data is needed.

Current test cases that are using different (yet
similar) code to manage it's own YUV input/output
data can eventually converge onto use of this common
class instead.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit fd26aa497dff3361e31e3d99066915a34a67ae64)

7 years agotest: use C random library for random numbers
U. Artie Eoff [Wed, 26 Oct 2016 20:24:16 +0000 (13:24 -0700)]
test: use C random library for random numbers

The speed of random number generation can have a
significant impact on test execution time when
initializing large arrays of random values. The C++
random number engines and generators are much slower
than std::rand.

Thus, use C's rand() to generate pseudo-random values
within a given [min,max] range.  For testing purposes,
deterministic sequences would be preferable anyway.
That is, if a particular sequence exposes a test failure,
then we can reproduce it later.  Also, we seed the
pseudo-random number generator with the current time
so that the sequence is not always the same across
executions.  The seed is then recorded in the test
results so that the sequence can be reproduced if
needed.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 9edf73284039f31720eb03f4c2196bb7c4dd033f)

7 years agotest: add a timer class
U. Artie Eoff [Wed, 26 Oct 2016 20:24:15 +0000 (13:24 -0700)]
test: add a timer class

The timer is useful to quickly instrument various sections
of code during test development optimization tasks or other
timing needs.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 1eae2167650c5159b510534d022cf79e38c9799c)

7 years agovdenc: Always use the 1st VCS ring
Xiang, Haihao [Fri, 28 Oct 2016 05:32:39 +0000 (13:32 +0800)]
vdenc: Always use the 1st VCS ring

VDEnc/HuC only works with the 1st VCS ring, however SKL GT3+ has 2 VCS rings.
To avoid executing the corresponding batch buffer from the 2nd VCS ring in i915, we
have to specify the 1st ring in the driver.

SKL GT1/GT2 has only one VCS ring, so specifying the 1st ring in the driver has no
any impact to GT1/GT2

v2: Use the right bug URL

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97872
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 63b98a529522385254c0f50dfb8e566679017c89)

7 years agosvct: hrd check per layer
Xiang, Haihao [Thu, 27 Oct 2016 14:41:46 +0000 (22:41 +0800)]
svct: hrd check per layer

Hence we can use separate parameters to estimate QP per layer and get more
accurate QP for next frame in the same layer.

Tested-by: Wang, Fei W <fei.w.wang@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 972c1c67fbfb83f37a6aef7af7be32ffbdc7f7f8)

7 years agosvct: Adjust the estimated frame size for QP=1
Xiang, Haihao [Mon, 24 Oct 2016 04:49:42 +0000 (12:49 +0800)]
svct: Adjust the estimated frame size for QP=1

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit f4656a78b80d9cf402ddc86b2d0261359623e180)

7 years agosvct: Save the frame numbers for each frame type in a GOP per layer
Xiang, Haihao [Mon, 24 Oct 2016 04:49:41 +0000 (12:49 +0800)]
svct: Save the frame numbers for each frame type in a GOP per layer

Use the right frame numbers in a GOP to estimate a QP for next frame

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 218cca1856bfae6090a842342522a9018d6a328a)

7 years agosvct: Save the current slice type per layer
Xiang, Haihao [Mon, 24 Oct 2016 04:49:40 +0000 (12:49 +0800)]
svct: Save the current slice type per layer

Use the right previous slice type to estimate a QP for next frame
in the same layer

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 36003e66b46bdb740813c021fe61dcd5538f1e11)

7 years agosvct: Save the current frame size per layer
Xiang, Haihao [Mon, 24 Oct 2016 04:49:39 +0000 (12:49 +0800)]
svct: Save the current frame size per layer

Use the the right previous frame size to estimate a QP for next frame in the
same layer

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 495e905a7c6e05c3b6a9c0c81f153f56aafcb759)

7 years agosvct: Usa an array to store QP rounding accumulator
Xiang, Haihao [Mon, 24 Oct 2016 04:49:38 +0000 (12:49 +0800)]
svct: Usa an array to store QP rounding accumulator

We can do QP compensation per layer.

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 755bed214e30b1ea96f88f3f5011bdff228ee3c8)

7 years agoUse Media Read message if possible on Gen8+
Xiang, Haihao [Wed, 12 Oct 2016 19:07:45 +0000 (03:07 +0800)]
Use Media Read message if possible on Gen8+

AVS can't gurantee bit-match for a large surface. This fixes the
failure reported by gtest case Common/JPEGEncodeInputTest.Full/95.

before:
[  FAILED  ] Common/JPEGEncodeInputTest.Full/95, where GetParam() = (Fixed Size 7680x4320, 0x501176 pointing to "I420") (9239 ms)
[----------] 1 test from Common/JPEGEncodeInputTest (9239 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (9361 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] Common/JPEGEncodeInputTest.Full/95, where GetParam() = (Fixed Size 7680x4320, 0x501176 pointing to "I420")

after:
[       OK ] Common/JPEGEncodeInputTest.Full/95 (15250 ms)
[----------] 1 test from Common/JPEGEncodeInputTest (15250 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (15365 ms total)
[  PASSED  ] 1 test.

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Tested-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 78b6841fa3e247f15005ea3450d8404c59938ac3)

7 years agotest: use valarray for raw image comparison
Scott D Phillips [Mon, 17 Oct 2016 20:00:51 +0000 (13:00 -0700)]
test: use valarray for raw image comparison

std::valarray can fuse elementwise operations across arrays for
more efficient comparison.

Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com>
Reviewed-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
(cherry picked from commit 852cea1cdfc83e0b6531dfefda14badafc9ee206)

7 years agovpp chroma-formats: report supported chroma formats for vpp
Daniel Charles [Thu, 13 Oct 2016 16:58:08 +0000 (09:58 -0700)]
vpp chroma-formats: report supported chroma formats for vpp

vpp to report the chroma formats according to what's allowed
by vaCreateSurfaces2

Signed-off-by: Daniel Charles <daniel.charles@intel.com>
Reviewed-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit e748bc7f0565d59a7ec2ba038e76a0a1de19c15c)

7 years agotest: add some avce context tests
U. Artie Eoff [Tue, 11 Oct 2016 19:21:46 +0000 (12:21 -0700)]
test: add some avce context tests

Add some simple avce context tests to verify various
encode context fields are appropriately configured.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit fc7bd0639a83b182b6e8a02217b22fd544253e08)

7 years agotest: allow default attribs param for create config
U. Artie Eoff [Tue, 11 Oct 2016 19:21:45 +0000 (12:21 -0700)]
test: allow default attribs param for create config

Driver does not require config attributes to create a config.
Thus, allow I965TestFixture::createConfig to be called without
specifying ConfigAttribs.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 31d499ebdd0fe080d8e3654ab90fede155b148fe)

7 years agotest: allow default surface param for create context
U. Artie Eoff [Tue, 11 Oct 2016 19:21:44 +0000 (12:21 -0700)]
test: allow default surface param for create context

The driver does not require surfaces to create a context.
That is, i965_CreateContext can accept an empty render_targets
list.  Thus, make Surfaces an optional parameter to
I965TestFixture::createContext so that simple tests don't
have to bother with Surfaces if they are irrelevant to
the test case.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 5c013c55e458a7f476f600e7ff78f59f3246168f)

7 years agoConfigAttribEncROI: check entrypoint on VAGetConfigAttrib
Daniel Charles [Wed, 12 Oct 2016 22:45:11 +0000 (15:45 -0700)]
ConfigAttribEncROI: check entrypoint on VAGetConfigAttrib

The attribute VAConfigAttribEncROI has to check that the entrypoint
is actually a VAEntrypointEncSlice or VAEntrypointEncSliceLP

Signed-off-by: Daniel Charles <daniel.charles@intel.com>
Reviewed-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit 8652f05e834bf2c0bbd8a324ee7d2040e1c0cc77)

7 years agoAdd support for IYUV in vaCreateSurfaces()
Xiang, Haihao [Wed, 12 Oct 2016 01:50:16 +0000 (09:50 +0800)]
Add support for IYUV in vaCreateSurfaces()

Actually IYUV is indentical to I420. This fixes the failue reported by
CreateSurfacesTest.SupportedPixelFormats in gtest

before:

[  FAILED  ] CreateSurfacesTest.SupportedPixelFormats (0 ms)
[----------] 1 test from CreateSurfacesTest (0 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (2 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] CreateSurfacesTest.SupportedPixelFormats

after:

[----------] 1 test from CreateSurfacesTest
[ RUN      ] CreateSurfacesTest.SupportedPixelFormats
[       OK ] CreateSurfacesTest.SupportedPixelFormats (1 ms)
[----------] 1 test from CreateSurfacesTest (1 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test case ran. (4 ms total)
[  PASSED  ] 1 test.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98033
Tested-by: Eoff, Ullysses A <ullysses.a.eoff@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Eoff, Ullysses A <ullysses.a.eoff@intel.com>
(cherry picked from commit 7ef5135054a3f6c6baff9c6dca4383079ff5f072)

7 years agotest: use common I965ConfigTest fixture for jpeg enc/dec
U. Artie Eoff [Wed, 5 Oct 2016 17:54:27 +0000 (10:54 -0700)]
test: use common I965ConfigTest fixture for jpeg enc/dec

Instantiate the JPEG encode/decode Entrypoint tests from
the common I965ConfigTest fixture with additional test
inputs.  Also, separate them into their own files.  This
changes their test case names, too.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit dd73514209d7942f2d8c8b0bbb541fe6884ea1bc)

7 years agotest: add avce/avcd create config tests
U. Artie Eoff [Wed, 5 Oct 2016 17:54:26 +0000 (10:54 -0700)]
test: add avce/avcd create config tests

Add a common I965ConfigTest parameterized test fixture with
a i965_CreateConfig test case and add the AVC encode/decode
create config test instantiations with associated profile
and entrypoint inputs.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 91caa8167d5b6b16ee8c58bd238f8a4773a4707a)

7 years agotest: add ostream operators for VAProfile and VAEntrypoint
U. Artie Eoff [Wed, 5 Oct 2016 17:54:25 +0000 (10:54 -0700)]
test: add ostream operators for VAProfile and VAEntrypoint

Add ostream operators for VAProfile and VAEntrypoint so
the testing framework and tests can log them by name.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit d36e351ef5d073f24aca0e0fb6dd3171d9b1914c)

7 years agotest: move vaInitialize/vaTerminate to a global test environment
U. Artie Eoff [Wed, 5 Oct 2016 17:54:24 +0000 (10:54 -0700)]
test: move vaInitialize/vaTerminate to a global test environment

Move the VADisplay, vaInitialize and vaTerminate responsibility
out of the I965TestFixture class and into a global
I965TestEnvironment (::testing::Environment) singleton.

The I965TestEnvironment singleton instance is registered with
the gtest framework at startup and it's SetUp and TearDown routines
are executed before and after all tests are executed.  This
allows all tests to obtain access to the VADisplay et. al.
outside of an I965TestFixture instance.

Essentially, this results in only one VADisplay being shared
between all executed test cases and one init/term sequence
for the entire test program execution.  This more closely
resembles how several real-world programs would use the
driver (i.e. init driver once, encode/decode multiple streams
and terminate driver once).

Prior to this, each test case had it's own VADisplay instance
and init/term sequence.  That behavior can still be achieved by
executing one test case at a time via the --gtest_filter option.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 8fb4dd957ff1db28c54430a47b5305a4e05f1e1d)

7 years agoSet default framerate to 30fps if user doesn't set the corresponding sequence parameter
Xiang, Haihao [Tue, 27 Sep 2016 14:49:24 +0000 (22:49 +0800)]
Set default framerate to 30fps if user doesn't set the corresponding sequence parameter

User can update framerate using VAEncMiscParameterTypeFrameRate buffer later

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 464d36dda586addb32379b8c74b2055da73783d3)

7 years agotest: add create surface test
U. Artie Eoff [Mon, 3 Oct 2016 20:21:30 +0000 (13:21 -0700)]
test: add create surface test

Add test to verify correct result for create surfaces with
supported and unsupported pixel formats.

Currently the IYUV pixel format case fails... see
https://bugs.freedesktop.org/show_bug.cgi?id=98033

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 0c5176a46e329e3d95f14f998b75a320621c769e)

7 years agojpeg/dec: gen8+ set correct fourcc for monochrome decode
U. Artie Eoff [Wed, 28 Sep 2016 20:22:37 +0000 (13:22 -0700)]
jpeg/dec: gen8+ set correct fourcc for monochrome decode

When the jpeg picture params have 1 component the
fourcc needs to be set to VA_FOURCC_Y800.

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 0287ca6f3871d202624ddbea97a4b3771e982e68)