aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libdce.c2
-rw-r--r--memplugin.h2
-rw-r--r--test_qnx/dce_enc_test/dce_enc_test.c16
-rw-r--r--test_qnx/dce_test/dce_test.c11
4 files changed, 16 insertions, 15 deletions
diff --git a/libdce.c b/libdce.c
index 881516e..7704613 100644
--- a/libdce.c
+++ b/libdce.c
@@ -153,7 +153,7 @@ void *dce_alloc(int sz)
153 Beware: The last argument is a bit field. As of now only core ID 153 Beware: The last argument is a bit field. As of now only core ID
154 is considered to be there in the last 4 bits of the word 154 is considered to be there in the last 4 bits of the word
155 */ 155 */
156 return (memplugin_alloc(sz, 1, MEM_TILER_1D, 0, IPU)); 156 return (memplugin_alloc(sz, 1, DEFAULT_REGION, 0, IPU));
157} 157}
158 158
159void dce_free(void *ptr) 159void dce_free(void *ptr)
diff --git a/memplugin.h b/memplugin.h
index 0073cf1..26562e3 100644
--- a/memplugin.h
+++ b/memplugin.h
@@ -49,7 +49,7 @@
49#include <tilermem.h> 49#include <tilermem.h>
50#include <SharedMemoryAllocatorUsr.h> 50#include <SharedMemoryAllocatorUsr.h>
51#include <memmgr.h> 51#include <memmgr.h>
52#define DEFAULT_REGION MEM_TILER_1D 52#define DEFAULT_REGION MEM_SHARED
53 53
54#elif defined (BUILDOS_ANDROID) 54#elif defined (BUILDOS_ANDROID)
55#define DEFAULT_REGION MEM_CARVEOUT 55#define DEFAULT_REGION MEM_CARVEOUT
diff --git a/test_qnx/dce_enc_test/dce_enc_test.c b/test_qnx/dce_enc_test/dce_enc_test.c
index cbc80e3..092703a 100644
--- a/test_qnx/dce_enc_test/dce_enc_test.c
+++ b/test_qnx/dce_enc_test/dce_enc_test.c
@@ -264,9 +264,10 @@ int read_input(const char *pattern, int cnt, char *input)
264 264
265 sz = width * height * 3 / 2; 265 sz = width * height * 3 / 2;
266 266
267 // Filling the input in TILER 2D mode; where 267 // Filling the input in NV12 format; where
268 // Luma has size of Stride "4096" * height. 268 // Luma has size of Stride "4096" * height for TILER or width * height
269 // and Chroma has size of Stride "4096 * height / 2. 269 // and Chroma has size of Stride "4096 * height / 2 for TILER or
270 // width * height / 2
270 for( num_planes = 0; num_planes < 2; num_planes++ ) { 271 for( num_planes = 0; num_planes < 2; num_planes++ ) {
271 if( num_planes ) { //UV location 272 if( num_planes ) { //UV location
272 buf_height = height / 2; 273 buf_height = height / 2;
@@ -519,7 +520,7 @@ int main(int argc, char * *argv)
519 520
520 DEBUG("width=%d, height=%d", width, height); 521 DEBUG("width=%d, height=%d", width, height);
521 522
522 /* output buffer parameters is TILER with width and height */ 523 /* output buffer parameters is aligned */
523 width = ALIGN2(width, 4); /* round up to MB */ 524 width = ALIGN2(width, 4); /* round up to MB */
524 height = ALIGN2(height, 1); /* round up to MB */ 525 height = ALIGN2(height, 1); /* round up to MB */
525 526
@@ -607,7 +608,6 @@ int main(int argc, char * *argv)
607 DEBUG("INPUT TILER buf=%p, buf->buf=%p y=%08x, uv=%08x", buf, buf->buf, buf->y, buf->uv); 608 DEBUG("INPUT TILER buf=%p, buf->buf=%p y=%08x, uv=%08x", buf, buf->buf, buf->y, buf->uv);
608 } else { 609 } else {
609 ERROR("DCE_ENCODE_TEST_FAIL: TILER ALLOCATION FAILED"); 610 ERROR("DCE_ENCODE_TEST_FAIL: TILER ALLOCATION FAILED");
610 free(buf);
611 goto shutdown; 611 goto shutdown;
612 } 612 }
613 } else { 613 } else {
@@ -987,9 +987,9 @@ int main(int argc, char * *argv)
987 dynParams->lateAcquireArg = -1; 987 dynParams->lateAcquireArg = -1;
988 988
989#ifdef GETVERSION 989#ifdef GETVERSION
990 // Allocating TILER 1D to store the Codec version information from Codec. 990 // Allocating memory to store the Codec version information from Codec.
991 char *codec_version = NULL; 991 char *codec_version = NULL;
992 codec_version = tiler_alloc(VERSION_SIZE, 0); 992 codec_version = dce_alloc(VERSION_SIZE);
993#endif 993#endif
994 994
995 switch( codec_switch ) { 995 switch( codec_switch ) {
@@ -1151,7 +1151,7 @@ int main(int argc, char * *argv)
1151 1151
1152#ifdef GETVERSION 1152#ifdef GETVERSION
1153 if( codec_version ) { 1153 if( codec_version ) {
1154 MemMgr_Free(codec_version); 1154 dce_free(codec_version);
1155 } 1155 }
1156#endif 1156#endif
1157 1157
diff --git a/test_qnx/dce_test/dce_test.c b/test_qnx/dce_test/dce_test.c
index 3b640a5..33d4f03 100644
--- a/test_qnx/dce_test/dce_test.c
+++ b/test_qnx/dce_test/dce_test.c
@@ -988,9 +988,10 @@ int main(int argc, char * *argv)
988 */ 988 */
989 989
990#ifdef GETVERSION 990#ifdef GETVERSION
991 // Allocating TILER 1D to store the Codec version information from Codec. 991 // Allocating memory to store the Codec version information from Codec.
992 char *codec_version = NULL; 992 char *codec_version = NULL;
993 codec_version = tiler_alloc(VERSION_SIZE, 0); 993 codec_version = dce_alloc(VERSION_SIZE);
994 DEBUG("codec_version 0x%x", codec_version);
994#endif 995#endif
995 996
996 switch( codec_switch ) { 997 switch( codec_switch ) {
@@ -1131,7 +1132,7 @@ int main(int argc, char * *argv)
1131 1132
1132#ifdef GETVERSION 1133#ifdef GETVERSION
1133 if( codec_version ) { 1134 if( codec_version ) {
1134 MemMgr_Free(codec_version); 1135 dce_free(codec_version);
1135 } 1136 }
1136#endif 1137#endif
1137 1138
@@ -1145,7 +1146,7 @@ int main(int argc, char * *argv)
1145 DEBUG("input buffer configuration width %d height %d", width, height); 1146 DEBUG("input buffer configuration width %d height %d", width, height);
1146 inBufs = dce_alloc(sizeof(XDM2_BufDesc)); 1147 inBufs = dce_alloc(sizeof(XDM2_BufDesc));
1147 inBufs->numBufs = 1; 1148 inBufs->numBufs = 1;
1148 input = tiler_alloc(width * height, 0); 1149 input = dce_alloc(width * height);
1149 inBufs->descs[0].buf = (XDAS_Int8 *)input; 1150 inBufs->descs[0].buf = (XDAS_Int8 *)input;
1150 inBufs->descs[0].memType = XDM_MEMTYPE_RAW; 1151 inBufs->descs[0].memType = XDM_MEMTYPE_RAW;
1151 1152
@@ -1485,7 +1486,7 @@ out:
1485 dce_free(outArgs); 1486 dce_free(outArgs);
1486 } 1487 }
1487 if( input ) { 1488 if( input ) {
1488 MemMgr_Free(input); 1489 dce_free(input);
1489 } 1490 }
1490 1491
1491 output_free(); 1492 output_free();