FFmpeg
Macros | Enumerations | Functions | Variables
indeo5.c File Reference
#include "avcodec.h"
#include "codec_internal.h"
#include "get_bits.h"
#include "ivi.h"
#include "ivi_dsp.h"
#include "indeo5data.h"

Go to the source code of this file.

Macros

#define BITSTREAM_READER_LE
 
#define IVI5_PIC_SIZE_ESC   15
 

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 (IVI45DecContext *ctx, AVCodecContext *avctx)
 Decode Indeo5 GOP (Group of pictures) header. More...
 
static int skip_hdr_extension (GetBitContext *gb)
 Skip a header extension. More...
 
static int decode_pic_hdr (IVI45DecContext *ctx, AVCodecContext *avctx)
 Decode Indeo5 picture header. More...
 
static int decode_band_hdr (IVI45DecContext *ctx, IVIBandDesc *band, AVCodecContext *avctx)
 Decode Indeo5 band header. More...
 
static int decode_mb_info (IVI45DecContext *ctx, IVIBandDesc *band, IVITile *tile, AVCodecContext *avctx)
 Decode info (block type, cbp, quant delta, motion vector) for all macroblocks in the current tile. More...
 
static void switch_buffers (IVI45DecContext *ctx)
 Switch buffers. More...
 
static int is_nonnull_frame (IVI45DecContext *ctx)
 
static av_cold int decode_init (AVCodecContext *avctx)
 Initialize Indeo5 decoder. More...
 

Variables

const FFCodec ff_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.

Macro Definition Documentation

◆ BITSTREAM_READER_LE

#define BITSTREAM_READER_LE

Definition at line 30 of file indeo5.c.

◆ IVI5_PIC_SIZE_ESC

#define IVI5_PIC_SIZE_ESC   15

Definition at line 49 of file indeo5.c.

Enumeration Type Documentation

◆ anonymous enum

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

◆ decode_gop_header()

static int decode_gop_header ( IVI45DecContext ctx,
AVCodecContext avctx 
)
static

Decode Indeo5 GOP (Group of pictures) header.

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

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

Definition at line 60 of file indeo5.c.

Referenced by decode_pic_hdr().

◆ skip_hdr_extension()

static int skip_hdr_extension ( GetBitContext gb)
inlinestatic

Skip a header extension.

Parameters
[in,out]gbthe GetBit context

Definition at line 293 of file indeo5.c.

Referenced by decode_band_hdr(), and decode_pic_hdr().

◆ decode_pic_hdr()

static int decode_pic_hdr ( IVI45DecContext ctx,
AVCodecContext avctx 
)
static

Decode Indeo5 picture header.

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

Definition at line 315 of file indeo5.c.

Referenced by decode_init().

◆ decode_band_hdr()

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

Decode Indeo5 band header.

Parameters
[in,out]ctxptr to the decoder context
[in,out]bandptr to the band descriptor
[in]avctxptr to the AVCodecContext
Returns
result code: 0 = OK, -1 = error

Definition at line 383 of file indeo5.c.

Referenced by decode_init().

◆ decode_mb_info()

static int decode_mb_info ( IVI45DecContext ctx,
IVIBandDesc band,
IVITile tile,
AVCodecContext avctx 
)
static

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

Parameters
[in,out]ctxptr to the decoder context
[in,out]bandptr to the band descriptor
[in,out]tileptr to the tile descriptor
[in]avctxptr to the AVCodecContext
Returns
result code: 0 = OK, -1 = error

Definition at line 455 of file indeo5.c.

Referenced by decode_init().

◆ switch_buffers()

static void switch_buffers ( IVI45DecContext ctx)
static

Switch buffers.

Parameters
[in,out]ctxptr to the decoder context

Definition at line 594 of file indeo5.c.

Referenced by decode_init().

◆ is_nonnull_frame()

static int is_nonnull_frame ( IVI45DecContext ctx)
static

Definition at line 632 of file indeo5.c.

Referenced by decode_init().

◆ decode_init()

static av_cold int decode_init ( AVCodecContext avctx)
static

Initialize Indeo5 decoder.

Definition at line 641 of file indeo5.c.

Variable Documentation

◆ ff_indeo5_decoder

const FFCodec ff_indeo5_decoder
Initial value:
= {
.p.name = "indeo5",
CODEC_LONG_NAME("Intel Indeo Video Interactive 5"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(IVI45DecContext),
.p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}

Definition at line 686 of file indeo5.c.

AV_CODEC_ID_INDEO5
@ AV_CODEC_ID_INDEO5
Definition: codec_id.h:164
FF_CODEC_CAP_INIT_CLEANUP
#define FF_CODEC_CAP_INIT_CLEANUP
The codec allows calling the close function for deallocation even if the init function returned a fai...
Definition: codec_internal.h:42
ff_ivi_decode_close
av_cold int ff_ivi_decode_close(AVCodecContext *avctx)
Close Indeo5 decoder and clean up its context.
Definition: ivi.c:1211
decode_init
static av_cold int decode_init(AVCodecContext *avctx)
Initialize Indeo5 decoder.
Definition: indeo5.c:641
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:306
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts_bsf.c:365
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
IVI45DecContext
Definition: ivi.h:213
AV_CODEC_CAP_DR1
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition: codec.h:52
ff_ivi_decode_frame
int ff_ivi_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
Definition: ivi.c:1068
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201