OSDN Git Service

android-x86/hardware-intel-common-libva.git
7 years agoAdd callbacks for error and info messages.
Emmanuel Gil Peyrot [Wed, 19 Oct 2016 12:37:36 +0000 (13:37 +0100)]
Add callbacks for error and info messages.

This lets any application using libva choose the best way to report
info and error messages to the user, for example graphical application
can open a popup on errors and write info messages in the toolbar.

Signed-off-by: Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoBump VA-API version to 0.39.4
Xiang, Haihao [Mon, 19 Sep 2016 05:43:49 +0000 (13:43 +0800)]
Bump VA-API version to 0.39.4

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agowayland: Check whether prime fd can be used in buffer sharing mechanism
Xiang, Haihao [Tue, 19 Jul 2016 08:19:58 +0000 (16:19 +0800)]
wayland: Check whether prime fd can be used in buffer sharing mechanism

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agoNew wayland-drm.xml
Xiang, Haihao [Tue, 19 Jul 2016 02:26:41 +0000 (10:26 +0800)]
New wayland-drm.xml

Update wayland-drm-client-protocol.h as well

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

Conflicts:
configure.ac

7 years agoA simple encoder for H.264/AVC SVC temporal scalability
Xiang, Haihao [Tue, 6 Sep 2016 13:25:29 +0000 (21:25 +0800)]
A simple encoder for H.264/AVC SVC temporal scalability

It is based on VA-API

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoAdd the comment for framerate in VAEncMiscParameterFrameRate
Xiang, Haihao [Tue, 6 Sep 2016 13:25:28 +0000 (21:25 +0800)]
Add the comment for framerate in VAEncMiscParameterFrameRate

To express a frame rate, such as 7.5, we have to use 'numerator / denominator'.
The high 2 bytes will be used as denominator and the low 2 bytes will be used
as numerator.

To keep backward compatible, the low 2 bytes is the real frame rate when the high
2 bytes is 0.

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoMerge and modify encoding bit-rate control per temporal layer.
Xiang, Haihao [Tue, 13 Sep 2016 07:10:49 +0000 (15:10 +0800)]
Merge and modify encoding bit-rate control per temporal layer.

Cherry-pick'ed from:
e6f92ae: Added geneirc support for encoding bit-rate control per temporal layer
753ec17: va.h: add data structure for the structure of temporal layer encoding

v2: Update the comment that user must send VAEncMiscParameterTemporalLayerStructure before
VAEncMiscParameterRateControl and VAEncMiscParameterFrameRate and the condition for error return

Signed-off-by: Jonathan Bian <jonathan.bian@intel.com>
Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
Signed-off-by: Zhangfei Zhang <zhangfei.zhang@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agolibva 1.7.2
Xiang, Haihao [Mon, 5 Sep 2016 02:31:31 +0000 (10:31 +0800)]
libva 1.7.2

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agolibva 1.7.3.pre1 for development
Xiang, Haihao [Tue, 23 Aug 2016 03:56:33 +0000 (11:56 +0800)]
libva 1.7.3.pre1 for development

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

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agoEncoding: Add ROI example
Zhao Yakui [Thu, 4 Feb 2016 13:41:22 +0000 (08:41 -0500)]
Encoding: Add ROI example

v1:
add --roi-test for test only for ROI. default only one region(0,0,120,120) has been test.
v2:
add ROI region size check to ensure region width/height < frame_width/4 or frame_height/4 if fram width/height < 120
add ROI attrib check
v3:
check the attrib return value for ROI

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 e5f8db3434667a044122ad1973459aca0d44903c)

7 years agoEncoding: Add ROI example
Zhao Yakui [Thu, 4 Feb 2016 13:41:22 +0000 (08:41 -0500)]
Encoding: Add ROI example

v1:
add --roi-test for test only for ROI. default only one region(0,0,120,120) has been test.
v2:
add ROI region size check to ensure region width/height < frame_width/4 or frame_height/4 if fram width/height < 120
add ROI attrib check
v3:
check the attrib return value for ROI

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>
7 years agova_trace: add traces for vp9encoder
Daniel Charles [Fri, 5 Aug 2016 22:32:11 +0000 (15:32 -0700)]
va_trace: add traces for vp9encoder

add trace information for VAEncPictureParameterBufferVP9
and VAEncSequenceParameterBufferVP9

also add the case for VAEncMiscParameterBufferType on
va_TraceVP9Buf

Signed-off-by: Daniel Charles <daniel.charles@intel.com>
(cherry picked from commit b27feb9b8e62725fed959c090feb2f1c853f74b3)

