• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

hardware/intel/common/vaapi


Commit MetaInfo

Revisión17bc8a0cb96b6ef02475ad598c626cd9e266a1cc (tree)
Tiempo2017-07-13 15:15:29
AutorXiang, Haihao <haihao.xiang@inte...>
CommiterXiang, Haihao

Log Message

Don't check the stride in the y direction for a single plane surface

obj_surface->height is used to calculate the offset for U/V plane. for a
surface with single plane, the check is unnecessary

This fixes https://github.com/01org/intel-vaapi-driver/issues/222

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Daniel Charles <daniel.charles@intel.com>
Tested-by: Daniel Charles <daniel.charles@intel.com>

Cambiar Resumen

Diferencia incremental

--- a/src/i965_drv_video.c
+++ b/src/i965_drv_video.c
@@ -1516,15 +1516,22 @@ i965_suface_external_memory(VADriverContextP ctx,
15161516 obj_surface->height = memory_attibute->data_size / obj_surface->width;
15171517 else
15181518 obj_surface->height = memory_attibute->offsets[1] / obj_surface->width;
1519- ASSERT_RET(IS_ALIGNED(obj_surface->height, 16), VA_STATUS_ERROR_INVALID_PARAMETER);
1520- ASSERT_RET(obj_surface->height >= obj_surface->orig_height, VA_STATUS_ERROR_INVALID_PARAMETER);
1519+
1520+ if (memory_attibute->num_planes > 1) {
1521+ ASSERT_RET(IS_ALIGNED(obj_surface->height, 16), VA_STATUS_ERROR_INVALID_PARAMETER);
1522+ ASSERT_RET(obj_surface->height >= obj_surface->orig_height, VA_STATUS_ERROR_INVALID_PARAMETER);
1523+ }
15211524
15221525 if (tiling) {
15231526 ASSERT_RET(IS_ALIGNED(obj_surface->width, 128), VA_STATUS_ERROR_INVALID_PARAMETER);
1524- ASSERT_RET(IS_ALIGNED(obj_surface->height, 32), VA_STATUS_ERROR_INVALID_PARAMETER);
1527+
1528+ if (memory_attibute->num_planes > 1)
1529+ ASSERT_RET(IS_ALIGNED(obj_surface->height, 32), VA_STATUS_ERROR_INVALID_PARAMETER);
15251530 } else {
15261531 ASSERT_RET(IS_ALIGNED(obj_surface->width, i965->codec_info->min_linear_wpitch), VA_STATUS_ERROR_INVALID_PARAMETER);
1527- ASSERT_RET(IS_ALIGNED(obj_surface->height, i965->codec_info->min_linear_hpitch), VA_STATUS_ERROR_INVALID_PARAMETER);
1532+
1533+ if (memory_attibute->num_planes > 1)
1534+ ASSERT_RET(IS_ALIGNED(obj_surface->height, i965->codec_info->min_linear_hpitch), VA_STATUS_ERROR_INVALID_PARAMETER);
15281535 }
15291536
15301537 obj_surface->x_cb_offset = 0; /* X offset is always 0 */