summaryrefslogtreecommitdiff
path: root/src/i965_drv_video.c
AgeCommit message (Collapse)AuthorFilesLines
2014-11-13vpp: expose BGRA surface formats on Ivybridge and Haswell.submit/tizen_ivi/20141201.111111submit/tizen/20141126.102545accepted/tizen/ivi/20141201.122140accepted/tizen/common/20141126.163030sandbox/pcoval/latestGwenole Beauchesne1-0/+12
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
2014-11-13Revert "add LockBuffer support for VAImage/VASurface"Philippe Coval1-76/+0
This reverts commit 9dbdd5c26b4a47f0edab79b86ba8d46d8a0c8bd4. Change-Id: I23eeb6b1a4889cc97d13d3ddcb6b9d3cd6eb570b Bug-Tizen: TC-1195/related
2014-11-13add LockBuffer support for VAImage/VASurfaceZhao, Halley1-0/+76
2014-10-08change the attribute of hw_codec_info so that it can be updated dynamicallyZhao Yakui1-1/+1
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
2014-10-08Add one callback function for hw_codec_info to initialize hw_codec_infoZhao Yakui1-0/+3
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>
2014-09-09initial export_refcount for obj_bufferZhao, Halley1-0/+1
(cherry picked from commit 11d01d01ce7ceedf19c74bdd8a07961b0fd8dd9b)
2014-09-09Add support for new VA buffer export APIs.Gwenole Beauchesne1-0/+129
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)
2014-09-09Remove gen7 only limitation for encoding configurationZhong Li1-1/+3
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)
2014-09-09Add multi quality levels encoding support for GEN7Zhong Li1-0/+9
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>
2014-06-16Encoding: Use the different delimeter to pass packed_rawdata and ↵Zhao, Yakui1-24/+95
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)
2014-06-16Fix the segfault while encoding multiple slice per frame.Sreerenj Balachandran1-0/+7
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)
2014-06-16Fix the GetConfigAttributes() for H264SteroHighProfileSreerenj Balachandran1-0/+1
(cherry picked from commit 510b271f912afb35edac1d3fb39354ee98b01711)
2014-06-16H264_Encoding: Add the support of packed slice header to be flexibleZhao, Yakui1-3/+29
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
2014-06-16H264_encoding: Reset the last_packed_header_type to avoid the unpaired ↵Zhao, Yakui1-1/+6
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)
2014-06-16H264_encoding: Add the support of inserting the packed raw data passed from userZhao, Yakui1-7/+55
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
2014-06-16H264_Encoding: Prepare some data structures for adding packed raw dataZhao, Yakui1-0/+43
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)
2014-06-16decoder: MVC chroma formatsGwenole Beauchesne1-0/+6
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>
2014-06-16decoder: h264: expose the set of supported MVC profiles.Gwenole Beauchesne1-8/+30
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
2014-06-16MVC: CODEC_H264_MVC defination and relatived properties checkLi Xiaowei1-3/+37
Signed-off-by: Li Xiaowei <xiaowei.a.li@intel.com> (cherry picked from commit 7d1ddfd3646f35f306f38bfabef6af9b2ebb19f4) Conflicts: src/i965_drv_video.c
2014-06-06New structure i965_fourcc_infoXiang, Haihao1-73/+121
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
2014-06-02decoder: h264: optimize support for grayscale surfaces.Gwenole Beauchesne1-0/+13
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>
2014-06-02config: fix supported set of chroma formats for JPEG decode.Gwenole Beauchesne1-0/+5
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>
2014-06-02config: fix vaCreateConfig() to not override user chroma format.Gwenole Beauchesne1-24/+66
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>
2014-06-02config: fix vaGetConfigAttributes() to validate profile/entrypoint.Gwenole Beauchesne1-67/+78
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>
2014-06-02surface: factor out release of surface buffer storage.Gwenole Beauchesne1-3/+11
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>
2014-06-02surface: fix geometry (size, layout) of grayscale surfaces.Gwenole Beauchesne1-4/+5
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>
2014-05-26Limit the minimum pitch for linear surfaceXiang, Haihao1-6/+8
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)
2014-05-26Simplify some macrosXiang, Haihao1-19/+19
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
2014-05-26Dump chipset information in the vendor stringXiang, Haihao1-1/+12
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com> (cherry picked from commit 2518c1e741cb21c5412a4b5252ebe861a52c2900)
2014-05-26Move all of PCIIDs and codec info into separated filesXiang, Haihao1-159/+5
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
2014-05-26i965_DeriveImage() support JPEG color formatsZhong Li1-0/+6
Signed-off-by: Zhong Li <zhong.li@intel.com> (cherry picked from commit 9f9c505ed5212ae0704f71f45532b9716ac0bd51)
2014-05-05Fix over assigned callback "QueryConfigEntrypoints".qing.zhang1-1/+0
2014-04-25VPP: Enable Skin Tone Detection and Enhancement feature in the driver.Sirisha Muppavarapu1-2/+7
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)
2014-04-23Fix bound checkingXiang, Haihao1-1/+1
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)
2014-04-23V3: Add 422H support.Alex wu1-0/+13
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)
2014-04-23Use the VA_FOURCC_XXXX to replace the VA_FOURCC(X,X,X,X) in i965_drv_videoZhao Yakui1-198/+198
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)
2014-04-23Fix for check i965_check_alloc_surface_bo retZhao, Halley1-3/+2
Signed-off-by: Zhao Halley <halley.zhao@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com> (cherry picked from commit 41da810decbb2d64843b95384fc87f7a29152c88)
2014-04-23clean up some assert in i965_drv_video.cZhao, Halley1-196/+179
a return value is expected when assert is disabled. Signed-off-by: Zhao Halley <halley.zhao@intel.com> (cherry picked from commit 12c81227fd92fe028100af0cb32cc17b7f698b3d)
2014-04-23va: User specified tiling and stride support.Zhao, Halley1-4/+78
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)
2014-04-23Add the support of derive image from YV16 surfaceZhao Yakui1-0/+10
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)
2014-04-23Export the surface attribute based on YV16 for VPP on Gen7+Zhao Yakui1-0/+12
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)
2014-04-23Add the support of create surface based on YV16 formatZhao Yakui1-1/+25
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)
2014-02-27Don't advertise CBR for MPEG-2 encodingXiang, Haihao1-1/+5
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2014-02-27Add the support of querying the surface attributes on BDWZhao Yakui1-0/+110
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>
2014-02-27Add the ring supported for bdw vpp filtersZhong Li1-4/+4
Signed-off-by: Zhong Li <zhong.li@intel.com>
2014-02-27VPP: add vebox motion compensation support on BDWZhong Li1-0/+1
Signed-off-by: Zhong Li <zhong.li@intel.com>
2014-02-27VPP: add VPP Filters for BDWXiang, Haihao1-0/+9
Needs to rebuild the shader for VAProcFilterSharpening on BDW Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
2014-02-27Remove unnecessary assertsZhong Li1-2/+0
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>
2014-02-27Create the image with aligned width/height on BDWZhao Yakui1-22/+30
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>
2014-02-27Add support for VAProbabilityBufferTypeXiang, Haihao1-1/+8
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>