7 years agoBump VA-API version to 0.39.3
Xiang, Haihao [Fri, 5 Aug 2016 02:58:16 +0000 (10:58 +0800)]
Bump VA-API version to 0.39.3

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit 695f99ef0405cf4255e7767b44effb0da2fe706e)

7 years agoAdd one flag to use the qp_delta instead of qp priority for ROI under non-CQP mode
jialipen [Wed, 3 Aug 2016 08:16:43 +0000 (16:16 +0800)]
Add one flag to use the qp_delta instead of qp priority for ROI under non-CQP mode

Currently the roi_value in VAEncROI is used as the qp priority when
VAConfigAttribRateControl != VA_RC_CQP. But some customers hope to use
it as qp_delta like CQP mode. In such case one flag is added to indicate
whether it is qp_priority or not. At the same time driver can export it
in VAConfigAttribValEncROI to indicate whether the qp_delta is supported
when VAConfigAttribRateControl != VA_RC_CQP.

v2: update comments in va.h

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>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 66c63e6eef3836e2243881f111553344edce54a5)

7 years agoProperly terminate parsed environment values with '\0'.
Tobias Stoeckmann [Sat, 25 Jun 2016 18:08:31 +0000 (20:08 +0200)]
Properly terminate parsed environment values with '\0'.

The function strncpy() does not guarantee to nul terminate the
destination. In most cases, this cannot be triggered, but it is also
used to parse user environment variables. These are allowed to be longer
than 1023 characters, effectively resulting in an unterminated string.

I've adjusted other places as well, because it won't hurt.

https://bugs.freedesktop.org/show_bug.cgi?id=96677
(cherry picked from commit 1517fd276e12cac14c018d5a30792177eb6c59de)

7 years agoChanged 'c' variable 'char' data type to 'int' data type (v3)
Lim Siew Hoon [Thu, 28 Jul 2016 01:12:41 +0000 (09:12 +0800)]
Changed 'c' variable 'char' data type to 'int' data type (v3)

The getopt_long func is return integer data type is more than 1 bytes.

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
(cherry picked from commit def5691f789b897b47af7f2a7ffa3b135a93950d)

7 years agoClean up the duplicate checking for unsuported source YUV format
Lim Siew Hoon [Fri, 1 Jul 2016 05:29:13 +0000 (13:29 +0800)]
Clean up the duplicate checking for unsuported source YUV format

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
(cherry picked from commit f7e22630bd18ed80d22da20a9dc18487938b6c8a)

7 years agoFix the p->load_huffman_table[0] keep print first element in for loop
Lim Siew Hoon [Fri, 1 Jul 2016 05:29:12 +0000 (13:29 +0800)]
Fix the p->load_huffman_table[0] keep print first element in for loop

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
(cherry picked from commit 6bf712ad26b11d2caa5d806c1bb31eaef12d382c)

7 years agoavoid U_row overwrite NULL value if src_fourcc and dst_fourcc is NV12
Lim Siew Hoon [Fri, 1 Jul 2016 05:29:11 +0000 (13:29 +0800)]
avoid U_row overwrite NULL value if src_fourcc and dst_fourcc is NV12

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
(cherry picked from commit 1f8aa1546182667cf70484b0c08959b08edb5a84)

7 years agoFix infinite loop
Lim Siew Hoon [Fri, 1 Jul 2016 05:29:10 +0000 (13:29 +0800)]
Fix infinite loop

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
(cherry picked from commit 3a617e995435eafb87ea87dd1afc647d51d49582)

7 years agoAdd assert check memory allocation potential NULL issue
Lim Siew Hoon [Fri, 1 Jul 2016 05:29:09 +0000 (13:29 +0800)]
Add assert check memory allocation potential NULL issue

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
(cherry picked from commit c0fa72c00aa661faf51d7c1fb1275ef11c5a9667)

7 years agoFix memory leak issue in open_display func
Lim Siew Hoon [Fri, 1 Jul 2016 05:29:08 +0000 (13:29 +0800)]
Fix memory leak issue in open_display func

If the !d->display is true, will exit without free memory
block allocate for 'd'.

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
(cherry picked from commit 5b185d937f354c462ddfe3dd754f7337dc6538c4)

7 years agoFix test_06 failed and hitting assert check
Lim Siew Hoon [Fri, 1 Jul 2016 03:13:25 +0000 (11:13 +0800)]
Fix test_06 failed and hitting assert check

Add in missing profile and entrypoint get from va.h

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
(cherry picked from commit de8e9edcf110355d7733f970ff0205e4970465fb)

