libavcodec/indeo5.c File Reference

Indeo Video Interactive version 5 decoder. More...

#include "avcodec.h"
#include "get_bits.h"
#include "dsputil.h"
#include "ivi_dsp.h"
#include "ivi_common.h"
#include "indeo5data.h"

Go to the source code of this file.

Data Structures

struct  IVI5DecContext

Defines

#define ALT_BITSTREAM_READER_LE
#define IVI5_PIC_SIZE_ESC   15
#define IVI5_IS_PROTECTED   0x20

Enumerations

enum  {
  FRAMETYPE_INTRA = 0, FRAMETYPE_INTER = 1, FRAMETYPE_INTER_SCAL = 2, FRAMETYPE_INTER_NOREF = 3,
  FRAMETYPE_NULL = 4
}
 Indeo5 frame types. More...

Functions

static int decode_gop_header (IVI5DecContext *ctx, AVCodecContext *avctx)
 Decodes Indeo5 GOP (Group of pictures) header.
static void skip_hdr_extension (GetBitContext *gb)
 Skips a header extension.
static int decode_pic_hdr (IVI5DecContext *ctx, AVCodecContext *avctx)
 Decodes Indeo5 picture header.
static int decode_band_hdr (IVI5DecContext *ctx, IVIBandDesc *band, AVCodecContext *avctx)
 Decodes Indeo5 band header.
static int decode_mb_info (IVI5DecContext *ctx, IVIBandDesc *band, IVITile *tile, AVCodecContext *avctx)
 Decodes info (block type, cbp, quant delta, motion vector) for all macroblocks in the current tile.
static int decode_band (IVI5DecContext *ctx, int plane_num, IVIBandDesc *band, AVCodecContext *avctx)
 Decodes an Indeo5 band.
static void switch_buffers (IVI5DecContext *ctx, AVCodecContext *avctx)
 Switches buffers.
static av_cold int decode_init (AVCodecContext *avctx)
 Initializes Indeo5 decoder.
static int decode_frame (AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
 main decoder function
static av_cold int decode_close (AVCodecContext *avctx)
 Closes Indeo5 decoder and cleans up its context.

Variables

AVCodec indeo5_decoder


Detailed Description

Indeo Video Interactive version 5 decoder.

Indeo5 data is usually transported within .avi or .mov files. Known FOURCCs: 'IV50'

Definition in file indeo5.c.


Define Documentation

#define ALT_BITSTREAM_READER_LE

Definition at line 30 of file indeo5.c.

#define IVI5_IS_PROTECTED   0x20

Definition at line 51 of file indeo5.c.

Referenced by decode_frame(), and decode_gop_header().

#define IVI5_PIC_SIZE_ESC   15

Definition at line 49 of file indeo5.c.

Referenced by decode_gop_header().


Enumeration Type Documentation

anonymous enum

Indeo5 frame types.

Enumerator:
FRAMETYPE_INTRA 
FRAMETYPE_INTER  non-droppable P-frame
FRAMETYPE_INTER_SCAL  droppable P-frame used in the scalability mode
FRAMETYPE_INTER_NOREF  droppable P-frame
FRAMETYPE_NULL  empty frame with no data

Definition at line 41 of file indeo5.c.


Function Documentation

static int decode_band ( IVI5DecContext ctx,
int  plane_num,
IVIBandDesc band,
AVCodecContext avctx 
) [static]

Decodes an Indeo5 band.

Parameters:
ctx [in,out] ptr to the decoder context
band [in,out] ptr to the band descriptor
avctx [in] ptr to the AVCodecContext
Returns:
result code: 0 = OK, -1 = error

Definition at line 551 of file indeo5.c.

Referenced by decode_frame().

static int decode_band_hdr ( IVI5DecContext ctx,
IVIBandDesc band,
AVCodecContext avctx 
) [static]

Decodes Indeo5 band header.

Parameters:
ctx [in,out] ptr to the decoder context
band [in,out] ptr to the band descriptor
avctx [in] ptr to the AVCodecContext
Returns:
result code: 0 = OK, -1 = error

Definition at line 358 of file indeo5.c.

Referenced by decode_band().

static av_cold int decode_close ( AVCodecContext avctx  )  [static]

Closes Indeo5 decoder and cleans up its context.

Definition at line 802 of file indeo5.c.

static int decode_frame ( AVCodecContext avctx,
void *  data,
int *  data_size,
AVPacket avpkt 
) [static]

main decoder function

Definition at line 731 of file indeo5.c.

static int decode_gop_header ( IVI5DecContext ctx,
AVCodecContext avctx 
) [static]

Decodes Indeo5 GOP (Group of pictures) header.

This header is present in key frames only. It defines parameters for all frames in a GOP.

Parameters:
ctx [in,out] ptr to the decoder context
avctx [in] ptr to the AVCodecContext
Returns:
result code: 0 = OK, -1 = error

Definition at line 91 of file indeo5.c.

Referenced by decode_pic_hdr().

static av_cold int decode_init ( AVCodecContext avctx  )  [static]

Initializes Indeo5 decoder.

Definition at line 692 of file indeo5.c.

static int decode_mb_info ( IVI5DecContext ctx,
IVIBandDesc band,
IVITile tile,
AVCodecContext avctx 
) [static]

Decodes info (block type, cbp, quant delta, motion vector) for all macroblocks in the current tile.

Parameters:
ctx [in,out] ptr to the decoder context
band [in,out] ptr to the band descriptor
tile [in,out] ptr to the tile descriptor
avctx [in] ptr to the AVCodecContext
Returns:
result code: 0 = OK, -1 = error

Definition at line 428 of file indeo5.c.

Referenced by decode_band().

static int decode_pic_hdr ( IVI5DecContext ctx,
AVCodecContext avctx 
) [static]

Decodes Indeo5 picture header.

Parameters:
ctx [in,out] ptr to the decoder context
avctx [in] ptr to the AVCodecContext
Returns:
result code: 0 = OK, -1 = error

Definition at line 305 of file indeo5.c.

Referenced by decode_frame().

static void skip_hdr_extension ( GetBitContext gb  )  [inline, static]

Skips a header extension.

Parameters:
gb [in,out] the GetBit context

Definition at line 287 of file indeo5.c.

Referenced by decode_band_hdr(), and decode_pic_hdr().

static void switch_buffers ( IVI5DecContext ctx,
AVCodecContext avctx 
) [static]

Switches buffers.

Parameters:
ctx [in,out] ptr to the decoder context
avctx [in] ptr to the AVCodecContext

Definition at line 651 of file indeo5.c.

Referenced by decode_frame().


Variable Documentation

Initial value:

 {
    .name           = "indeo5",
    .type           = AVMEDIA_TYPE_VIDEO,
    .id             = CODEC_ID_INDEO5,
    .priv_data_size = sizeof(IVI5DecContext),
    .init           = decode_init,
    .close          = decode_close,
    .decode         = decode_frame,
    .long_name      = NULL_IF_CONFIG_SMALL("Intel Indeo Video Interactive 5"),
}

Definition at line 818 of file indeo5.c.


Generated on Fri Oct 26 02:36:52 2012 for FFmpeg by  doxygen 1.5.8