OSDN Git Service
U. Artie Eoff [Wed, 28 Sep 2016 20:36:02 +0000 (13:36 -0700)]
test: move generic toString to i965_streamable.h
The toString template is generic and should be part of the
i965_streamable.h header.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
U. Artie Eoff [Wed, 28 Sep 2016 20:36:01 +0000 (13:36 -0700)]
test: move ASSERT_NO_FAILURE macro to test.h
Both jpeg decode and encode test files use this macro.
So move it to the common test.h header to avoid duplicating
it.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
peng.chen [Mon, 26 Sep 2016 05:46:23 +0000 (13:46 +0800)]
Move the sharpening into the whole virtual VEBOX process
V2: add vpp_sharpness_filtering() in gen75&gen8_vebox_process_picture()
It fixes below issues:
https://bugs.freedesktop.org/show_bug.cgi?id=96987
https://bugs.freedesktop.org/show_bug.cgi?id=96988
Signed-off-by: peng.chen <peng.c.chen@intel.com>
Xiang, Haihao [Mon, 26 Sep 2016 01:48:35 +0000 (09:48 +0800)]
The {width, height} in VEBOX_SURFACE_STATE is in unit of pixel
v2: The ending position in VEB_DI_IECP must be within the surface region
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Xiang, Haihao [Wed, 28 Sep 2016 00:42:01 +0000 (08:42 +0800)]
Add CBR and VBR bitrate control flags for low power encode if possible
CBR and VBR for low power encode depend on the fully loaded HuC firmware.
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Xiang, Haihao [Wed, 28 Sep 2016 00:42:00 +0000 (08:42 +0800)]
Check whether there is a fully loaded HuC firmware
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
U. Artie Eoff [Mon, 26 Sep 2016 20:11:48 +0000 (13:11 -0700)]
test: add some jpeg encode tests
Add JPEG encode tests that encode raw I420 and NV12 data
at quality 100 and then decodes them to verify proper
encoding.
Currently, the 7680x4320 I420 test fails because ~40-60
Y-values (i.e. plane 0) in each line from the decoded
bitstream are off by more than 2 of the original raw
I420 values. It is not clear why only this resolution
exhibits this problem.
v2: don't create any input data in test fixture if
jpeg encoding is not supported.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
U. Artie Eoff [Mon, 26 Sep 2016 20:11:47 +0000 (13:11 -0700)]
test: add common test utils
Common utilities and functions that may be useful for multiple
tests.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
U. Artie Eoff [Mon, 26 Sep 2016 20:11:46 +0000 (13:11 -0700)]
test: add wrapper for SyncSurface
Add a wrapper that calls the driver i965_SyncSurface.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
U. Artie Eoff [Mon, 26 Sep 2016 20:11:45 +0000 (13:11 -0700)]
test: add streamable operators for VA structs and other
Add convenience streamable operators for VA and other common
data structures so that tests can log them as needed.
v2: put std::array stream operators into the std namespace
otherwise gcc 5.x complains.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
U. Artie Eoff [Mon, 26 Sep 2016 20:11:44 +0000 (13:11 -0700)]
test: add wrapper for CreateSurfaces2
Add support for calling i965_CreateSurfaces2 so that we
can pass VASurfaceAttributes. This is needed to set a
particular surface pixel format in some tests.
We must call i965_CreateSurfaces2 via the vtable since
it is a static function within the i965_drv_video.c
file... thus hidden.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
U. Artie Eoff [Mon, 26 Sep 2016 20:11:43 +0000 (13:11 -0700)]
test: wrap jpeg decode tests and data in namespace
Put the JPEG decode tests and test data into its own
namespace so that it can be distinguished from encode.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
U. Artie Eoff [Mon, 26 Sep 2016 20:11:42 +0000 (13:11 -0700)]
test: split jpeg test data into header and cpp
Move static definitions of JPEG TestPatternData into the .cpp
so that multiple files can include the i965_jpeg_test_data.h
header file. Otherwise, there will be "multiple definition"
compiler errors.
Also, change generateSolid to be inline for the same reason.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Xiang, Haihao [Wed, 21 Sep 2016 04:11:09 +0000 (12:11 +0800)]
Use char *ptr instead of void *ptr
The code performs arithmetic on void *. Although it works in gcc,
it is not legal in C
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Xiang, Haihao [Mon, 19 Sep 2016 06:32:32 +0000 (14:32 +0800)]
G2130 doesn't support MPEG2/H.264 encoding
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Xiang, Haihao [Mon, 19 Sep 2016 06:32:07 +0000 (14:32 +0800)]
Revert "HEVC10bit ENC: work around gpu hang when p010->nv12"
Commit
302cf63 fixes the GPU hang issue.
This reverts commit
53bfe9ab7fcaf2ae5c1e1ba0087831a59dbfe249.
Cc: peng.chen <peng.c.chen@intel.com>
Cc: Qu, Pengfei <pengfei.qu@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
peng.chen [Mon, 19 Sep 2016 05:25:17 +0000 (13:25 +0800)]
Clear IECP state buffer when it is enabled
It fixes a VEBOX GPU hang up issue while doing P010->NV12 CSC
v3: Remove the file mode changes
v2: Add VPP_IECP_CSC_TRANSFORM flag for the actual transform (YUV<->RGB) operation.
It removes the conflict meaning of proc_ctx->is_iecp_enabled and
proc_ctx->filters_mask when no actual transform is required, such as P010->NV12
Signed-off-by: peng.chen <peng.c.chen@intel.com>
Xiang, Haihao [Mon, 19 Sep 2016 05:50:37 +0000 (13:50 +0800)]
Update the dependency on VA-API version
VA-API 0.39.4 is required for bitrate control per temporal layer
and PRIME buffer sharing
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Xiang, Haihao [Tue, 19 Jul 2016 08:25:11 +0000 (16:25 +0800)]
Wayland: try prime fd first in buffer sharing meachanism
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Xiang, Haihao [Tue, 19 Jul 2016 06:08:27 +0000 (14:08 +0800)]
Update wayland-drm.xml
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Xiang, Haihao [Mon, 19 Sep 2016 06:15:32 +0000 (14:15 +0800)]
Merge branch 'v1.7-branch' into fdo--master
Conflicts:
configure.ac
src/gen6_mfc_common.c
src/gen75_vme.c
src/gen7_vme.c
src/gen8_mfc.c
src/gen8_vme.c
src/gen9_mfc.c
src/gen9_vme.c
src/i965_drv_video.c
src/i965_encoder.c
src/i965_encoder.h
Xiang, Haihao [Tue, 13 Sep 2016 08:02:47 +0000 (16:02 +0800)]
Add support for VAConfigAttribEncRateControlExt attribute
Currently bit rate control per temporal layer is disabled
v2: rebased
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Xiang, Haihao [Tue, 13 Sep 2016 08:02:46 +0000 (16:02 +0800)]
Update CBR algo for H.264 per tempolar layer
v2: rebased
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Xiang, Haihao [Tue, 13 Sep 2016 08:02:45 +0000 (16:02 +0800)]
Initialize internal related parameters per temporal layer for H.264 BRC
v2: rebased
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Xiang, Haihao [Tue, 13 Sep 2016 08:02:44 +0000 (16:02 +0800)]
Use arrays to store BRC related parameters per temporal layer
Currently only the first element is used
v2: rebased
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Xiang, Haihao [Tue, 13 Sep 2016 08:02:43 +0000 (16:02 +0800)]
Change the type of the 2nd parameter of intel_mfc_update_hrd()
In addition, change the two caller functions as well.
v2: rebased
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Xiang, Haihao [Tue, 13 Sep 2016 08:02:42 +0000 (16:02 +0800)]
Save bitrate and framerate per temporal layer
v2: bitrate and framerate related fields in VAEncSequenceParameterBufferH264
are used for the hightest layer
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Xiang, Haihao [Tue, 13 Sep 2016 08:02:41 +0000 (16:02 +0800)]
Use arrays to store bitrate and framerate
Currently only the first element is used
v2: rebased
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Xiang, Haihao [Tue, 13 Sep 2016 08:02:40 +0000 (16:02 +0800)]
Check temporal layer structure
v2: set right temporal layer id for current frame
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Xiang, Haihao [Tue, 13 Sep 2016 08:02:39 +0000 (16:02 +0800)]
Store buffers for VAEncMiscParameterTypeRateControl and VAEncMiscParameterTypeFrameRate per temporal layer
v2: rebased
v3: Don't store buffers per layer if the layer structure is not submitted before
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Xiang, Haihao [Tue, 13 Sep 2016 08:02:38 +0000 (16:02 +0800)]
Use a 2-dimensional array to store misc parameters
This patch allows multiple misc parameter buffers for the same type
within the same Begin/Render/End sequence in the future. Currently
only the first element for each misc type is used, so it doesn't
change any functionality yet.
v2: rebased
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Xiang, Haihao [Tue, 13 Sep 2016 08:02:37 +0000 (16:02 +0800)]
move QpPrimeY to another inner structure for H.264/VP8 BRC
It doesn't cause functionality change
v2: rebased
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Xiang, Haihao [Tue, 13 Sep 2016 08:02:36 +0000 (16:02 +0800)]
Remove unused fields and code in H.264/VP8 BRC
H.264 and VP8 share some data structures
v2: rebased
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Xiang, Haihao [Tue, 13 Sep 2016 08:02:35 +0000 (16:02 +0800)]
Do not use the input parameters directly in H.264 BRC
The corresponding paramters are saved in the context
v2: use frame_width_in_pixel and frame_height_in_pixel instead of
frame_width_in_mbs and frame_height_in_mbs
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Xiang, Haihao [Tue, 13 Sep 2016 08:02:34 +0000 (16:02 +0800)]
Remove unnecessary code in H.264 BRC
v2: rebased
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Xiang, Haihao [Tue, 13 Sep 2016 08:02:33 +0000 (16:02 +0800)]
Check bitrate control related parameters in sequence and misc parameters
Currently only used for H.264 encoding
v2: rebased
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Xiang, Haihao [Tue, 13 Sep 2016 08:02:32 +0000 (16:02 +0800)]
Add some new internal variables for a new sequence
Currently these variables are used only for H.264 encoding
v2: rename frame_width_in_mbs and frame_height_in_mbs to
frame_width_in_pixel and frame_height_in_pixel. It moves
WIDTH_IN_MACROBLOCKS() and HEIGHT_IN_MACROBLOCKS() from gen9_vdenc.h
to i965_encoder.h so that the two macros can be used in
other codecs.
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Xiang, Haihao [Tue, 13 Sep 2016 08:02:31 +0000 (16:02 +0800)]
Add an internal flag to indicate the start of a new sequence
v2: rebased
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Xiang, Haihao [Tue, 13 Sep 2016 08:02:30 +0000 (16:02 +0800)]
intel_mfc_brc_prepare() only works for H.264 or H.264 MVC
v2: rebased
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Pengfei Qu [Tue, 13 Sep 2016 02:07:00 +0000 (10:07 +0800)]
Fix: check the bo of reconstructed to ensure it is not NULL
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
Tested-by: Xiang, Haihao <haihao.xiang@intel.com>
Xiang, Haihao [Thu, 8 Sep 2016 08:28:14 +0000 (16:28 +0800)]
Code cleanup for vme/mfc initializing on SKL
It keeps i965_encoder.c simple
v2: rebased
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
U. Artie Eoff [Wed, 7 Sep 2016 20:43:38 +0000 (13:43 -0700)]
test: skip jpeg fourcc decode test if unsupported by hw
If the hardware does not support jpeg decode, then log this
information and return from the test early.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
U. Artie Eoff [Wed, 7 Sep 2016 20:43:37 +0000 (13:43 -0700)]
test: add getFullTestName to i965 test fixture
Add I965TestFixture::getFullTestName to allow tests to
log the current test's name.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
U. Artie Eoff [Wed, 7 Sep 2016 20:43:36 +0000 (13:43 -0700)]
test: add jpeg entrypoint test
Add a test to verify the i965_CreateConfig functionality
for the VAProfileJPEGBaseline/VAEntrypointVLD entrypoint
based on platform supported or not.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
U. Artie Eoff [Wed, 7 Sep 2016 20:43:35 +0000 (13:43 -0700)]
test: add more convenience macros and wrap VAStatus
Add some more convenience test macros and wrap the
VAStatus in a class so that it can be streamed by its
name instead of its value by the gtest framework.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
U. Artie Eoff [Thu, 8 Sep 2016 14:47:57 +0000 (07:47 -0700)]
move HAS_* macros to header
Move the HAS_* macros (i.e. HAS_JPEG_ENCODING, etc.) to
the i965_drv_video.h header so that they can be used
by testing.
This will allow tests to use the macros to determine
if a particular test is supported on the current
execution platform.
v2: rebased
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
Xiang, Haihao [Mon, 5 Sep 2016 02:36:48 +0000 (10:36 +0800)]
libva-intel-driver 1.7.2
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Pengfei Qu [Thu, 8 Sep 2016 00:43:27 +0000 (08:43 +0800)]
HEVC10bit ENC: work around gpu hang when p010->nv12
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Pengfei Qu [Thu, 8 Sep 2016 00:43:26 +0000 (08:43 +0800)]
HEVC10bit ENC:enable hevc 10bit encoding pipeline
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Pengfei Qu [Thu, 8 Sep 2016 00:43:25 +0000 (08:43 +0800)]
HEVC10bit ENC:enable hevc 10bit on VME and PAK
1.add p010->nv12 before VME
2.add CBR support
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Xiang, Haihao <haihao.xiang@intel.com>
Pengfei Qu [Thu, 8 Sep 2016 00:43:24 +0000 (08:43 +0800)]
HEVC10bit ENC: add private surface for p010 conversion to nv12
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Xiang, Haihao <haihao.xiang@intel.com>
U. Artie Eoff [Wed, 7 Sep 2016 19:22:44 +0000 (12:22 -0700)]
test: fix jpeg decode invalid indexing
Use hsample and vsample factor in printComponentDataTo to
avoid invalid indexes into the data array.
This fixes a segfault in the jpeg fourcc tests that may be
triggered during 'make check'.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
U. Artie Eoff [Thu, 1 Sep 2016 19:59:45 +0000 (12:59 -0700)]
test: add TESTING readme file
Add a TESTING readme file to describe the design and usage
of the libva-intel-driver tests.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
U. Artie Eoff [Thu, 1 Sep 2016 19:59:44 +0000 (12:59 -0700)]
test: add some chipset tests
Add various tests to verify the integrity of the
chipset and pciid definitions and lookups.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
U. Artie Eoff [Thu, 1 Sep 2016 19:59:43 +0000 (12:59 -0700)]
test: add some object_heap tests
Add some basic object_heap tests to verify logical
usage.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
U. Artie Eoff [Thu, 1 Sep 2016 19:59:42 +0000 (12:59 -0700)]
test: add some JPEG decode test cases
Test that the driver properly decodes JPEG data that
is encoded in various fourcc formats.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
U. Artie Eoff [Thu, 1 Sep 2016 19:59:41 +0000 (12:59 -0700)]
test: add an i965 initialize test
Add basic i965 initialize test to verify certain driver data
is properly initialized and to demonstrate the usage of the
I965TestFixture class.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
U. Artie Eoff [Thu, 1 Sep 2016 19:59:40 +0000 (12:59 -0700)]
test: add i965 test fixture
Add an i965 test fixture class which creates a va drm display
for driver testing and initializes/terminates va. It also
provides some conversion operators for converting to various
driver data types. Various driver wrapper functions are
provided, too, for convenience.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
U. Artie Eoff [Thu, 1 Sep 2016 19:59:39 +0000 (12:59 -0700)]
test: link to i965 convenience library
Link the i965 convenience library to the i965 test
executable for testing.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
U. Artie Eoff [Thu, 1 Sep 2016 19:59:38 +0000 (12:59 -0700)]
i965: compile driver source as convenience library
Compile driver source into a noinst convenience library and
link it into the driver module. This allows for tests to link
to the driver library, too, for testing.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
U. Artie Eoff [Thu, 1 Sep 2016 19:59:37 +0000 (12:59 -0700)]
test: add initial test_i965_drv_video target
Add test_i965_drv_video as noinst program with an initial
test main() definition.
Also provide a test.h header with common test includes and
definitions that can be included by all test compilation
units.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
U. Artie Eoff [Thu, 1 Sep 2016 19:59:36 +0000 (12:59 -0700)]
toolchain: build gtest convenience library
Define autoconf/automake rules to build libgtest.la
as a convenience library.
Add --enable-tests configure option (default:no).
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
U. Artie Eoff [Thu, 1 Sep 2016 19:59:35 +0000 (12:59 -0700)]
test: add googletest release-1.8.0 source
We will use the Google Test Framework for testing.
Google Test is not meant to be packaged and used as a system
dependency like other libraries. Google Test recommends that
it be custom compiled for each project that uses it. Thus,
we'll keep our own copy of it here and compile it as needed.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
peng.chen [Tue, 23 Aug 2016 05:25:01 +0000 (13:25 +0800)]
Add the write_enabled flag of GPE media surface state
Fix this issue: https://bugs.freedesktop.org/show_bug.cgi?id=94607
Signed-off-by: peng.chen <peng.c.chen@intel.com>
Xiang, Haihao [Tue, 23 Aug 2016 03:50:59 +0000 (11:50 +0800)]
1.7.3.pre1 for development
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Xiang, Haihao [Mon, 22 Aug 2016 04:57:41 +0000 (12:57 +0800)]
Update NEWS
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Pengfei Qu [Tue, 23 Aug 2016 02:07:46 +0000 (10:07 +0800)]
HEVC ENC:set the initial QP threshold to avoid the low quality in the first GOP
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
(cherry picked from commit
76bedafc8141224c882281c7bf7c1cd77c3c128c)
Pengfei Qu [Tue, 23 Aug 2016 02:06:43 +0000 (10:06 +0800)]
HEVC ENC:fill the correct chroma intra mode
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
(cherry picked from commit
7594542eabea59a92ca6c2aa6c55f8e8c58152d1)
Xiang, Haihao [Tue, 23 Aug 2016 01:53:02 +0000 (09:53 +0800)]
Remove unused .g9a/.g9b files
v2: remove unused .g9a files, and change the short commit log as well
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit
455a725ee292601a0a82f7878bc753fca468a826)
Xiang, Haihao [Mon, 22 Aug 2016 08:52:51 +0000 (16:52 +0800)]
Cleanup gen9_mfc.c
This patch removes all unneeded functions/variables in gen9_mfc.c for mfc pipeline setting.
Especially it doesn't include shaders/utils/mfc_batchbuffer_avc_intra.g9b and
shaders/utils/mfc_batchbuffer_avc_inter.g9b in gen9_mfc.c because the two .g9b files are no longer
included in the package created by 'make dist'
C i965_drv_video_la-gen9_mfc.lo
gen9_mfc.c:54:55: fatal error: shaders/utils/mfc_batchbuffer_avc_intra.g9b: No such file or directory
#include "shaders/utils/mfc_batchbuffer_avc_intra.g9b"
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit
2c213d3a071c540eaba23eb2ef82db6e33327a4f)
Pengfei Qu [Tue, 23 Aug 2016 02:07:46 +0000 (10:07 +0800)]
HEVC ENC:set the initial QP threshold to avoid the low quality in the first GOP
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
Pengfei Qu [Tue, 23 Aug 2016 02:06:43 +0000 (10:06 +0800)]
HEVC ENC:fill the correct chroma intra mode
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
Xiang, Haihao [Tue, 23 Aug 2016 01:53:02 +0000 (09:53 +0800)]
Remove unused .g9a/.g9b files
v2: remove unused .g9a files, and change the short commit log as well
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Xiang, Haihao [Mon, 22 Aug 2016 08:52:51 +0000 (16:52 +0800)]
Cleanup gen9_mfc.c
This patch removes all unneeded functions/variables in gen9_mfc.c for mfc pipeline setting.
Especially it doesn't include shaders/utils/mfc_batchbuffer_avc_intra.g9b and
shaders/utils/mfc_batchbuffer_avc_inter.g9b in gen9_mfc.c because the two .g9b files are no longer
included in the package created by 'make dist'
C i965_drv_video_la-gen9_mfc.lo
gen9_mfc.c:54:55: fatal error: shaders/utils/mfc_batchbuffer_avc_intra.g9b: No such file or directory
#include "shaders/utils/mfc_batchbuffer_avc_intra.g9b"
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Xiang, Haihao [Wed, 17 Aug 2016 01:59:53 +0000 (09:59 +0800)]
Set the right transform 8x8 flag for Intra macroblock in VME output on BDW+
VME message doesn't output the transform 8x8 flag, the shader
set the right flag accordingly.
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Meng, Jia <jia.meng@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit
b53fad9ba9759a3d26f162be2bcf31113b58a503)
Xiang, Haihao [Tue, 16 Aug 2016 04:33:19 +0000 (12:33 +0800)]
Remove unused fields in struct encode_state
It also fixes a wrong assert() in gen8_mfc.c
v2: Correct condition code when removing used fields
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit
f13307275165d1d3c0f6efaf9ff387574f5c1701)
Xiang, Haihao [Tue, 16 Aug 2016 04:10:55 +0000 (12:10 +0800)]
Set cost to 0 for CHROMA INTRA mode
Commit
1cd6795 causes quality drop for U/V plane.
Reported-by: Wang, Fei W <fei.w.wang@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Wang, Fei W <fei.w.wang@intel.com>
Reviewed-by: Seaan V Kelley <seanvk@posteo.de>
(cherry picked from commit
99cd714fc467c141677f842cbcda0523b21d9571)
Xiang, Haihao [Mon, 15 Aug 2016 02:46:11 +0000 (10:46 +0800)]
Encode/VP9: Don't use hardcoded offsets
codec_private_data in struct i965_coded_buffer_segment is used to store
codec related data. Add 'struct vp9_encode_status' for the data that will
be written into codec_private_data
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit
d6cfa6a5a2dd0b7b1a88d73c5451657df57a940a)
Xiang, Haihao [Mon, 15 Aug 2016 02:46:10 +0000 (10:46 +0800)]
Encode/VP9: turn gen9_vp9_get_coded_status() into a local function
Set encoder_context->get_status to this local function when initializing,
so that we can fetch VP9 encoding status from the underlying context.
This patch changes the input parameters and removes redundant assigns
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit
1dea706fe10f7161d880f889f37b7fc86b193e55)
Ung, Teng En [Thu, 18 Aug 2016 06:06:36 +0000 (14:06 +0800)]
Fix the code to avoid plus minus conversion if the result is already zero in the float to integer conversion algorithm.
Signed-off-by: Ung, Teng En <teng.en.ung@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit
1e98d344014d6e7415008f9ddc4f6cfd982143b0)
Daniel Charles [Thu, 18 Aug 2016 19:43:46 +0000 (12:43 -0700)]
i965_encoder: remove double check for VAStatus result
after creating underlying surface there's a double check on the
VAStatus result. Replace it with ASSERT_RET.
Signed-off-by: Daniel Charles <daniel.charles@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit
c237791816a1e1067fc5504401a95ae910daa950)
Daniel Charles [Sat, 13 Aug 2016 00:30:55 +0000 (17:30 -0700)]
vp9encoder: encoder to handle properly CSC on input surface
VP9 encoder was not checking for the yuv surface fourcc provided as the input.
If the format is I420, the driver creates an underlying surface where the input
is converted to NV12.
The underlying temporary surface was not used properly by the vme_pipeline_vp9 as
intel_encoder_check_yuv_surface will place the underlying surface on the
encode_state->input_yuv_object if it needed conversion or it will place the correct
current_render_target if the conversion is not needed.
Signed-off-by: Daniel Charles <daniel.charles@intel.com>
(cherry picked from commit
98555d27c8291fe2511355d53924d17a5263dc22)
Xiang, Haihao [Mon, 15 Aug 2016 07:44:48 +0000 (15:44 +0800)]
Update the dependency on VA-API version
VA-API 0.39.3 is required for ROI delta QP support for CBR
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit
3e115315e9ef2df1b3d8f64bced69d0f685c6651)
Conflicts:
configure.ac
Jia Meng [Tue, 17 May 2016 02:13:16 +0000 (10:13 +0800)]
scaling matrix of h264 encoder on gen7/gen7.5/gen8/gen9
v1:
change the title according to yakui's comments.
qm is in raster scan order per va api, and fqm is in
column wise raster scan order per hardware requirement.
Signed-off-by: Jia Meng <jia.meng@intel.com>
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
(cherry picked from commit
38e3d97d19ee6ff43ec9fa2b568b41a14bafd8e4)
Jia Meng [Fri, 11 Oct 2013 03:22:47 +0000 (11:22 +0800)]
Adjust the maximum number of motion vectors for B frame on HSW+
Signed-off-by: Jia Meng <jia.meng@intel.com>
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
(cherry picked from commit
134995732028a3ca6e55c8ceaa9743cd405c6461)
Pengfei Qu [Mon, 18 Jul 2016 04:57:39 +0000 (12:57 +0800)]
ROI:enable on gen8 and gen9
v2:
use ASSERT_RET to check the ROI flag setted by user. instead of assert.
v1:
ROI enable on gen8 and gen9
Enable GPU to construct GPU command under ROI scenario
fix roi attrib config incorrectly
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
(cherry picked from commit
f53ff4069d14bcb2bafa95997cad5af9d67f3fbc)
Zhao Yakui [Sun, 1 Jan 2012 02:54:34 +0000 (02:54 +0000)]
Encoding: ROI support for CQP/CBR on Haswell/Ivy
v2:
remove unused variable
set max ROI number to 3 according low power mode or 8
v1:
merge 3 ROI patches together
Encoding: Add the support of ROI under CQP on Haswell/Ivybridge
Encoding: Add the support of ROI for CBR
Currently it will allocate the different qp for the ROI and non_ROI region
based on the ROI ratio. The qp delta is related with the ratio of ROI region.
Encoding: Expand to support multiple ROI regions.
Encoding: bits.roi_rc_qp_delat_support
user guide:
The first is that the driver should expose the feature of qp_delta in
VAConfigAttribValEncROI.
The second is that the user-app can pass the qp_delta flag in
VAEncMiscParameterBufferROI and then the driver will use the qp_delta to
calculate the corresponding qp for ROI region. For the non-ROI region: I
think that currently we can use the following model to predicate the qp.
(qp_value = intel_qpvalue_from_qp(qp))
Qp_value_roi * ROI_area + qp_value_nonroi * area_nonroi = base_qp *
total_area.
Signed-off-by: ceciliapeng <cecilia.peng@intel.com>
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
(cherry picked from commit
dfb64b3220a6df9be1bd6f667cd96f056d1a8cb6)
Zhao Yakui [Sun, 1 Jan 2012 02:13:28 +0000 (02:13 +0000)]
encoding:use the qp per every macroblock on Ivy and haswell
v1:
combine the patch together for Ivy and haswell
use-CPU-to-construct-the-MFC-pak-command
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: ceciliapeng <cecilia.peng@intel.com>
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
(cherry picked from commit
3d12cd730f319c7f0fd23a978721ee2482342a79)
Zhao Yakui [Sun, 1 Jan 2012 02:19:05 +0000 (02:19 +0000)]
Encoding: Add one ROI flag and ROI buffer
v3:
free the qp_per_mb for vme context
v2:
remove unused variable to avoid warning when compiling.
v1:
Add one flag to indicate whether ROI is supported in one encode context
Allocate one ROI buffer to hold qp per mb dynamically
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: pjl <cecilia.peng@intel.com>
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
(cherry picked from commit
93247612f9e7ebb95c8ef7b6fdcf5dac4d556bb4)
Zhao Yakui [Sun, 1 Jan 2012 02:18:58 +0000 (02:18 +0000)]
Encoding: Dynamically select one mechanism to construct encoding command buffer for each frame on Haswell and Gen7/Gen6
v2:remove the warning when compiling
v1: combine the Haswell and Gen7/6 patch together
Currently it uses the fixed policy to construct encoding command buffer.
(Use CPU or GPU). And it is statically compiled.
But sometimes it needs to choose the different mechanism on the fly instead
of statically compiled mode.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: pjl <cecilia.peng@intel.com>
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
(cherry picked from commit
89463c30a9ce2740603f36f1000da54b8b5c731b)
Zhao Yakui [Sun, 1 Jan 2012 02:18:52 +0000 (02:18 +0000)]
Encoding: Pass the qp parameter into VME shader and VME shader select the different cost table based on input Qp on Ivy
v1: add assert after bo map
In order to suppor that macroblocks have the different QP to do the motion
prediction, different cost tables are provided so that the VME engine can
select the different mode/motion-vector cost tables based on the input Qp.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: pjl <cecilia.peng@intel.com>
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
(cherry picked from commit
ae08e61f0746c5ed34d740ad2ed3731e43b5b456)
Zhao Yakui [Sun, 1 Jan 2012 02:18:48 +0000 (02:18 +0000)]
encoding: Send VME instruction uses one register as the desc parameter
The desc parameter of current VME send instruction is immediate. And it can't
be updated based on the input parameter.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: pjl <cecilia.peng@intel.com>
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
(cherry picked from commit
3013a910d05ea36654731b18a361c7385a5de3ab)
Zhao Yakui [Sun, 1 Jan 2012 02:18:44 +0000 (02:18 +0000)]
Encoding: VME shader reads mbmv_cost from cost_table surface instead of constant buffer on Haswell
This is to do the prepartion of enhanced features.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: pjl <cecilia.peng@intel.com>
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
(cherry picked from commit
579514daa9456357fd0896332486ea3ca5cb502f)
Zhao Yakui [Sun, 1 Jan 2012 01:24:19 +0000 (01:24 +0000)]
Encoding: mbmv cost table related changes for ROI
v3:remove the warning according to haihao's comments
v2: merge three mbmv cost table related patches together.
Encoding:Abstract the calculation of mbmv cost for qp as one function.
Encoding:Add one function that initialize mbmv cost table for supported Qp range.
Encoding:Setup one cost_table surface state for VME shader
According haihao's comments, free pointer directly.
v1:
format/style aligment accordingly to avoid the warning.
Currently the length of VME MEDIA_OBJECT command on Ivy can't exceed 8 dwords. If more parameter needs to be passed, the buffer length should be enlarged.
Pass the Qp parameter into VME shader
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: pjl <cecilia.peng@intel.com>
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
(cherry picked from commit
6e5f956fb4a291b38c3613c32ee20b3a40a831eb)
Zhao Yakui [Wed, 10 Aug 2016 04:30:13 +0000 (12:30 +0800)]
VPP: Check the returned status of hsw_veb_pre_format_convert before VEBOX VPP
V1->V2: Use the ASSERT_RET for the debug purpose
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit
5a30370b22f0937f64d5935621e66561adc48ae0)
Zhao Yakui [Wed, 10 Aug 2016 04:30:12 +0000 (12:30 +0800)]
VPP: Check the VPP pipeline_parameter to avoid NULL pointer
This is to fix the crash issue caused by the commit
51ad826fcc0d2512f7ef74e807e4b8526663fc28.
Reported-by: Xu,Guangxin <guangxin.xu@itnel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit
4f8d4b211b4f90ef26c356b8028c5435cd685952)
Hyunjun Ko [Wed, 10 Aug 2016 03:24:23 +0000 (12:24 +0900)]
gen8_mfc: fix memory leak during vp8 encoding
This fixes https://bugs.freedesktop.org/show_bug.cgi?id=97272
Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
(cherry picked from commit
860192924ee81f443c06312dc0fc023822c3f05c)
Xiang, Haihao [Fri, 5 Aug 2016 05:25:58 +0000 (13:25 +0800)]
decoder/h264: don't assert on invalid parameter
Remove redundant checking on input parameters as well.
This avoids assertion failure in https://bugs.freedesktop.org/show_bug.cgi?id=94007,
but the upper library should check why are the invalid paramters passed to libva.
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit
fb7d6f56ad3000734390279a55b5c7f54ed9e3a3)
Xiang, Haihao [Wed, 3 Aug 2016 08:43:31 +0000 (16:43 +0800)]
Set cost for modes used for VP8 encoding
This is similar to what commit
1cd6795 does
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Wang, Fei W <fei.w.wang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit
e32ac14feacff2d1b2a082ad54c0a91e9a8735a5)
Xiang, Haihao [Mon, 25 Jul 2016 08:53:08 +0000 (16:53 +0800)]
Encode: Set cost for MODE_CHROMA_INTRA/MODE_REFID_COST
This fixes the remaining issues mentioned in https://bugs.freedesktop.org/show_bug.cgi?id=96703
after applying commit
3699c14
On GEN75+, driver copies vme_context->vme_state_message to VME kernel curbe buffer and
VME kernel uses the data in curbe buffer to initialize VME message payload.
vme_context->vme_state_message is set up in intel_vme_update_mbmv_cost(), which doesn't
set all costs for used modes in VME kernels. The uninitialized mode cost will result in
difference in VME output. Thanks for Elaine's finding that the issue disappears after
initializing VME state message buffer with zeros.
Signed-off-by: Elaine Wang <elaine.wang@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
Tested-by: Mingruo Sun <mingruo.sun@intel.com>
(cherry picked from commit
1cd67951974c944b060e2d5d88a76abb34c0c99b)