7 years agoAvoid access invalid memory location huffman_table for index 2..3 (v2)
Lim Siew Hoon [Fri, 1 Jul 2016 03:13:24 +0000 (11:13 +0800)]
Avoid access invalid memory location huffman_table for index 2..3 (v2)

The size of array huffman_table only 2 in VAHuffmanTableBufferJPEGBaseline
default_huffman_table_param. The index in 2..3 in huffman_table[x] will
be access invalid memory location in for loop that looping 4 times.

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
(cherry picked from commit c56ebc89d19efdbf879a86ef5f0407ac9aad45af)

7 years agoFix buffer overflow for array index out of bounds in test_07
Lim Siew Hoon [Fri, 1 Jul 2016 03:13:23 +0000 (11:13 +0800)]
Fix buffer overflow for array index out of bounds in test_07

The size of array surface_1 is 2, but it passed to test_unique_surfaces
func is 16 or 6 to do compare for surface_16. The index for surface_1
not in the array index range for surface_1 and access invalid memory
location.

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
(cherry picked from commit e4535e404d1dc33fb1fddf99f057c341fc652bfd)

7 years agoadd assert check for potential NULL issue in test/encode/
Lim Siew Hoon [Fri, 1 Jul 2016 03:13:22 +0000 (11:13 +0800)]
add assert check for potential NULL issue in test/encode/

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
(cherry picked from commit 1199b16ebd6488734d43c8d962d1d2d7eb42a37a)

7 years agoadd assert to check for potential NULL issue in test_XX
Lim Siew Hoon [Fri, 1 Jul 2016 03:13:21 +0000 (11:13 +0800)]
add assert to check for potential NULL issue in test_XX

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
(cherry picked from commit 56f90c0dee7de287f9557c59d65f870240b3ada2)

7 years agocheck memory alloc to avoid NULL and initialize value in YUV_blend_with_pic (v2)
Lim Siew Hoon [Fri, 1 Jul 2016 02:30:21 +0000 (10:30 +0800)]
check memory alloc to avoid NULL and initialize value in YUV_blend_with_pic (v2)

v2:
Add in second free(NULL) for pic_y and third free(NULL) for pic_u.
Put back 'allocated' missing consider about the pic_y, pic_u and pic_v
will be contains pic_y_old, pic_u_old and pic_v_old will be assign to
pic_y, pic_u and pic_v.

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
(cherry picked from commit 1c2997307e007c9a999b33da9c237dda370d1990)

7 years agocheck memory allocation and initialize to zero value in save_recyuv (v2)
Lim Siew Hoon [Fri, 1 Jul 2016 02:30:20 +0000 (10:30 +0800)]
check memory allocation and initialize to zero value in save_recyuv (v2)

v2:
Remove not necessary check dst_Y against NULL for sencond free(NULL).
Remove not necessary check dst_Y and dst_U against NULL for second free(NULL)
and third free(NULL).

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
(cherry picked from commit 8c0973050d825fb6a0734dd62fdf8b209aee8ad0)

7 years agofix buffer overflow for dc_values and ac_values (v2)
Lim Siew Hoon [Fri, 1 Jul 2016 02:30:19 +0000 (10:30 +0800)]
fix buffer overflow for dc_values and ac_values (v2)

The dc_values only have 12 bytes and ac_value only 162 bytes but the
memcpy did it for 16 bytes and 256 bytes copying thru hard code value.
To avoid the array index out of bound again, recommend move to use sizeof.

v2:
Fix commit message typo from 265 bytes to 256 bytes.

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
(cherry picked from commit c36778ff264b3c45b538db4bbfe6aea38fcb165e)

7 years agoRemove unused 'id' in va_wayland_drm_create
Lim Siew Hoon [Wed, 22 Jun 2016 11:46:03 +0000 (19:46 +0800)]
Remove unused 'id' in va_wayland_drm_create

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit c36971c682d890681fe839bbaa8a348fe845aa42)

7 years agoRemove unused local varibles in upload_source_YUV_once_for_all.
Lim Siew Hoon [Wed, 22 Jun 2016 11:46:02 +0000 (19:46 +0800)]
Remove unused local varibles in upload_source_YUV_once_for_all.

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 4ea3e2f0b921cfbed30d0cfe795939df742e5cfd)

7 years agoRemove unused variable 'id' in va_wayland_emgd_create.
Lim Siew Hoon [Wed, 22 Jun 2016 11:46:01 +0000 (19:46 +0800)]
Remove unused variable 'id' in va_wayland_emgd_create.

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit fb3d2ef558907d490e9d1183bba013ca8e75af9e)

