API Guide Home (Online version only) |

# palmOneCodecFormat.h

Go to the documentation of this file.

    00001 /*******************************************************************************
    00002  * Copyright (c) 2004-2005 palmOne, Inc. or its subsidiaries.
    00003  * All rights reserved.
    00004  ******************************************************************************/
    00005 /**
    00006  * @ingroup Codec
    00007  */
    00008
    00009 /**
    00010  * @file    palmOneCodecFormat.h
    00011  * @version 1.0
    00012  *
    00013  * @brief   Public 68K common header file for Codec Plugin Manager API - Codec Formats.
    00014  *
    00015  * This file contains the list of known codecs. The codecs listed below
    00016  * may not be implemented yet. Each format is identified with a 4-byte
    00017  * ID as an attempt to avoid collision and be human readable.
    00018  * <hr>
    00019  */
    00020
    00021 #ifndef _PALMONECODECFORMAT_H_
    00022 #define _PALMONECODECFORMAT_H_
    00023
    00024 #include <PalmTypes.h>
    00025 #include <VFSMgr.h>
    00026 #include <FileStream.h>
    00027
    00028 /**
    00029  * @name Audio Codecs
    00030  */
    00031 /*@{*/
    00032 #define palmCodecAudioPCM           'PCM1'  /**< Raw PCM Audio Format. */
    00033 #define palmCodecAudioAAC           'DAAC'  /**< AAC Audio Format. */
    00034 #define palmCodecAudioMP1           'MPG1'  /**< MPEG Layer 1 Audio Format. */
    00035 #define palmCodecAudioMP2           'MPG2'  /**< MPEG Layer 2 Audio Format. */
    00036 #define palmCodecAudioMP3           'MPG3'  /**< MPEG Layer 3 Audio Format. */
    00037 #define palmCodecAudioVORBIS        'OGGV'  /**< OGG Vorbis Audio Format. */
    00038 #define palmCodecAudioIMA_ADPCM     'APCM'  /**< IMA ADPCM Audio Format. */
    00039 #define palmCodecAudioDVI_ADPCM     'DPCM'  /**< Intel/MS/DVI ADPCM. */
    00040 #define palmCodecAudioALAW          'ALAW'  /**< A-Law Audio Format. */
    00041 #define palmCodecAudioULAW          'ULAW'  /**< U-Law Audio Format. */
    00042 /*@}*/
    00043
    00044 /**
    00045  * @name Speech Codecs
    00046  */
    00047 /*@{*/
    00048 #define palmCodecAudioAMR           'AMRS'  /**< GSM-AMR Speech Format. */
    00049 #define palmCodecAudioQCELP         'QCLP'  /**< CDMA-QCELP Speech Format. */
    00050 #define palmCodecAudioG711          'G711'  /**< G.711 Speech Format. */
    00051 #define palmCodecAudioG722          'G722'  /**< G.722 Speech Format. */
    00052 #define palmCodecAudioG726          'G726'  /**< G.726 Speech Format. */
    00053 #define palmCodecAudioG728          'G728'  /**< G.728 Speech Format. */
    00054 /*@}*/
    00055
    00056 /**
    00057  * @name Video Codecs
    00058  */
    00059 /*@{*/
    00060 #define palmCodecVideoMPEG4         'MPG4'  /**< MPEG-4 Video Format. */
    00061 #define palmCodecVideoMPEG1         'Mpg1'  /**< MPEG-1 Video Format. */
    00062 #define palmCodecVideoMPEG2         'Mpg2'  /**< MPEG-2 Video Format. */
    00063 #define palmCodecVideoH263          'H263'  /**< H263 Video Format. */
    00064 #define palmCodecVideoMJPEG         'MJPG'  /**< Motion JPEG Video Format. */
    00065 #define palmCodecVideoDIVX          'DivX'  /**< DivX Video Format. */
    00066 #define palmCodecVideoXVID          'XviD'  /**< XviD Video Format. */
    00067 #define palmCodecVideoAVC           'AVCd'  /**< AVC(H.264) Video Format. */
    00068
    00069 /*@}*/
    00070
    00071 /**
    00072  * @name Text Codecs
    00073  */
    00074 /*@{*/
    00075 #define palmCodecText3G             '3GTX'  /**< 3G Text Format. */
    00076 /*@}*/
    00077
    00078 /**
    00079  * @name Still Images Codecs
    00080  */
    00081 /*@{*/
    00082 #define palmCodecImageJPEG          'JPEG'  /**< JPEG Image Format. */
    00083 #define palmCodecImageGIF87a        'GIF7'  /**< GIF87a Image Format. */
    00084 #define palmCodecImageGIF89a        'GIF9'  /**< GIF89a Image Format. */
    00085 #define palmCodecImagePNG           'PNGI'  /**< Portable Network Graphics Image Format. */
    00086 #define palmCodecImageWBMP          'WBMP'  /**< Windows Bitmap Image Format. */
    00087 #define palmCodecImageTIFF          'TIFF'  /**< TIFF Image Format. */
    00088 /*@}*/
    00089
    00090 /**
    00091  * @name Image File Formats
    00092  */
    00093 /*@{*/
    00094 #define palmCodecImageJPEGFile      'JPEF'  /**< JPEG Image File Format. */
    00095 #define palmCodecImageGIF87aFile    'GI7F'  /**< GIF87a Image File Format. */
    00096 #define palmCodecImageGIF89aFile    'GI9F'  /**< GIF89a Image Format. */
    00097 #define palmCodecImagePNGFile       'PNGF'  /**< Portable Network Graphics Image File Format. */
    00098 #define palmCodecImageWBMPFile      'WBMF'  /**< Windows Bitmap Image File Format. */
    00099 #define palmCodecImageTIFFFile      'TFFF'  /**< TIFF Image File Format. */
    00100 /*@}*/
    00101
    00102 #define palmCodecImageBase          'IM00'  /**< Base code for Image formats. */
    00103
    00104 /**
    00105  * Image Formats
    00106  */
    00107 enum
    00108 {
    00109     palmCodecImageARGB32 = palmCodecImageBase, /**< 32 bit color with alpha channel. */
    00110     palmCodecImageRGBA32,           /**< ('IM01') 32 bit color with alpha channel. */
    00111     palmCodecImageRGB32,            /**< ('IM02') 32 bit RGB color without alpha channel. */
    00112     palmCodecImageRGB888,           /**< ('IM03') 24 bit RGB color. */
    00113     palmCodecImageRGB888Planar,     /**< ('IM04') 24 bit RGB Planar color. */
    00114     palmCodecImageRGB565,           /**< ('IM05') 16 bit RGB color. */
    00115     palmCodecImageRGB555,           /**< ('IM06') 16 bit RGB color + don't care. */
    00116     palmCodecImageBGRA32,           /**< ('IM07') 32 bit BGR color with alpha channel. */
    00117     palmCodecImageBGR32,            /**< ('IM08') 32 bit BGR color without alpha channel. */
    00118     palmCodecImageBGR888,           /**< ('IM09') 24 bit BGR color. */
    00119     palmCodecImageBGR565,           /**< ('IM0:') 16 bit BGR color. */
    00120     palmCodecImageBGR555,           /**< ('IM0;') 16 bit BGR color + don't care. */
    00121     palmCodecImageYUV444,           /**< ('IM0<') 4:4:4 YUV format. */
    00122     palmCodecImageYUV422,           /**< ('IM0=') 4:2:2 YUV format. */
    00123     palmCodecImageYUV420,           /**< ('IM0>') 4:2:0 YUV format. */
    00124     palmCodecImageYUV411,           /**< ('IM0?') 4:1:1 YUV format. */
    00125     palmCodecImageYUV211,           /**< ('IM0@') 2:1:1 YUV format. */
    00126     palmCodecImageYUV444Planar,     /**< ('IM0A') 4:4:4 Planar YUV format. */
    00127     palmCodecImageYUV422Planar,     /**< ('IM0B') 4:2:2 Planar YUV format. */
    00128     palmCodecImageYUV420Planar,     /**< ('IM0C') 4:2:0 Planar YUV format. */
    00129     palmCodecImageYUV411Planar,     /**< ('IM0D') 4:1:1 Planar YUV format. */
    00130     palmCodecImageYUV211Planar,     /**< ('IM0E') 2:1:1 Planar YUV format. */
    00131     palmCodecImageYCbCr444,         /**< ('IM0F') 4:4:4 YCbCr format. */
    00132     palmCodecImageYCbCr422,         /**< ('IM0G') 4:2:2 YCbCr format. */
    00133     palmCodecImageYCbCr420,         /**< ('IM0H') 4:2:0 YCbCr format. */
    00134     palmCodecImageYCbCr411,         /**< ('IM0I') 4:1:1 YCbCr format. */
    00135     palmCodecImageYCbCr211,         /**< ('IM0J') 2:1:1 YCbCr format. */
    00136     palmCodecImageYCbCr444Planar,   /**< ('IM0K') 4:4:4 Planar YCbCr format. */
    00137     palmCodecImageYCbCr422Planar,   /**< ('IM0L') 4:2:2 Planar YCbCr format. */
    00138     palmCodecImageYCbCr420Planar,   /**< ('IM0M') 4:2:0 Planar YCbCr format. */
    00139     palmCodecImageYCbCr411Planar,   /**< ('IM0N') 4:1:1 Planar YCbCr format. */
    00140     palmCodecImageYCbCr211Planar,   /**< ('IM0O') 2:1:1 Planar YCbCr format. */
    00141     palmCodecImageRGBIndex16,       /**< ('IM0P') Palettized 16 bit RGB. */
    00142     palmCodecImageRGBIndex8,        /**< ('IM0Q') Palettized 8 bit RGB. */
    00143     palmCodecImageRGBIndex4,        /**< ('IM0R') Palettized 4 bit RGB. */
    00144     palmCodecImageRGBIndex2,        /**< ('IM0S') Palettized 2 bit RGB. */
    00145     palmCodecImageRGBIndex1,        /**< ('IM0T') Palettized 1 bit RGB. */
    00146     palmCodecImageRGBIndex,         /**< ('IM0U') Palettized RGB (unknowm index size). */
    00147     palmCodecImageGRAY8,            /**< ('IM0V') Gray color 8 bit. */
    00148     palmCodecImageGRAY4,            /**< ('IM0W') Gray color 4 bit. */
    00149     palmCodecImageGRAY2,            /**< ('IM0X') Gray color 2 bit. */
    00150     palmCodecImageGRAY1,            /**< ('IM0Y') Gray color 1 bit. */
    00151     palmCodecImageGIFFrame,         /**< ('IM0Z') GIF Frame format. */
    00152     palmCodecImageCMY,              /**< ('IM0[') Cyan Magenta Yellow format. */
    00153     palmCodecImageCMYK,             /**< ('IM0\') Cyan Magenta Yellow BlacK format. */
    00154     palmCodecImageHSL,              /**< ('IM0]') Hue Saturation Lightness format. */
    00155     palmCodecImageHSI,              /**< ('IM0^') Hue Saturation Intensity format. */
    00156     palmCodecImageHSV,              /**< ('IM0_') Hue Saturation Value format. */
    00157     palmCodecImageHCI               /**< ('IM0`') Hue Chroma Intensity format. */
    00158 };
    00159
    00160
    00161 /**
    00162  * Audio channels
    00163  */
    00164 typedef enum {
    00165     palmCodecMONO   = 0x01, /**< One channel. */
    00166     palmCodecSTEREO         /**< Two channels. */
    00167
    00168 } PalmAudioChannelType;
    00169
    00170 /**
    00171  * Basic data types
    00172  */
    00173 typedef enum {
    00174
    00175     // Compatibility layer for sound manager
    00176     palmCodecINT8           = 0x01, /**< Signed 8-bit. */
    00177     palmCodecUINT8          = 0x11, /**< Unsigned 8-bit. */
    00178     palmCodecINT16Big       = 0x02, /**< Signed 16-bit big-endian. */
    00179     palmCodecINT16Little    = 0x12, /**< Signed 16-bit little-endian. */
    00180     palmCodecINT32Big       = 0x04, /**< Signed 32-bit big-endian. */
    00181     palmCodecINT32Little    = 0x14, /**< Signed 32-bit little-endian. */
    00182     palmCodecFloatBig       = 0x24, /**< Float big-endian. */
    00183     palmCodecFloatLittle    = 0x34, /**< Float little-endian. */
    00184
    00185     // Extra types
    00186     palmCodecUINT16Big,             /**< Unsigned 16-bit big-endian. */
    00187     palmCodecUINT16Little,          /**< Unsigned 16-bit little-endian. */
    00188     palmCodecINT24,                 /**< Signed 24-bit. */
    00189     palmCodecUINT24,                /**< Unsigned 24-bit. */
    00190     palmCodecUINT32Big,             /**< Unsigned 32-bit big-endian. */
    00191     palmCodecUINT32Little           /**< Unsigned 32-bit little-endian. */
    00192
    00193 } PalmBasicType;
    00194
    00195 /**
    00196  * Endianess
    00197  */
    00198 typedef enum {
    00199     palmCodecBIG_ENDIAN,    /**< Big endian. */
    00200     palmCodecLITTLE_ENDIAN  /**< Little endian. */
    00201
    00202 } PalmEndianType;
    00203
    00204
    00205 /**
    00206  * File types
    00207  */
    00208 typedef enum {
    00209     palmCodecVFSFile,       /**< VFS File. */
    00210     palmCodecStreamFile     /**< Stream File. */
    00211
    00212 } PalmFileType;
    00213
    00214 /**
    00215  * BMP compression
    00216  */
    00217 typedef enum {
    00218     palmCodecBMP_None,      /**< No compression. */
    00219     palmCodecBMP_RLE4,      /**< RLE 4bit compression. */
    00220     palmCodecBMP_RLE8       /**< RLE 8bit compression. */
    00221
    00222 } PalmBMPCompressionType;
    00223
    00224 /**
    00225  * AAC profiles
    00226  */
    00227 typedef enum {
    00228     palmCodecAACMainProfile,  /**< Main Profile */
    00229     palmCodecAACLowComplexity, /**< Low Complexity Profile */
    00230     palmCodecAACScaleableSamplingRate /**< SSR Profile*/
    00231
    00232 } PalmAACProfileType;
    00233
    00234 /**
    00235  * AMR modes
    00236  */
    00237 typedef enum {
    00238     palmCodecAMR475,        /**<  4.75 kBits/second. */
    00239     palmCodecAMR515,        /**<  5.15 kBits/second. */
    00240     palmCodecAMR59,         /**<  5.9  kBits/second. */
    00241     palmCodecAMRM67,        /**<  6.7  kBits/second. */
    00242     palmCodecAMR74,         /**<  7.4  kBits/second. */
    00243     palmCodecAMR795,        /**<  7.95 kBits/second. */
    00244     palmCodecAMR102,        /**< 10.2  kBits/second. */
    00245     palmCodecAMR122         /**< 12.2  kBits/second. */
    00246
    00247 } PalmAMRMode;
    00248
    00249 /**
    00250  * AMR transmission settings
    00251  */
    00252 typedef enum {
    00253     palmCodecAMRDtxDisable, /**< Disable discontinuous transmission mode. */
    00254     palmCodecAMRDtxEnable   /**< Enable discontinuous transmission mode. */
    00255
    00256 } PalmAMRDtxMode;
    00257
    00258 /**
    00259  * QCELP rates
    00260  */
    00261 typedef enum {
    00262     palmCodecQCELPSilent,   /**<   0 Bits per packet. */
    00263     palmCodecQCELPEighth,   /**<  20 Bits per packet. */
    00264     palmCodecQCELPQuarter,  /**<  54 Bits per packet. */
    00265     palmCodecQCELPHalf,     /**< 124 Bits per packet. */
    00266     palmCodecQCELPFull      /**< 266 Bits per packet. */
    00267
    00268 } PalmQCELPRate;
    00269
    00270 /**
    00271  * QCELP encoder settings
    00272  */
    00273 typedef enum {
    00274     palmCodecQCELPReducedDisabled,  /**<  Disable reduced rate encoding. */
    00275     palmCodecQCELPReducedEnabled    /**<  Enable reduced rate encoding. */
    00276
    00277 } PalmQCELPReducedRate;
    00278
    00279 /**
    00280  * AAC file formats
    00281  */
    00282 typedef enum {
    00283     palmCodecAAC_RAW,   /**<  RAW format.  */
    00284     palmCodecAAC_ADIF,  /**<  ADIF format. */
    00285     palmCodecAAC_ADTS,  /**<  ADTS format. */
    00286     palmCodecAAC_MP4A,  /**<  MP4A format. */
    00287     palmCodecAAC_LATM   /**<  LATM format. */
    00288
    00289 } AACHeaderType;
    00290
    00291 /**
    00292  * AAC object type
    00293  */
    00294 typedef enum {
    00295     MAIN        = 1,
    00296     LC,
    00297     SSR,
    00298     LTP,
    00299     HE_AAC,
    00300     ER_LC       = 17,
    00301     ER_LTP      = 19,
    00302     LD          = 23,
    00303     DRM_ER_LC   = 27
    00304
    00305 } AACObjectType;
    00306
    00307 /**
    00308  * File flags
    00309  */
    00310 typedef enum {
    00311     VFS = 1,        /**<  VFS.  */
    00312     FileStream = 2  /**<  FileStream. */
    00313
    00314 } FileFlag;
    00315
    00316 /**
    00317  * MPEG4 encoding algorithm
    00318  */
    00319 typedef enum {
    00320     palmCodecMPEG4MVFAST,   /**< Motion Vector Field Adaptation Search Technique. */
    00321     palmCodecMPEG4SEA       /**< Successive Elimination Algorithm. */
    00322
    00323 } PalmMPEG4Algorithm;
    00324
    00325
    00326 /**
    00327  * Custom controls / API selectors
    00328  */
    00329 typedef enum {
    00330     palmCodecCtlGetVersion,                 /**< Get the codec version. (UInt32 in SysMakeROM style) */
    00331     palmCodecCtlGetAuthor,                  /**< Get the codec author. (Char[64]) */
    00332     palmCodecCtlGetDate,                    /**< Get the codec date. (Char[10] like "09/02/2003") */
    00333     palmCodecCtlGetComments,                /**< Get comments about the codec. (Char[512]) */
    00334     palmCodecCtlLastBuffer,                 /**< Next EncodeDecode call will get the last buffer. */
    00335     palmCodecCtlCustomBase  = 0x80000000,   /**< Custom custom control base. */
    00336
    00337     // AVC specific API
    00338     palmCodecCtlAVCGetInfo,                 /**< Get the video frame width/ht info. */
    00339     palmCodecCtlAVCGetDecodedFrame,         /**< Get the decoded frame. */
    00340     palmCodecCtlAVCSetCropMode,             /**< Set the crop mode. */
    00341
    00342     // Secure access to particular codec
    00343     palmCodecCtlPutSeed,                    /**< Give the codec a random number. */
    00344     palmCodecCtlGetKey,                     /**< Get the encoded key from the codec. */
    00345     palmCodecCtlPutKey,                     /**< Give the re-encoded key to the codec. */
    00346
    00347     // AAC specific API
    00348     palmCodecCtlAACGetInfo                  /**< Get the audio frame freq/chan info. */
    00349
    00350 } PalmCodecControlType;
    00351
    00352
    00353 /**
    00354  * @brief RAW image format parameters
    00355  */
    00356 typedef struct {
    00357     UInt32  width;              /**< Width of the image. */
    00358     UInt32  height;             /**< Height of the image. */
    00359     UInt32  rowByte;            /**< Rowbyte of the image. */
    00360     UInt32  endianess;          /**< Big Endian, Little Endian. */
    00361
    00362 } PalmImageParamType;
    00363
    00364 #define MAX_PLANE_COUNT     5   /**< Maximum number of image planes */
    00365
    00366 /**
    00367  * @brief Planar image structure, passed during EncodeDecode
    00368  */
    00369 typedef struct {
    00370     UInt32  width;              /**< Width of the image. */
    00371     UInt32  height;             /**< Height of the image. */
    00372
    00373     // Plane info
    00374     void    *planeP[MAX_PLANE_COUNT];   /**< Image planes. */
    00375     UInt32  planeWidth[MAX_PLANE_COUNT];/**< Width of each plane. */
    00376     UInt32  planeCount;                 /**< Number of planes used. */
    00377
    00378 } PalmImagePlanarType;
    00379
    00380 /**
    00381  * @brief PCM format parameters
    00382  */
    00383 typedef struct {
    00384     UInt32  sampleRate;         /**< Sample rate (44100, 32000...). */
    00385     UInt32  sampleType;         /**< Sample type (use the one one from Sound Manager). */
    00386     UInt32  sampleWidth;        /**< Sample width (mono/stereo). */
    00387
    00388 } PalmAudioPCMParamType;
    00389
    00390 /**
    00391  * @brief IMA-ADPCM format parameters
    00392  */
    00393 typedef struct {
    00394     UInt32  sampleRate;         /**< Sample rate (44100, 32000...). */
    00395     UInt32  sampleWidth;        /**< Sample width (mono/stereo). */
    00396     UInt32  blockSize;          /**< Block Size. */
    00397
    00398 } PalmAudioADPCMParamType;
    00399
    00400 /**
    00401  * @brief AAC format parameters
    00402  */
    00403 typedef struct {
    00404     UInt32  bitRate;            /**< Bits per second. */
    00405     UInt32  sampleRate;         /**< Sample rate (44100, 32000...). */
    00406     UInt32  sampleWidth;        /**< Sample width (mono/stereo). */
    00407     UInt32  profile;            /**< Profile used if any. */
    00408
    00409 } PalmAudioAACParamType;
    00410
    00411
    00412 /**
    00413  * @brief AAC decoding parameters
    00414  */
    00415 typedef struct {
    00416     UInt32 fileFormat;              /**< RAW, ADTS, ADIF, MP4A and LATM */
    00417
    00418     union {
    00419         void *ascP;                 /**< Parameter block for MP4A */
    00420         void *esdsP;                /**< Parameter block for RAW */
    00421     } u;
    00422
    00423     void *frameP;                   /**< First AAC frame */
    00424     UInt32 frameSize;               /**< Frame size */
    00425     UInt32 sampleRate;              /**> Sample rate returned */
    00426
    00427 } PalmAudioAACDecParamType;
    00428
    00429 typedef struct {
    00430     UInt32 flags;                   /**< Set to VFS or FileStream */
    00431
    00432     union {
    00433         struct {
    00434             UInt32 volRefNum;
    00435             FileRef fileRef;
    00436         } file;
    00437
    00438         struct {
    00439             FileHand fileH;
    00440             UInt32 type;
    00441             UInt32 creator;
    00442         } stream;
    00443     } u;
    00444
    00445 } AacFileRef, *AacFileRefPtr;
    00446
    00447 /*
    00448  * @brief AMR format encoding parameters
    00449  */
    00450 typedef struct {
    00451     UInt32  mode;               /**< Encoding mode (i.e. kBits/second). */
    00452     UInt32  dtxMode;            /**< Discontinuous transmission mode. */
    00453
    00454 } PalmAudioAMRParamType;
    00455
    00456 /*
    00457  * @brief QCELP format encoding parameters
    00458  */
    00459 typedef struct {
    00460     UInt32  maxRate;            /**< Maximum rate. */
    00461     UInt32  minRate;            /**< Minimum rate. */
    00462     UInt32  reducedRate;        /**< Reduced rate flag. */
    00463
    00464 } PalmAudioQCELPParamType;
    00465
    00466 /*
    00467  * @brief QCELP format decoding parameter
    00468  */
    00469 typedef struct {
    00470     UInt32  headerSize;         /**< size of RIFF header. */
    00471     UInt32  headerP;            /**< RIFF header. */
    00472
    00473 } PalmAudioQCELPDecParamType;
    00474
    00475 /**
    00476  * @brief MPEG-1 audio decoding parameters
    00477  */
    00478 typedef struct {
    00479     UInt32 avgBytesPerSec;
    00480     UInt32 bitsPerSample;
    00481     UInt32 channels;
    00482     UInt32 sampleRate;
    00483
    00484 } PalmAudioMP2ParamType;
    00485
    00486 /**
    00487  * @brief File format parameters
    00488  */
    00489 typedef struct {
    00490     UInt32      fileLocationType;   /**< File location type. */
    00491     FileRef     vfsFileRef;         /**< File Reference for VFS type. */
    00492     FileHand    streamFileHandle;   /**< File Handle for File Stream type. */
    00493
    00494 } PalmFileFormatParamType;
    00495
    00496
    00497 /**
    00498  * @brief BMP format parameters
    00499  */
    00500 typedef struct {
    00501     UInt32  xPixelsPerMeter;    /**< Horizontal resolution. */
    00502     UInt32  yPixelsPerMeter;    /**< Vertical resolution. */
    00503     UInt32  colorUsed;          /**< Number of color indices actually used. */
    00504     UInt32  colorImportant;     /**< Number of color indices actually required. 0 = all colors required. */
    00505     UInt32  compression;        /**< Bitmap compression. */
    00506
    00507 } PalmImageBMPParamType;
    00508
    00509
    00510 /**
    00511  * @brief JPEG format encoding parameters
    00512  */
    00513 typedef struct {
    00514     UInt32  quality;            /**< JPEG quality between 0 and 100. */
    00515     UInt32  restartInterval;    /**< Number of restart intervals. */
    00516     UInt32  JPEGMode;           /**< Baseline/Progressive... */
    00517     UInt32  subSampling;        /**< SubSampling YCbCr (444, 422, 411). */
    00518
    00519 } PalmImageJPEGEncodeParamType;
    00520
    00521 /**
    00522  * @brief GIF frame parameters
    00523  *
    00524  * Each GIF frame contains more info than a simple palette and image buffer.
    00525  */
    00526 typedef struct {
    00527     UInt32  leftPosition;           /**< Left position of the image. */
    00528     UInt32  topPosition;            /**< Top posistion of the image. */
    00529     UInt32  imageWidth;             /**< Image width. */
    00530     UInt32  imageHeight;            /**< Image height. */
    00531     UInt32  localColorBits;         /**< Number of bits for the local color table. */
    00532     UInt32  hasLocalColorTable;     /**< 1 if has local color table, 0 otherwise. */
    00533     UInt32  isInterlaced;           /**< 1 if interlaced, 0 otherwise. */
    00534     UInt32  hasTransparentColor;    /**< 1 if has transparency, 0 otherwise. */
    00535     UInt32  transparentColorIndex;  /**< Transparency color index. */
    00536     UInt32  disposalMethod;         /**< Disposal method. (Refer to GIF standard)*/
    00537     UInt32  delayTime;              /**< Delay for the current image. */
    00538     UInt8   localColorTable[256*3]; /**< Local color table. */
    00539     UInt32  imageDataSize;          /**< Size of the image buffer. */
    00540     UInt8   *imageDataP;            /**< Raw Image. */
    00541
    00542 } PalmImageGIFFrameParamType;
    00543
    00544 /**
    00545  * @brief Index image parameters
    00546  */
    00547 typedef struct {
    00548     UInt32  width;              /**< Width of the image. */
    00549     UInt32  height;             /**< Height of the image. */
    00550     UInt32  rowByte;            /**< Rowbyte of the image. */
    00551     UInt32  endianess;          /**< Big Endian, Little Endian. */
    00552     UInt32  colorBits;          /**< Number of bits for the color table. */
    00553     UInt8   *colorTable;        /**< Color table. Should have the size 4*2^(colorBits). */
    00554     UInt8   *imageDataP;        /**< Raw Image data. */
    00555
    00556 } PalmImageINDEXParamType;
    00557
    00558 /**
    00559  * @brief MPEG-1 video decoding parameters
    00560  */
    00561 typedef struct {
    00562     UInt32  width;          /**< Width. */
    00563     UInt32  height;         /**< Height. */
    00564     UInt32  skipBFrames;    /**< B Frame are very time consuming. If True skip B-Frames. */
    00565
    00566 } PalmVideoMPEG1DecodeParamType;
    00567
    00568 /**
    00569  * @brief MPEG-4 video format encoding parameters
    00570  */
    00571 typedef struct {
    00572     UInt32  profile;            /**< Profile used if any. */
    00573     UInt32  volWidth;           /**< Video Object Layer width. */
    00574     UInt32  volHeight;          /**< Video Object Layer height. */
    00575     UInt32  keyFrame;           /**< Number of P-Frames between two I-Frames. */
    00576     UInt32  frameRate;          /**< Number of frames per second. */
    00577     UInt32  bitRate;            /**< Bit rate target. */
    00578     UInt32  algorithm;          /**< MV_FAST, SEA... */
    00579     UInt32  IVOPQuantization;   /**< Quantization step in I-VOP frames. */
    00580     UInt32  VOVOLVersionID;     /**< Version ID for VO & VOL header. */
    00581     UInt32  searchRange;        /**< Motion search range (in pixels). */
    00582
    00583 } PalmVideoMPEG4EncodeParamType;
    00584
    00585 /**
    00586  * @brief MPEG-4 video format decoding parameters
    00587  */
    00588 typedef struct {
    00589     UInt32  profile;            /**< Profile used if any. */
    00590     UInt32  volWidth;           /**< Video Object Layer width. */
    00591     UInt32  volHeight;          /**< Video Object Layer width. */
    00592 } PalmVideoMPEG4DecodeParamType;
    00593
    00594
    00595 /**
    00596  * @brief AVC/H264 video format decoding parameters
    00597  */
    00598 typedef struct {
    00599     UInt8           *NALUnit;
    00600     UInt32          NALUnitSize;
    00601     UInt32          compositionTimestamp;
    00602     double          compositionTime;
    00603 } PalmVideoAVCDecodeParamType;
    00604
    00605 /**
    00606  * @brief AVC/H264 Custom Control API structure for GetInfo about frame
    00607  */
    00608 typedef struct {
    00609     UInt16          frameWidth;          /**< width of lum. plane in pixels */
    00610     UInt16          frameHeight;         /**< Ht of lum. plane in pixels */
    00611     UInt16          frameWidthCropped;   /**< Width of cropped lum. plane in pixels */
    00612     UInt16          frameHeightCropped;  /**< height of cropped lum. plane in pixels */
    00613     UInt16          horizontalOffset;    /**< Horizontal offset of cropped lum. plane */
    00614     UInt16          verticalOffset;      /**< Vertical offset of cropped lum. plane */
    00615     UInt32          chromaFormat;        /**< Chroma format, only YUV420 for now */
    00616 } PalmVideoAVCCustomGetInfoType;
    00617
    00618 /**
    00619  * @brief AVC/H264 Custom Control API structure for getting a decoded frame
    00620  */
    00621 typedef struct {
    00622     PalmImagePlanarType  planarData;
    00623     Int32                framesReady;
    00624     UInt16               picWidth;            /**< width of lum. plane in pixels */
    00625     UInt16               picWidthCropped;     /**< Width of cropped lum. plane in pixels */
    00626     UInt16               picHeight;           /**< Ht of lum. plane in pixels */
    00627     UInt16               picHeightCropped;    /**< height of cropped lum. plane in pixels */
    00628     UInt16               stride;              /**< offset from start of one line of from to start of next */
    00629     UInt32               compositionTimestamp;/**< timestamp moment in time decoded data to be played back */
    00630     double               compositionTime;     /**< time describing moment in time decoded data to be played back */
    00631 } PalmVideoAVCCustomGetDecodedFrameType;
    00632
    00633 /**
    00634  * @brief AVC/H264 Custom Control API structure for getting a decoded frame
    00635  */
    00636 typedef struct {
    00637     Boolean              bCroppedMode;        /**< TRUE - output cropped size, FALSE - full size */
    00638 } PalmVideoAVCCustomSetCropModeType;
    00639
    00640 /**
    00641  * @brief AVC/H264 video format decoding parameters
    00642  */
    00643 typedef struct {
    00644     Int32                framesReady;         /**< No. of avail. decoded frames */
    00645 } PalmVideoAVCOutputBufferType;
    00646
    00647
    00648 #endif  // _PALMONECODECFORMAT_H_

Top | Palm Developer Network © 2004-2008, Palm, Inc. All rights reserved. Generated on Fri Jun 13 10:06:54 2008 for Palm API Guide