Age | Commit message (Collapse) | Author | Files | Lines |
|
Allow for vaQuerySurfaceAttributes() to return BGRA and BGRX formats
for VPP on Ivybridge and Haswell. This is supported as both source
and target surface formats.
This fixes VA/EGL interop on Gen7 processors when a BGR[AX] surface
is exported into an EGLImage.
Change-Id: I94f0b174223f94b0a1155e32a17bb23ffb2792cf
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Bug-Tizen: TC-1195/related
|
|
This reverts commit 9dbdd5c26b4a47f0edab79b86ba8d46d8a0c8bd4.
Change-Id: I23eeb6b1a4889cc97d13d3ddcb6b9d3cd6eb570b
Bug-Tizen: TC-1195/related
|
|
|
|
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
V1->V2: Refine the call back function name from hw_codec_hook to preinit_hw_codec
And it is called after VADriverContext is fully initialized. This is based on the comment
from Gwenole Beauchesne.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
(cherry picked from commit 11d01d01ce7ceedf19c74bdd8a07961b0fd8dd9b)
|
|
Implement va{Acquire,Release}BufferHandle() hooks so that to allow
VA surface or VA image buffer sharing with thirdparty APIs like EGL,
OpenCL, etc.
v2: made sure to sync bo before export, improved VA buffer type check.
v3: tracked internal resources on acquire, disposed them on release.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
(cherry picked from commit 483bb130925182f2096cd9e6fa5dbae6a55e7764)
|
|
Since all generations from gen6 can support avc encoding configuration,
remove gen7 only limitation.
MVC also can be support with little change, but it is low priority,
it will be support when necessary and this function is stable.
Signed-off-by: Zhong Li <zhong.li@intel.com>
(cherry picked from commit f2178e267a67bdecab0a30502804c2ce5bccd0c2)
|
|
Two encoding quality levels are support on GEN7.
Default quality level is set to be 1, which has better quality,
but higher gpu usage.
The second quality level is set to be 2, which has worse quality but
it has lower gpu usage.
Other platforms support for multi-quality-level will be added later.
v1->v2: 1. follow haihao's comments to init and check quality_level.
2. remove CBR limitation for low quality level.
(Zhao Yakui helps to merge several patches on staging so that it can
be cherry-picked to master)
Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
slice_header based on VAConfigAttribEncPackedHeaders attribute
Currently the packed_slice_header is optional. And it uses the VAEncSliceParameterBuffer
as the delimeter to decide how to insert the packed rawdata/slice_header
for one slice. This is not convenient under some scenario. For example: some
user hope to be more flexible. When the user is responsible for generating the
packed slice_header, it hopes to use the packed slice_header as the delimeter
to determine how to inser the packed rawdata/slice_header for the given slice.
So the VAConfigAttribEncPackedHeaders attriburation of encoding_context is
used to decide which kind of delimeter.
a. When the VAEncPackedSlice is set when calling vaCreateConfig, it will use
the packed slice_header as delimeter. Of course the packed rawdata should be
parsed before the packed slice_header for one given slice. For exmaple:
for the slice 0: the packed rawdata should be parsed before paring the first
packed slice_header. After one packed slice_header is parsed, it will start
to parse the corresponding data for a new slice.
b. When the VAEncPackedSlice is not set when calling vaCreateConfig, it will
use the VAEncSliceParameterBuffer as delimeter.
V1->V2: Return an error instead of only complaining warning message when packed
slice_header is missing for some slice under the VAEncPackedSlice mode. This
is the suggestion from Gwenole and Sreerenj Balachandran.
Signed-off-by: Zhao, Yakui <yakui.zhao@intel.com>
(cherry picked from commit 9d49a6d693aa6c862467a4a879bc86d9cb98dbe5)
|
|
Zero initialize the packed raw data index array and
packed slice header index array during each preallocation.
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Reviewed-by: Zhao, Yakui <yakui.zhao@intel.com>
(cherry picked from commit fbbe401aa28a0b3859d587ef08f0df15a2f7c8f2)
|
|
(cherry picked from commit 510b271f912afb35edac1d3fb39354ee98b01711)
|
|
Under some encoding scenario, the user hopes to generate the packed slice
header data by themself and then the driver can insert the passed slice
header packed data into the coded clip.
1.The VA_ENC_PACKED_HEADER_SLICE flag is exported and it is treated as optional.
This is to say: if packed slice header data is passed, it will be
inserted directly. If no packed slice header data is passed, the driver will
help to generate it.
2.Another restriction is that the packed slice header data is inserted after
the packed rawdata for one slice. That is to say: If it needs to insert the
packed rawdata and slice header data, the packed rawdata will be inserted
firstly(This is handled by the driver).
Signed-off-by: Zhao, Yakui <yakui.zhao@intel.com>
(cherry picked from commit 00111e8a8bfa67b971419b72577eaa1b9f47bc34)
Conflicts:
src/gen75_mfc.c
src/gen8_mfc.c
|
|
packed header type/data
After adding the support of inserting the packed rawdata, more group of packed header data
can be passed. In order to insert the packed rawdata correctly, the packed header type/
data should be paired.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit fd78866bd64d7ab57fe8cb0c4b25e8357973b0b1)
|
|
Under some encoding scenario, the user-space application hopes that the driver
can insert the passed packed rawdata into the coded clip. This is to allow the
insertion of packed rawdata passed from user. As the position of packed rawdata
is related with the slice. So the following restrictions are added:
1. the packed rawdata header type/data should be paired.
2. the packed rawdata data is inserted by following the passed order
3. the packed rawdata header type/data is split by using VAEncSliceParameterBuffer.
That is to say: The packed rawdata for slice 0 should be passed before the first
VAEncSliceParameterBuffer. After one VAEncSliceParameterBuffer is parsed,
the subseuquent packed rawdata is for another new slice. The subsequent
packed rawdata after the last VAEncSliceParameterBuffer is ignored.
4. it does not change the rule for the packed data of SPS/PPS/MISC type.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit 974597ef64dc9a283d4787e1484a75d1610414f4)
Conflicts:
src/gen75_mfc.c
src/gen8_mfc.c
|
|
Under some encoding scenario, the user-space application hopes that the driver
can insert the passed packed rawdata into the coded clip. But the insertion of
packed rawdata is related with the slice. So some data structures are added so
that it can store how the packed rawdata is inserted into the coded clip
per-slice.
Signed-off-by: Zhao, Yakui <yakui.zhao@intel.com>
(cherry picked from commit 65727b1868f01d836659396724b83d2992656242)
|
|
This is a part of fa469f74227a7b4e0e6f882c488132eaa9c44417 on staging
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
|
|
H.264 MVC decoding support is defined as follows:
- Stereo High profile on Sandybridge and newer ;
- Multiview High profile on Haswell and newer.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
(cherry picked from commit 1f244834dedb7b46863b315a898d8649d01c5f58)
Conflicts:
src/i965_device_info.c
src/i965_drv_video.c
src/va_backend_compat.h
|
|
Signed-off-by: Li Xiaowei <xiaowei.a.li@intel.com>
(cherry picked from commit 7d1ddfd3646f35f306f38bfabef6af9b2ebb19f4)
Conflicts:
src/i965_drv_video.c
|
|
and hold all supported fourcc in an array
v2: bpp[] in bit and fix the vertical factor for 411P (Yakui)
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit 1de3a2cdc8c3f8b2f6191c0f114fa1167f40f2ec)
Conflicts:
src/i965_drv_video.c
|
|
Optimize support for grayscale surfaces in two aspects: (i) space
by only allocating the luminance component ; (ii) speed by avoiding
initialization of the (now inexistent) chrominance planes.
Keep backward compatibility with older codec layers that only
supported YUV 4:2:0 and not grayscale formats properly.
v2: fix check for extra H.264 chroma formats [Haihao]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
|
|
If the hardware supports JPEG decoding, then we have to expose the
right set of chroma formats for the output (decoded) VA surface. In
particular, we could support YUV 4:0:0, 4:1:0, 4:2:2 and 4:4:4.
v2: export support for YUV 4:0:0 (grayscale) too [Haihao]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
|
|
Only validate the user-defined chroma format (VAConfigAttribRTFormat)
attribute, if any. Don't override it. i.e. append a pre-defined value
only if it was not defined by the user beforehand.
Propertly return VA_STATUS_ERROR_UNSUPPORTED_RT_FORMAT if the supplied
chroma format is not supported.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
|
|
Factor out code to validate profile/entrypoint per the underlying
hardware capabilities. Also fix vaGetConfigAttributes() to really
validate the profile/entrypoint pair.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
|
|
Introduce a new i965_destroy_surface_storage() helper function to
unreference the underlying GEM buffer object, and any associated
private data, if any.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
|
|
Fix size of the allocated buffer used to represent grayscale (Y800)
surfaces. Only the luminance component is needed, thus implying a
single plane.
Likewise, update render routines to only submit the first plane.
The existing render kernels readily only care about that single
plane.
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
|
|
pitch must be 64 at least for linear surface for most functions on IVB/HSW/BDW
such VEBOX, Data port media read/write
https://bugs.freedesktop.org/show_bug.cgi?id=72522
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit 57db5c2524f4e3cb6ae2301bddfdf1c40cdbb626)
|
|
Now it can directly use the information in intel_device_info instead of
checking the pci id.
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit f1b3f83953cd5f6e39900d98b4858a7cb825dee0)
Conflicts:
src/gen8_post_processing.c
src/i965_post_processing.c
src/intel_driver.h
|
|
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit 2518c1e741cb21c5412a4b5252ebe861a52c2900)
|
|
The redundant code will be removed soon.
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit d20db5984989626728f62eb3e02b60093d914d01)
Conflicts:
src/i965_drv_video.c
|
|
Signed-off-by: Zhong Li <zhong.li@intel.com>
(cherry picked from commit 9f9c505ed5212ae0704f71f45532b9716ac0bd51)
|
|
|
|
The VPP-STDE feature is enabled in the driver code for gen75 and gen8.
In this commit, I added the filter and made appropriate changes to the
hw_codec_info and the supporting methods.
(cherry picked from commit 691b149b7afe578889a423841a29db3ac56aad83)
|
|
Otherwise it might result in buffer overflow.
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit 782b8afdda14f000874d8acf51c3e8c490d55773)
|
|
Changes between V3 to V2:
1. Add 422H support into gen8_post_processing.c, according to
yakui's comments.
changes between V2 and V1:
1. Rebase on staging branch.
2. Add 422H support for pp.
3. Reword the commit title.
Signed-off-by: Alex wu <zhiwen.wu@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit 347dd731d31dd37b242bbace744125554f2c09e7)
|
|
This is helpful to avoid the typo error when using VA_FOURCC(A, B, C, D).
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit ab3e02d63fe672e3f81631f2beb5bc2b7ab17af0)
|
|
Signed-off-by: Zhao Halley <halley.zhao@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit 41da810decbb2d64843b95384fc87f7a29152c88)
|
|
a return value is expected when assert is disabled.
Signed-off-by: Zhao Halley <halley.zhao@intel.com>
(cherry picked from commit 12c81227fd92fe028100af0cb32cc17b7f698b3d)
|
|
It is done by two VASurfaceAttrib:
* one is buffer attribute described by VASurfaceAttribExternalBufferDescriptor.
it covers strides and tiling or not.
* another is buffer type to indicate that the buffer is allocated by va driver.
VASurfaceAttribMemoryType:VA_SURFACE_ATTRIB_MEM_TYPE_VA
Signed-off-by: Zhao Halley <halley.zhao@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit 55e63685dc040e3855868b4d7ccb0ac8e1f66690)
|
|
Reviewed-by: Wind Yuan <feng.yuan@intel.com>
Tested-by: Wind Yuan <feng.yuan@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit 7d5172de91336db2e627c0011404231b6b64b211)
|
|
Reviewed-by: Wind Yuan <feng.yuan@intel.com>
Tested-by: Wind Yuan <feng.yuan@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit 94f415b29ee197f66281370801a9c3bd4240c928)
|
|
Reviewed-by: Wind Yuan <feng.yuan@intel.com>
Tested-by: Wind Yuan <feng.yuan@intel.com>
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit 12e7421ce1ed2627270dcb281af4d760afeb7209)
|
|
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
|
|
Otherwise the user-space application doesn't query which surfaceformat is
supported by the libva-vappi driver on BDW.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
Signed-off-by: Zhong Li <zhong.li@intel.com>
|
|
Signed-off-by: Zhong Li <zhong.li@intel.com>
|
|
Needs to rebuild the shader for VAProcFilterSharpening on BDW
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
|
|
I think these two asserts are not necessary, and they will cause assert failure when probability buffer created.
Signed-off-by: Zhong Li <zhong.li@intel.com>
|
|
The hardware requires that the surface pitch should be 64 alignment.
Otherwise the data port can't be accessed correctly.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
|