7 years agoRemove unused 'k' in test func and pre func.
Lim Siew Hoon [Wed, 22 Jun 2016 11:46:00 +0000 (19:46 +0800)]
Remove unused 'k' in test func and pre func.

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 979894b6812d977d2784a3c7c3091ee517473da2)

7 years agoRemove unused 'i' in va_TraceVAEncPackedHeaderParameterBufferType
Lim Siew Hoon [Wed, 22 Jun 2016 11:45:59 +0000 (19:45 +0800)]
Remove unused 'i' in va_TraceVAEncPackedHeaderParameterBufferType

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit d8397f79e0ded7c8a87098996af3c603bba2d61f)

7 years agoRemove unused 'trace_index' in va_TraceInit
Lim Siew Hoon [Wed, 22 Jun 2016 11:45:58 +0000 (19:45 +0800)]
Remove unused 'trace_index' in va_TraceInit

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 98ee039437488047529746956f9d4505f86fa74f)

7 years agoRemove unused 'j' in va_TraceVAPictureParameterBufferVP9.
Lim Siew Hoon [Wed, 22 Jun 2016 11:45:57 +0000 (19:45 +0800)]
Remove unused 'j' in va_TraceVAPictureParameterBufferVP9.

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 6bfc10804d24e4ba49c2c07f15115f3b549323bd)

7 years agoRemove unused 'check_sum' and 'j' in va_TraceSurface
Lim Siew Hoon [Wed, 22 Jun 2016 11:45:56 +0000 (19:45 +0800)]
Remove unused 'check_sum' and 'j' in va_TraceSurface

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 42ab32a8042691988abb469bfa36467d7618b9ad)

7 years agoRemove unused 'i' and 'buf_list' in va_TraceDestroyBuffer
Lim Siew Hoon [Wed, 22 Jun 2016 11:45:55 +0000 (19:45 +0800)]
Remove unused 'i' and 'buf_list' in va_TraceDestroyBuffer

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
(cherry picked from commit 12beda5f22e0d223367ffd91d40c17e6ab2b631e)

7 years agolibva 1.7.2.pre1 for development
Xiang, Haihao [Thu, 2 Jun 2016 17:07:50 +0000 (01:07 +0800)]
libva 1.7.2.pre1 for development

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit aa8df4c3d10d0609ffac235ffdc76c5e05763a23)

Conflicts:
configure.ac

7 years agova_trace: add traces for vp9encoder
Daniel Charles [Fri, 5 Aug 2016 22:32:11 +0000 (15:32 -0700)]
va_trace: add traces for vp9encoder

add trace information for VAEncPictureParameterBufferVP9
and VAEncSequenceParameterBufferVP9

also add the case for VAEncMiscParameterBufferType on
va_TraceVP9Buf

Signed-off-by: Daniel Charles <daniel.charles@intel.com>
7 years agoBump VA-API version to 0.39.3
Xiang, Haihao [Fri, 5 Aug 2016 02:58:16 +0000 (10:58 +0800)]
Bump VA-API version to 0.39.3

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agoAdd one flag to use the qp_delta instead of qp priority for ROI under non-CQP mode
jialipen [Wed, 3 Aug 2016 08:16:43 +0000 (16:16 +0800)]
Add one flag to use the qp_delta instead of qp priority for ROI under non-CQP mode

Currently the roi_value in VAEncROI is used as the qp priority when
VAConfigAttribRateControl != VA_RC_CQP. But some customers hope to use
it as qp_delta like CQP mode. In such case one flag is added to indicate
whether it is qp_priority or not. At the same time driver can export it
in VAConfigAttribValEncROI to indicate whether the qp_delta is supported
when VAConfigAttribRateControl != VA_RC_CQP.

v2: update comments in va.h

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>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoProperly terminate parsed environment values with '\0'.
Tobias Stoeckmann [Sat, 25 Jun 2016 18:08:31 +0000 (20:08 +0200)]
Properly terminate parsed environment values with '\0'.

The function strncpy() does not guarantee to nul terminate the
destination. In most cases, this cannot be triggered, but it is also
used to parse user environment variables. These are allowed to be longer
than 1023 characters, effectively resulting in an unterminated string.

I've adjusted other places as well, because it won't hurt.

https://bugs.freedesktop.org/show_bug.cgi?id=96677

