diff options
author | Austin Hu <austin.hu@intel.com> | 2017-07-08 23:16:42 +0800 |
---|---|---|
committer | Daniel Cardenas <danielcar@google.com> | 2017-07-11 10:05:48 -0700 |
commit | dfc4b4b2cafeb307a4531f88ea4eb13fddf84e3c (patch) | |
tree | d1e9bae474b5b5be26d14e3f1d5e86b358d4b2c8 | |
parent | 19045e10b7d7ed42f4b60f00e055ca226bba39ae (diff) | |
download | psb_video-dfc4b4b2cafeb307a4531f88ea4eb13fddf84e3c.tar.gz |
Worked around the random CTS testOtherH264ImageReader & DecodeAccuracyTest failure.android-vts-8.0_r2android-vts-8.0_r1
Bug: 37283516, 62788295, 38138788, 32717946
BZ: IMINAN-51520, IMINAN-51500, IMINAN-51528
To make the workaround in video kernel mode driver take effect.
Test: Netflix, play movies, youtube
Change-Id: Ia8a73e673b88066c70d51ee686659c3e5adf1611
Signed-off-by: Austin Hu <austin.hu@intel.com>
(cherry picked from commit 531fbe107e8e1186cc54670cc85d941e09ebf81b)
-rwxr-xr-x | src/psb_drv_video.c | 14 | ||||
-rwxr-xr-x | src/psb_drv_video.h | 3 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/psb_drv_video.c b/src/psb_drv_video.c index 9f5b465..7d46aff 100755 --- a/src/psb_drv_video.c +++ b/src/psb_drv_video.c @@ -1496,9 +1496,15 @@ VAStatus psb_CreateContext( if (obj_config->profile == VAProfileVC1Simple || obj_config->profile == VAProfileVC1Main || - obj_config->profile == VAProfileVC1Advanced) { + obj_config->profile == VAProfileVC1Advanced || + obj_config->profile == VAProfileH264Baseline || + obj_config->profile == VAProfileH264Main || + obj_config->profile == VAProfileH264High || + obj_config->profile == VAProfileVP8Version0_3) { uint64_t width_in_mb = ((driver_data->render_rect.x + driver_data->render_rect.width + 15) / 16); + uint64_t height_in_mb = ((driver_data->render_rect.y + driver_data->render_rect.height + 15) / 16); obj_context->ctp_type |= (width_in_mb << 32); + obj_context->ctp_type |= (height_in_mb << 48); } /* add ctx_num to save vp8 enc context num to support dual vp8 encoding */ @@ -2200,6 +2206,12 @@ VAStatus psb_BeginPicture( } } + if ((driver_data->protected & VA_RT_FORMAT_PROTECTED) && + !(obj_context->ctp_type & VA_RT_FORMAT_PROTECTED)) { + obj_context->ctp_type |= VA_RT_FORMAT_PROTECTED; + psb_update_context(driver_data, obj_context->ctp_type); + } + /* if the surface is decode render target, and in displaying */ if (obj_config && (obj_config->entrypoint != VAEntrypointEncSlice) && diff --git a/src/psb_drv_video.h b/src/psb_drv_video.h index 6df3424..7f404db 100755 --- a/src/psb_drv_video.h +++ b/src/psb_drv_video.h @@ -440,7 +440,8 @@ struct object_context_s { * bytes[1]: profile * bytes[2]: tile stride | rotated tile stride * bytes[3]: driver_data->protected - * bytes[4]: width_in_mb; pass width kernel for VC1 workaround + * bytes[4]: width_in_mb; pass width kernel for VC1/H.264 workaround + * bytes[5]: height_in_mb; pass width kernel for VC1/H.264 workaround */ uint64_t ctp_type; |