aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSunita Nadampalli2013-09-20 15:52:55 -0500
committerSunita Nadampalli2013-09-23 11:13:41 -0500
commit8ba74367a00526b8b79c25ab837bc542955cec3b (patch)
tree7e487943fa781c364f3144e5707b699976cc40eb /libdce.c
parent50fb84c011c169b79079afe27738c07dc4e1d6e5 (diff)
downloadrepo-libdce-8ba74367a00526b8b79c25ab837bc542955cec3b.tar.gz
repo-libdce-8ba74367a00526b8b79c25ab837bc542955cec3b.tar.xz
repo-libdce-8ba74367a00526b8b79c25ab837bc542955cec3b.zip
[LIBDCE][ANDROID] unify 1D output buffer support for Android/Linux
Android omx components are modified to support dma buf fd for the output buffers, in all scenarios. Hence Android specific changes are removed from libdce, and enabled linux code for android as well. Change-Id: I8bf86803b40702d28ba0c45fd829b35fb47445fd Signed-off-by: Sunita Nadampalli <sunitan@ti.com>
Diffstat (limited to 'libdce.c')
-rw-r--r--libdce.c25
1 files changed, 1 insertions, 24 deletions
diff --git a/libdce.c b/libdce.c
index 63b548a..ae8771e 100644
--- a/libdce.c
+++ b/libdce.c
@@ -501,7 +501,6 @@ static XDAS_Int32 process(void *codec, void *inBufs, void *outBufs,
501 501
502#ifdef BUILDOS_ANDROID 502#ifdef BUILDOS_ANDROID
503 int32_t inbuf_offset[MAX_INPUT_BUF]; 503 int32_t inbuf_offset[MAX_INPUT_BUF];
504 int32_t outbuf_offset[MAX_OUTPUT_BUF];
505#endif 504#endif
506 505
507 _ASSERT(codec != NULL, DCE_EINVALID_INPUT); 506 _ASSERT(codec != NULL, DCE_EINVALID_INPUT);
@@ -566,7 +565,7 @@ static XDAS_Int32 process(void *codec, void *inBufs, void *outBufs,
566 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), OUTBUFS_INDEX, MmRpc_OFFSET((int32_t)outBufs, (int32_t)data_buf), 565 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), OUTBUFS_INDEX, MmRpc_OFFSET((int32_t)outBufs, (int32_t)data_buf),
567 (size_t)*data_buf, (size_t)*data_buf); 566 (size_t)*data_buf, (size_t)*data_buf);
568 } 567 }
569#if defined(BUILDOS_LINUX) 568#if defined(BUILDOS_LINUX) || defined(BUILDOS_ANDROID)
570 else { 569 else {
571 /* SinglePlanar Buffers for Decode usecase*/ 570 /* SinglePlanar Buffers for Decode usecase*/
572 data_buf = (void * *)(&(((XDM2_BufDesc *)outBufs)->descs[count].buf)); 571 data_buf = (void * *)(&(((XDM2_BufDesc *)outBufs)->descs[count].buf));
@@ -582,19 +581,6 @@ static XDAS_Int32 process(void *codec, void *inBufs, void *outBufs,
582 } 581 }
583 } 582 }
584 } 583 }
585#elif defined(BUILDOS_ANDROID)
586 else {
587 /* SinglePlanar Buffers for Decode usecase*/
588 /* the decoder out buffers allocated from non2D region have an offset */
589 /* for the UV data. the offset within the input buffer is provided */
590 /* via memheader offset field. Hence the buf ptr needs to be advanced with the offset */
591 data_buf = (void * *)(&(((XDM2_BufDesc *)outBufs)->descs[count].buf));
592 outbuf_offset[count] = P2H(*data_buf)->offset;
593 Fill_MmRpc_fxnCtx_Xlt_Array(&(fxnCtx.xltAry[total_count]), OUTBUFS_INDEX, MmRpc_OFFSET((int32_t)outBufs, (int32_t)data_buf), (size_t)P2H(*data_buf), (size_t)memplugin_share((void*)*data_buf));
594 if(count == CHROMA_BUF) {
595 *data_buf += outbuf_offset[count];
596 }
597 }
598#endif 584#endif
599 } 585 }
600 586
@@ -612,15 +598,6 @@ static XDAS_Int32 process(void *codec, void *inBufs, void *outBufs,
612 *data_buf -= inbuf_offset[count]; 598 *data_buf -= inbuf_offset[count];
613 } 599 }
614 } 600 }
615 /* Output Buffers */
616 for( count = 0; count < numOutBufs; count++ ) {
617 /* restore the actual ptr for UV buffer allocated from */
618 /* non2D region */
619 if(count == CHROMA_BUF && outbuf_offset[count]) {
620 data_buf = (void * *)(&(((XDM2_BufDesc *)outBufs)->descs[count].buf));
621 *data_buf -= outbuf_offset[count];
622 }
623 }
624 601
625#endif 602#endif
626 603