7 years agoChanged 'c' variable 'char' data type to 'int' data type (v3)
Lim Siew Hoon [Thu, 28 Jul 2016 01:12:41 +0000 (09:12 +0800)]
Changed 'c' variable 'char' data type to 'int' data type (v3)

The getopt_long func is return integer data type is more than 1 bytes.

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
7 years agoClean up the duplicate checking for unsuported source YUV format
Lim Siew Hoon [Fri, 1 Jul 2016 05:29:13 +0000 (13:29 +0800)]
Clean up the duplicate checking for unsuported source YUV format

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
7 years agoFix the p->load_huffman_table[0] keep print first element in for loop
Lim Siew Hoon [Fri, 1 Jul 2016 05:29:12 +0000 (13:29 +0800)]
Fix the p->load_huffman_table[0] keep print first element in for loop

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
7 years agoavoid U_row overwrite NULL value if src_fourcc and dst_fourcc is NV12
Lim Siew Hoon [Fri, 1 Jul 2016 05:29:11 +0000 (13:29 +0800)]
avoid U_row overwrite NULL value if src_fourcc and dst_fourcc is NV12

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
7 years agoFix infinite loop
Lim Siew Hoon [Fri, 1 Jul 2016 05:29:10 +0000 (13:29 +0800)]
Fix infinite loop

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
7 years agoAdd assert check memory allocation potential NULL issue
Lim Siew Hoon [Fri, 1 Jul 2016 05:29:09 +0000 (13:29 +0800)]
Add assert check memory allocation potential NULL issue

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
7 years agoFix memory leak issue in open_display func
Lim Siew Hoon [Fri, 1 Jul 2016 05:29:08 +0000 (13:29 +0800)]
Fix memory leak issue in open_display func

If the !d->display is true, will exit without free memory
block allocate for 'd'.

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
7 years agoFix test_06 failed and hitting assert check
Lim Siew Hoon [Fri, 1 Jul 2016 03:13:25 +0000 (11:13 +0800)]
Fix test_06 failed and hitting assert check

Add in missing profile and entrypoint get from va.h

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
7 years agoAvoid access invalid memory location huffman_table for index 2..3 (v2)
Lim Siew Hoon [Fri, 1 Jul 2016 03:13:24 +0000 (11:13 +0800)]
Avoid access invalid memory location huffman_table for index 2..3 (v2)

The size of array huffman_table only 2 in VAHuffmanTableBufferJPEGBaseline
default_huffman_table_param. The index in 2..3 in huffman_table[x] will
be access invalid memory location in for loop that looping 4 times.

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
7 years agoFix buffer overflow for array index out of bounds in test_07
Lim Siew Hoon [Fri, 1 Jul 2016 03:13:23 +0000 (11:13 +0800)]
Fix buffer overflow for array index out of bounds in test_07

The size of array surface_1 is 2, but it passed to test_unique_surfaces
func is 16 or 6 to do compare for surface_16. The index for surface_1
not in the array index range for surface_1 and access invalid memory
location.

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
7 years agoadd assert check for potential NULL issue in test/encode/
Lim Siew Hoon [Fri, 1 Jul 2016 03:13:22 +0000 (11:13 +0800)]
add assert check for potential NULL issue in test/encode/

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
7 years agoadd assert to check for potential NULL issue in test_XX
Lim Siew Hoon [Fri, 1 Jul 2016 03:13:21 +0000 (11:13 +0800)]
add assert to check for potential NULL issue in test_XX

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
7 years agocheck memory alloc to avoid NULL and initialize value in YUV_blend_with_pic (v2)
Lim Siew Hoon [Fri, 1 Jul 2016 02:30:21 +0000 (10:30 +0800)]
check memory alloc to avoid NULL and initialize value in YUV_blend_with_pic (v2)

v2:
Add in second free(NULL) for pic_y and third free(NULL) for pic_u.
Put back 'allocated' missing consider about the pic_y, pic_u and pic_v
will be contains pic_y_old, pic_u_old and pic_v_old will be assign to
pic_y, pic_u and pic_v.

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
7 years agocheck memory allocation and initialize to zero value in save_recyuv (v2)
Lim Siew Hoon [Fri, 1 Jul 2016 02:30:20 +0000 (10:30 +0800)]
check memory allocation and initialize to zero value in save_recyuv (v2)

v2:
Remove not necessary check dst_Y against NULL for sencond free(NULL).
Remove not necessary check dst_Y and dst_U against NULL for second free(NULL)
and third free(NULL).

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
7 years agofix buffer overflow for dc_values and ac_values (v2)
Lim Siew Hoon [Fri, 1 Jul 2016 02:30:19 +0000 (10:30 +0800)]
fix buffer overflow for dc_values and ac_values (v2)

