FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
indeo4.c File Reference

Indeo Video Interactive version 4 decoder. More...

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

Go to the source code of this file.

Macros

#define BITSTREAM_READER_LE
 
#define IVI4_PIC_SIZE_ESC   7
 

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 (IVI45DecContext *ctx, AVCodecContext *avctx)
 Decode Indeo 4 picture header.
 
static int decode_band_hdr (IVI45DecContext *ctx, IVIBandDesc *band, AVCodecContext *avctx)
 Decode Indeo 4 band header.
 
static int decode_mb_info (IVI45DecContext *ctx, IVIBandDesc *band, IVITile *tile, AVCodecContext *avctx)
 Decode information (block type, cbp, quant delta, motion vector) for all macroblocks in the current tile.
 
static void switch_buffers (IVI45DecContext *ctx)
 Rearrange decoding and reference buffers.
 
static int is_nonnull_frame (IVI45DecContext *ctx)
 
static av_cold int decode_init (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.

Macro Definition Documentation

#define BITSTREAM_READER_LE

Definition at line 30 of file indeo4.c.

#define IVI4_PIC_SIZE_ESC   7

Definition at line 37 of file indeo4.c.

Referenced by decode_pic_hdr().

Function Documentation

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]gbthe GetBit context
Returns
number of wavelet bands or 0 on error

Definition at line 75 of file indeo4.c.

Referenced by decode_pic_hdr().

static int scale_tile_size ( int  def_size,
int  size_factor 
)
inlinestatic

Definition at line 92 of file indeo4.c.

Referenced by decode_pic_hdr().

static int decode_pic_hdr ( IVI45DecContext ctx,
AVCodecContext avctx 
)
static

Decode Indeo 4 picture header.

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

Definition at line 104 of file indeo4.c.

Referenced by decode_init().

static int decode_band_hdr ( IVI45DecContext ctx,
IVIBandDesc band,
AVCodecContext avctx 
)
static

Decode Indeo 4 band header.

Parameters
[in,out]ctxpointer to the decoder context
[in,out]bandpointer to the band descriptor
[in]avctxpointer to the AVCodecContext
Returns
result code: 0 = OK, negative number = error

Definition at line 269 of file indeo4.c.

Referenced by decode_init().

static int decode_mb_info ( IVI45DecContext 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]ctxpointer to the decoder context
[in,out]bandpointer to the band descriptor
[in,out]tilepointer to the tile descriptor
[in]avctxpointer to the AVCodecContext
Returns
result code: 0 = OK, negative number = error

Definition at line 466 of file indeo4.c.

Referenced by decode_init().

static void switch_buffers ( IVI45DecContext ctx)
static

Rearrange decoding and reference buffers.

Parameters
[in,out]ctxpointer to the decoder context

Definition at line 627 of file indeo4.c.

Referenced by decode_init().

static int is_nonnull_frame ( IVI45DecContext ctx)
static

Definition at line 656 of file indeo4.c.

Referenced by decode_init().

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 662 of file indeo4.c.

Variable Documentation

InvTransformPtr* inv_trans

Definition at line 41 of file indeo4.c.

Referenced by decode_band_hdr().

DCTransformPtr* dc_trans

Definition at line 42 of file indeo4.c.

int is_2d_trans

Definition at line 43 of file indeo4.c.

struct { ... } transforms[18]
AVCodec ff_indeo4_decoder
Initial value:
= {
.name = "indeo4",
.long_name = NULL_IF_CONFIG_SMALL("Intel Indeo Video Interactive 4"),
.priv_data_size = sizeof(IVI45DecContext),
.capabilities = CODEC_CAP_DR1,
}

Definition at line 697 of file indeo4.c.