videoeditorengine/h263decoder/inc/sync.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 * Sync codes.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef _SYNC_H_
       
    22 #define _SYNC_H_
       
    23 
       
    24 
       
    25 #include "epoclib.h"
       
    26 
       
    27 #include "biblin.h"
       
    28 
       
    29 
       
    30 /*
       
    31  * Defines
       
    32  */
       
    33 
       
    34 /* Return values */
       
    35 #define SNC_NO_SYNC  0        /* No synchronization code found */
       
    36 #define SNC_PSC      1        /* Picture Start Code */
       
    37 #define SNC_GBSC     2        /* GOB Start Code */
       
    38 #define SNC_EOS      4        /* End of Sequence */
       
    39 
       
    40 /*** MPEG-4 REVISION ***/
       
    41 #define SNC_VIDPACK  5        /* Video Packet resynchronization marker */
       
    42 #define SNC_VOS      6        /* Video Object Sequence (VOS) Start Code */
       
    43 #define SNC_VOP      7        /* Video Object Plane (VOP) Start Code */
       
    44 #define SNC_GOV      8        /* Group of VOPs (GOV) Start Code */
       
    45 #define SNC_USERDATA 9        /* User Data Start Code */
       
    46 #define SNC_EOB      10       /* Visual Sequence End Code */
       
    47 #define SNC_VID      11       /* Other Video Object Header Start Codes */
       
    48 #define SNC_PATTERN  12       /* The search pattern in sncSeekBitPattern */
       
    49 /*** End MPEG-4 REVISION ***/
       
    50 
       
    51 #define SNC_STUFFING 13       /* Stuffing in the end of a buffer containing
       
    52                                  one frame */
       
    53 
       
    54 /* See sncRewindAndSeekNewSync for description. */
       
    55 #define SNC_DEFAULT_REWIND -1
       
    56 
       
    57 
       
    58 /*
       
    59  * Function prototypes
       
    60  */
       
    61 
       
    62 int sncCheckSync(bibBuffer_t *buffer, int *numStuffBits, int16 *error);
       
    63 
       
    64 int sncRewindAndSeekNewSync(u_int32 numBitsToRewind, bibBuffer_t *buffer, 
       
    65    int16 *error);
       
    66 
       
    67 int sncSeekFrameSync(bibBuffer_t *buffer, int16 *error);
       
    68 
       
    69 int sncSeekSync(bibBuffer_t *buffer, int16 *error);
       
    70 
       
    71    int sncCheckMpegVOP(bibBuffer_t *buffer, int16 *error);
       
    72    int sncCheckMpegSync(bibBuffer_t *buffer, int f_code, int16 *error);
       
    73    int sncRewindAndSeekNewMPEGSync(int earliestBitPos, bibBuffer_t *buffer,
       
    74                                    int f_code, int16 *error);
       
    75    int sncSeekMPEGSync(bibBuffer_t *buffer, int f_code, int16 *error);
       
    76    int sncSeekMPEGStartCode(bibBuffer_t *buffer, int f_code, int skipVPSync, int checkUD, int16 *error);
       
    77    int sncSeekBitPattern(bibBuffer_t *buffer, u_int32 BitPattern, 
       
    78       int BitPatternLength, int16 *error);
       
    79    int sncRewindStuffing(bibBuffer_t *buffer, int16 *error);
       
    80 
       
    81 #endif
       
    82 // End of File