FFmpeg
Data Structures | Macros | Functions | Variables
eatgv.c File Reference
#include "libavutil/mem.h"
#include "avcodec.h"
#include "get_bits.h"
#include "codec_internal.h"
#include "decode.h"

Go to the source code of this file.

Data Structures

struct  TgvContext
 

Macros

#define BITSTREAM_READER_LE
 
#define EA_PREAMBLE_SIZE   8
 
#define kVGT_TAG   MKTAG('k', 'V', 'G', 'T')
 

Functions

static av_cold int tgv_decode_init (AVCodecContext *avctx)
 
static int unpack (const uint8_t *src, const uint8_t *src_end, uint8_t *dst, int width, int height)
 Unpack buffer. More...
 
static int tgv_decode_inter (TgvContext *s, AVFrame *frame, const uint8_t *buf, const uint8_t *buf_end)
 Decode inter-frame. More...
 
static int tgv_decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
 
static av_cold int tgv_decode_end (AVCodecContext *avctx)
 

Variables

const FFCodec ff_eatgv_decoder
 

Detailed Description

Electronic Arts TGV Video Decoder by Peter Ross (pross.nosp@m.@xvi.nosp@m.d.org)

Technical details here: http://wiki.multimedia.cx/index.php?title=Electronic_Arts_TGV

Definition in file eatgv.c.

Macro Definition Documentation

◆ BITSTREAM_READER_LE

#define BITSTREAM_READER_LE

Definition at line 33 of file eatgv.c.

◆ EA_PREAMBLE_SIZE

#define EA_PREAMBLE_SIZE   8

Definition at line 39 of file eatgv.c.

◆ kVGT_TAG

#define kVGT_TAG   MKTAG('k', 'V', 'G', 'T')

Definition at line 40 of file eatgv.c.

Function Documentation

◆ tgv_decode_init()

static av_cold int tgv_decode_init ( AVCodecContext avctx)
static

Definition at line 55 of file eatgv.c.

◆ unpack()

static int unpack ( const uint8_t *  src,
const uint8_t *  src_end,
uint8_t *  dst,
int  width,
int  height 
)
static

Unpack buffer.

Returns
0 on success, -1 on critical buffer underflow

Definition at line 73 of file eatgv.c.

Referenced by tgv_decode_frame().

◆ tgv_decode_inter()

static int tgv_decode_inter ( TgvContext s,
AVFrame frame,
const uint8_t *  buf,
const uint8_t *  buf_end 
)
static

Decode inter-frame.

Returns
0 on success, -1 on critical buffer underflow

Definition at line 148 of file eatgv.c.

Referenced by tgv_decode_frame().

◆ tgv_decode_frame()

static int tgv_decode_frame ( AVCodecContext avctx,
AVFrame frame,
int got_frame,
AVPacket avpkt 
)
static

Definition at line 264 of file eatgv.c.

◆ tgv_decode_end()

static av_cold int tgv_decode_end ( AVCodecContext avctx)
static

Definition at line 350 of file eatgv.c.

Variable Documentation

◆ ff_eatgv_decoder

const FFCodec ff_eatgv_decoder
Initial value:
= {
.p.name = "eatgv",
CODEC_LONG_NAME("Electronic Arts TGV video"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_TGV,
.priv_data_size = sizeof(TgvContext),
.close = tgv_decode_end,
.p.capabilities = AV_CODEC_CAP_DR1,
}

Definition at line 360 of file eatgv.c.

tgv_decode_init
static av_cold int tgv_decode_init(AVCodecContext *avctx)
Definition: eatgv.c:55
tgv_decode_frame
static int tgv_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
Definition: eatgv.c:264
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
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
AV_CODEC_ID_TGV
@ AV_CODEC_ID_TGV
Definition: codec_id.h:172
tgv_decode_end
static av_cold int tgv_decode_end(AVCodecContext *avctx)
Definition: eatgv.c:350
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
TgvContext
Definition: eatgv.c:42