From a63afb68c501d169a5cf2af4938fc49653312d5c Mon Sep 17 00:00:00 2001 From: ChenSiyong Date: Fri, 3 Jun 2016 06:28:44 +0000 Subject: [PATCH] [vpu_legacy] process with mask for video bit depth git-svn-id: https://10.10.10.66:8443/svn/MediaProcessPlatform/trunk/mpp@869 6e48237b-75ef-9749-8fc9-41990f28c85a --- mpp/legacy/vpu_api_legacy.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/mpp/legacy/vpu_api_legacy.cpp b/mpp/legacy/vpu_api_legacy.cpp index d803489d..51ff1e52 100644 --- a/mpp/legacy/vpu_api_legacy.cpp +++ b/mpp/legacy/vpu_api_legacy.cpp @@ -345,11 +345,20 @@ RK_S32 VpuApi::control(VpuCodecContext *ctx, VPU_API_CMD cmd, void *param) case VPU_API_SET_DEFAULT_WIDTH_HEIGH: { VPU_GENERIC *p = (VPU_GENERIC *)param; mpicmd = MPP_CODEC_SET_FRAME_INFO; + RK_U32 ImgWidth = p->ImgWidth; + /**hightest of p->ImgWidth bit show current dec bitdepth + * 0 - 8bit + * 1 - 10bit + **/ + if(((p->ImgWidth&0x80000000)>>31)){ + p->ImgWidth = (p->ImgWidth&0x7FFFFFFF); + ImgWidth = (p->ImgWidth *10)>>3; + } if (ctx->videoCoding == OMX_RK_VIDEO_CodingHEVC) { - p->ImgHorStride = hevc_ver_align_256_odd(p->ImgWidth); + p->ImgHorStride = hevc_ver_align_256_odd(ImgWidth); p->ImgVerStride = hevc_ver_align_8(p->ImgHeight); } else { - p->ImgHorStride = default_align_16(p->ImgWidth); + p->ImgHorStride = default_align_16(ImgWidth); p->ImgVerStride = default_align_16(p->ImgHeight); } break;