summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevaraj Rangasamy <dev@ti.com>2012-09-12 15:24:57 +0530
committerDevaraj Rangasamy <dev@ti.com>2012-09-12 15:24:57 +0530
commit56f71200f952d2e3fdf0af414f6c38bc44c8259f (patch)
treee7ede6e12f042b1a0ef1e930e355ffc84d8658e0
parent37c647fbfab52f3c40918fed1a5d117510dbb406 (diff)
downloadhardware_ti_omap4-56f71200f952d2e3fdf0af414f6c38bc44c8259f.zip
hardware_ti_omap4-56f71200f952d2e3fdf0af414f6c38bc44c8259f.tar.gz
hardware_ti_omap4-56f71200f952d2e3fdf0af414f6c38bc44c8259f.tar.bz2
Raw dump utility: fix for continuos NV12.
Raw dump utility was broken due to changing NV12 to be continuous in memory, this patch changes the algorithm for getting Y and UV parts according the new implementation. Change-Id: I639471d0159bab5d027d762719e0d97afd1586d6 Signed-off-by: Illia Ragozin <x0160199@ti.com> Signed-off-by: Devaraj Rangasamy <dev@ti.com>
-rwxr-xr-xdomx/omx_proxy_common.h3
-rwxr-xr-xomx_proxy_component/omx_video_dec/src/omx_proxy_videodec.c1
-rwxr-xr-xomx_proxy_component/omx_video_dec/src/omx_proxy_videodec_utils.c9
3 files changed, 9 insertions, 4 deletions
diff --git a/domx/omx_proxy_common.h b/domx/omx_proxy_common.h
index 7c7d6c8..2ced279 100755
--- a/domx/omx_proxy_common.h
+++ b/domx/omx_proxy_common.h
@@ -234,7 +234,8 @@ extern "C"
OMX_U32 frame_width;
OMX_U32 frame_height;
OMX_U32 frame_xoffset;
- OMX_U32 frame_yoffset;
+ OMX_U32 frame_yoffset;
+ OMX_U32 decoded_height;
OMX_U32 stride;
OMX_S32 runningFrame;
OMX_U32 *y_uv[2];
diff --git a/omx_proxy_component/omx_video_dec/src/omx_proxy_videodec.c b/omx_proxy_component/omx_video_dec/src/omx_proxy_videodec.c
index 8ac4c9d..db84dae 100755
--- a/omx_proxy_component/omx_video_dec/src/omx_proxy_videodec.c
+++ b/omx_proxy_component/omx_video_dec/src/omx_proxy_videodec.c
@@ -693,6 +693,7 @@ OMX_ERRORTYPE PROXY_VIDDEC_FillThisBuffer(OMX_HANDLETYPE hComponent, OMX_BUFFERH
pCompPrv->debugframeInfo.frame_height = rect.nHeight;
pCompPrv->debugframeInfo.frame_xoffset = rect.nLeft;
pCompPrv->debugframeInfo.frame_yoffset = rect.nTop;
+ pCompPrv->debugframeInfo.decoded_height = sPortDef.format.video.nFrameHeight;
#endif
pCompPrv->grallocModule->lock((gralloc_module_t const *) pCompPrv->grallocModule,
(buffer_handle_t)grallocHandle, GRALLOC_USAGE_HW_RENDER,
diff --git a/omx_proxy_component/omx_video_dec/src/omx_proxy_videodec_utils.c b/omx_proxy_component/omx_video_dec/src/omx_proxy_videodec_utils.c
index 949d46a..98abe71 100755
--- a/omx_proxy_component/omx_video_dec/src/omx_proxy_videodec_utils.c
+++ b/omx_proxy_component/omx_video_dec/src/omx_proxy_videodec_utils.c
@@ -256,10 +256,13 @@ static void convertNV12ToYuv420(DebugFrame_Dump *frameInfo, void *dst)
* rearrange from packed planar [uvuvuv] to planar [uuu][vvvv] packages pixel wise
* calculate the offset for UV buffer
*/
- uint32_t UV_offset = frameInfo->frame_xoffset +
- (frameInfo->frame_yoffset * stride)/2;
- const uint8_t* p1uv = (uint8_t*)frameInfo->y_uv[1] + UV_offset;
+ uint32_t UV_offset = frameInfo->frame_xoffset
+ + (frameInfo->decoded_height
+ + frameInfo->frame_yoffset / 2)
+ * stride;
+
+ const uint8_t* p1uv = (uint8_t*)frameInfo->y_uv[0] + UV_offset;
uint8_t* p2u = ((uint8_t*) dst + (width * height));
uint8_t* p2v = ((uint8_t*) p2u + ((width/2) * (height/2)));