ividenc2.h
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
00059
00062
00063 #define IVIDENC2_EOK XDM_EOK
00064 #define IVIDENC2_EFAIL XDM_EFAIL
00065 #define IVIDENC2_EUNSUPPORTED XDM_EUNSUPPORTED
00073 typedef enum {
00074 IVIDENC2_MOTIONVECTOR_PIXEL = 0,
00075 IVIDENC2_MOTIONVECTOR_HALFPEL = 1,
00076 IVIDENC2_MOTIONVECTOR_QUARTERPEL = 2,
00077 IVIDENC2_MOTIONVECTOR_EIGHTHPEL = 3,
00078 IVIDENC2_MOTIONVECTOR_MAX = 4
00079 } IVIDENC2_MotionVectorAccuracy;
00080
00091 typedef enum {
00092 IVIDENC2_CTRL_NONE = 0,
00093 IVIDENC2_CTRL_FORCESKIP = 1,
00095 IVIDENC2_CTRL_DEFAULT = IVIDENC2_CTRL_NONE
00096 } IVIDENC2_Control;
00097
00098
00103 typedef struct IVIDENC2_Obj {
00104 struct IVIDENC2_Fxns *fxns;
00105 } IVIDENC2_Obj;
00106
00107
00111 typedef struct IVIDENC2_Obj *IVIDENC2_Handle;
00112
00122 #define IVIDENC2_DEFAULTPROFILE (-1)
00123
00133 #define IVIDENC2_DEFAULTLEVEL (-1)
00134
00141 typedef struct IVIDENC2_Params {
00142 XDAS_Int32 size;
00143 XDAS_Int32 encodingPreset;
00144 XDAS_Int32 rateControlPreset;
00148 XDAS_Int32 maxHeight;
00149 XDAS_Int32 maxWidth;
00150 XDAS_Int32 dataEndianness;
00154 XDAS_Int32 maxInterFrameInterval;
00161 XDAS_Int32 maxBitRate;
00164 XDAS_Int32 minBitRate;
00167 XDAS_Int32 inputChromaFormat;
00171 XDAS_Int32 inputContentType;
00176 XDAS_Int32 operatingMode;
00180 XDAS_Int32 profile;
00185 XDAS_Int32 level;
00190 XDAS_Int32 inputDataMode;
00206 XDAS_Int32 outputDataMode;
00225 XDAS_Int32 numInputDataUnits;
00234 XDAS_Int32 numOutputDataUnits;
00243 XDAS_Int32 metadataType[IVIDEO_MAX_NUM_METADATA_PLANES];
00248 } IVIDENC2_Params;
00249
00250
00265 typedef struct IVIDENC2_DynamicParams {
00266 XDAS_Int32 size;
00267 XDAS_Int32 inputHeight;
00268 XDAS_Int32 inputWidth;
00269 XDAS_Int32 refFrameRate;
00276 XDAS_Int32 targetFrameRate;
00283 XDAS_Int32 targetBitRate;
00284 XDAS_Int32 intraFrameInterval;
00296 XDAS_Int32 generateHeader;
00300 XDAS_Int32 captureWidth;
00305 XDAS_Int32 forceFrame;
00323 XDAS_Int32 interFrameInterval;
00340 XDAS_Int32 mvAccuracy;
00345 XDAS_Int32 sampleAspectRatioHeight;
00350 XDAS_Int32 sampleAspectRatioWidth;
00355 XDAS_Int32 ignoreOutbufSizeFlag;
00363 XDM_DataSyncPutFxn putDataFxn;
00364 XDM_DataSyncHandle putDataHandle;
00365 XDM_DataSyncGetFxn getDataFxn;
00366 XDM_DataSyncHandle getDataHandle;
00367 XDM_DataSyncGetBufferFxn getBufferFxn;
00368 XDM_DataSyncHandle getBufferHandle;
00369 XDAS_Int32 lateAcquireArg;
00398 } IVIDENC2_DynamicParams;
00399
00400
00409 typedef struct IVIDENC2_InArgs {
00410 XDAS_Int32 size;
00411 XDAS_Int32 inputID;
00432 XDAS_Int32 control;
00436 } IVIDENC2_InArgs;
00437
00438
00446 typedef struct IVIDENC2_Status {
00447 XDAS_Int32 size;
00448 XDAS_Int32 extendedError;
00449 XDM1_SingleBufDesc data;
00471 XDAS_Int32 encodingPreset;
00472 XDAS_Int32 rateControlPreset;
00476 XDAS_Int32 maxInterFrameInterval;
00484 XDAS_Int32 inputChromaFormat;
00488 XDAS_Int32 inputContentType;
00493 XDAS_Int32 operatingMode;
00497 XDAS_Int32 profile;
00501 XDAS_Int32 level;
00505 XDAS_Int32 inputDataMode;
00511 XDAS_Int32 outputDataMode;
00517 XDAS_Int32 numInputDataUnits;
00526 XDAS_Int32 numOutputDataUnits;
00535 XDAS_Int32 configurationID;
00550 XDM1_AlgBufInfo bufInfo;
00570 XDAS_Int32 metadataType[IVIDEO_MAX_NUM_METADATA_PLANES];
00575 IVIDENC2_DynamicParams encDynamicParams;
00587 } IVIDENC2_Status;
00588
00589
00598 typedef struct IVIDENC2_OutArgs {
00599 XDAS_Int32 size;
00600 XDAS_Int32 extendedError;
00601 XDAS_Int32 bytesGenerated;
00604 XDAS_Int32 encodedFrameType;
00608 XDAS_Int32 inputFrameSkip;
00612 XDAS_Int32 freeBufID[IVIDEO2_MAX_IO_BUFFERS];
00640 IVIDEO2_BufDesc reconBufs;
00641 } IVIDENC2_OutArgs;
00642
00643
00654 typedef IALG_Cmd IVIDENC2_Cmd;
00655
00656
00660 typedef struct IVIDENC2_Fxns {
00661 IALG_Fxns ialg;
00739 XDAS_Int32 (*process)(IVIDENC2_Handle handle, IVIDEO2_BufDesc *inBufs,
00740 XDM2_BufDesc *outBufs, IVIDENC2_InArgs *inArgs,
00741 IVIDENC2_OutArgs *outArgs);
00742
00743
00779 XDAS_Int32 (*control)(IVIDENC2_Handle handle, IVIDENC2_Cmd id,
00780 IVIDENC2_DynamicParams *params, IVIDENC2_Status *status);
00781
00782 } IVIDENC2_Fxns;
00783
00784
00787 #ifdef __cplusplus
00788 }
00789 #endif
00790
00791 #endif
00792
00793
00794
00795