videoeditorengine/h263decoder/inc/vde.h
changeset 0 951a5db380a0
equal deleted inserted replaced
-1:000000000000 0:951a5db380a0
       
     1 /*
       
     2 * Copyright (c) 2010 Ixonos Plc.
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of the "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - Initial contribution
       
    11 *
       
    12 * Contributors:
       
    13 * Ixonos Plc
       
    14 *
       
    15 * Description:  
       
    16 * A header file for internal usage of the services provided by 
       
    17 * the Video Decoder Engine.
       
    18 *
       
    19 */
       
    20 
       
    21 
       
    22 #ifndef _VDE_H_
       
    23 #define _VDE_H_
       
    24 
       
    25 
       
    26 /*
       
    27  * Includes
       
    28  */
       
    29 
       
    30 #include "vdefrt.h"
       
    31 #include "vdeims.h"
       
    32 
       
    33 #include "biblin.h"
       
    34 #include "vdc263.h"
       
    35 #include "h263dapi.h"
       
    36 
       
    37 
       
    38 /*
       
    39  * Defines
       
    40  */
       
    41 
       
    42 /* Aliased return values from h263dext.h.
       
    43    (These values may also be exported outside the decoder.) */
       
    44 
       
    45 #define VDE_OK_BUT_NOT_CODED \
       
    46                            H263D_OK_BUT_NOT_CODED
       
    47 #define VDE_OK_BUT_FRAME_USELESS \
       
    48                            H263D_OK_BUT_FRAME_USELESS
       
    49 #define VDE_OK_EOS         H263D_OK_EOS
       
    50 #define VDE_OK             H263D_OK
       
    51 #define VDE_ERROR          H263D_ERROR
       
    52 #define VDE_ERROR_HALTED   H263D_ERROR_HALTED
       
    53 #define VDE_ERROR_NO_INTRA H263D_ERROR_NO_INTRA
       
    54 
       
    55 /* Internal return values.
       
    56    See h263dext.h that they do not conflict with the exported ones. */
       
    57 #define VDE_OK_NOT_AVAILABLE 10  /* a requested item is not available,
       
    58                                     see vdeFrtGetItem */
       
    59 #define VDE_OK_SEGMENTATION_CHANGED 11
       
    60                                  /* image segmentation in the Reference
       
    61                                     Picture Selection mode has changed,
       
    62                                     see rsbGetLatest */
       
    63 
       
    64 /* VDE states */
       
    65 #define VDE_STATE_BEGIN 0        /* no frame data decoded */
       
    66 #define VDE_STATE_MIDDLE 1       /* decoding */
       
    67 #define VDE_STATE_EOS 2          /* End-of-Stream reached */
       
    68 #define VDE_STATE_HALTED 3       /* fatal error, halted */
       
    69 #define VDE_STATE_RESYNC 4       /* Resyncing to INTRA frame */
       
    70 
       
    71 /* Temporal scalability levels, aliased from h263dext.h */
       
    72 #define VDE_LEVEL_ALL_FRAMES        H263D_LEVEL_ALL_FRAMES
       
    73 #define VDE_LEVEL_INTRA_FRAMES      H263D_LEVEL_INTRA_FRAMES
       
    74 #define VDE_LEVEL_ANNEX_N_LEVEL_0   (VDE_LEVEL_INTRA_FRAMES + 1)
       
    75 
       
    76 
       
    77 /*
       
    78  * Macros
       
    79  */
       
    80 
       
    81 /* Memory allocation wrappers */
       
    82 
       
    83 #define vdeMalloc malloc
       
    84 #define vdeCalloc calloc
       
    85 #define vdeRealloc realloc
       
    86 #define vdeDealloc free
       
    87 
       
    88 /* Assertion wrapper */
       
    89 #ifndef vdeAssert
       
    90    #define vdeAssert(exp) assert(exp);
       
    91 #endif
       
    92 
       
    93 
       
    94 /*
       
    95  * Structures and typedefs
       
    96  */
       
    97 
       
    98 /* {{-output"vdeInstance_t_info.txt" -ignore"*" -noCR}}
       
    99    vdeInstance_t holds the instance data for a Video Decoder Engine instance.
       
   100    This structure is used to keep track of the internal state of the VDE
       
   101    instance.
       
   102    {{-output"vdeInstance_t_info.txt"}} */
       
   103 
       
   104    /* {{-output"vdeInstance_t.txt"}} */
       
   105    typedef struct {
       
   106       vdcHInstance_t vdcHInstance;        /* Video Decoder Core instance handle */
       
   107 
       
   108       bibBuffer_t *inBuffer;              /* Bit Buffer instance data */
       
   109 
       
   110 
       
   111       bibBuffer_t *outBuffer;              /* output stream Bit Buffer instance data */
       
   112 	  bibBufferEdit_t *bufEdit; 
       
   113       int iColorEffect; 
       
   114       int iColorToneU; 				             /* U color tone value to be used */
       
   115       int iColorToneV; 				             /* V color tone value to be used */
       
   116       int iRefQp;                          /* first frame QP for color toning */
       
   117 	  TBool iGetDecodedFrame;
       
   118 
       
   119 
       
   120       vdeIms_t imageStore;                /* Image Store instance data */
       
   121 
       
   122       vdeFrtStore_t renStore;             /* Frame type specific store for renderer 
       
   123                                              handles */
       
   124 
       
   125       vdeFrtStore_t startCallbackStore;   /* Frame type specific store for
       
   126                                              "start frame decoding" callbacks */
       
   127 
       
   128       vdeFrtStore_t endCallbackStore;     /* Frame type specific store for
       
   129                                              "ended frame decoding" callbacks */
       
   130 
       
   131       int state;                          /* current state of VDE, see 
       
   132                                              VDE_STATE_XXX definitions for
       
   133                                              possible values */
       
   134 
       
   135       u_int32 creationTime;               /* the time returned by gtGetTime
       
   136                                              when the instance was created */
       
   137 
       
   138       u_char fMPEG4;                      /* this flag is used to signal the stream type 
       
   139                                              "0" H.263, "1" MPEG-4. 
       
   140                                              Set by calling vdeDetermineStreamType before 
       
   141                                              the first frame of the stream */
       
   142 
       
   143       int lumWidth;                       /* Expected size of the incoming */
       
   144       int lumHeight;                      /* luminance pictures */
       
   145 
       
   146       int requestedScalabilityLevel;      /* Requested temporal scalability 
       
   147                                              level to decode.
       
   148                                              See vdeSetTemporalScalability 
       
   149                                              for further details. */
       
   150 
       
   151       int fPrevFrameDecoded;              /* 0 if the previous frame was not
       
   152                                              decoded because it did not belong
       
   153                                              to requested temporal scalability
       
   154                                              level,
       
   155                                              1 otherwise */
       
   156    } vdeInstance_t;
       
   157    /* {{-output"vdeInstance_t.txt"}} */
       
   158 
       
   159 #endif
       
   160 // End of File