Home / VIC Libraries / H263 Decoder

H.263 decoder:

The main features include:

  1. It decodes H.263 video elementary bit-stream;
  2. It supports video resolution up to 768 x 576;
  3. The H.263 decoder can decode bit-stream data from a continuous stream without knowledge of the frame boundary (for example, read data from a file). It can also accept bit stream for one frame at a time.
  4. In the first case, the buffer will be filled up by the application before calling the decoder for the first time. Then, every time before calling decoding next frame, check how many data left in the buffer. If the buffer is half empty, copy the bytes that are left over to the start position of the buffer, then followed by new data read in.
  5. For the second case, if you know the bit stream data is exactly for one frame (you know the bit stream boundary for each frame), just copy the data to the buffer start each time you call the decoder.
  6. The decoded image will be sent back to the caller in YUV raw format after every frame is decoded. It is up to the caller (application) to decide how to handle the decoded image, whether to display, to store to a file, or to trans-code to other formats.
  7. A decoder parameter structure is defined as:

    typedef struct _SRI_H263_DEC_PARAM {
         unsigned char *InputBitstreamBuffer;
         unsigned char *DecodedYUVimage;
         unsigned long *BytesConsumed;
         int *PictureWidth;
         int *PictureHeight;
         int *TimeStamp;
         int *FrameNumber;
    } SRI_H263_DEC_PARAM;

  8. There are 5 functions in this library:

    int SRI_H263_InitDecoder(
          SRI_H263_DEC_PARAM * H263DecParameters)
          );

    int SRI_H263_DecodeFrame(
          int DecHandler,
          SRI_H263_DEC_PARAM * H263DecParameters)
          );

    int SRI_H263_ReleaseDecoder(
          int DecHandler,
          SRI_H263_DEC_PARAM * H263DecParameters)
          );

    int SRI_H263_GetPicType(
          int DecHandler,
          int *PicType)
          );

    int SRI_H263_GetQuant(
          int DecHandler,
          unsigned char *QuantBuf,
          int BufSize)
          );

Download the package: h263dec.zip
Package includes: H263 decoder filter library, demo program source code with project files (for Windows) and make file (for Linux), example H263 video clip and test script batch file.
 
Copyright, www.sunrayimage.com, 2009