summaryrefslogtreecommitdiffstats
path: root/src/pnw_H264.c
diff options
context:
space:
mode:
authorLi Zeng <li.zeng@intel.com>2013-08-31 06:30:54 +0800
committerPatrick Tjin <pattjin@google.com>2014-07-21 22:06:27 -0700
commit4d06c1febaa800c6a9efb9908a2c6233472c7464 (patch)
treecfd586abd8bb6e2cd55acc83d7e567029b0a4f9e /src/pnw_H264.c
parent8ed711d50371b21e8611381b631b509dc566c9ff (diff)
downloadandroid_hardware_intel_img_psb_video-4d06c1febaa800c6a9efb9908a2c6233472c7464.tar.gz
android_hardware_intel_img_psb_video-4d06c1febaa800c6a9efb9908a2c6233472c7464.tar.bz2
android_hardware_intel_img_psb_video-4d06c1febaa800c6a9efb9908a2c6233472c7464.zip
VED: Enable VED buffer scaling
BZ: 134818 Enable VED buffer scaling Change-Id: I084e15a29f3019f1b2c5f43ab20f798829229bd1 Signed-off-by: Li Zeng <li.zeng@intel.com>
Diffstat (limited to 'src/pnw_H264.c')
-rw-r--r--src/pnw_H264.c22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/pnw_H264.c b/src/pnw_H264.c
index 7644158..c8371cb 100644
--- a/src/pnw_H264.c
+++ b/src/pnw_H264.c
@@ -1670,7 +1670,7 @@ static VAStatus pnw_H264_EndPicture(
if (ctx->two_pass_mode) {
psb_buffer_p colocated_target_buffer = vld_dec_lookup_colocated_buffer(&ctx->dec_ctx, target_surface);
- psb_surface_p rotate_surface = ctx->obj_context->current_render_target->psb_surface_rotate;
+ psb_surface_p rotate_surface = ctx->obj_context->current_render_target->out_loop_surface;
uint32_t rotation_flags = 0;
uint32_t ext_stride_a = 0;
@@ -1763,6 +1763,15 @@ static VAStatus pnw_H264_EndPicture(
}
#endif
+ /* if scaling is enabled, rotate is not performed in 1st pass */
+ if (CONTEXT_ROTATE(obj_context) && CONTEXT_SCALING(obj_context))
+ {
+ vld_dec_yuv_rotate(obj_context,
+ ctx->picture_width_mb * 16,
+ ctx->picture_height_mb * 16);
+ ctx->dec_ctx.process_buffer = pnw_H264_process_buffer;
+ }
+
if (psb_context_flush_cmdbuf(ctx->obj_context)) {
return VA_STATUS_ERROR_UNKNOWN;
}
@@ -1777,17 +1786,6 @@ static VAStatus pnw_H264_EndPicture(
ctx->iq_matrix = NULL;
}
-/*
- obj_context->msvdx_rotate = 1;
- driver_data->msvdx_rotate_want = 1;
- if (CONTEXT_ROTATE(obj_context))
- {
- vld_dec_yuv_rotate(obj_context,
- ctx->picture_width_mb * 16,
- ctx->picture_height_mb * 16);
- }
-*/
-
return VA_STATUS_SUCCESS;
}