The dc_values only have 12 bytes and ac_value only 162 bytes but the
memcpy did it for 16 bytes and 256 bytes copying thru hard code value.
To avoid the array index out of bound again, recommend move to use sizeof.

v2:
Fix commit message typo from 265 bytes to 256 bytes.

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
7 years agoRemove unused 'id' in va_wayland_drm_create
Lim Siew Hoon [Wed, 22 Jun 2016 11:46:03 +0000 (19:46 +0800)]
Remove unused 'id' in va_wayland_drm_create

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoRemove unused local varibles in upload_source_YUV_once_for_all.
Lim Siew Hoon [Wed, 22 Jun 2016 11:46:02 +0000 (19:46 +0800)]
Remove unused local varibles in upload_source_YUV_once_for_all.

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoRemove unused variable 'id' in va_wayland_emgd_create.
Lim Siew Hoon [Wed, 22 Jun 2016 11:46:01 +0000 (19:46 +0800)]
Remove unused variable 'id' in va_wayland_emgd_create.

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoRemove unused 'k' in test func and pre func.
Lim Siew Hoon [Wed, 22 Jun 2016 11:46:00 +0000 (19:46 +0800)]
Remove unused 'k' in test func and pre func.

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoRemove unused 'i' in va_TraceVAEncPackedHeaderParameterBufferType
Lim Siew Hoon [Wed, 22 Jun 2016 11:45:59 +0000 (19:45 +0800)]
Remove unused 'i' in va_TraceVAEncPackedHeaderParameterBufferType

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoRemove unused 'trace_index' in va_TraceInit
Lim Siew Hoon [Wed, 22 Jun 2016 11:45:58 +0000 (19:45 +0800)]
Remove unused 'trace_index' in va_TraceInit

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoRemove unused 'j' in va_TraceVAPictureParameterBufferVP9.
Lim Siew Hoon [Wed, 22 Jun 2016 11:45:57 +0000 (19:45 +0800)]
Remove unused 'j' in va_TraceVAPictureParameterBufferVP9.

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoRemove unused 'check_sum' and 'j' in va_TraceSurface
Lim Siew Hoon [Wed, 22 Jun 2016 11:45:56 +0000 (19:45 +0800)]
Remove unused 'check_sum' and 'j' in va_TraceSurface

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoRemove unused 'i' and 'buf_list' in va_TraceDestroyBuffer
Lim Siew Hoon [Wed, 22 Jun 2016 11:45:55 +0000 (19:45 +0800)]
Remove unused 'i' and 'buf_list' in va_TraceDestroyBuffer

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agolibva 1.7.1
Xiang, Haihao [Tue, 21 Jun 2016 01:29:25 +0000 (09:29 +0800)]
libva 1.7.1

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agolibva 1.7.2.pre1 for development
Xiang, Haihao [Thu, 2 Jun 2016 17:07:50 +0000 (01:07 +0800)]
libva 1.7.2.pre1 for development

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agoUpdate NEWS
Xiang, Haihao [Thu, 2 Jun 2016 14:37:48 +0000 (22:37 +0800)]
Update NEWS

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agofix check NULL issues
peng.chen [Fri, 27 May 2016 05:16:20 +0000 (13:16 +0800)]
fix check NULL issues

v2:
code clean up

v1:
initial

Signed-off-by: peng.chen <peng.c.chen@intel.com>
7 years agoBump VA-API version to 0.39.2
Xiang, Haihao [Fri, 27 May 2016 05:07:47 +0000 (13:07 +0800)]
Bump VA-API version to 0.39.2

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agoAdd API for VP9 Encode
Wang, Ce [Thu, 26 May 2016 01:56:41 +0000 (09:56 +0800)]
Add API for VP9 Encode

Signed-off-by: Wang, Ce <ce.wang@intel.com>
Signed-off-by: bzhao11 <bo.zhao@intel.com>
[Haihao: include va_enc_vp9.h in va core include file]
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit 1c314d6a6e6aad9c73ec4837d78e4e3c99137f3b)

7 years agoFix missing parameter of vatrace DisplayAttribute print
Austin Yuan [Tue, 24 May 2016 06:57:25 +0000 (14:57 +0800)]
Fix missing parameter of vatrace DisplayAttribute print

