videoeditorengine/h263decoder/inc/rendri.h
branchRCL_3
changeset 3 e0b5df5c0969
parent 0 951a5db380a0
child 5 4c409de21d23
equal deleted inserted replaced
0:951a5db380a0 3:e0b5df5c0969
     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 the draw item abstract data type.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef _RENDRI_H_
       
    22 #define _RENDRI_H_
       
    23 
       
    24 
       
    25 /*
       
    26  * Includes
       
    27  */
       
    28 
       
    29 #include "renapi.h"
       
    30 
       
    31 
       
    32 /*
       
    33  * Macros
       
    34  */
       
    35 
       
    36 /* {{-output"renDriMacros.txt"}} */
       
    37 /*
       
    38  * The following macros return a specific feature of the draw item
       
    39  * passed as a parameter.
       
    40  *
       
    41  *
       
    42  * renDriNewSourceFlag
       
    43  *    returns 1, if the draw item is a new source for macroblock copying,
       
    44  *    otherwise, it returns 0,
       
    45  *    see REN_EXTDRAW_NEW_SOURCE in renExtDrawParam_t
       
    46  *
       
    47  * renDriCopyNotCodedFlag
       
    48  *    returns 1, if the draw item contains not-coded macroblock info,
       
    49  *    otherwise, it returns 0,
       
    50  *    see REN_EXTDRAW_COPY_NOT_CODED in renExtDrawParam_t
       
    51  *
       
    52  * renDriSnapshotFlag
       
    53  *    returns 1, if the draw item is marked as a snapshot,
       
    54  *    otherwise, it returns 0,
       
    55  *    see REN_EXTDRAW_SNAPSHOT in renExtDrawParam_t
       
    56  *
       
    57  * renDriFreezeReleaseFlag
       
    58  *    returns 1, if the draw item ends picture freezing,
       
    59  *    otherwise, it returns 0,
       
    60  *    see REN_EXTDRAW_SNAPSHOT in renExtDrawParam_t
       
    61  *
       
    62  * renDriNoStatusCallbackFlag
       
    63  *    returns 1, if no status callback is called after this draw item is,
       
    64  *    processed, 
       
    65  *    otherwise, it returns 0,
       
    66  *    see REN_EXTDRAW_NO_STATUS_CALLBACK in renExtDrawParam_t
       
    67  *
       
    68  * renDriRate
       
    69  *    returns the rate parameter of renExtDrawParam_t
       
    70  *
       
    71  * renDriScale
       
    72  *    returns the scale parameter of renExtDrawParam_t
       
    73  *
       
    74  * renDriCodedMBs
       
    75  *    returns a pointer to an unsigned char array of flags of coded MBs,
       
    76  *    the array is indexed by scan-ordered macroblock index,
       
    77  *    1 means that the corresponding macroblock is coded,
       
    78  *    0 means that the corresponding macroblock is not coded
       
    79  *
       
    80  * renDriNumOfMBs
       
    81  *    returns the number of macroblocks in the draw item
       
    82  *
       
    83  * renDriNumOfCodedMBs
       
    84  *    returns the number of coded macroblocks in the draw item
       
    85  *
       
    86  * renDriBitmapWidth
       
    87  *    returns the width of the bitmap to be displayed (in pixels)
       
    88  *
       
    89  * renDriBitmapHeight
       
    90  *    returns the height of the bitmap to be displayed (in pixels)
       
    91  *
       
    92  * renDriBitmapImageSize
       
    93  *    returns the size of the bitmap to be displayed (in bytes)
       
    94  *
       
    95  * renDriBitmapCompression
       
    96  *    returns the compression ID number of the draw item
       
    97  *
       
    98  * renDriFrameNumber
       
    99  *    returns the frame number of the draw item 
       
   100  *    (the lTime Parameter of renDrawParam_t)
       
   101  *
       
   102  * renDriRetFrame
       
   103  *    returns the pointer to the function where to return the processed draw
       
   104  *    item (the retFrame param of renDrawItem_t)
       
   105  *
       
   106  * renDriRetFrameParam
       
   107  *    returns the parameter to pass to the function where to return
       
   108  *    the processed draw item (the retFrameParam of renDrawItem_t)
       
   109  *
       
   110  */
       
   111 
       
   112 #define renDriNewSourceFlag(drawItem) \
       
   113    (((drawItem)->extParam.flags & REN_EXTDRAW_NEW_SOURCE) > 0)
       
   114 
       
   115 #define renDriCopyNotCodedFlag(drawItem) \
       
   116    (((drawItem)->extParam.flags & REN_EXTDRAW_COPY_NOT_CODED) > 0)
       
   117 
       
   118 #define renDriRate(drawItem) \
       
   119    ((drawItem)->extParam.rate)
       
   120 
       
   121 #define renDriCodedMBs(drawItem) \
       
   122    ((drawItem)->extParam.fCodedMBs)
       
   123 
       
   124 #define renDriNumOfMBs(drawItem) \
       
   125    ((drawItem)->extParam.numOfMBs)
       
   126 
       
   127 #define renDriNumOfCodedMBs(drawItem) \
       
   128    ((drawItem)->extParam.numOfCodedMBs)
       
   129 
       
   130 #define renDriBitmapWidth(drawItem) \
       
   131    (((renBitmapInfoHeader_t *) ((drawItem)->param.lpFormat))->biWidth)
       
   132 
       
   133 #define renDriBitmapHeight(drawItem) \
       
   134    (labs(((renBitmapInfoHeader_t *) ((drawItem)->param.lpFormat))->biHeight))
       
   135 
       
   136 #define renDriBitmapImageSize(drawItem) \
       
   137     (((renBitmapInfoHeader_t *) ((drawItem)->param.lpFormat))->biSizeImage)
       
   138 
       
   139 #define renDriFrameNumber(drawItem) \
       
   140    ((drawItem)->param.lTime)
       
   141 
       
   142 
       
   143 /*
       
   144  * Function prototypes
       
   145  */
       
   146 
       
   147 renDrawItem_t * renDriAlloc(int width, int height, int fYuvNeeded);
       
   148 
       
   149 void renDriCopyParameters(
       
   150    renDrawItem_t *dstDrawItem, 
       
   151    const renDrawItem_t *srcDrawItem);
       
   152 
       
   153 void renDriCopyFrameData(
       
   154    renDrawItem_t *dstDrawItem, 
       
   155    const renDrawItem_t *srcDrawItem);
       
   156 
       
   157 void renDriFree(renDrawItem_t *drawItem);
       
   158 
       
   159 int renDriYUV(renDrawItem_t *drawItem,
       
   160    u_char **y, u_char **u, u_char **v, int *width, int *height);
       
   161 
       
   162 #endif
       
   163 // End of File