diff options
author | Austin Hu <austin.hu@intel.com> | 2017-07-11 19:22:58 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-07-11 19:22:58 +0000 |
commit | b89bcc9ae9e5fe7187f6bc62f171c8cce0b4e489 (patch) | |
tree | 37198171431d8fd3afcb9d8bc3bace99f6d549c8 | |
parent | 8a6bf7a07d49e7f3b6214a899209103c233589e9 (diff) | |
parent | c931ff22933c9a02a17b0bac52a1a83c2e034559 (diff) | |
download | psb_video-b89bcc9ae9e5fe7187f6bc62f171c8cce0b4e489.tar.gz |
Worked around the random CTS testOtherH264ImageReader & DecodeAccuracyTest failure. am: dfc4b4b2ca
am: c931ff2293
Change-Id: Id707166973c801f33d1bf02fd138d5a8aae75e95
-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 73bfcda..0d7ea60 100755 --- a/src/psb_drv_video.h +++ b/src/psb_drv_video.h @@ -439,7 +439,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; |