OSDN Git Service
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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)
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
U. Artie Eoff [Wed, 28 Sep 2016 20:36:11 +0000 (13:36 -0700)]
test: jpeg/enc: add tests for Y800 inputs
Add support for Y800 input data for jpeg encode tests.
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:10 +0000 (13:36 -0700)]
test: jpeg/enc: add tests for YUY2 and UYVY inputs
...plus optimize TestInput::toOutputFourcc()
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:09 +0000 (13:36 -0700)]
test: jpeg/enc: return empty TestInput::Shared if fourcc not handled
Move JPEG::Encode::TestInput member initialization to its static
"create" routine so that an empty/invalid Shared can be returned
if the input fourcc is not handled/implemented. This will allow
a caller/test to react appropriately.
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:08 +0000 (13:36 -0700)]
test: jpeg/enc: improve random YUV data initialization
Make initialization of YUV input for jpeg encode a
little faster, esp. for larger resolution.
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:07 +0000 (13:36 -0700)]
test: jpeg/enc: move YUV conversion to TestInput class
Let the ::JPEG::Encode::TestInput class deal with
converting from its input fourcc to its expected
output fourcc.
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:06 +0000 (13:36 -0700)]
test: jpeg/enc: enable shared_from_this on TestInput
...and make the constructor private so that only Shared
instances can be created.
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:05 +0000 (13:36 -0700)]
test: jpeg/enc: move input creators to data file
Move the ::JPEG::Encode::TestInputCreator's to the
i965_jpeg_test_data[.h|.cpp] files.
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:04 +0000 (13:36 -0700)]
test: jpeg/enc: move TestInput impl to compilation unit
Move the implementation of JPEG::Encode::TestInput to the
compilation unit file (.cpp). This helps reduce the number
of include headers needed in the header file.
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:03 +0000 (13:36 -0700)]
test: jpeg/enc: fix TestInput::SharedConst typedef
The ::JPEG::Encode::TestInput::SharedConst typedef should
actually use a 'const TestInput' template parameter
for the std::shared_ptr. Hence, the name.
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: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>