FFmpeg
Data Structures | Macros | Functions | Variables
eacmv.c File Reference
#include "libavutil/common.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"

Go to the source code of this file.

Data Structures

struct  CmvContext
 

Macros

#define EA_PREAMBLE_SIZE   8
 
#define MVIh_TAG   MKTAG('M', 'V', 'I', 'h')
 

Functions

static av_cold int cmv_decode_init (AVCodecContext *avctx)
 
static void cmv_decode_intra (CmvContext *s, AVFrame *frame, const uint8_t *buf, const uint8_t *buf_end)
 
static void cmv_motcomp (unsigned char *dst, ptrdiff_t dst_stride, const unsigned char *src, ptrdiff_t src_stride, int x, int y, int xoffset, int yoffset, int width, int height)
 
static void cmv_decode_inter (CmvContext *s, AVFrame *frame, const uint8_t *buf, const uint8_t *buf_end)
 
static int cmv_process_header (CmvContext *s, const uint8_t *buf, const uint8_t *buf_end)
 
static int cmv_decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
 
static av_cold int cmv_decode_end (AVCodecContext *avctx)
 

Variables

const FFCodec ff_eacmv_decoder
 

Detailed Description

Electronic Arts CMV 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_CMV

Definition in file eacmv.c.

Macro Definition Documentation

◆ EA_PREAMBLE_SIZE

#define EA_PREAMBLE_SIZE   8

Definition at line 169 of file eacmv.c.

◆ MVIh_TAG

#define MVIh_TAG   MKTAG('M', 'V', 'I', 'h')

Definition at line 170 of file eacmv.c.

Function Documentation

◆ cmv_decode_init()

static av_cold int cmv_decode_init ( AVCodecContext avctx)
static

Definition at line 46 of file eacmv.c.

◆ cmv_decode_intra()

static void cmv_decode_intra ( CmvContext s,
AVFrame frame,
const uint8_t *  buf,
const uint8_t *  buf_end 
)
static

Definition at line 60 of file eacmv.c.

Referenced by cmv_decode_frame().

◆ cmv_motcomp()

static void cmv_motcomp ( unsigned char *  dst,
ptrdiff_t  dst_stride,
const unsigned char *  src,
ptrdiff_t  src_stride,
int  x,
int  y,
int  xoffset,
int  yoffset,
int  width,
int  height 
)
static

Definition at line 73 of file eacmv.c.

Referenced by cmv_decode_inter().

◆ cmv_decode_inter()

static void cmv_decode_inter ( CmvContext s,
AVFrame frame,
const uint8_t *  buf,
const uint8_t *  buf_end 
)
static

Definition at line 92 of file eacmv.c.

Referenced by cmv_decode_frame().

◆ cmv_process_header()

static int cmv_process_header ( CmvContext s,
const uint8_t *  buf,
const uint8_t *  buf_end 
)
static

Definition at line 131 of file eacmv.c.

Referenced by cmv_decode_frame().

◆ cmv_decode_frame()

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

Definition at line 172 of file eacmv.c.

◆ cmv_decode_end()

static av_cold int cmv_decode_end ( AVCodecContext avctx)
static

Definition at line 222 of file eacmv.c.

Variable Documentation

◆ ff_eacmv_decoder

const FFCodec ff_eacmv_decoder
Initial value:
= {
.p.name = "eacmv",
CODEC_LONG_NAME("Electronic Arts CMV video"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_CMV,
.priv_data_size = sizeof(CmvContext),
.close = cmv_decode_end,
.p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_CLEANUP,
}

Definition at line 231 of file eacmv.c.

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
cmv_decode_init
static av_cold int cmv_decode_init(AVCodecContext *avctx)
Definition: eacmv.c:46
cmv_decode_end
static av_cold int cmv_decode_end(AVCodecContext *avctx)
Definition: eacmv.c:222
cmv_decode_frame
static int cmv_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
Definition: eacmv.c:172
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
CmvContext
Definition: eacmv.c:38
AV_CODEC_ID_CMV
@ AV_CODEC_ID_CMV
Definition: codec_id.h:170
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201