Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00047 #ifndef ti_xdais_dm_IVIDENC2_
00048 #define ti_xdais_dm_IVIDENC2_
00049
00050 #include <ti/xdais/ialg.h>
00051 #include <ti/xdais/xdas.h>
00052 #include "xdm.h"
00053 #include "ivideo.h"
00054
00055 #ifdef __cplusplus
00056 extern "C" {
00057 #endif
00058
00061
00062 #define IVIDENC2_EOK XDM_EOK
00063 #define IVIDENC2_EFAIL XDM_EFAIL
00064 #define IVIDENC2_EUNSUPPORTED XDM_EUNSUPPORTED
00072 typedef enum {
00073 IVIDENC2_MOTIONVECTOR_PIXEL = 0,
00074 IVIDENC2_MOTIONVECTOR_HALFPEL = 1,
00075 IVIDENC2_MOTIONVECTOR_QUARTERPEL = 2,
00076 IVIDENC2_MOTIONVECTOR_EIGHTHPEL = 3,
00077 IVIDENC2_MOTIONVECTOR_MAX = 4
00078 } IVIDENC2_MotionVectorAccuracy;
00079
00092 typedef enum {
00093 IVIDENC2_CTRL_NONE = 0,
00094 IVIDENC2_CTRL_FORCESKIP = 1,
00096 IVIDENC2_CTRL_DEFAULT = IVIDENC2_CTRL_NONE
00097 } IVIDENC2_Control;
00098
00099
00104 typedef struct IVIDENC2_Obj {
00105 struct IVIDENC2_Fxns *fxns;
00106 } IVIDENC2_Obj;
00107
00108
00112 typedef struct IVIDENC2_Obj *IVIDENC2_Handle;
00113
00123 #define IVIDENC2_DEFAULTPROFILE (-1)
00124
00134 #define IVIDENC2_DEFAULTLEVEL (-1)
00135
00142 typedef struct IVIDENC2_Params {
00143 XDAS_Int32 size;
00144 XDAS_Int32 encodingPreset;
00145 XDAS_Int32 rateControlPreset;
00149 XDAS_Int32 maxHeight;
00150 XDAS_Int32 maxWidth;
00151 XDAS_Int32 dataEndianness;
00155 XDAS_Int32 maxInterFrameInterval;
00162 XDAS_Int32 maxBitRate;
00165 XDAS_Int32 minBitRate;
00168 XDAS_Int32 inputChromaFormat;
00172 XDAS_Int32 inputContentType;
00177 XDAS_Int32 operatingMode;
00181 XDAS_Int32 profile;
00194 XDAS_Int32 level;
00207 XDAS_Int32 inputDataMode;
00223 XDAS_Int32 outputDataMode;
00242 XDAS_Int32 numInputDataUnits;
00251 XDAS_Int32 numOutputDataUnits;
00260 XDAS_Int32 metadataType[IVIDEO_MAX_NUM_METADATA_PLANES];
00265 } IVIDENC2_Params;
00266
00267
00282 typedef struct IVIDENC2_DynamicParams {
00283 XDAS_Int32 size;
00284 XDAS_Int32 inputHeight;
00285 XDAS_Int32 inputWidth;
00286 XDAS_Int32 refFrameRate;
00293 XDAS_Int32 targetFrameRate;
00300 XDAS_Int32 targetBitRate;
00301 XDAS_Int32 intraFrameInterval;
00313 XDAS_Int32 generateHeader;
00317 XDAS_Int32 captureWidth;
00322 XDAS_Int32 forceFrame;
00340 XDAS_Int32 interFrameInterval;
00357 XDAS_Int32 mvAccuracy;
00368 XDAS_Int32 sampleAspectRatioHeight;
00374 XDAS_Int32 sampleAspectRatioWidth;
00380 XDAS_Int32 ignoreOutbufSizeFlag;
00412 XDM_DataSyncPutFxn putDataFxn;
00425 XDM_DataSyncHandle putDataHandle;
00447 XDM_DataSyncGetFxn getDataFxn;
00460 XDM_DataSyncHandle getDataHandle;
00481 XDM_DataSyncGetBufferFxn getBufferFxn;
00495 XDM_DataSyncHandle getBufferHandle;
00517 XDAS_Int32 lateAcquireArg;
00546 } IVIDENC2_DynamicParams;
00547
00548
00557 typedef struct IVIDENC2_InArgs {
00558 XDAS_Int32 size;
00559 XDAS_Int32 inputID;
00580 XDAS_Int32 control;
00584 } IVIDENC2_InArgs;
00585
00586
00594 typedef struct IVIDENC2_Status {
00595 XDAS_Int32 size;
00596 XDAS_Int32 extendedError;
00597 XDM1_SingleBufDesc data;
00619 XDAS_Int32 encodingPreset;
00620 XDAS_Int32 rateControlPreset;
00624 XDAS_Int32 maxInterFrameInterval;
00631 XDAS_Int32 inputChromaFormat;
00635 XDAS_Int32 inputContentType;
00640 XDAS_Int32 operatingMode;
00644 XDAS_Int32 profile;
00649 XDAS_Int32 level;
00654 XDAS_Int32 inputDataMode;
00659 XDAS_Int32 outputDataMode;
00664 XDAS_Int32 numInputDataUnits;
00677 XDAS_Int32 numOutputDataUnits;
00689 XDAS_Int32 configurationID;
00703 XDM1_AlgBufInfo bufInfo;
00716 XDAS_Int32 metadataType[IVIDEO_MAX_NUM_METADATA_PLANES];
00721 IVIDENC2_DynamicParams encDynamicParams;
00733 } IVIDENC2_Status;
00734
00735
00744 typedef struct IVIDENC2_OutArgs {
00745 XDAS_Int32 size;
00746 XDAS_Int32 extendedError;
00747 XDAS_Int32 bytesGenerated;
00750 XDAS_Int32 encodedFrameType;
00754 XDAS_Int32 inputFrameSkip;
00758 XDAS_Int32 freeBufID[IVIDEO2_MAX_IO_BUFFERS];
00786 IVIDEO2_BufDesc reconBufs;
00787 } IVIDENC2_OutArgs;
00788
00789
00800 typedef IALG_Cmd IVIDENC2_Cmd;
00801
00802
00806 typedef struct IVIDENC2_Fxns {
00807 IALG_Fxns ialg;
00885 XDAS_Int32 (*process)(IVIDENC2_Handle handle, IVIDEO2_BufDesc *inBufs,
00886 XDM2_BufDesc *outBufs, IVIDENC2_InArgs *inArgs,
00887 IVIDENC2_OutArgs *outArgs);
00888
00889
00925 XDAS_Int32 (*control)(IVIDENC2_Handle handle, IVIDENC2_Cmd id,
00926 IVIDENC2_DynamicParams *params, IVIDENC2_Status *status);
00927
00928 } IVIDENC2_Fxns;
00929
00930
00933 #ifdef __cplusplus
00934 }
00935 #endif
00936
00937 #endif
00938
00939
00940
00941
00942