[49270.199330] ==========va_TraceMaxNumDisplayAttributes
[49270.199334]  max_display_attributes = 6
[49270.199362]  num_attributes = 5
[49270.199365]  attr_list[-1429804448] =
[49270.199367]    typ = 0x00000000

Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
7 years agotrace: Cleanup some HEVC prints
Scott D Phillips [Tue, 17 May 2016 22:29:08 +0000 (15:29 -0700)]
trace: Cleanup some HEVC prints

Some fields in HEVC buffers had extraneous timestamps interspersed
with the traced data.

Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agotrace: Add `va_TracePrint`, `va_TraceVPrint` static functions
Scott D Phillips [Tue, 17 May 2016 22:29:07 +0000 (15:29 -0700)]
trace: Add `va_TracePrint`, `va_TraceVPrint` static functions

These functions are similar to va_TraceMsg() but without emitting
a timestamp.

Signed-off-by: Scott D Phillips <scott.d.phillips@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
7 years agoadd the support of multiple context tracing
peng.chen [Wed, 11 May 2016 07:03:26 +0000 (15:03 +0800)]
add the support of multiple context tracing

Libva has a limited tracing function before. If more than one context is created
in one instance, then this tracing can't work and output wrong log messages.
This patch fixes this problem. Tracing is possible while multiple contexts are
being used.

Each log file name is suffixed by thread id. This file has all log message from
this thread. Each surface or codedbuf dump file name is suffixed by context id.
This file has all surface or codedbuf data of this context.

Signed-off-by: peng.chen <peng.c.chen@intel.com>
Reviewed-by: Sean V Kelley <sean.v.kelley@intel.com>
Tested-by: Daniel Charles <daniel.charles@intel.com>
7 years agoBump VA-API version to 0.39.1
Xiang, Haihao [Wed, 11 May 2016 02:57:31 +0000 (10:57 +0800)]
Bump VA-API version to 0.39.1

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
7 years agotest/encode/avcenc: Add support for low power mode
Xiang, Haihao [Mon, 23 Nov 2015 05:05:02 +0000 (13:05 +0800)]
test/encode/avcenc: Add support for low power mode

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-By: Sean V Kelley <sean.v.kelley@intel.com>
7 years agotest/encode/avcenc: use getopt_long_only() to parse optional command-line options
Xiang, Haihao [Mon, 23 Nov 2015 04:37:09 +0000 (12:37 +0800)]
test/encode/avcenc: use getopt_long_only() to parse optional command-line options

It's convenient to add new option later

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-By: Sean V Kelley <sean.v.kelley@intel.com>
7 years agoAdd Macroblock based rate control method.
pylee [Wed, 30 Oct 2013 20:43:49 +0000 (13:43 -0700)]
Add Macroblock based rate control method.

Signed-off-by: pylee <penne.y.lee@intel.com>
Reviewed-By: Sean V Kelley <sean.v.kelley@intel.com>
7 years agoMerge ROI patches from staging branch
pylee [Wed, 30 Oct 2013 19:17:53 +0000 (12:17 -0700)]
Merge ROI patches from staging branch

Cherry-pick'ed from:
26cc3b0: Add Region-of-Interest (ROI) support for encoder based on user provided ROI rectangles.
84b90a3: ROI updates for encoder.

Signed-off-by: pylee <penne.y.lee@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-By: Sean V Kelley <sean.v.kelley@intel.com>
7 years agoAdd the missing entrypoints in vainfo list
Yuan, Shengquan [Thu, 21 Apr 2016 07:47:31 +0000 (07:47 +0000)]
Add the missing entrypoints in vainfo list

It is a part of 624838b in staging branch

Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
Reviewed-By: Sean V Kelley <sean.v.kelley@intel.com>
7 years agoAdded VAEntrypointEncSliceLP for implementations to expose a low power/high performan...
Jonathan Bian [Wed, 30 Oct 2013 17:03:06 +0000 (10:03 -0700)]
Added VAEntrypointEncSliceLP for implementations to expose a low power/high performance variant of slice level encoding entrypoint.

Signed-off-by: Jonathan Bian <jonathan.bian@intel.com>
Reviewed-By: Sean V Kelley <sean.v.kelley@intel.com>
(cherry picked from commit 71030701cef0c1099e87d112f3207cb78a6ce711)

8 years agogcc suggests not putting ; at end of if statements
Alan Coopersmith [Sat, 9 Apr 2016 18:00:06 +0000 (11:00 -0700)]
gcc suggests not putting ; at end of if statements

dri2_util.c: In function 'dri2Close':
dri2_util.c:171:33: warning: suggest braces around empty body in an 'if'
   statement [-Wempty-body]
     if (dri_state->base.fd >= 0);
                                 ^

