aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbuddy.liong2013-11-15 17:39:49 -0600
committerbuddy.liong2013-11-15 17:39:49 -0600
commit31bb1282efc6e9afcfdc90ece237cfe156d4d853 (patch)
treeda329780e73e187d84a762851a5b1809b24c0989 /test_qnx
parent2f4b8635e4c6717dfe963ea6d43d5aff000b0e12 (diff)
downloadrepo-libdce-31bb1282efc6e9afcfdc90ece237cfe156d4d853.tar.gz
repo-libdce-31bb1282efc6e9afcfdc90ece237cfe156d4d853.tar.xz
repo-libdce-31bb1282efc6e9afcfdc90ece237cfe156d4d853.zip
[LIBDCE] Get codec version on dce_test and dce_enc_test
Internal reference: DVT OMAPS00302159. To add the capability for the QNX dce_test and dce_enc_test to get the codec version through XDM_GETVERSION command of codec_control. Change-Id: Ia39aeb5b55d3b8aba9365ad6d4a4a63e4e44b8aa Signed-off-by: buddy.liong <buddy.budiono@ti.com>
Diffstat (limited to 'test_qnx')
-rw-r--r--test_qnx/dce_enc_test/dce_enc_test.c39
-rw-r--r--test_qnx/dce_test/dce_test.c132
2 files changed, 123 insertions, 48 deletions
diff --git a/test_qnx/dce_enc_test/dce_enc_test.c b/test_qnx/dce_enc_test/dce_enc_test.c
index dabba7a..07afb04 100644
--- a/test_qnx/dce_enc_test/dce_enc_test.c
+++ b/test_qnx/dce_enc_test/dce_enc_test.c
@@ -74,6 +74,9 @@
74// Profile the init and encode calls 74// Profile the init and encode calls
75//#define PROFILE_TIME 75//#define PROFILE_TIME
76 76
77// Getting codec version through XDM_GETVERSION
78#define GETVERSION
79
77enum { 80enum {
78 IVAHD_H264_ENCODE, 81 IVAHD_H264_ENCODE,
79 IVAHD_MPEG4_ENCODE, 82 IVAHD_MPEG4_ENCODE,
@@ -328,6 +331,10 @@ uint64_t mark_microsecond(uint64_t *last)
328 331
329#endif 332#endif
330 333
334#ifdef GETVERSION
335#define VERSION_SIZE 128
336#endif
337
331/* encoder body */ 338/* encoder body */
332int main(int argc, char * *argv) 339int main(int argc, char * *argv)
333{ 340{
@@ -940,6 +947,12 @@ int main(int argc, char * *argv)
940 dynParams->getBufferHandle = NULL; 947 dynParams->getBufferHandle = NULL;
941 dynParams->lateAcquireArg = -1; 948 dynParams->lateAcquireArg = -1;
942 949
950#ifdef GETVERSION
951 // Allocating TILER 1D to store the Codec version information from Codec.
952 char *codec_version = NULL;
953 codec_version = tiler_alloc(VERSION_SIZE, 0);
954#endif
955
943 switch( codec_switch ) { 956 switch( codec_switch ) {
944 case DCE_ENC_TEST_H264 : 957 case DCE_ENC_TEST_H264 :
945 dynParams->interFrameInterval = 1; // 2 B frames 958 dynParams->interFrameInterval = 1; // 2 B frames
@@ -1035,6 +1048,16 @@ int main(int argc, char * *argv)
1035 status->size = sizeof(IH264ENC_Status); 1048 status->size = sizeof(IH264ENC_Status);
1036 DEBUG("dce_alloc IH264ENC_Status successful status=%p", status); 1049 DEBUG("dce_alloc IH264ENC_Status successful status=%p", status);
1037 1050
1051#ifdef GETVERSION
1052 status->data.buf = (XDAS_Int8 *) codec_version;
1053 status->data.bufSize = VERSION_SIZE;
1054
1055 h264enc_status = (IH264ENC_Status *) status;
1056 DEBUG("IH264ENC_Status successful h264enc_status=%p", h264enc_status);
1057 err = VIDENC2_control(codec, XDM_GETVERSION, (VIDENC2_DynamicParams *) h264enc_dynParams, (VIDENC2_Status *) h264enc_status);
1058 DEBUG("VIDENC2_control IH264ENC_Status XDM_GETVERSION h264enc_status->data.buf = %s", (((VIDENC2_Status *)h264enc_status)->data.buf));
1059#endif
1060
1038 h264enc_status = (IH264ENC_Status *) status; 1061 h264enc_status = (IH264ENC_Status *) status;
1039 err = VIDENC2_control(codec, XDM_SETPARAMS, (VIDENC2_DynamicParams *) h264enc_dynParams, (VIDENC2_Status *) h264enc_status); 1062 err = VIDENC2_control(codec, XDM_SETPARAMS, (VIDENC2_DynamicParams *) h264enc_dynParams, (VIDENC2_Status *) h264enc_status);
1040 DEBUG("dce_alloc IH264ENC_Status successful h264enc_status=%p", h264enc_status); 1063 DEBUG("dce_alloc IH264ENC_Status successful h264enc_status=%p", h264enc_status);
@@ -1061,6 +1084,16 @@ int main(int argc, char * *argv)
1061 status->size = sizeof(IMPEG4ENC_Status); 1084 status->size = sizeof(IMPEG4ENC_Status);
1062 DEBUG("dce_alloc IMPEG4ENC_Status successful status=%p", status); 1085 DEBUG("dce_alloc IMPEG4ENC_Status successful status=%p", status);
1063 1086
1087#ifdef GETVERSION
1088 status->data.buf = (XDAS_Int8 *) codec_version;
1089 status->data.bufSize = VERSION_SIZE;
1090
1091 mpeg4enc_status = (IMPEG4ENC_Status *) status;
1092 DEBUG("IMPEG4ENC_Status successful mpeg4enc_status=%p status->data.buf %p ", mpeg4enc_status, status->data.buf);
1093 err = VIDENC2_control(codec, XDM_GETVERSION, (VIDENC2_DynamicParams *) mpeg4enc_dynParams, (VIDENC2_Status *) mpeg4enc_status);
1094 DEBUG("VIDENC2_control IMPEG4ENC_Status XDM_GETVERSION mpeg4enc_status->data.buf = %s ", (((VIDENC2_Status *)mpeg4enc_status)->data.buf));
1095#endif
1096
1064 mpeg4enc_status = (IMPEG4ENC_Status *) status; 1097 mpeg4enc_status = (IMPEG4ENC_Status *) status;
1065 DEBUG("dce_alloc IMPEG4ENC_Status successful mpeg4enc_status=%p", mpeg4enc_status); 1098 DEBUG("dce_alloc IMPEG4ENC_Status successful mpeg4enc_status=%p", mpeg4enc_status);
1066 err = VIDENC2_control(codec, XDM_SETPARAMS, (VIDENC2_DynamicParams *) mpeg4enc_dynParams, (VIDENC2_Status *) mpeg4enc_status); 1099 err = VIDENC2_control(codec, XDM_SETPARAMS, (VIDENC2_DynamicParams *) mpeg4enc_dynParams, (VIDENC2_Status *) mpeg4enc_status);
@@ -1077,6 +1110,12 @@ int main(int argc, char * *argv)
1077 1110
1078 DEBUG("VIDENC2_control XDM_SETPARAMS successful"); 1111 DEBUG("VIDENC2_control XDM_SETPARAMS successful");
1079 1112
1113#ifdef GETVERSION
1114 if( codec_version ) {
1115 MemMgr_Free(codec_version);
1116 }
1117#endif
1118
1080 // XDM_GETBUFINFO 1119 // XDM_GETBUFINFO
1081 // Send Control cmd XDM_GETBUFINFO to get min output and output size 1120 // Send Control cmd XDM_GETBUFINFO to get min output and output size
1082 err = VIDENC2_control(codec, XDM_GETBUFINFO, dynParams, status); 1121 err = VIDENC2_control(codec, XDM_GETBUFINFO, dynParams, status);
diff --git a/test_qnx/dce_test/dce_test.c b/test_qnx/dce_test/dce_test.c
index d3194c6..0343b01 100644
--- a/test_qnx/dce_test/dce_test.c
+++ b/test_qnx/dce_test/dce_test.c
@@ -48,6 +48,12 @@
48#include <memmgr.h> 48#include <memmgr.h>
49#include <ti/sdo/ce/Engine.h> 49#include <ti/sdo/ce/Engine.h>
50#include <ti/sdo/ce/video3/viddec3.h> 50#include <ti/sdo/ce/video3/viddec3.h>
51
52// Need to define ti_sdo_fc_ires_NOPROTOCOLREV to supress warning because
53// ijpegvdec.h, impeg2vdec.h, impeg4vdec.h, and ivc1vdec.h will define
54// IRES_HDVICP2_PROTOCOLREVISION which is not used.
55#define ti_sdo_fc_ires_NOPROTOCOLREV
56
51#include <ti/sdo/codecs/h264vdec/ih264vdec.h> 57#include <ti/sdo/codecs/h264vdec/ih264vdec.h>
52#include <ti/sdo/codecs/mpeg4vdec/impeg4vdec.h> 58#include <ti/sdo/codecs/mpeg4vdec/impeg4vdec.h>
53#include <ti/sdo/codecs/vc1vdec/ivc1vdec.h> 59#include <ti/sdo/codecs/vc1vdec/ivc1vdec.h>
@@ -75,6 +81,9 @@
75// Profile the init and decode calls 81// Profile the init and decode calls
76//#define PROFILE_TIME 82//#define PROFILE_TIME
77 83
84// Getting codec version through XDM_GETVERSION
85#define GETVERSION
86
78enum { 87enum {
79 IVAHD_AVC1_DECODE, 88 IVAHD_AVC1_DECODE,
80 IVAHD_H264_DECODE, 89 IVAHD_H264_DECODE,
@@ -557,8 +566,9 @@ uint64_t mark_microsecond(uint64_t *last)
557FILE *inputDump; 566FILE *inputDump;
558#endif 567#endif
559 568
569#ifdef GETVERSION
560#define VERSION_SIZE 128 570#define VERSION_SIZE 128
561static char version_buffer[VERSION_SIZE]; 571#endif
562 572
563/* decoder body */ 573/* decoder body */
564int main(int argc, char * *argv) 574int main(int argc, char * *argv)
@@ -956,110 +966,119 @@ int main(int argc, char * *argv)
956 dynParams->frameSkipMode = IVIDEO_NO_SKIP; 966 dynParams->frameSkipMode = IVIDEO_NO_SKIP;
957 dynParams->newFrameFlag = XDAS_TRUE; 967 dynParams->newFrameFlag = XDAS_TRUE;
958 968
969/*
970 * VIDDEC3_control - XDM_GETVERSION & XDM_SETPARAMS
971 */
959 972
960 //Testing XDM_GETVERSION 973#ifdef GETVERSION
961 // NOT WORKING 974 // Allocating TILER 1D to store the Codec version information from Codec.
962#if 0 975 char *codec_version = NULL;
976 codec_version = tiler_alloc(VERSION_SIZE, 0);
977#endif
963 978
964 switch( codec_switch ) { 979 switch( codec_switch ) {
965 case DCE_TEST_H264 : 980 case DCE_TEST_H264 :
966
967 DEBUG("dce_alloc IH264VDEC_DynamicParams successful dynParams=%p", dynParams);
968 h264_dynParams = (IH264VDEC_DynamicParams *) dynParams; 981 h264_dynParams = (IH264VDEC_DynamicParams *) dynParams;
969 DEBUG("dce_alloc IH264VDEC_DynamicParams successful h264_dynParams=%p", h264_dynParams); 982 DEBUG("Allocating IH264VDEC_DynamicParams successful h264_dynParams=%p", h264_dynParams);
970 983
971 status = dce_alloc(sizeof(IH264VDEC_Status)); 984 status = dce_alloc(sizeof(IH264VDEC_Status));
972 status->size = sizeof(IH264VDEC_Status); 985 status->size = sizeof(IH264VDEC_Status);
973 DEBUG("dce_alloc IH264VDEC_Status successful status=%p", status); 986 DEBUG("dce_alloc IH264VDEC_Status successful status=%p", status);
974 987
975 status->data.buf = (XDAS_Int8 *) version_buffer; 988#ifdef GETVERSION
989 status->data.buf = (XDAS_Int8 *) codec_version;
990 status->data.bufSize = VERSION_SIZE;
991#endif
992
976 h264_status = (IH264VDEC_Status *) status; 993 h264_status = (IH264VDEC_Status *) status;
977 DEBUG("dce_alloc IH264VDEC_Status successful h264_status=%p", h264_status); 994 DEBUG("IH264VDEC_Status successful h264_status=%p", h264_status);
978 995
979 //((IH264VDEC_Status*)h264_status)->viddec3Status->data.buf = version_buffer; 996#ifdef GETVERSION
980 err = VIDDEC3_control(codec, XDM_GETVERSION, (VIDDEC3_DynamicParams *) h264_dynParams, (VIDDEC3_Status *) h264_status); 997 err = VIDDEC3_control(codec, XDM_GETVERSION, (VIDDEC3_DynamicParams *) h264_dynParams, (VIDDEC3_Status *) h264_status);
981 998 DEBUG("VIDDEC3_control IH264VDEC_Status XDM_GETVERSION h264_status->data.buf = %s", (((VIDDEC3_Status *)h264_status)->data.buf));
982 DEBUG("dce_alloc IH264VDEC_Status get_version h264_status=%s", (((VIDDEC3_Status *)h264_status)->data.buf));
983 break;
984 default :
985 DEBUG("Not implemented or supported codec_switch %d", codec_switch);
986 }
987
988 if( status ) {
989 dce_free(status);
990 }
991#endif 999#endif
992 1000
993 switch( codec_switch ) {
994 case DCE_TEST_H264 :
995
996 DEBUG("dce_alloc IH264VDEC_DynamicParams successful dynParams=%p", dynParams);
997 h264_dynParams = (IH264VDEC_DynamicParams *) dynParams;
998 DEBUG("dce_alloc IH264VDEC_DynamicParams successful h264_dynParams=%p", h264_dynParams);
999
1000 status = dce_alloc(sizeof(IH264VDEC_Status));
1001 status->size = sizeof(IH264VDEC_Status);
1002 DEBUG("dce_alloc IH264VDEC_Status successful status=%p", status);
1003
1004 h264_status = (IH264VDEC_Status *) status;
1005 DEBUG("dce_alloc IH264VDEC_Status successful h264_status=%p", h264_status);
1006 err = VIDDEC3_control(codec, XDM_SETPARAMS, (VIDDEC3_DynamicParams *) h264_dynParams, (VIDDEC3_Status *) h264_status); 1001 err = VIDDEC3_control(codec, XDM_SETPARAMS, (VIDDEC3_DynamicParams *) h264_dynParams, (VIDDEC3_Status *) h264_status);
1007 break; 1002 break;
1008 1003
1009 case DCE_TEST_MPEG4 : 1004 case DCE_TEST_MPEG4 :
1010
1011 DEBUG("dce_alloc IMPEG4VDEC_DynamicParams successful dynParams=%p", dynParams);
1012 mpeg4_dynParams = (IMPEG4VDEC_DynamicParams *) dynParams; 1005 mpeg4_dynParams = (IMPEG4VDEC_DynamicParams *) dynParams;
1013 DEBUG("dce_alloc IMPEG4VDEC_DynamicParams successful mpeg4_dynParams=%p", mpeg4_dynParams); 1006 DEBUG("Allocating IMPEG4VDEC_DynamicParams successful mpeg4_dynParams=%p", mpeg4_dynParams);
1014 1007
1015 status = dce_alloc(sizeof(IMPEG4VDEC_Status)); 1008 status = dce_alloc(sizeof(IMPEG4VDEC_Status));
1016 status->size = sizeof(IMPEG4VDEC_Status); 1009 status->size = sizeof(IMPEG4VDEC_Status);
1017 DEBUG("dce_alloc IMPEG4VDEC_Status successful status=%p", status); 1010 DEBUG("dce_alloc IMPEG4VDEC_Status successful status=%p", status);
1018 1011
1012#ifdef GETVERSION
1013 status->data.buf = (XDAS_Int8 *) codec_version;
1014 status->data.bufSize = VERSION_SIZE;
1015#endif
1016
1019 mpeg4_status = (IMPEG4VDEC_Status *) status; 1017 mpeg4_status = (IMPEG4VDEC_Status *) status;
1020 DEBUG("dce_alloc IMPEG4VDEC_Status successful mpeg4_status=%p", mpeg4_status); 1018 DEBUG("dce_alloc IMPEG4VDEC_Status successful mpeg4_status=%p", mpeg4_status);
1019
1020#ifdef GETVERSION
1021 err = VIDDEC3_control(codec, XDM_GETVERSION, (VIDDEC3_DynamicParams *) mpeg4_dynParams, (VIDDEC3_Status *) mpeg4_status);
1022 DEBUG("VIDDEC3_control IMPEG4VDEC_Status XDM_GETVERSION mpeg4_status->data.buf = %s", (((VIDDEC3_Status *)mpeg4_status)->data.buf));
1023#endif
1024
1021 err = VIDDEC3_control(codec, XDM_SETPARAMS, (VIDDEC3_DynamicParams *) mpeg4_dynParams, (VIDDEC3_Status *) mpeg4_status); 1025 err = VIDDEC3_control(codec, XDM_SETPARAMS, (VIDDEC3_DynamicParams *) mpeg4_dynParams, (VIDDEC3_Status *) mpeg4_status);
1022 break; 1026 break;
1023 1027
1024 case DCE_TEST_VC1SMP : 1028 case DCE_TEST_VC1SMP :
1025 case DCE_TEST_VC1AP : 1029 case DCE_TEST_VC1AP :
1026
1027 DEBUG("dce_alloc IVC1VDEC_DynamicParams successful dynParams=%p", dynParams);
1028 vc1_dynParams = (IVC1VDEC_DynamicParams *) dynParams; 1030 vc1_dynParams = (IVC1VDEC_DynamicParams *) dynParams;
1029 DEBUG("dce_alloc IVC1VDEC_DynamicParams successful vc1_dynParams=%p", vc1_dynParams); 1031 DEBUG("Allocating IVC1VDEC_DynamicParams successful vc1_dynParams=%p", vc1_dynParams);
1030 1032
1031 status = dce_alloc(sizeof(IVC1VDEC_Status)); 1033 status = dce_alloc(sizeof(IVC1VDEC_Status));
1032 status->size = sizeof(IVC1VDEC_Status); 1034 status->size = sizeof(IVC1VDEC_Status);
1033 DEBUG("dce_alloc IVC1VDEC_Status successful status=%p", status); 1035 DEBUG("dce_alloc IVC1VDEC_Status successful status=%p", status);
1034 1036
1037#ifdef GETVERSION
1038 status->data.buf = (XDAS_Int8 *) codec_version;
1039 status->data.bufSize = VERSION_SIZE;
1040#endif
1041
1035 vc1_status = (IVC1VDEC_Status *) status; 1042 vc1_status = (IVC1VDEC_Status *) status;
1036 DEBUG("dce_alloc IVC1VDEC_Status successful vc1_status=%p", vc1_status); 1043 DEBUG("dce_alloc IVC1VDEC_Status successful vc1_status=%p", vc1_status);
1044
1045#ifdef GETVERSION
1046 err = VIDDEC3_control(codec, XDM_GETVERSION, (VIDDEC3_DynamicParams *) vc1_dynParams, (VIDDEC3_Status *) vc1_status);
1047 DEBUG("VIDDEC3_control IVC1VDEC_Status XDM_GETVERSION vc1_status->data.buf = %s", (((VIDDEC3_Status *)vc1_status)->data.buf));
1048#endif
1049
1037 err = VIDDEC3_control(codec, XDM_SETPARAMS, (VIDDEC3_DynamicParams *) vc1_dynParams, (VIDDEC3_Status *) vc1_status); 1050 err = VIDDEC3_control(codec, XDM_SETPARAMS, (VIDDEC3_DynamicParams *) vc1_dynParams, (VIDDEC3_Status *) vc1_status);
1038 break; 1051 break;
1039 1052
1040 case DCE_TEST_MJPEG : 1053 case DCE_TEST_MJPEG :
1041
1042 DEBUG("dce_alloc IJPEGVDEC_DynamicParams successful dynParams=%p", dynParams);
1043 mjpeg_dynParams = (IJPEGVDEC_DynamicParams *) dynParams; 1054 mjpeg_dynParams = (IJPEGVDEC_DynamicParams *) dynParams;
1044 mjpeg_dynParams->decodeThumbnail = 0; 1055 mjpeg_dynParams->decodeThumbnail = 0;
1045 mjpeg_dynParams->thumbnailMode = IJPEGVDEC_THUMBNAIL_DOWNSAMPLE; 1056 mjpeg_dynParams->thumbnailMode = IJPEGVDEC_THUMBNAIL_DOWNSAMPLE;
1046 mjpeg_dynParams->downsamplingFactor = IJPEGVDEC_NODOWNSAMPLE; 1057 mjpeg_dynParams->downsamplingFactor = IJPEGVDEC_NODOWNSAMPLE;
1047 mjpeg_dynParams->streamingCompliant = 1; 1058 mjpeg_dynParams->streamingCompliant = 1;
1059 DEBUG("Allocating IJPEGVDEC_DynamicParams successful mjpeg_dynParams=%p", mjpeg_dynParams);
1048 1060
1049 DEBUG("dce_alloc IJPEGVDEC_DynamicParams successful mjpeg_dynParams=%p", mjpeg_dynParams); 1061 status = dce_alloc(sizeof(IJPEGVDEC_Status));
1050
1051 status = dce_alloc(sizeof(IVC1VDEC_Status));
1052 status->size = sizeof(IJPEGVDEC_Status); 1062 status->size = sizeof(IJPEGVDEC_Status);
1053 DEBUG("dce_alloc IVC1VDEC_Status successful status=%p", status); 1063 DEBUG("dce_alloc IJPEGVDEC_Status successful status=%p", status);
1064
1065#ifdef GETVERSION
1066 status->data.buf = (XDAS_Int8 *) codec_version;
1067 status->data.bufSize = VERSION_SIZE;
1068#endif
1054 1069
1055 mjpeg_status = (IJPEGVDEC_Status *) status; 1070 mjpeg_status = (IJPEGVDEC_Status *) status;
1056 DEBUG("dce_alloc IJPEGVDEC_Status successful mjpeg_status=%p", mjpeg_status); 1071 DEBUG("dce_alloc IJPEGVDEC_Status successful mjpeg_status=%p", mjpeg_status);
1072
1073#ifdef GETVERSION
1074 err = VIDDEC3_control(codec, XDM_GETVERSION, (VIDDEC3_DynamicParams *) mjpeg_dynParams, (VIDDEC3_Status *) mjpeg_status);
1075 DEBUG("VIDDEC3_control IJPEGVDEC_Status XDM_GETVERSION mjpeg_status->data.buf = %s", (((VIDDEC3_Status *)mjpeg_status)->data.buf));
1076#endif
1077
1057 err = VIDDEC3_control(codec, XDM_SETPARAMS, (VIDDEC3_DynamicParams *) mjpeg_dynParams, (VIDDEC3_Status *) mjpeg_status); 1078 err = VIDDEC3_control(codec, XDM_SETPARAMS, (VIDDEC3_DynamicParams *) mjpeg_dynParams, (VIDDEC3_Status *) mjpeg_status);
1058 break; 1079 break;
1059 1080
1060 case DCE_TEST_MPEG2 : 1081 case DCE_TEST_MPEG2 :
1061
1062 DEBUG("dce_alloc IMPEG2VDEC_DynamicParams successful dynParams=%p", dynParams);
1063 mpeg2_dynParams = (IMPEG2VDEC_DynamicParams *) dynParams; 1082 mpeg2_dynParams = (IMPEG2VDEC_DynamicParams *) dynParams;
1064 //MPEG2 buffer width should be 128 byte aligned for non TILER (atleast) 1083 //MPEG2 buffer width should be 128 byte aligned for non TILER (atleast)
1065 //If displayWidth=0 then MPEG2 codec does not have a way to calculate 1084 //If displayWidth=0 then MPEG2 codec does not have a way to calculate
@@ -1073,8 +1092,19 @@ int main(int argc, char * *argv)
1073 status->size = sizeof(IMPEG2VDEC_Status); 1092 status->size = sizeof(IMPEG2VDEC_Status);
1074 DEBUG("dce_alloc IMPEG2VDEC_Status successful status=%p", status); 1093 DEBUG("dce_alloc IMPEG2VDEC_Status successful status=%p", status);
1075 1094
1095#ifdef GETVERSION
1096 status->data.buf = (XDAS_Int8 *) codec_version;
1097 status->data.bufSize = VERSION_SIZE;
1098#endif
1099
1076 mpeg2_status = (IMPEG2VDEC_Status *) status; 1100 mpeg2_status = (IMPEG2VDEC_Status *) status;
1077 DEBUG("dce_alloc IMPEG2VDEC_Status successful mpeg2_status=%p", mpeg2_status); 1101 DEBUG("mpeg2_status=%p", mpeg2_status);
1102
1103#ifdef GETVERSION
1104 err = VIDDEC3_control(codec, XDM_GETVERSION, (VIDDEC3_DynamicParams *) mpeg2_dynParams, (VIDDEC3_Status *) mpeg2_status);
1105 DEBUG("VIDDEC3_control IMPEG2VDEC_Status XDM_GETVERSION mpeg2_status->data.buf = %s", (((VIDDEC3_Status *)mpeg2_status)->data.buf));
1106#endif
1107
1078 err = VIDDEC3_control(codec, XDM_SETPARAMS, (VIDDEC3_DynamicParams *) mpeg2_dynParams, (VIDDEC3_Status *) mpeg2_status); 1108 err = VIDDEC3_control(codec, XDM_SETPARAMS, (VIDDEC3_DynamicParams *) mpeg2_dynParams, (VIDDEC3_Status *) mpeg2_status);
1079 break; 1109 break;
1080 1110
@@ -1082,6 +1112,12 @@ int main(int argc, char * *argv)
1082 DEBUG("Not implemented or supported codec_switch %d", codec_switch); 1112 DEBUG("Not implemented or supported codec_switch %d", codec_switch);
1083 } 1113 }
1084 1114
1115#ifdef GETVERSION
1116 if( codec_version ) {
1117 MemMgr_Free(codec_version);
1118 }
1119#endif
1120
1085 if( err ) { 1121 if( err ) {
1086 ERROR("fail: %d", err); 1122 ERROR("fail: %d", err);
1087 goto shutdown; 1123 goto shutdown;