diff options
author | Sun, Jian <jianx.sun@intel.com> | 2014-05-27 11:24:24 +0800 |
---|---|---|
committer | Patrick Tjin <pattjin@google.com> | 2014-07-21 22:06:38 -0700 |
commit | ea19f5543d17793f6a03e37e27a9b4f1fbc781bc (patch) | |
tree | 16b316cee4e17274ba9e6980f7b12fec782562cf | |
parent | 2f3a46feb9905f73c9ad9e45177b755dbf5fbd0d (diff) | |
download | android_hardware_intel_img_psb_video-ea19f5543d17793f6a03e37e27a9b4f1fbc781bc.tar.gz android_hardware_intel_img_psb_video-ea19f5543d17793f6a03e37e27a9b4f1fbc781bc.tar.bz2 android_hardware_intel_img_psb_video-ea19f5543d17793f6a03e37e27a9b4f1fbc781bc.zip |
VED: pass video width information to kernel
BZ: 198675
pass video width information to kernel for VC1 decode, the info is needed for kernel to make workaround
Change-Id: Idf2d410bea6ace549248354f3d24ca9361a262b4
Signed-off-by: Sun, Jian <jianx.sun@intel.com>
-rwxr-xr-x | src/psb_drv_video.c | 9 | ||||
-rwxr-xr-x | src/psb_drv_video.h | 11 |
2 files changed, 18 insertions, 2 deletions
diff --git a/src/psb_drv_video.c b/src/psb_drv_video.c index d2e7daf..228733e 100755 --- a/src/psb_drv_video.c +++ b/src/psb_drv_video.c @@ -928,7 +928,7 @@ VAStatus psb_DestroySurfaces( return VA_STATUS_SUCCESS; } -int psb_new_context(psb_driver_data_p driver_data, int ctx_type) +int psb_new_context(psb_driver_data_p driver_data, uint64_t ctx_type) { struct drm_lnc_video_getparam_arg arg; int ret = 0; @@ -1374,6 +1374,13 @@ VAStatus psb_CreateContext( obj_context->ctp_type |= ((obj_context->msvdx_tile & 0xff) << 16); } + if (obj_config->profile == VAProfileVC1Simple || + obj_config->profile == VAProfileVC1Main || + obj_config->profile == VAProfileVC1Advanced) { + uint64_t width_in_mb = ((driver_data->render_rect.x + driver_data->render_rect.width + 15) / 16); + obj_context->ctp_type |= (width_in_mb << 32); + } + /* add ctx_num to save vp8 enc context num to support dual vp8 encoding */ int ret = psb_new_context(driver_data, obj_context->ctp_type | driver_data->protected); if (ret) diff --git a/src/psb_drv_video.h b/src/psb_drv_video.h index 7ecc8ce..14627eb 100755 --- a/src/psb_drv_video.h +++ b/src/psb_drv_video.h @@ -409,7 +409,16 @@ struct object_context_s { int msvdx_rotate; int msvdx_scaling; int interlaced_stream; - unsigned long ctp_type; + + /* value is 64bits value, consist of 8 bytes + * bytes[0]: entrypoint + * 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 + */ + uint64_t ctp_type; + unsigned long msvdx_tile; /* normal tile | (rotate tile << 4) */ #ifdef SLICE_HEADER_PARSING int msvdx_frame_end; |