eamad.c File Reference

Electronic Arts Madcow Video Decoder. More...

#include "avcodec.h"
#include "get_bits.h"
#include "aandcttab.h"
#include "eaidct.h"
#include "internal.h"
#include "mpeg12.h"
#include "mpeg12data.h"
#include "libavutil/imgutils.h"
Include dependency graph for eamad.c:

Go to the source code of this file.

Data Structures

struct  MadContext
 

Macros

#define EA_PREAMBLE_SIZE   8
 
#define MADk_TAG   MKTAG('M', 'A', 'D', 'k') /* MAD i-frame */
 
#define MADm_TAG   MKTAG('M', 'A', 'D', 'm') /* MAD p-frame */
 
#define MADe_TAG   MKTAG('M', 'A', 'D', 'e') /* MAD lqp-frame */
 

Typedefs

typedef struct MadContext MadContext
 

Functions

static av_cold int decode_init (AVCodecContext *avctx)
 
static void comp (unsigned char *dst, int dst_stride, unsigned char *src, int src_stride, int add)
 
static void comp_block (MadContext *t, AVFrame *frame, int mb_x, int mb_y, int j, int mv_x, int mv_y, int add)
 
static void idct_put (MadContext *t, AVFrame *frame, int16_t *block, int mb_x, int mb_y, int j)
 
static int decode_block_intra (MadContext *s, int16_t *block)
 
static int decode_motion (GetBitContext *gb)
 
static int decode_mb (MadContext *s, AVFrame *frame, int inter)
 
static void calc_quant_matrix (MadContext *s, int qscale)
 
static int decode_frame (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 
static av_cold int decode_end (AVCodecContext *avctx)
 

Variables

AVCodec ff_eamad_decoder
 

Detailed Description

Electronic Arts Madcow Video Decoder.

Author
Peter Ross pross.nosp@m.@xvi.nosp@m.d.org
See also
technical details at http://wiki.multimedia.cx/index.php?title=Electronic_Arts_MAD

Definition in file eamad.c.

Macro Definition Documentation

#define EA_PREAMBLE_SIZE   8

Definition at line 40 of file eamad.c.

#define MADe_TAG   MKTAG('M', 'A', 'D', 'e') /* MAD lqp-frame */

Definition at line 43 of file eamad.c.

Referenced by decode_frame().

#define MADk_TAG   MKTAG('M', 'A', 'D', 'k') /* MAD i-frame */

Definition at line 41 of file eamad.c.

#define MADm_TAG   MKTAG('M', 'A', 'D', 'm') /* MAD p-frame */

Definition at line 42 of file eamad.c.

Referenced by decode_frame().

Typedef Documentation

typedef struct MadContext MadContext

Function Documentation

static void calc_quant_matrix ( MadContext s,
int  qscale 
)
static

Definition at line 220 of file eamad.c.

Referenced by decode_frame().

static void comp_block ( MadContext t,
AVFrame frame,
int  mb_x,
int  mb_y,
int  j,
int  mv_x,
int  mv_y,
int  add 
)
inlinestatic

Definition at line 80 of file eamad.c.

Referenced by decode_mb().

static int decode_block_intra ( MadContext s,
int16_t *  block 
)
inlinestatic

Definition at line 119 of file eamad.c.

Referenced by decode_mb().

static av_cold int decode_end ( AVCodecContext avctx)
static

Definition at line 309 of file eamad.c.

static int decode_frame ( AVCodecContext avctx,
void data,
int *  got_frame,
AVPacket avpkt 
)
static

Definition at line 229 of file eamad.c.

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 59 of file eamad.c.

static int decode_mb ( MadContext s,
AVFrame frame,
int  inter 
)
static

Definition at line 190 of file eamad.c.

Referenced by decode_frame().

static int decode_motion ( GetBitContext gb)
static

Definition at line 179 of file eamad.c.

Referenced by decode_mb().

static void idct_put ( MadContext t,
AVFrame frame,
int16_t *  block,
int  mb_x,
int  mb_y,
int  j 
)
inlinestatic

Definition at line 104 of file eamad.c.

Referenced by decode_mb().

Variable Documentation

AVCodec ff_eamad_decoder
Initial value:
= {
.name = "eamad",
.priv_data_size = sizeof(MadContext),
.capabilities = CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("Electronic Arts Madcow Video")
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
struct MadContext MadContext
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static av_cold int decode_end(AVCodecContext *avctx)
Definition: eamad.c:309
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: eamad.c:229
static void close(AVCodecParserContext *s)
Definition: h264_parser.c:375
static int decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: crystalhd.c:868
static av_cold int decode_init(AVCodecContext *avctx)
Definition: eamad.c:59

Definition at line 317 of file eamad.c.