videoeditorengine/h263decoder/inc/viddemux.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 * Header for the video demultiplexer module.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef _VIDDEMUX_H_
       
    22 #define _VIDDEMUX_H_
       
    23 
       
    24 #include "epoclib.h"
       
    25 
       
    26 #include "biblin.h"
       
    27 
       
    28 #include "dlist.h"
       
    29 #include "vdc263.h" /* for vdxPictureHeader_t and vdxSEI_t */
       
    30 class CMPEG4Transcoder;
       
    31 
       
    32 
       
    33 /*
       
    34  * Defines
       
    35  */
       
    36 
       
    37 /* General return values */
       
    38 // unify error codes
       
    39 #define VDX_OK_BUT_BIT_ERROR  H263D_OK_BUT_BIT_ERROR     /* Handled portion of the bistream
       
    40                                        contains a bit error */
       
    41 #define VDX_OK         H263D_OK     /* Everything ok */
       
    42 #define VDX_ERR     H263D_ERROR     /* Everything ok */
       
    43 #define VDX_ERR_NOT_SUPPORTED H263D_ERROR    /* Some bit combination (in header)
       
    44                                        occurs which is not supported by the 
       
    45                                        implementetion */
       
    46 #define VDX_ERR_BIB  H263D_ERROR    /* Bit Buffer module returned an error */
       
    47 
       
    48 /* Picture types */
       
    49 #define VDX_PIC_TYPE_I     0
       
    50 #define VDX_PIC_TYPE_P     1
       
    51 #define VDX_PIC_TYPE_PB    8
       
    52 #define VDX_PIC_TYPE_IPB   2
       
    53 #define VDX_PIC_TYPE_B     3
       
    54 #define VDX_PIC_TYPE_EI    4
       
    55 #define VDX_PIC_TYPE_EP    5
       
    56 #define VDX_VOP_TYPE_I     0 /* MPEG-4 Intra Picture */
       
    57 #define VDX_VOP_TYPE_P     1 /* MPEG-4 Inter Picture */
       
    58 #define VDX_VOP_NOT_CODED -1 /* MPEG-4 Not Coded Picture 
       
    59                                 (only the time_increment is present) */
       
    60 
       
    61 /* Reference Picture Selection modes */
       
    62 #define VDX_RPS_MODE_NO_MSGS     0
       
    63 #define VDX_RPS_MODE_ACK         1
       
    64 #define VDX_RPS_MODE_NACK        2
       
    65 #define VDX_RPS_MODE_BOTH_MSGS   3
       
    66 
       
    67 /* Macroblock classes */
       
    68 #define VDX_MB_INTER    1
       
    69 #define VDX_MB_INTRA    2
       
    70 
       
    71 #define MAX_USER_DATA_LENGTH 512    /* The maximum allocated memory for 
       
    72                                        user data (UD). Only this much of the UD
       
    73                                        from the bitstream is stored */
       
    74 
       
    75 /*
       
    76  * Typedefs
       
    77  */
       
    78 
       
    79 /*
       
    80  * vdxVolHeader_t
       
    81  */
       
    82 
       
    83 /* {{-output"vdxVolHeader_t_info.txt" -ignore"*" -noCR}}
       
    84    The vdxGetVolHeader function uses this structure to return VOL header data.
       
    85    /MPEG-4/
       
    86    {{-output"vdxVolHeader_t_info.txt"}} */
       
    87 
       
    88 /* {{-output"vdxVolHeader_t.txt"}} */
       
    89 typedef struct {
       
    90 
       
    91    int profile_level;       /* Indicates the Level (1,2 or 3) of the Simple
       
    92                                Profile the Video Object conforms to */
       
    93    int vo_priority;         /* Priority assigned to the Video Object 
       
    94                                a value between 1(lowest)-7(highest).
       
    95                                If not in the bitstream, set to zero */
       
    96    
       
    97    int vo_id;               /* id of the Video Object */
       
    98    int vol_id;              /* id of the Video Object Layer */
       
    99    int random_accessible_vol; 
       
   100                             /* set to 1 if all the VOPs in the stream are
       
   101                                  I-VOP. */
       
   102    int pixel_aspect_ratio;  /* see. MPEG-4 visual spec. pp. 71 */
       
   103 
       
   104    int time_increment_resolution;
       
   105                             /* Resolution to interpret the time_increment 
       
   106                                fields in the VOP headers */
       
   107 
       
   108    int lumWidth;            /* Frame width of the Y component in pixels */
       
   109    int lumHeight;           /* Frame height of the Y component in pixels */
       
   110 
       
   111    u_char error_res_disable;/* Flag ON if no resynchronization markers are
       
   112                                used inside frames. 
       
   113                                When OFF it doesn't mean they ARE used. */
       
   114    u_char data_partitioned; /* Flag indicating if data partitioning inside 
       
   115                                a VP is used or not. */
       
   116    u_char reversible_vlc;   /* flag indicating the usage of reversible 
       
   117                                VLC codes */
       
   118 
       
   119    /* the following parameters concern the input video signal,
       
   120       see MPEG-4 visual spec. pp. 66-70, and "Note" in viddemux_mpeg.c 
       
   121       Not used in the current implementatnion. */
       
   122    int video_format;
       
   123    int video_range;
       
   124    int colour_primaries;    
       
   125    int transfer_characteristics;
       
   126    int matrix_coefficients;
       
   127 
       
   128    /* the following parameters are used in the Video Buffering Verifier
       
   129       (Annex D) to monitor the input bit buffer, complexity, memory buffer
       
   130       used in the decoding process. The conformance of a stream can be checked
       
   131       using these parameters. 
       
   132       Not used in the current implementatnion. */
       
   133    u_int32 bit_rate;
       
   134    u_int32 vbv_buffer_size;
       
   135    u_int32 vbv_occupancy;
       
   136 
       
   137    char *user_data;         /* User Data if available */
       
   138    int user_data_length;    /* Length of the recieved user data */
       
   139    u_char fixed_vop_rate;       /* fixed vop rate indication, added for transcoding */
       
   140 } vdxVolHeader_t;
       
   141 /* {{-output"vdxVolHeader_t.txt"}} */
       
   142 
       
   143 /*
       
   144  * vdxGovHeader_t
       
   145  */
       
   146 
       
   147 /* {{-output"vdxGovHeader_t_info.txt" -ignore"*" -noCR}}
       
   148    The vdxGetGovHeader function uses this structure to return GOV header data.
       
   149    /MPEG-4/
       
   150    {{-output"vdxGovHeader_t_info.txt"}} */
       
   151 
       
   152 /* {{-output"vdxGovHeader_t.txt"}} */
       
   153 typedef struct {
       
   154    int time_stamp;              /* The time stamp value in the GOV Header */
       
   155 
       
   156    u_char closed_gov;           /* only important if B-VOPs can be in the stream */
       
   157    u_char broken_link;          /* only important if B-VOPs can be in the stream */
       
   158 
       
   159    char *user_data;             /* User Data if available */
       
   160    int user_data_length;        /* Length of the recieved user data */
       
   161 } vdxGovHeader_t;
       
   162 /* {{-output"vdxGovHeader_t.txt"}} */
       
   163 
       
   164 
       
   165 /*
       
   166  * vdxGetVopHeaderInputParam_t
       
   167  */
       
   168 
       
   169 /* {{-output"vdxGetVopHeaderInputParam_t_info.txt" -ignore"*" -noCR}}
       
   170    This structure is used to pass input parameters to
       
   171    the vdxGetVopHeader function. /MPEG-4/
       
   172    {{-output"vdxGetVopHeaderInputParam_t_info.txt"}} */
       
   173 
       
   174 /* {{-output"vdxGetVopHeaderInputParam_t.txt"}} */
       
   175 typedef struct {
       
   176 
       
   177     int time_increment_resolution; /* resolution of the time increment field */
       
   178 
       
   179 } vdxGetVopHeaderInputParam_t;
       
   180 /* {{-output"vdxGetVopHeaderInputParam_t.txt"}} */
       
   181 
       
   182 
       
   183 /*
       
   184  * vdxVopHeader_t
       
   185  */
       
   186 
       
   187 /* {{-output"vdxVopHeader_t_info.txt" -ignore"*" -noCR}}
       
   188    The vdxGetVopHeader function uses this structure to return the picture
       
   189    header parameters. /MPEG-4/
       
   190    {{-output"vdxVopHeader_t_info.txt"}} */
       
   191 
       
   192 /* {{-output"vdxVopHeader_t.txt"}} */
       
   193 typedef struct {
       
   194     int time_base_incr;         /* Increment of the modulo time base from the
       
   195                                    previous VOP or GOV header in seconds */
       
   196     int time_inc;             /* Time increment value of the current VOP,
       
   197                                    plus the modulo time base = absolute time */
       
   198 
       
   199     u_char vop_coded;           /* Flag: 1 - VOP coded;
       
   200                                          0 - VOP not coded/skipped */
       
   201     int coding_type;            /* VOP coding type is one of the following:
       
   202                                        VDX_VOP_TYPE_I       MPEG-4 INTRA
       
   203                                        VDX_VOP_TYPE_P       MPEG-4 INTER */
       
   204 
       
   205     int rounding_type;          /* Rounding of the sub-pixel predictor
       
   206                                    calculations: 0 or 1. */
       
   207 
       
   208     int intra_dc_vlc_thr;       /* QP dependent switch control of coding the
       
   209                                    Intra DC coefficient as separate/optimized or
       
   210                                    as the other Intra AC. (0..7) */
       
   211     int quant;                  /* Initial Quantizer value */
       
   212 
       
   213     int fcode_forward;          /* For P-VOPs Motion Vector range control
       
   214                                    1: [-16,16] .. 7:[-1024,1024] */
       
   215 } vdxVopHeader_t;
       
   216 /* {{-output"vdxVopHeader_t.txt"}} */
       
   217 
       
   218 
       
   219 /*
       
   220  * vdxGetVideoPacketHeaderInputParam_t
       
   221  */
       
   222 
       
   223 /* {{-output"vdxGetVideoPacketHeaderInputParam_t_info.txt" -ignore"*" -noCR}}
       
   224    This structure is used to pass input parameters to
       
   225    the vdxGetVideoPacketHeader function. /MPEG-4/
       
   226    {{-output"vdxGetVideoPacketHeaderInputParam_t_info.txt"}} */
       
   227 
       
   228 /* {{-output"vdxGetVideoPacketHeaderInputParam_t.txt"}} */
       
   229 typedef struct {
       
   230 
       
   231     int fcode_forward;          /* used for determining the resync_marker
       
   232                                    length */
       
   233     int time_increment_resolution; /* resolution of the time increment field */
       
   234 
       
   235     int numOfMBs;               /* Number of MBs in a VOP */
       
   236 
       
   237 } vdxGetVideoPacketHeaderInputParam_t;
       
   238 /* {{-output"vdxGetVideoPacketHeaderInputParam_t.txt"}} */
       
   239 
       
   240 
       
   241 /*
       
   242  * vdxVideoPacketHeader_t
       
   243  */
       
   244 
       
   245 /* {{-output"vdxVideoPacketHeader_t_info.txt" -ignore"*" -noCR}}
       
   246    The vdxGetVideoPacketHeader function uses this structure to return the
       
   247    Number of the immediately following MB in the VOP and optionally confirm
       
   248    header parameters. /MPEG-4/
       
   249    {{-output"vdxVideoPacketHeader_t_info.txt"}} */
       
   250 
       
   251 /* {{-output"vdxVideoPacketHeader_t.txt"}} */
       
   252 typedef struct {
       
   253 
       
   254     int currMBNum;              /* Number of the immediately following MB */
       
   255     int quant;                  /* Quantizer used for the following MB */
       
   256 
       
   257     u_char fHEC;                /* Flag for header extension code */
       
   258 
       
   259     int time_base_incr;         /* Increment of the modulo time base from the
       
   260                                    previous VOP or GOV header in seconds */
       
   261     int time_inc;             /* Time increment value of the current VOP,
       
   262                                    plus the modulo time base = absolute time */
       
   263 
       
   264     int coding_type;            /* VOP coding type is one of the following:
       
   265                                        VDX_VOP_TYPE_I       MPEG-4 INTRA
       
   266                                        VDX_VOP_TYPE_P       MPEG-4 INTER */
       
   267 
       
   268     int intra_dc_vlc_thr;       /* QP dependent switch control of coding the
       
   269                                    Intra DC coefficient as separate/optimized or
       
   270                                    as the other Intra AC. (0..7) */
       
   271 
       
   272     int fcode_forward;          /* For P-VOPs Motion Vector range control
       
   273                                    1: [-16,16] .. 7:[-1024,1024] */
       
   274 } vdxVideoPacketHeader_t;
       
   275 /* {{-output"vdxVideoPacketHeader_t.txt"}} */
       
   276 
       
   277 
       
   278 /*
       
   279  * vdxGetPictureHeaderInputParam_t
       
   280  */
       
   281 
       
   282 /* {{-output"vdxGetPictureHeaderInputParam_t_info.txt" -ignore"*" -noCR}}
       
   283    This structure is used to pass input parameters to
       
   284    the vdxGetPictureHeader function.
       
   285    {{-output"vdxGetPictureHeaderInputParam_t_info.txt"}} */
       
   286 
       
   287 /* {{-output"vdxGetPictureHeaderInputParam_t.txt"}} */
       
   288 typedef struct {
       
   289    int numStuffBits;             /* Number of stuffing bits before PSC */
       
   290 
       
   291    int fCustomPCF;               /* Non-zero if custom picture clock frequency
       
   292                                     is allowed. Otherwise zero. */
       
   293 
       
   294    int fScalabilityMode;         /* Non-zero if the Temporal, SNR, and Spatial
       
   295                                     Scalability mode (Annex O) is in use.
       
   296                                     Otherwise zero. */
       
   297 
       
   298    int fRPS;                     /* Non-zero if the Refence Picture Selection
       
   299                                     mode (Annex N) is in use. Otherwise zero. */
       
   300 
       
   301    bibFlushBits_t flushBits;     /* Pointers for bit buffer functions. */
       
   302    bibGetBits_t getBits;         /* Needed to provide a possibly different */
       
   303    bibShowBits_t showBits;       /* input mechanism for normal reading from
       
   304                                     incoming bit-stream and for parsing
       
   305                                     a picture header copy */
       
   306 } vdxGetPictureHeaderInputParam_t;
       
   307 /* {{-output"vdxGetPictureHeaderInputParam_t.txt"}} */
       
   308 
       
   309 
       
   310 /*
       
   311  * vdxPictureHeader_t
       
   312  * Defined in vdc263.h because Video Decoder Core exports the data structure.
       
   313  */
       
   314 
       
   315 
       
   316 /*
       
   317  * vdxSEI_t
       
   318  * Defined in vdc263.h because Video Decoder Core exports the data structure.
       
   319  */
       
   320 
       
   321 
       
   322 /*
       
   323  * vdxGetGOBHeaderInputParam_t
       
   324  */
       
   325 
       
   326 /* {{-output"vdxGetGOBHeaderInputParam_t_info.txt" -ignore"*" -noCR}}
       
   327    This structure is used to pass input parameters to
       
   328    the vdxGetGOBHeader function.
       
   329    {{-output"vdxGetGOBHeaderInputParam_t_info.txt"}} */
       
   330 
       
   331 /* {{-output"vdxGetGOBHeaderInputParam_t.txt"}} */
       
   332 typedef struct {
       
   333    int numStuffBits;             /* Number of stuffing bits before PSC */
       
   334 
       
   335    int fCustomPCF;               /* Non-zero if custom picture clock frequency
       
   336                                     is allowed. Otherwise zero. */
       
   337 
       
   338    int fCPM;                     /* Non-zero if the Continuous Presence
       
   339                                     Multipoint feature (Annex C) is in use.
       
   340                                     Otherwise zero. */
       
   341 
       
   342    int fRPS;                     /* Non-zero if the Refence Picture Selection
       
   343                                     mode (Annex N) is in use. Otherwise zero. */
       
   344 } vdxGetGOBHeaderInputParam_t;
       
   345 /* {{-output"vdxGetGOBHeaderInputParam_t.txt"}} */
       
   346 
       
   347 
       
   348 /*
       
   349  * vdxGOBHeader_t
       
   350  */
       
   351 
       
   352 /* {{-output"vdxGOBHeader_t_info.txt" -ignore"*" -noCR}}
       
   353    The vdxGetGOBHeader function uses this structure to return the GOB
       
   354    header parameters.
       
   355    {{-output"vdxGOBHeader_t_info.txt"}} */
       
   356 
       
   357 /* {{-output"vdxGOBHeader_t.txt"}} */
       
   358 typedef struct {
       
   359    int gn;                       /* Group Number (GN) field */
       
   360 
       
   361    int gfid;                     /* GOB Frame ID (GFID) field */
       
   362 
       
   363    int gquant;                   /* Quantizer Information (GQUANT) field */
       
   364 
       
   365    /* If CPM (Annex C) is in use */
       
   366       int gsbi;                  /* GOB Sub-Bitstream Indicator (GSBI) field */
       
   367 
       
   368    /* If the Reference Picture Selection mode is in use */
       
   369       int tri;                   /* Temporal Reference Indicator (TRI) field */
       
   370       int trpi;                  /* Temporal Reference for Prediction
       
   371                                     Indicator (TRPI) field */
       
   372 
       
   373       /* If tri == 1 */
       
   374          int tr;                 /* Temporal Reference (TR) field */
       
   375 
       
   376       /* If trpi == 1 */
       
   377          int trp;                /* Temporal Reference for Prediction (TRP) 
       
   378                                     field */
       
   379 } vdxGOBHeader_t;
       
   380 /* {{-output"vdxGOBHeader_t.txt"}} */
       
   381 
       
   382 
       
   383 /*
       
   384  * vdxGetSliceHeaderInputParam_t
       
   385  */
       
   386 
       
   387 /* {{-output"vdxGetSliceHeaderInputParam_t_info.txt" -ignore"*" -noCR}}
       
   388    This structure is used to pass input parameters to
       
   389    the vdxGetSliceHeader function.
       
   390    {{-output"vdxGetSliceHeaderInputParam_t_info.txt"}} */
       
   391 
       
   392 /* {{-output"vdxGetSliceHeaderInputParam_t.txt"}} */
       
   393 typedef struct {
       
   394    int sliceHeaderAfterPSC;      /* If the slice follows a PSC, the value 
       
   395                                     should be 1 */ 
       
   396 
       
   397    int numStuffBits;             /* Number of stuffing bits before SSC */
       
   398 
       
   399    int fCPM;                     /* Non-zero if the Continuous Presence
       
   400                                     Multipoint feature (Annex C) is in use.
       
   401                                     Otherwise zero. */
       
   402 
       
   403    int fRPS;                     /* Non-zero if the Refence Picture Selection
       
   404                                     mode (Annex N) is in use. Otherwise zero. */
       
   405 
       
   406    int mbaFieldWidth;            /* MBA Field width */
       
   407    int mbaMaxValue;              /* MBA maximum value. See Table K.2/H.263 */
       
   408 
       
   409    int fRectangularSlices;       /* 0 = free-running slices, 
       
   410                                     1 = rectangular slices */
       
   411    
       
   412    int swiFieldWidth;            /* SWI Field width */
       
   413    int swiMaxValue;              /* SWI maximum value. See Table K.3/H.263 */
       
   414 } vdxGetSliceHeaderInputParam_t;
       
   415 /* {{-output"vdxGetSliceHeaderInputParam_t.txt"}} */
       
   416 
       
   417 /*
       
   418  * vdxSliceHeader_t
       
   419  */
       
   420 
       
   421 /* {{-output"vdxSliceHeader_t_info.txt" -ignore"*" -noCR}}
       
   422    The vdxGetSliceHeader function uses this structure to return the Slice
       
   423    header parameters.
       
   424    {{-output"vdxSliceHeader_t_info.txt"}} */
       
   425 
       
   426 /* {{-output"vdxSliceHeader_t.txt"}} */
       
   427 typedef struct {
       
   428    /* If CPM (Annex C) is in use */
       
   429       int ssbi;                   /* Slice Sub-Bitstream Indicator (SSBI) */
       
   430 
       
   431       int gn;                    /* Group Number (GN) field */
       
   432 
       
   433       int sbn;                   /* Sub-Bitstream number */
       
   434 
       
   435    int mba;                      /* Macroblock Address (MBA) */
       
   436 
       
   437    /* If not the slice just after the PSC */
       
   438       int squant;                /* Quantizer Inforation (SQUANT) */
       
   439 
       
   440    /* If fRectangularSlices */
       
   441       int swi;                   /* Slice Width Indication in Macroblocks (SWI)*/
       
   442       
       
   443    int gfid;                     /* GOB Frame ID (GFID) field */
       
   444    /* If the Reference Picture Selection mode is in use */
       
   445       int tri;                   /* Temporal Reference Indicator (TRI) field */
       
   446       int trpi;                  /* Temporal Reference for Prediction
       
   447                                     Indicator (TRPI) field */
       
   448 
       
   449       /* If tri == 1 */
       
   450          int tr;                 /* Temporal Reference (TR) field */
       
   451 
       
   452       /* If trpi == 1 */
       
   453          int trp;                /* Temporal Reference for Prediction (TRP) 
       
   454                                     field */
       
   455 
       
   456 } vdxSliceHeader_t;
       
   457 /* {{-output"vdxSliceHeader_t.txt"}} */
       
   458 
       
   459 /*
       
   460  * vdxGetIMBLayerInputParam_t
       
   461  */
       
   462 
       
   463 /* {{-output"vdxGetIMBLayerInputParam_t_info.txt" -ignore"*" -noCR}}
       
   464    This structure is used to pass input parameters to
       
   465    the vdxGetIMBLayer function.
       
   466    {{-output"vdxGetIMBLayerInputParam_t_info.txt"}} */
       
   467 
       
   468 /* {{-output"vdxGetIMBLayerInputParam_t.txt"}} */
       
   469 typedef struct {
       
   470    int fMQ;                      /* Modified Quantization */
       
   471    int quant;                    /* Current QUANT */
       
   472    int fAIC;                     /* Advanced Intra Coding Flag */
       
   473    int fSS;                      /* Slice Structured Mode Flag */
       
   474    u_char fMPEG4;                /* MPEG4 or H.263 */
       
   475 } vdxGetIMBLayerInputParam_t;
       
   476 /* {{-output"vdxGetIMBLayerInputParam_t.txt"}} */
       
   477 
       
   478 
       
   479 /*
       
   480  * vdxGetDataPartitionedIMBLayerInputParam_t
       
   481  */
       
   482 
       
   483 /* {{-output"vdxGetDataPartitionedIMBLayerInputParam_t_info.txt" -ignore"*" -noCR}}
       
   484    This structure is used to pass input parameters to
       
   485    the vdxGetDataPartitionedIMBLayer function. /MPEG-4/
       
   486    {{-output"vdxGetDataPartitionedIMBLayerInputParam_t_info.txt"}} */
       
   487 
       
   488 /* {{-output"vdxGetDataPartitionedIMBLayerInputParam_t.txt"}} */
       
   489 typedef struct {
       
   490    int intra_dc_vlc_thr;
       
   491    int quant;                    /* Current QUANT */
       
   492 } vdxGetDataPartitionedIMBLayerInputParam_t;
       
   493 /* {{-output"vdxGetDataPartitionedIMBLayerInputParam_t.txt"}} */
       
   494 
       
   495 
       
   496 /*
       
   497  * vdxIMBLayer_t
       
   498  */
       
   499 
       
   500 /* {{-output"vdxIMBLayer_t_info.txt" -ignore"*" -noCR}}
       
   501    The vdxGetIMBLayer function uses this structure to return
       
   502    the macroblock header parameters.
       
   503    {{-output"vdxIMBLayer_t_info.txt"}} */
       
   504 
       
   505 /* {{-output"vdxIMBLayer_t.txt"}} */
       
   506 typedef struct {
       
   507 	int mcbpc;                     /* Macroblock type and the coded block 
       
   508 																    pattern for chrominance */
       
   509 
       
   510    int cbpc;                     /* Coded Block Pattern for Chrominance,
       
   511                                     bit 1 is for U and bit 0 is for V,
       
   512                                     use vdxIsUCoded and vdxIsVCoded macros 
       
   513                                     to access this value */
       
   514 
       
   515    int cbpy;                     /* Coded Block Pattern for Luminance,
       
   516                                     bit 3 is for block 1, ..., 
       
   517                                     bit 0 is for block 4,
       
   518                                     use vdxIsYCoded macro to access this 
       
   519                                     value */
       
   520 
       
   521 /*** MPEG-4 REVISION ***/
       
   522    u_char ac_pred_flag;          /* "1" AC prediction used, "0" not */
       
   523 /*** End MPEG-4 REVISION ***/
       
   524 
       
   525    int quant;                    /* New (possibly updated) QUANT */
       
   526 
       
   527    int predMode;                 /* Prediction Mode used in Annex I
       
   528                                     0 (DC Only)
       
   529                                     1 (Vertical DC&AC)
       
   530                                     2 (Horizontal DC&AC) */
       
   531    
       
   532    int mbType;                   /* 0..5, see table 9/H.263 */
       
   533 
       
   534 } vdxIMBLayer_t;
       
   535 /* {{-output"vdxIMBLayer_t.txt"}} */
       
   536 
       
   537 
       
   538 /*
       
   539  * vdxGetPPBMBLayerInputParam_t
       
   540  */
       
   541 
       
   542 /* {{-output"vdxGetPPBMBLayerInputParam_t_info.txt" -ignore"*" -noCR}}
       
   543    This structure is used to pass input parameters to
       
   544    the vdxGetPPBMBLayer function.
       
   545    {{-output"vdxGetPPBMBLayerInputParam_t_info.txt"}} */
       
   546 
       
   547 /* {{-output"vdxGetPPBMBLayerInputParam_t.txt"}} */
       
   548 typedef struct {  
       
   549    int pictureType;              /* Picture type is one of the following:
       
   550                                        VDX_PIC_TYPE_P       INTER
       
   551                                        VDX_PIC_TYPE_PB      PB (Annex G)
       
   552                                        VDX_PIC_TYPE_IPB     Improved PB */
       
   553 
       
   554    /* See the description of vdxPictureHeader_t for the following flags. */
       
   555    int fPLUSPTYPE;
       
   556    int fUMV;
       
   557    int fAP;
       
   558    int fDF;
       
   559    int fMQ;
       
   560 
       
   561    int fCustomSourceFormat;      /* Flag indicating if custom source format 
       
   562                                     is used */
       
   563 
       
   564 
       
   565 /*** MPEG-4 REVISION ***/
       
   566    u_char fMPEG4;                /* MPEG4 or H.263 */
       
   567    int f_code;
       
   568 /*** End MPEG-4 REVISION ***/
       
   569 
       
   570    int quant;                    /* Current QUANT */
       
   571 
       
   572    int fFirstMBOfPicture;        /* Non-zero if the macroblock is the first
       
   573                                     (top-left) one of the picture */
       
   574 
       
   575    int fAIC;                     /* Advanced Intra Coding Flag */
       
   576 } vdxGetPPBMBLayerInputParam_t;
       
   577 /* {{-output"vdxGetPPBMBLayerInputParam_t.txt"}} */
       
   578 
       
   579 
       
   580 /*
       
   581  * vdxGetDataPartitionedPMBLayerInputParam_t
       
   582  */
       
   583 
       
   584 /* {{-output"vdxGetDataPartitionedPMBLayerInputParam_t_info.txt" -ignore"*" -noCR}}
       
   585    This structure is used to pass input parameters to
       
   586    the vdxGetDataPartitionedPMBLayer function. /MPEG-4/
       
   587    {{-output"vdxGetDataPartitionedPMBLayerInputParam_t_info.txt"}} */
       
   588 
       
   589 /* {{-output"vdxGetDataPartitionedPMBLayerInputParam_t.txt"}} */
       
   590 typedef struct {
       
   591    int intra_dc_vlc_thr;
       
   592    int quant;                    /* Current QUANT */
       
   593    int f_code;
       
   594 } vdxGetDataPartitionedPMBLayerInputParam_t;
       
   595 /* {{-output"vdxGetDataPartitionedPMBLayerInputParam_t.txt"}} */
       
   596 
       
   597 
       
   598 /*
       
   599  * vdxPPBMBLayer_t
       
   600  */
       
   601 
       
   602 /* {{-output"vdxPPBMBLayer_t_info.txt" -ignore"*" -noCR}}
       
   603    The vdxGetPPBMBLayer function uses this structure to return
       
   604    the macroblock header parameters.
       
   605    {{-output"vdxPPBMBLayer_t_info.txt"}} */
       
   606 
       
   607 /* {{-output"vdxPPBMBLayer_t.txt"}} */
       
   608 typedef struct {
       
   609 	 int mcbpc;                    /* Macroblock type and the coded block 
       
   610 																    pattern for chrominance */
       
   611 
       
   612 	 int fCodedMB;                 /* 1 if the macroblock is coded. 
       
   613                                     Otherwise 0. */
       
   614 
       
   615    int mbType;                   /* 0..5, see table 9/H.263 */
       
   616 
       
   617    int mbClass;                  /* VDX_MB_INTRA or VDX_MB_INTER */
       
   618 
       
   619    int cbpc;                     /* Coded Block Pattern for Chrominance,
       
   620                                     bit 1 is for U and bit 0 is for V,
       
   621                                     use vdxIsUCoded and vdxIsVCoded macros 
       
   622                                     to access this value */
       
   623 
       
   624    int cbpy;                     /* Coded Block Pattern for Luminance,
       
   625                                     bit 3 is for block 1, ..., 
       
   626                                     bit 0 is for block 4,
       
   627                                     use vdxIsYCoded macro to access this 
       
   628                                     value */
       
   629 
       
   630    int cbpb;                     /* Coded Block Pattern for B-blocks,
       
   631                                     bit 5 is for block 1, ..., 
       
   632                                     bit 0 is for block 6 */
       
   633 
       
   634 /*** MPEG-4 REVISION ***/
       
   635    u_char ac_pred_flag;          /* "1" AC prediction used, "0" not */
       
   636 /*** End MPEG-4 REVISION ***/
       
   637 
       
   638    int quant;                    /* New (possibly updated) QUANT */
       
   639                            
       
   640    int numMVs;                   /* Number of motion vectors for the MB,
       
   641                                     0 if MVD is not in the stream,
       
   642                                     1 if MVD but not MVD2-4 is in the stream,
       
   643                                     4 if MVD and MVD2-4 is in the stream */
       
   644 
       
   645    /* Only the number of MVs indicated in the numMVs member is valid
       
   646       in the following arrays. */
       
   647    int mvdx[4];                  /* Horizontal components of MVD1-4,
       
   648                                     index to table 14/H.263 */
       
   649    int mvdy[4];                  /* Vertical components of MVD1-4,
       
   650                                     index to table 14/H.263 */
       
   651 
       
   652    int fMVDB;                    /* 1 = MVDB exists in the bitstream,
       
   653                                     i.e. mvdbx and mvdby are valid */
       
   654 
       
   655    int mvdbx;                    /* Horizontal components of MVDB,
       
   656                                     index to table 14/H.263 */
       
   657    int mvdby;                    /* Vertical components of MVDB,
       
   658                                     index to table 14/H.263 */
       
   659    int predMode;                 /* Prediction Mode used in Annex I
       
   660                                     0 (DC Only)
       
   661                                     1 (Vertical DC&AC)
       
   662                                     2 (Horizontal DC&AC) */
       
   663    int IPBPredMode;              /* Prediction Modes used in annex M
       
   664                                     0  Bidirectional prediction
       
   665                                     1  Forward prediction
       
   666                                     2  Backward prediction  */
       
   667 } vdxPPBMBLayer_t;
       
   668 /* {{-output"vdxPPBMBLayer_t.txt"}} */
       
   669 
       
   670 
       
   671 /*
       
   672  * vdxIMBListItem_t
       
   673  */
       
   674 
       
   675 /* {{-output"vdxIMBListItem_t_info.txt" -ignore"*" -noCR}}
       
   676    List Item which is used to build a queue of Intra MBs during the data
       
   677    partitioned decoding of an I-VOP. /MPEG-4/
       
   678    The vdxGetDataPartitionedIMBLayer function uses this structure.
       
   679    {{-output"vdxIMBListItem_t_info.txt"}} */
       
   680 
       
   681 /* {{-output"vdxIMBListItem_t.txt"}} */
       
   682 
       
   683 
       
   684 /* Data item recording for data partitioned transcoding */
       
   685 #ifndef VDT_OPERATION
       
   686 #define VDT_OPERATION
       
   687 #define VDT_SET_START_POSITION(mb,item,byte,bit) \
       
   688 {\
       
   689 	(mb)->DataItemStartByteIndex[(item)] = (byte);\
       
   690      (mb)->DataItemStartBitIndex[(item)] = (bit);\
       
   691 }
       
   692 
       
   693 #define VDT_SET_END_POSITION(mb,item,byte,bit) \
       
   694 {\
       
   695 	(mb)->DataItemEndByteIndex[(item)] = (byte);\
       
   696      (mb)->DataItemEndBitIndex[(item)] = (bit);\
       
   697 }
       
   698 #endif
       
   699 
       
   700 
       
   701 
       
   702 typedef struct {
       
   703    DLST_ITEM_SKELETON
       
   704 
       
   705 /* for data partitioned transcoding
       
   706    array ordering: 0: mcbpc, 1: dquant, 2: cbpy, 3: ac_pred_flag, 4~9: intraDCs, 10: mv, 11: mb stuffing
       
   707  */
       
   708    int mcbpc;
       
   709    int DataItemStartByteIndex[12];
       
   710    int DataItemStartBitIndex[12];
       
   711    int DataItemEndByteIndex[12];
       
   712    int DataItemEndBitIndex[12];
       
   713    int dquant;
       
   714 
       
   715    int DC[6];                 /* DC component */
       
   716    int quant;                 /* QUANT */
       
   717    int cbpc;                  /* Coded Block Pattern for Chrominance */
       
   718    int cbpy;                  /* Coded Block Pattern for Luminance */
       
   719    u_char ac_pred_flag;       /* "1" AC prediction used, "0" not */
       
   720    u_char switched;           /* intra_dc_vlc_thr indicated switch 
       
   721                                  to Intra AC VLC coding of the DC coeff
       
   722                                  intstead of the usual DC VLC coding 
       
   723                                  at this QP */
       
   724 } vdxIMBListItem_t;
       
   725 /* {{-output"vdxIMBListItem_t.txt"}} */
       
   726 
       
   727 
       
   728 /*
       
   729  * vdxPMBListItem_t
       
   730  */
       
   731 
       
   732 /* {{-output"vdxPMBListItem_t_info.txt" -ignore"*" -noCR}}
       
   733    List Item which is used to build a queue of Inter MBs during the data
       
   734    partitioned decoding of a P-VOP. /MPEG-4/
       
   735    The vdxGetDataPartitionedPMBLayer function uses this structure.
       
   736    {{-output"vdxPMBListItem_t_info.txt"}} */
       
   737 
       
   738 /* {{-output"vdxPMBListItem_t.txt"}} */
       
   739 typedef struct {
       
   740    DLST_ITEM_SKELETON
       
   741 /* for data partitioned transcoding
       
   742    array ordering: 0: mcbpc, 1: dquant, 2: cbpy, 3: ac_pred_flag, 4~9: intraDCs, 10: mv, 11: mb stuffing
       
   743  */
       
   744    int mcbpc;
       
   745    int DataItemStartByteIndex[12];
       
   746    int DataItemStartBitIndex[12];
       
   747    int DataItemEndByteIndex[12];
       
   748    int DataItemEndBitIndex[12];
       
   749    int dquant;
       
   750    int mv_x[4];                /* horizontal componenet of 1-4 MVs */ 
       
   751    int mv_y[4];                /* vertical componenet of 1-4 MVs */
       
   752 
       
   753    u_char fCodedMB;           /* 1 if the macroblock is coded. 
       
   754                                     Otherwise 0. */
       
   755    int mbType;                /* 0..5, see table 9/H.263 */
       
   756    int mbClass;               /* VDX_MB_INTRA or VDX_MB_INTER */
       
   757    int DC[6];                 /* DC component */
       
   758    int quant;                 /* QUANT */
       
   759    int cbpc;                  /* Coded Block Pattern for Chrominance */
       
   760    int cbpy;                  /* Coded Block Pattern for Luminance */
       
   761    u_char ac_pred_flag;       /* "1" AC prediction used, "0" not */
       
   762    u_char switched;           /* intra_dc_vlc_thr indicated switch 
       
   763                                  to Intra AC VLC coding of the DC coeff
       
   764                                  intstead of the usual DC VLC coding 
       
   765                                  at this QP */
       
   766    int numMVs;                /* Number of motion vectors for the MB */
       
   767    int mvx[4];                /* horizontal componenet of 1-4 MVs */ // actually it is dMV
       
   768    int mvy[4];                /* vertical componenet of 1-4 MVs */
       
   769 } vdxPMBListItem_t;
       
   770 /* {{-output"vdxPMBListItem_t.txt"}} */
       
   771 
       
   772 
       
   773 /*
       
   774  * Macros
       
   775  */
       
   776 
       
   777 /* These arrays are intialized in viddemux.c and needed in the vdxIsYXCoded 
       
   778    macros. */
       
   779 extern const int vdxBlockIndexToCBPYMask[5];
       
   780 extern const int vdxYBlockIndexToCBPBMask[5];
       
   781 
       
   782 /* {{-output"vdxIsXCoded.txt"}} */
       
   783 /*
       
   784  * vdxIsYCoded
       
   785  * vdxIsUCoded
       
   786  * vdxIsVCoded
       
   787  * vdxIsYBCoded
       
   788  * vdxIsUBCoded
       
   789  * vdxIsVBCoded
       
   790  *
       
   791  * Parameters:
       
   792  *    for vdxIsYCoded:
       
   793  *       cbpy                    coded block for luminance
       
   794  *       blockIndex              index for luminance block 1..4
       
   795  *
       
   796  *    for vdxIsUCoded and vdxIsVCoded:
       
   797  *       cbpc                    coded block pattern for chrominance
       
   798  *
       
   799  *    for vdxIsXBCoded:
       
   800  *       cbpb                    coded block pattern for B blocks
       
   801  *       blockIndex              index for B luminance block 1..4
       
   802  *
       
   803  * Function:
       
   804  *    This macros access the coded block bit patterns.
       
   805  *
       
   806  * Returns:
       
   807  *    0 if the requested block is not coded
       
   808  *    non-zero if the requested block is coded
       
   809  *
       
   810  */
       
   811 
       
   812 #define vdxIsYCoded(cbpy, blockIndex) \
       
   813    ((cbpy) & vdxBlockIndexToCBPYMask[(blockIndex)])
       
   814 
       
   815 #define vdxIsUCoded(cbpc) ((cbpc) & 2)
       
   816 #define vdxIsVCoded(cbpc) ((cbpc) & 1)
       
   817 
       
   818 #define vdxIsYBCoded(cbpb, blockIndex) \
       
   819    ((cbpb) & vdxYBlockIndexToCBPBMask[(blockIndex)])
       
   820 
       
   821 #define vdxIsUBCoded(cbpb) ((cbpb) & 2)
       
   822 #define vdxIsVBCoded(cbpb) ((cbpb) & 1)
       
   823 /* {{-output"vdxIsXCoded.txt"}} */
       
   824 
       
   825 
       
   826 /*
       
   827  * Function prototypes
       
   828  */
       
   829 
       
   830 /* Picture Layer Global Functions */
       
   831 class CMPEG4Transcoder;
       
   832 
       
   833 int vdxGetVolHeader(
       
   834    bibBuffer_t *inBuffer,
       
   835    vdxVolHeader_t *header,
       
   836    int *bitErrorIndication,
       
   837    int getInfo, int *aByteIndex, int *aBitIndex,
       
   838    CMPEG4Transcoder *hTranscoder);
       
   839 
       
   840 int vdxGetGovHeader(
       
   841    bibBuffer_t *inBuffer,
       
   842    vdxGovHeader_t *header,
       
   843    int *bitErrorIndication);
       
   844 
       
   845 int vdxGetVopHeader(
       
   846    bibBuffer_t *inBuffer,
       
   847    const vdxGetVopHeaderInputParam_t *inpParam,
       
   848    vdxVopHeader_t *header,
       
   849    int * ModuloByteIndex,
       
   850    int * ModuloBitIndex,
       
   851    int * TimeIncByteIndex,
       
   852    int * TimeIncBitIndex,
       
   853    int *bitErrorIndication);
       
   854 
       
   855 int vdxGetPictureHeader(
       
   856    bibBuffer_t *inBuffer, 
       
   857    const vdxGetPictureHeaderInputParam_t *inpParam,
       
   858    vdxPictureHeader_t *header,
       
   859    int *bitErrorIndication);
       
   860 
       
   861 int vdxFlushSEI(
       
   862    bibBuffer_t *inBuffer,
       
   863    int *bitErrorIndication);
       
   864 
       
   865 int vdxGetSEI(
       
   866    bibBuffer_t *inBuffer,
       
   867    int *ftype,
       
   868    int *dsize,
       
   869    u_char *parameterData,
       
   870    int *fLast,
       
   871    int *bitErrorIndication);
       
   872 
       
   873 int vdxGetAndParseSEI(
       
   874    bibBuffer_t *inBuffer,
       
   875    int fPLUSPTYPE,
       
   876    int numScalabilityLayers,
       
   877    vdxSEI_t *sei,
       
   878    int *bitErrorIndication);
       
   879 
       
   880 int vdxGetUserData(bibBuffer_t *inBuffer,
       
   881    char *user_data, int *user_data_length,
       
   882    int *bitErrorIndication);
       
   883 
       
   884 /* GOB/Video Packet Layer Global Functions */
       
   885 
       
   886 int vdxGetGOBHeader(
       
   887    bibBuffer_t *inBuffer, 
       
   888    const vdxGetGOBHeaderInputParam_t *inpParam,
       
   889    vdxGOBHeader_t *header,
       
   890    int *bitErrorIndication,
       
   891    int aColorEffect,
       
   892    int* aStartByteIndex,
       
   893    int* aStartBitIndex,
       
   894    CMPEG4Transcoder *hTranscoder);
       
   895 
       
   896 int vdxGetVideoPacketHeader(
       
   897    bibBuffer_t *inBuffer,
       
   898    const vdxGetVideoPacketHeaderInputParam_t *inpParam,
       
   899    vdxVideoPacketHeader_t *header,
       
   900    int *bitErrorIndication);
       
   901 
       
   902 /* Slice Layer Global Functions*/
       
   903 
       
   904 int vdxGetSliceHeader(
       
   905    bibBuffer_t *inBuffer, 
       
   906    const vdxGetSliceHeaderInputParam_t *inpParam,
       
   907    vdxSliceHeader_t *header,
       
   908    int *bitErrorIndication);
       
   909 
       
   910 void vdxGetMBAandSWIValues(
       
   911    int width,
       
   912    int height,
       
   913    int fRRU,
       
   914    int *mbaFieldWidth,
       
   915    int *mbaMaxValue,
       
   916    int *swiFieldWidth,
       
   917    int *swiMaxValue);
       
   918 
       
   919 /* Macroblock Layer Global Functions */
       
   920 
       
   921 
       
   922 int vdxGetIMBLayer(
       
   923    bibBuffer_t *inBuffer, 
       
   924 	 bibBuffer_t *outBuffer, 
       
   925    bibBufferEdit_t *bufEdit,
       
   926    int aColorEffect, 
       
   927 	 int *StartByteIndex, 
       
   928 	 int *StartBitIndex, 
       
   929    TBool aGetDecodedFrame, 
       
   930    const vdxGetIMBLayerInputParam_t *inpParam,
       
   931    vdxIMBLayer_t *outParam,
       
   932    int *bitErrorIndication,
       
   933    CMPEG4Transcoder *hTranscoder);
       
   934 
       
   935 
       
   936 int vdxGetPPBMBLayer(
       
   937    bibBuffer_t *inBuffer, 
       
   938    bibBuffer_t *outBuffer, 
       
   939    bibBufferEdit_t *bufEdit,
       
   940    int aColorEffect,
       
   941 	 int *aStartByteIndex, 
       
   942 	 int *aStartBitIndex, 
       
   943    TBool aGetDecodedFrame, 
       
   944    int *bwMBType, 
       
   945    const vdxGetPPBMBLayerInputParam_t *inpParam,
       
   946    vdxPPBMBLayer_t *outParam,
       
   947    int *bitErrorIndication,
       
   948    CMPEG4Transcoder *hTranscoder);
       
   949 
       
   950 
       
   951 int vdxGetDataPartitionedIMBLayer_Part1(
       
   952    bibBuffer_t *inBuffer, bibBuffer_t *outBuffer, bibBufferEdit_t *bufEdit, 
       
   953 	 int aColorEffect, int *aStartByteIndex, int *aStartBitIndex, 
       
   954 	 CMPEG4Transcoder *hTranscoder, 
       
   955    const vdxGetDataPartitionedIMBLayerInputParam_t *inpParam,
       
   956    dlst_t *MBList,
       
   957    int *bitErrorIndication);
       
   958 
       
   959 int vdxGetDataPartitionedIMBLayer_Part2(
       
   960    bibBuffer_t *inBuffer, bibBuffer_t *outBuffer, bibBufferEdit_t *bufEdit, 
       
   961 	 int aColorEffect, int *aStartByteIndex, int *aStartBitIndex, 
       
   962    dlst_t *MBList,
       
   963    int numMBsInVP,
       
   964    int *bitErrorIndication);
       
   965 
       
   966 int vdxGetDataPartitionedPMBLayer_Part1(
       
   967    bibBuffer_t *inBuffer, bibBuffer_t *outBuffer, bibBufferEdit_t *bufEdit, 
       
   968 	 int aColorEffect, int *aStartByteIndex, int *aStartBitIndex, 
       
   969    const vdxGetDataPartitionedPMBLayerInputParam_t *inpParam,
       
   970    dlst_t *MBList,
       
   971    int *bitErrorIndication);
       
   972 
       
   973 int vdxGetDataPartitionedPMBLayer_Part2(
       
   974    bibBuffer_t *inBuffer,
       
   975    bibBuffer_t *outBuffer, 
       
   976    bibBufferEdit_t *bufEdit,
       
   977    int aColorEffect, int *aStartByteIndex, int *aStartBitIndex, 
       
   978    CMPEG4Transcoder *hTranscoder, 
       
   979    const vdxGetDataPartitionedPMBLayerInputParam_t *inpParam,
       
   980    dlst_t *MBList,
       
   981    int *bitErrorIndication);
       
   982 
       
   983 /* Block Layer Global Functions */
       
   984 
       
   985 int vdxGetIntraDCTBlock(
       
   986    bibBuffer_t *inBuffer, 
       
   987    int fCodedBlock,
       
   988    int *block,
       
   989    int *bitErrorIndication,
       
   990    int fMQ,
       
   991    int qp);
       
   992 
       
   993 int vdxGetIntraDC(
       
   994    bibBuffer_t *inBuffer,
       
   995 	 bibBuffer_t *outBuffer, 
       
   996    bibBufferEdit_t *bufEdit,
       
   997    int aColorEffect, 
       
   998 	 int *aStartByteIndex, 
       
   999 	 int *aStartBitIndex,    
       
  1000 	 int compnum,
       
  1001 	 int *IntraDCSize, 
       
  1002    int *IntraDCDelta, 
       
  1003 	 int *bitErrorIndication);
       
  1004 
       
  1005 int vdxGetMPEGIntraDCTBlock(
       
  1006    bibBuffer_t *inBuffer, 
       
  1007    int startIndex,
       
  1008    int *block,
       
  1009    int *bitErrorIndication);
       
  1010 
       
  1011 int vdxGetDCTBlock(
       
  1012    bibBuffer_t *inBuffer,
       
  1013    int startIndex,
       
  1014    u_char fMPEG4EscapeCodes,
       
  1015    int *block,
       
  1016    int *bitErrorIndication,
       
  1017    int fMQ,
       
  1018    int qp,
       
  1019    int *fEscapeCodeUsed);
       
  1020 
       
  1021 int vdxGetAdvIntraDCTBlock(
       
  1022    bibBuffer_t *inBuffer, 
       
  1023    int fCodedBlock,
       
  1024    int *block,
       
  1025    int *bitErrorIndication,
       
  1026    int predMode,
       
  1027    int fMQ,
       
  1028    int qp);
       
  1029 
       
  1030 int vdxGetAdvDCTBlock(
       
  1031    bibBuffer_t *inBuffer, 
       
  1032    int startIndex,
       
  1033    int *block,
       
  1034    int *bitErrorIndication,
       
  1035    int predMode,
       
  1036    int fMQ,
       
  1037    int qp);
       
  1038 
       
  1039 int vdxGetRVLCDCTBlock(
       
  1040    bibBuffer_t *inBuffer, 
       
  1041    int startIndex,
       
  1042    int fIntraBlock,
       
  1043    int *block,
       
  1044    int *bitErrorIndication);
       
  1045 
       
  1046 int vdxGetRVLCDCTBlockBackwards(
       
  1047    bibBuffer_t *inBuffer, 
       
  1048    int startIndex,
       
  1049    int fIntraBlock,
       
  1050    int *block,
       
  1051    int *bitErrorIndication);
       
  1052 
       
  1053 
       
  1054 
       
  1055 int vdxChangeBlackAndWhiteHeaderIntraIMB(bibBufferEdit_t *bufEdit, 
       
  1056 																				 int mcbpcIndex,
       
  1057 																				 int StartByteIndex, 
       
  1058 																				 int StartBitIndex);
       
  1059 
       
  1060 int vdxChangeBlackAndWhiteHeaderInterPMB(bibBufferEdit_t *bufEdit, 
       
  1061 																				 int mcbpcIndex,
       
  1062 																				 int StartByteIndex, 
       
  1063 																				 int StartBitIndex);
       
  1064 
       
  1065 
       
  1066 
       
  1067 #endif
       
  1068 // End of File