Introduced-by: commit fffeffb8a78fffbb6a May 30 2011
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
8 years agolibva 1.7.1.pre1 for development
Xiang, Haihao [Thu, 17 Mar 2016 01:06:45 +0000 (09:06 +0800)]
libva 1.7.1.pre1 for development

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
8 years agolibva 1.7.0
Xiang, Haihao [Tue, 15 Mar 2016 06:33:43 +0000 (14:33 +0800)]
libva 1.7.0

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
8 years agoAllow loading the backend driver built against VAAPI 0.38
Xiang, Haihao [Tue, 15 Mar 2016 06:57:13 +0000 (14:57 +0800)]
Allow loading the backend driver built against VAAPI 0.38

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
8 years agoUpdate NEWS
Xiang, Haihao [Fri, 4 Mar 2016 04:09:29 +0000 (12:09 +0800)]
Update NEWS

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
8 years agoBump VA-API to 0.39
Xiang, Haihao [Thu, 3 Mar 2016 04:59:41 +0000 (12:59 +0800)]
Bump VA-API to 0.39

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
8 years agoMerge remote-tracking branch 'fdo/v1.6-branch' into fdo--master
Xiang, Haihao [Thu, 3 Mar 2016 05:00:43 +0000 (13:00 +0800)]
Merge remote-tracking branch 'fdo/v1.6-branch' into fdo--master

8 years agoglx: check OpenGL 3.1 extensions
Cyril Drouet [Wed, 2 Mar 2016 10:21:51 +0000 (11:21 +0100)]
glx: check OpenGL 3.1 extensions

I successfully implemented hardware decoding with VAAPI via FFmpeg
by copying the data back to the CPU's memory; however, when I tried
to use the data directly from the GPU (instead of copying them back)
by using VA/GLX to convert the decoded VASurfaces to OpenGL textures,
I ran into some issues.

With the latest version of libva, vaCreateSurfaceGLX fails all the time
when I set OpenGL to 3.1 or above. If I set it to 3.0, then it doesn't
fail, and everything works correctly. I downloaded the sources of libva
and it fails when checking for GL extensions because of the use of
glGetString(GL_EXTENSIONS) which is deprecated. I have implemented a fix
on my end (which I've attached for convenience) which works well for me
but I haven't done a lot of testing, and I would rather use the official
version of libva.

Signed-off-by: Cyril Drouet <cyril.drouet@immerex.com>
Signed-off-by: Víctor Jáquez <vjaquez@igalia.com>
8 years agodriver_name_map: add nouveau and radeon for Mesa Gallium
Julien Isorce [Fri, 27 Nov 2015 08:53:45 +0000 (08:53 +0000)]
driver_name_map: add nouveau and radeon for Mesa Gallium

This patch allows va_getDriverName to succeed.
It is useful in vaInitialize to select the vaapi
driver provided by Mesa Gallium:
lib/dri/gallium_drv_video.so

Signed-off-by: Julien Isorce <j.isorce@samsung.com>
8 years agoadd the support of enum VAProfileVP9Profile1~3 for vainfo
peng.chen [Wed, 27 Jan 2016 07:05:26 +0000 (15:05 +0800)]
add the support of enum VAProfileVP9Profile1~3 for vainfo

Signed-off-by: peng.chen <peng.c.chen@intel.com>
(cherry picked from commit 09b2f1f637390318236c11312898e3f4906c9581)

8 years agoAdd support for 10b vp9 decode
Wang, Ce [Wed, 27 Jan 2016 07:03:36 +0000 (15:03 +0800)]
Add support for 10b vp9 decode

v2:
recover VAProfileVP9Profile1~3 from the original patch

v1:
initial

Signed-off-by: Sun, Maggie <maggie.sun@intel.com>
Signed-off-by: peng.chen <peng.c.chen@intel.com>
(cherry picked from commit 000622dad919387ac40f3ad48157d5db925c1ce9)

8 years agoAvoid reaching div by zero
Lim Siew Hoon [Thu, 7 Jan 2016 08:37:23 +0000 (16:37 +0800)]
Avoid reaching div by zero

Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
(cherry picked from commit cb418f6ef36b6e6f0d632bf7c0aaf035a271400b)

8 years agolibva 1.6.3.pre1 for development
Xiang, Haihao [Sun, 13 Dec 2015 17:28:41 +0000 (01:28 +0800)]
libva 1.6.3.pre1 for development

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit 6ef997f03eba8fcabfe3a2ac1546bbaf924e519f)

Conflicts:
configure.ac