libavcodec/indeo4.c File Reference

Indeo Video Interactive version 4 decoder. More...

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

Go to the source code of this file.

Data Structures

struct  IVI4DecContext

Defines

#define ALT_BITSTREAM_READER_LE
#define IVI4_STREAM_ANALYSER   0
#define IVI4_DEBUG_CHECKSUM   0
#define IVI4_PIC_SIZE_ESC   7

Enumerations

enum  {
  FRAMETYPE_INTRA = 0, FRAMETYPE_BIDIR1 = 1, FRAMETYPE_INTER = 2, FRAMETYPE_BIDIR = 3,
  FRAMETYPE_INTER_NOREF = 4, FRAMETYPE_NULL_FIRST = 5, FRAMETYPE_NULL_LAST = 6
}
 Indeo 4 frame types. More...

Functions

static int decode_plane_subdivision (GetBitContext *gb)
 Decode subdivision of a plane.
static int scale_tile_size (int def_size, int size_factor)
static int decode_pic_hdr (IVI4DecContext *ctx, AVCodecContext *avctx)
 Decode Indeo 4 picture header.
static int decode_band_hdr (IVI4DecContext *ctx, IVIBandDesc *band, AVCodecContext *avctx)
 Decode Indeo 4 band header.
static int decode_mb_info (IVI4DecContext *ctx, IVIBandDesc *band, IVITile *tile, AVCodecContext *avctx)
 Decode information (block type, cbp, quant delta, motion vector) for all macroblocks in the current tile.
static int decode_band (IVI4DecContext *ctx, int plane_num, IVIBandDesc *band, AVCodecContext *avctx)
 Decode an Indeo 4 band.
static av_cold int decode_init (AVCodecContext *avctx)
static void switch_buffers (IVI4DecContext *ctx)
 Rearrange decoding and reference buffers.
static int decode_frame (AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
static av_cold int decode_close (AVCodecContext *avctx)

Variables

struct {
   InvTransformPtr *   inv_trans
   DCTransformPtr *   dc_trans
   int   is_2d_trans
transforms [18]
AVCodec ff_indeo4_decoder


Detailed Description

Indeo Video Interactive version 4 decoder.

Indeo 4 data is usually transported within .avi or .mov files. Known FOURCCs: 'IV41'

Definition in file indeo4.c.


Define Documentation

#define ALT_BITSTREAM_READER_LE

Definition at line 30 of file indeo4.c.

#define IVI4_DEBUG_CHECKSUM   0

Definition at line 39 of file indeo4.c.

#define IVI4_PIC_SIZE_ESC   7

Definition at line 54 of file indeo4.c.

Referenced by decode_pic_hdr().

#define IVI4_STREAM_ANALYSER   0

Definition at line 38 of file indeo4.c.


Enumeration Type Documentation

anonymous enum

Indeo 4 frame types.

Enumerator:
FRAMETYPE_INTRA 
FRAMETYPE_BIDIR1  bidirectional frame
FRAMETYPE_INTER  non-droppable P-frame
FRAMETYPE_BIDIR  bidirectional frame
FRAMETYPE_INTER_NOREF  droppable P-frame
FRAMETYPE_NULL_FIRST  empty frame with no data
FRAMETYPE_NULL_LAST  empty frame with no data

Definition at line 44 of file indeo4.c.


Function Documentation

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

Decode an Indeo 4 band.

Parameters:
[in,out] ctx pointer to the decoder context
[in,out] band pointer to the band descriptor
[in] avctx pointer to the AVCodecContext
Returns:
result code: 0 = OK, negative number = error

Definition at line 585 of file indeo4.c.

Referenced by decode_frame().

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

Decode Indeo 4 band header.

Parameters:
[in,out] ctx pointer to the decoder context
[in,out] band pointer to the band descriptor
[in] avctx pointer to the AVCodecContext
Returns:
result code: 0 = OK, negative number = error

Definition at line 325 of file indeo4.c.

Referenced by decode_band().

static av_cold int decode_close ( AVCodecContext avctx  )  [static]

Definition at line 791 of file indeo4.c.

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

Definition at line 725 of file indeo4.c.

static av_cold int decode_init ( AVCodecContext avctx  )  [static]

Definition at line 671 of file indeo4.c.

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

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

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

Definition at line 457 of file indeo4.c.

Referenced by decode_band().

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

Decode Indeo 4 picture header.

Parameters:
[in,out] ctx pointer to the decoder context
[in] avctx pointer to the AVCodecContext
Returns:
result code: 0 = OK, negative number = error

Definition at line 161 of file indeo4.c.

Referenced by decode_frame().

static int decode_plane_subdivision ( GetBitContext gb  )  [static]

Decode subdivision of a plane.

This is a simplified version that checks for two supported subdivisions:

  • 1 wavelet band per plane, size factor 1:1, code pattern: 3
  • 4 wavelet bands per plane, size factor 1:4, code pattern: 2,3,3,3,3 Anything else is either unsupported or corrupt.

Parameters:
[in,out] gb the GetBit context
Returns:
number of wavelet bands or 0 on error

Definition at line 132 of file indeo4.c.

Referenced by decode_pic_hdr().

static int scale_tile_size ( int  def_size,
int  size_factor 
) [inline, static]

Definition at line 149 of file indeo4.c.

Referenced by decode_pic_hdr().

static void switch_buffers ( IVI4DecContext ctx  )  [static]

Rearrange decoding and reference buffers.

Parameters:
[in,out] ctx pointer to the decoder context

Definition at line 696 of file indeo4.c.

Referenced by decode_frame().


Variable Documentation

Definition at line 99 of file indeo4.c.

Initial value:

 {
    .name           = "indeo4",
    .type           = AVMEDIA_TYPE_VIDEO,
    .id             = CODEC_ID_INDEO4,
    .priv_data_size = sizeof(IVI4DecContext),
    .init           = decode_init,
    .close          = decode_close,
    .decode         = decode_frame,
    .long_name      = NULL_IF_CONFIG_SMALL("Intel Indeo Video Interactive 4"),
}

Definition at line 819 of file indeo4.c.

Definition at line 98 of file indeo4.c.

Referenced by decode_band_hdr().

Definition at line 100 of file indeo4.c.

struct { ... } transforms[18]

Referenced by decode_band_hdr().


Generated on Fri Oct 26 02:43:48 2012 for FFmpeg by  doxygen 1.5.8