ividenc2.h

Go to the documentation of this file.
00001 /* 
00002  * Copyright (c) 2011, Texas Instruments Incorporated
00003  * All rights reserved.
00004  *
00005  * Redistribution and use in source and binary forms, with or without
00006  * modification, are permitted provided that the following conditions
00007  * are met:
00008  *
00009  * *  Redistributions of source code must retain the above copyright
00010  *    notice, this list of conditions and the following disclaimer.
00011  *
00012  * *  Redistributions in binary form must reproduce the above copyright
00013  *    notice, this list of conditions and the following disclaimer in the
00014  *    documentation and/or other materials provided with the distribution.
00015  *
00016  * *  Neither the name of Texas Instruments Incorporated nor the names of
00017  *    its contributors may be used to endorse or promote products derived
00018  *    from this software without specific prior written permission.
00019  *
00020  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00021  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
00022  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
00023  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
00024  * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
00025  * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
00026  * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
00027  * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
00028  * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
00029  * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
00030  * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
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 
00093 typedef enum {
00094     IVIDENC2_CTRL_NONE = 0,        
00095     IVIDENC2_CTRL_FORCESKIP = 1,   
00097     IVIDENC2_CTRL_DEFAULT = IVIDENC2_CTRL_NONE
00098 } IVIDENC2_Control;
00099 
00100 
00105 typedef struct IVIDENC2_Obj {
00106     struct IVIDENC2_Fxns *fxns;
00107 } IVIDENC2_Obj;
00108 
00109 
00113 typedef struct IVIDENC2_Obj  *IVIDENC2_Handle;
00114 
00124 #define IVIDENC2_DEFAULTPROFILE (-1)
00125 
00135 #define IVIDENC2_DEFAULTLEVEL (-1)
00136 
00143 typedef struct IVIDENC2_Params {
00144     XDAS_Int32 size;            
00145     XDAS_Int32 encodingPreset;  
00146     XDAS_Int32 rateControlPreset;
00150     XDAS_Int32 maxHeight;       
00151     XDAS_Int32 maxWidth;        
00152     XDAS_Int32 dataEndianness;  
00156     XDAS_Int32 maxInterFrameInterval;
00163     XDAS_Int32 maxBitRate;      
00166     XDAS_Int32 minBitRate;      
00169     XDAS_Int32 inputChromaFormat;
00173     XDAS_Int32 inputContentType;
00178     XDAS_Int32 operatingMode;   
00182     XDAS_Int32 profile;         
00195     XDAS_Int32 level;           
00208     XDAS_Int32 inputDataMode;   
00224     XDAS_Int32 outputDataMode;  
00243     XDAS_Int32 numInputDataUnits; 
00252     XDAS_Int32 numOutputDataUnits;
00261     XDAS_Int32 metadataType[IVIDEO_MAX_NUM_METADATA_PLANES];
00266 } IVIDENC2_Params;
00267 
00268 
00283 typedef struct IVIDENC2_DynamicParams {
00284     XDAS_Int32 size;            
00285     XDAS_Int32 inputHeight;     
00286     XDAS_Int32 inputWidth;      
00287     XDAS_Int32 refFrameRate;    
00294     XDAS_Int32 targetFrameRate; 
00301     XDAS_Int32 targetBitRate;   
00302     XDAS_Int32 intraFrameInterval;
00314     XDAS_Int32 generateHeader;  
00318     XDAS_Int32 captureWidth;    
00323     XDAS_Int32 forceFrame;      
00341     XDAS_Int32 interFrameInterval;
00358     XDAS_Int32 mvAccuracy;      
00369     XDAS_Int32 sampleAspectRatioHeight; 
00375     XDAS_Int32 sampleAspectRatioWidth; 
00381     XDAS_Int32 ignoreOutbufSizeFlag; 
00413     XDM_DataSyncPutFxn putDataFxn; 
00426     XDM_DataSyncHandle putDataHandle;
00448     XDM_DataSyncGetFxn getDataFxn;
00461     XDM_DataSyncHandle getDataHandle;
00482     XDM_DataSyncGetBufferFxn getBufferFxn;
00496     XDM_DataSyncHandle getBufferHandle;
00518     XDAS_Int32 lateAcquireArg;  
00547 } IVIDENC2_DynamicParams;
00548 
00549 
00558 typedef struct IVIDENC2_InArgs {
00559     XDAS_Int32 size;            
00560     XDAS_Int32 inputID;         
00581    XDAS_Int32 control;          
00585 } IVIDENC2_InArgs;
00586 
00587 
00595 typedef struct IVIDENC2_Status {
00596     XDAS_Int32 size;            
00597     XDAS_Int32 extendedError;   
00598     XDM1_SingleBufDesc data;    
00620     XDAS_Int32  encodingPreset; 
00621     XDAS_Int32  rateControlPreset;
00625     XDAS_Int32  maxInterFrameInterval; 
00632     XDAS_Int32 inputChromaFormat;
00636     XDAS_Int32 inputContentType; 
00641     XDAS_Int32 operatingMode;   
00645     XDAS_Int32 profile;         
00650     XDAS_Int32 level;           
00655     XDAS_Int32 inputDataMode;   
00660     XDAS_Int32 outputDataMode;  
00665     XDAS_Int32 numInputDataUnits; 
00678     XDAS_Int32 numOutputDataUnits;
00690    XDAS_Int32 configurationID;  
00704     XDM1_AlgBufInfo bufInfo;    
00717     XDAS_Int32 metadataType[IVIDEO_MAX_NUM_METADATA_PLANES];
00722     IVIDENC2_DynamicParams encDynamicParams;  
00734 } IVIDENC2_Status;
00735 
00736 
00745 typedef struct IVIDENC2_OutArgs {
00746     XDAS_Int32 size;            
00747     XDAS_Int32 extendedError;   
00748     XDAS_Int32 bytesGenerated;  
00751     XDAS_Int32 encodedFrameType;
00755     XDAS_Int32 inputFrameSkip;  
00759    XDAS_Int32 freeBufID[IVIDEO2_MAX_IO_BUFFERS]; 
00787     IVIDEO2_BufDesc reconBufs;  
00788 } IVIDENC2_OutArgs;
00789 
00790 
00801 typedef  IALG_Cmd IVIDENC2_Cmd;
00802 
00803 
00807 typedef struct IVIDENC2_Fxns {
00808     IALG_Fxns   ialg;             
00886     XDAS_Int32 (*process)(IVIDENC2_Handle handle, IVIDEO2_BufDesc *inBufs,
00887             XDM2_BufDesc *outBufs, IVIDENC2_InArgs *inArgs,
00888             IVIDENC2_OutArgs *outArgs);
00889 
00890 
00926     XDAS_Int32 (*control)(IVIDENC2_Handle handle, IVIDENC2_Cmd id,
00927             IVIDENC2_DynamicParams *params, IVIDENC2_Status *status);
00928 
00929 } IVIDENC2_Fxns;
00930 
00931 
00934 #ifdef __cplusplus
00935 }
00936 #endif
00937 
00938 #endif
00939 /*
00940  *  @(#) ti.xdais.dm; 1, 0, 7,7; 6-14-2011 10:34:32; /db/wtree/library/trees/dais/dais.git/src/ dais-u02
00941  */
00942 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines

Copyright 2011, Texas Instruments Incorporated