aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Hu <austin.hu@intel.com>2017-07-11 19:26:35 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-07-11 19:26:35 +0000
commit36924e59db60784d443365d2135a014751e721fe (patch)
tree5a43236361f3b072ef842e18e5660a32ee118a73
parenta4d89c591e3c358e8dc870aeeeb1abc6d245b48f (diff)
parent51b6724ae2a4b51d6b993edbb4cc2e71ecbbfccc (diff)
downloadpsb_video-36924e59db60784d443365d2135a014751e721fe.tar.gz
Worked around the random CTS testOtherH264ImageReader & DecodeAccuracyTest failure. am: dfc4b4b2ca am: d5c862143d
am: 51b6724ae2 Change-Id: I4cef4616bcc923133eb2cec2b63564858a61d569
-rwxr-xr-xsrc/psb_drv_video.c14
-rwxr-xr-xsrc/psb_drv_video.h3
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;