aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSaurabh Bipin Chandra2013-05-23 07:06:20 -0500
committerSaurabh Bipin Chandra2013-05-23 08:40:32 -0500
commit14c8d691ba78d318979c4db3f3c3f570d625bf6f (patch)
tree154d2d8b69aa179c308114b78318658cfd91112c /test_qnx
parentc4d2df1d6b5d291d93e029eb0606029a6a2cccea (diff)
downloadrepo-libdce-14c8d691ba78d318979c4db3f3c3f570d625bf6f.tar.gz
repo-libdce-14c8d691ba78d318979c4db3f3c3f570d625bf6f.tar.xz
repo-libdce-14c8d691ba78d318979c4db3f3c3f570d625bf6f.zip
[Dce_Test] Enable MPEG2 Decoder in dce_test app3.00.01.01
This patch enables MPEG2 decoder as the MPEG2 codec library 01.00.12.00 renames the enum which was common with MJPEG decoder. Change-Id: Ifbdabee6358652af633474ca7ac2aebad57f4591 Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
Diffstat (limited to 'test_qnx')
-rw-r--r--test_qnx/dce_test.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/test_qnx/dce_test.c b/test_qnx/dce_test.c
index 6a6d6a1..9de8562 100644
--- a/test_qnx/dce_test.c
+++ b/test_qnx/dce_test.c
@@ -29,6 +29,7 @@
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, 29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 */ 31 */
32
32#include <xdc/std.h> 33#include <xdc/std.h>
33#include <stdlib.h> 34#include <stdlib.h>
34#include <string.h> 35#include <string.h>
@@ -51,9 +52,8 @@
51#include <ti/sdo/codecs/mpeg4vdec/impeg4vdec.h> 52#include <ti/sdo/codecs/mpeg4vdec/impeg4vdec.h>
52#include <ti/sdo/codecs/vc1vdec/ivc1vdec.h> 53#include <ti/sdo/codecs/vc1vdec/ivc1vdec.h>
53#include <ti/sdo/codecs/jpegvdec/ijpegvdec.h> 54#include <ti/sdo/codecs/jpegvdec/ijpegvdec.h>
54#ifdef ENABLE_MPEG2
55#include <ti/sdo/codecs/mpeg2vdec/impeg2vdec.h> 55#include <ti/sdo/codecs/mpeg2vdec/impeg2vdec.h>
56#endif 56
57#include "ti/shmemallocator/SharedMemoryAllocatorUsr.h" 57#include "ti/shmemallocator/SharedMemoryAllocatorUsr.h"
58#include "libdce.h" 58#include "libdce.h"
59 59
@@ -119,11 +119,11 @@ IVC1VDEC_Status *vc1_status = NULL;
119IJPEGVDEC_Params *mjpeg_params = NULL; 119IJPEGVDEC_Params *mjpeg_params = NULL;
120IJPEGVDEC_DynamicParams *mjpeg_dynParams = NULL; 120IJPEGVDEC_DynamicParams *mjpeg_dynParams = NULL;
121IJPEGVDEC_Status *mjpeg_status = NULL; 121IJPEGVDEC_Status *mjpeg_status = NULL;
122#ifdef ENABLE_MPEG2 122
123IMPEG2VDEC_Params *mpeg2_params = NULL; 123IMPEG2VDEC_Params *mpeg2_params = NULL;
124IMPEG2VDEC_DynamicParams *mpeg2_dynParams = NULL; 124IMPEG2VDEC_DynamicParams *mpeg2_dynParams = NULL;
125IMPEG2VDEC_Status *mpeg2_status = NULL; 125IMPEG2VDEC_Status *mpeg2_status = NULL;
126#endif 126
127unsigned int frameSize[64000]; /* Buffer for keeping frame sizes */ 127unsigned int frameSize[64000]; /* Buffer for keeping frame sizes */
128static int input_offset = 0; 128static int input_offset = 0;
129 129
@@ -802,7 +802,7 @@ int main(int argc, char * *argv)
802 params->numOutputDataUnits = 1; 802 params->numOutputDataUnits = 1;
803 params->maxWidth = width; 803 params->maxWidth = width;
804 break; 804 break;
805#ifdef ENABLE_MPEG2 805
806 case DCE_TEST_MPEG2 : 806 case DCE_TEST_MPEG2 :
807 params = dce_alloc(sizeof(IMPEG2VDEC_Params)); 807 params = dce_alloc(sizeof(IMPEG2VDEC_Params));
808 if( !params ) { 808 if( !params ) {
@@ -815,7 +815,7 @@ int main(int argc, char * *argv)
815 params->numOutputDataUnits = 0; 815 params->numOutputDataUnits = 0;
816 params->maxWidth = padded_width; 816 params->maxWidth = padded_width;
817 break; 817 break;
818#endif 818
819 } 819 }
820 820
821 params->maxHeight = height; 821 params->maxHeight = height;
@@ -897,7 +897,7 @@ int main(int argc, char * *argv)
897 897
898 codec = VIDDEC3_create(engine, "ivahd_jpegvdec", (VIDDEC3_Params *)mjpeg_params); 898 codec = VIDDEC3_create(engine, "ivahd_jpegvdec", (VIDDEC3_Params *)mjpeg_params);
899 break; 899 break;
900#ifdef ENABLE_MPEG2 900
901 case DCE_TEST_MPEG2 : 901 case DCE_TEST_MPEG2 :
902 mpeg2_params = (IMPEG2VDEC_Params *) params; 902 mpeg2_params = (IMPEG2VDEC_Params *) params;
903 mpeg2_params->outloopDeBlocking = TRUE; 903 mpeg2_params->outloopDeBlocking = TRUE;
@@ -911,7 +911,7 @@ int main(int argc, char * *argv)
911 911
912 codec = VIDDEC3_create(engine, "ivahd_mpeg2vdec", (VIDDEC3_Params *)mpeg2_params); 912 codec = VIDDEC3_create(engine, "ivahd_mpeg2vdec", (VIDDEC3_Params *)mpeg2_params);
913 break; 913 break;
914#endif 914
915 } 915 }
916 916
917 if( !codec ) { 917 if( !codec ) {
@@ -942,13 +942,13 @@ int main(int argc, char * *argv)
942 dynParams->size = sizeof(IJPEGVDEC_DynamicParams); 942 dynParams->size = sizeof(IJPEGVDEC_DynamicParams);
943 dynParams->lateAcquireArg = -1; 943 dynParams->lateAcquireArg = -1;
944 break; 944 break;
945#ifdef ENABLE_MPEG2 945
946 case DCE_TEST_MPEG2 : 946 case DCE_TEST_MPEG2 :
947 dynParams = dce_alloc(sizeof(IMPEG2VDEC_DynamicParams)); 947 dynParams = dce_alloc(sizeof(IMPEG2VDEC_DynamicParams));
948 dynParams->size = sizeof(IMPEG2VDEC_DynamicParams); 948 dynParams->size = sizeof(IMPEG2VDEC_DynamicParams);
949 dynParams->lateAcquireArg = -1; 949 dynParams->lateAcquireArg = -1;
950 break; 950 break;
951#endif 951
952 } 952 }
953 953
954 dynParams->decodeHeader = XDM_DECODE_AU; 954 dynParams->decodeHeader = XDM_DECODE_AU;
@@ -1057,7 +1057,7 @@ int main(int argc, char * *argv)
1057 DEBUG("dce_alloc IJPEGVDEC_Status successful mjpeg_status=%p", mjpeg_status); 1057 DEBUG("dce_alloc IJPEGVDEC_Status successful mjpeg_status=%p", mjpeg_status);
1058 err = VIDDEC3_control(codec, XDM_SETPARAMS, (VIDDEC3_DynamicParams *) mjpeg_dynParams, (VIDDEC3_Status *) mjpeg_status); 1058 err = VIDDEC3_control(codec, XDM_SETPARAMS, (VIDDEC3_DynamicParams *) mjpeg_dynParams, (VIDDEC3_Status *) mjpeg_status);
1059 break; 1059 break;
1060#ifdef ENABLE_MPEG2 1060
1061 case DCE_TEST_MPEG2 : 1061 case DCE_TEST_MPEG2 :
1062 1062
1063 DEBUG("dce_alloc IMPEG2VDEC_DynamicParams successful dynParams=%p", dynParams); 1063 DEBUG("dce_alloc IMPEG2VDEC_DynamicParams successful dynParams=%p", dynParams);
@@ -1078,7 +1078,7 @@ int main(int argc, char * *argv)
1078 DEBUG("dce_alloc IMPEG2VDEC_Status successful mpeg2_status=%p", mpeg2_status); 1078 DEBUG("dce_alloc IMPEG2VDEC_Status successful mpeg2_status=%p", mpeg2_status);
1079 err = VIDDEC3_control(codec, XDM_SETPARAMS, (VIDDEC3_DynamicParams *) mpeg2_dynParams, (VIDDEC3_Status *) mpeg2_status); 1079 err = VIDDEC3_control(codec, XDM_SETPARAMS, (VIDDEC3_DynamicParams *) mpeg2_dynParams, (VIDDEC3_Status *) mpeg2_status);
1080 break; 1080 break;
1081#endif 1081
1082 default : 1082 default :
1083 DEBUG("Not implemented or supported codec_switch %d", codec_switch); 1083 DEBUG("Not implemented or supported codec_switch %d", codec_switch);
1084 } 1084 }
@@ -1196,12 +1196,12 @@ int main(int argc, char * *argv)
1196 DEBUG("Calling VIDDEC3_control XDM_FLUSH mjpeg_dynParams %p mjpeg_status %p", mjpeg_dynParams, mjpeg_status); 1196 DEBUG("Calling VIDDEC3_control XDM_FLUSH mjpeg_dynParams %p mjpeg_status %p", mjpeg_dynParams, mjpeg_status);
1197 err = VIDDEC3_control(codec, XDM_FLUSH, (VIDDEC3_DynamicParams *) mjpeg_dynParams, (VIDDEC3_Status *) mjpeg_status); 1197 err = VIDDEC3_control(codec, XDM_FLUSH, (VIDDEC3_DynamicParams *) mjpeg_dynParams, (VIDDEC3_Status *) mjpeg_status);
1198 break; 1198 break;
1199#ifdef ENABLE_MPEG2 1199
1200 case DCE_TEST_MPEG2 : 1200 case DCE_TEST_MPEG2 :
1201 DEBUG("Calling VIDDEC3_control XDM_FLUSH mpeg2_dynParams %p mpeg2_status %p", mpeg2_dynParams, mpeg2_status); 1201 DEBUG("Calling VIDDEC3_control XDM_FLUSH mpeg2_dynParams %p mpeg2_status %p", mpeg2_dynParams, mpeg2_status);
1202 err = VIDDEC3_control(codec, XDM_FLUSH, (VIDDEC3_DynamicParams *) mpeg2_dynParams, (VIDDEC3_Status *) mpeg2_status); 1202 err = VIDDEC3_control(codec, XDM_FLUSH, (VIDDEC3_DynamicParams *) mpeg2_dynParams, (VIDDEC3_Status *) mpeg2_status);
1203 break; 1203 break;
1204#endif 1204
1205 } 1205 }
1206 1206
1207 /* We have sent the XDM_FLUSH, call VIDDEC3_process until we get 1207 /* We have sent the XDM_FLUSH, call VIDDEC3_process until we get
@@ -1245,12 +1245,12 @@ int main(int argc, char * *argv)
1245 DEBUG("Calling VIDDEC3_control XDM_FLUSH mjpeg_dynParams %p mjpeg_status %p", mjpeg_dynParams, mjpeg_status); 1245 DEBUG("Calling VIDDEC3_control XDM_FLUSH mjpeg_dynParams %p mjpeg_status %p", mjpeg_dynParams, mjpeg_status);
1246 err = VIDDEC3_control(codec, XDM_FLUSH, (VIDDEC3_DynamicParams *) mjpeg_dynParams, (VIDDEC3_Status *) mjpeg_status); 1246 err = VIDDEC3_control(codec, XDM_FLUSH, (VIDDEC3_DynamicParams *) mjpeg_dynParams, (VIDDEC3_Status *) mjpeg_status);
1247 break; 1247 break;
1248#ifdef ENABLE_MPEG2 1248
1249 case DCE_TEST_MPEG2 : 1249 case DCE_TEST_MPEG2 :
1250 DEBUG("Calling VIDDEC3_control XDM_FLUSH mpeg2_dynParams %p mpeg2_status %p", mpeg2_dynParams, mpeg2_status); 1250 DEBUG("Calling VIDDEC3_control XDM_FLUSH mpeg2_dynParams %p mpeg2_status %p", mpeg2_dynParams, mpeg2_status);
1251 err = VIDDEC3_control(codec, XDM_FLUSH, (VIDDEC3_DynamicParams *) mpeg2_dynParams, (VIDDEC3_Status *) mpeg2_status); 1251 err = VIDDEC3_control(codec, XDM_FLUSH, (VIDDEC3_DynamicParams *) mpeg2_dynParams, (VIDDEC3_Status *) mpeg2_status);
1252 break; 1252 break;
1253#endif 1253
1254 } 1254 }
1255 1255
1256 /* We have sent the XDM_FLUSH, call VIDDEC3_process until we get 1256 /* We have sent the XDM_FLUSH, call VIDDEC3_process until we get