ividenc.h

Go to the documentation of this file.
00001 /* 
00002  * Copyright (c) 2009, 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 
00050 #ifndef ti_xdais_dm_IVIDENC_
00051 #define ti_xdais_dm_IVIDENC_
00052 
00053 #include <ti/xdais/ialg.h>
00054 #include <ti/xdais/xdas.h>
00055 
00056 /*
00057  * By definition, this interface is 0.9 XDM.  Before including xdm.h,
00058  * define XDM_INCLUDE_DOT9_SUPPORT
00059  */
00060 #ifndef XDM_INCLUDE_DOT9_SUPPORT
00061 #define XDM_INCLUDE_DOT9_SUPPORT
00062 #endif
00063 #include "xdm.h"
00064 #include "ivideo.h"
00065 
00066 #ifdef __cplusplus
00067 extern "C" {
00068 #endif
00069 
00070 
00073 
00074 #define IVIDENC_CID      "ti.xdais.dm.IVIDENC"  
00076 #define IVIDENC_ERUNTIME  XDM_ERUNTIME          
00077 #define IVIDENC_EOK       XDM_EOK               
00078 #define IVIDENC_EFAIL     XDM_EFAIL             
00084 typedef struct IVIDENC_Obj {
00085     struct IVIDENC_Fxns *fxns;
00086 } IVIDENC_Obj;
00087 
00088 
00092 typedef struct IVIDENC_Obj  *IVIDENC_Handle;
00093 
00094 
00104 typedef struct IVIDENC_Params {
00105     XDAS_Int32 size;            
00106     XDAS_Int32 encodingPreset;  
00107     XDAS_Int32 rateControlPreset;
00111     XDAS_Int32 maxHeight;       
00112     XDAS_Int32 maxWidth;        
00113     XDAS_Int32 maxFrameRate;    
00114     XDAS_Int32 maxBitRate;      
00115     XDAS_Int32 dataEndianness;  
00119     XDAS_Int32 maxInterFrameInterval;
00122     XDAS_Int32 inputChromaFormat;
00126     XDAS_Int32 inputContentType;
00131 } IVIDENC_Params;
00132 
00133 
00148 typedef struct IVIDENC_DynamicParams {
00149     XDAS_Int32 size;            
00150     XDAS_Int32 inputHeight;     
00151     XDAS_Int32 inputWidth;      
00152     XDAS_Int32 refFrameRate;    
00153     XDAS_Int32 targetFrameRate; 
00154     XDAS_Int32 targetBitRate;   
00155     XDAS_Int32 intraFrameInterval;
00158     XDAS_Int32 generateHeader;  
00162     XDAS_Int32 captureWidth;    
00167     XDAS_Int32 forceIFrame;     
00169 } IVIDENC_DynamicParams;
00170 
00179 typedef struct IVIDENC_InArgs {
00180     XDAS_Int32 size;            
00185 } IVIDENC_InArgs;
00186 
00194 typedef struct IVIDENC_Status {
00195     XDAS_Int32 size;            
00196     XDAS_Int32 extendedError;   
00197     XDM_AlgBufInfo bufInfo;     
00200 } IVIDENC_Status;
00201 
00202 
00211 typedef struct IVIDENC_OutArgs {
00212     XDAS_Int32 size;            
00213     XDAS_Int32 extendedError;   
00214     XDAS_Int32 bytesGenerated;  
00215     XDAS_Int32 encodedFrameType;
00219     XDAS_Int32 inputFrameSkip;  
00220     IVIDEO_BufDesc reconBufs;   
00221 } IVIDENC_OutArgs;
00222 
00223 
00234 typedef  IALG_Cmd IVIDENC_Cmd;
00235 
00236 
00240 typedef struct IVIDENC_Fxns {
00241     IALG_Fxns   ialg;             
00278     XDAS_Int32 (*process)(IVIDENC_Handle handle, XDM_BufDesc *inBufs,
00279         XDM_BufDesc *outBufs, IVIDENC_InArgs *inArgs,
00280         IVIDENC_OutArgs *outArgs);
00281 
00282 
00308     XDAS_Int32 (*control)(IVIDENC_Handle handle, IVIDENC_Cmd id,
00309         IVIDENC_DynamicParams *params, IVIDENC_Status *status);
00310 
00311 } IVIDENC_Fxns;
00312 
00313 
00316 #ifdef __cplusplus
00317 }
00318 #endif
00319 
00320 #endif
00321 /*
00322  *  @(#) ti.xdais.dm; 1, 0, 5,194; 3-13-2009 12:27:50; /db/wtree/library/trees/dais/dais-o05x/src/
00323  */
00324 

Copyright 2009, Texas Instruments Incorporated