ividenc1.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 
00047 #ifndef ti_xdais_dm_IVIDENC1_
00048 #define ti_xdais_dm_IVIDENC1_
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 IVIDENC1_EOK       XDM_EOK             
00063 #define IVIDENC1_EFAIL     XDM_EFAIL           
00064 #define IVIDENC1_EUNSUPPORTED XDM_EUNSUPPORTED 
00070 typedef struct IVIDENC1_Obj {
00071     struct IVIDENC1_Fxns *fxns;
00072 } IVIDENC1_Obj;
00073 
00074 
00078 typedef struct IVIDENC1_Obj  *IVIDENC1_Handle;
00079 
00080 
00087 typedef struct IVIDENC1_Params {
00088     XDAS_Int32 size;            
00089     XDAS_Int32 encodingPreset;  
00090     XDAS_Int32 rateControlPreset;
00094     XDAS_Int32 maxHeight;       
00095     XDAS_Int32 maxWidth;        
00096     XDAS_Int32 maxFrameRate;    
00101     XDAS_Int32 maxBitRate;      
00102     XDAS_Int32 dataEndianness;  
00106     XDAS_Int32 maxInterFrameInterval;
00113     XDAS_Int32 inputChromaFormat;
00117     XDAS_Int32 inputContentType;
00122     XDAS_Int32 reconChromaFormat;
00133 } IVIDENC1_Params;
00134 
00135 
00150 typedef struct IVIDENC1_DynamicParams {
00151     XDAS_Int32 size;            
00152     XDAS_Int32 inputHeight;     
00153     XDAS_Int32 inputWidth;      
00154     XDAS_Int32 refFrameRate;    
00161     XDAS_Int32 targetFrameRate; 
00168     XDAS_Int32 targetBitRate;   
00169     XDAS_Int32 intraFrameInterval;
00181     XDAS_Int32 generateHeader;  
00185     XDAS_Int32 captureWidth;    
00190     XDAS_Int32 forceFrame;      
00208     XDAS_Int32 interFrameInterval;
00225     XDAS_Int32 mbDataFlag;      
00229 } IVIDENC1_DynamicParams;
00230 
00231 
00240 typedef struct IVIDENC1_InArgs {
00241     XDAS_Int32 size;            
00242     XDAS_Int32 inputID;         
00263     XDAS_Int32 topFieldFirstFlag;
00276 } IVIDENC1_InArgs;
00277 
00278 
00286 typedef struct IVIDENC1_Status {
00287     XDAS_Int32 size;            
00288     XDAS_Int32 extendedError;   
00289     XDM1_SingleBufDesc data;    
00310     XDM_AlgBufInfo bufInfo;     
00330 } IVIDENC1_Status;
00331 
00332 
00341 typedef struct IVIDENC1_OutArgs {
00342     XDAS_Int32 size;            
00343     XDAS_Int32 extendedError;   
00344     XDAS_Int32 bytesGenerated;  
00347     XDAS_Int32 encodedFrameType;
00351     XDAS_Int32 inputFrameSkip;  
00355     XDAS_Int32 outputID;        
00366    XDM1_SingleBufDesc encodedBuf;
00388     IVIDEO1_BufDesc reconBufs;  
00406 } IVIDENC1_OutArgs;
00407 
00408 
00419 typedef  IALG_Cmd IVIDENC1_Cmd;
00420 
00421 
00434 typedef struct IVIDENC1_MbData {
00435     XDAS_Int32 mbMode;          
00446     XDAS_Int32 QP;              
00451     XDAS_Int32 mvFwdXY;         
00467     XDAS_Int32 mvBwdXY;         
00472 } IVIDENC1_MbData;
00473 
00474 
00478 typedef struct IVIDENC1_Fxns {
00479     IALG_Fxns   ialg;             
00570     XDAS_Int32 (*process)(IVIDENC1_Handle handle, IVIDEO1_BufDescIn *inBufs,
00571         XDM_BufDesc *outBufs, IVIDENC1_InArgs *inArgs,
00572         IVIDENC1_OutArgs *outArgs);
00573 
00574 
00610     XDAS_Int32 (*control)(IVIDENC1_Handle handle, IVIDENC1_Cmd id,
00611         IVIDENC1_DynamicParams *params, IVIDENC1_Status *status);
00612 
00613 } IVIDENC1_Fxns;
00614 
00615 
00618 #ifdef __cplusplus
00619 }
00620 #endif
00621 
00622 #endif
00623 /*
00624  *  @(#) ti.xdais.dm; 1, 0, 5,194; 3-13-2009 12:27:50; /db/wtree/library/trees/dais/dais-o05x/src/
00625  */
00626 

Copyright 2009, Texas Instruments Incorporated