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

American Laser Games MM Video Decoder by Peter Ross (pross.nosp@m.@xvi.nosp@m.d.org) More...

#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  MmContext
 

Macros

#define MM_PREAMBLE_SIZE   6
 
#define MM_TYPE_INTER   0x5
 
#define MM_TYPE_INTRA   0x8
 
#define MM_TYPE_INTRA_HH   0xc
 
#define MM_TYPE_INTER_HH   0xd
 
#define MM_TYPE_INTRA_HHV   0xe
 
#define MM_TYPE_INTER_HHV   0xf
 
#define MM_TYPE_PALETTE   0x31
 

Functions

static av_cold int mm_decode_init (AVCodecContext *avctx)
 
static void mm_decode_pal (MmContext *s)
 
static int mm_decode_intra (MmContext *s, int half_horiz, int half_vert)
 
static int mm_decode_inter (MmContext *s, int half_horiz, int half_vert)
 
static int mm_decode_frame (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 
static av_cold int mm_decode_end (AVCodecContext *avctx)
 

Variables

AVCodec ff_mmvideo_decoder
 

Detailed Description

American Laser Games MM Video Decoder by Peter Ross (pross.nosp@m.@xvi.nosp@m.d.org)

The MM format was used by IBM-PC ports of ALG's "arcade shooter" games, including Mad Dog McCree and Crime Patrol.

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

Definition in file mmvideo.c.

Macro Definition Documentation

#define MM_PREAMBLE_SIZE   6

Definition at line 39 of file mmvideo.c.

Referenced by mm_decode_frame().

#define MM_TYPE_INTER   0x5

Definition at line 41 of file mmvideo.c.

Referenced by mm_decode_frame().

#define MM_TYPE_INTRA   0x8

Definition at line 42 of file mmvideo.c.

Referenced by mm_decode_frame().

#define MM_TYPE_INTRA_HH   0xc

Definition at line 43 of file mmvideo.c.

Referenced by mm_decode_frame().

#define MM_TYPE_INTER_HH   0xd

Definition at line 44 of file mmvideo.c.

Referenced by mm_decode_frame().

#define MM_TYPE_INTRA_HHV   0xe

Definition at line 45 of file mmvideo.c.

Referenced by mm_decode_frame().

#define MM_TYPE_INTER_HHV   0xf

Definition at line 46 of file mmvideo.c.

Referenced by mm_decode_frame().

#define MM_TYPE_PALETTE   0x31

Definition at line 47 of file mmvideo.c.

Referenced by mm_decode_frame().

Function Documentation

static av_cold int mm_decode_init ( AVCodecContext avctx)
static

Definition at line 56 of file mmvideo.c.

static void mm_decode_pal ( MmContext s)
static

Definition at line 78 of file mmvideo.c.

Referenced by mm_decode_frame().

static int mm_decode_intra ( MmContext s,
int  half_horiz,
int  half_vert 
)
static
Parameters
half_horizHalf horizontal resolution (0 or 1)
half_vertHalf vertical resolution (0 or 1)

Definition at line 93 of file mmvideo.c.

Referenced by mm_decode_frame().

static int mm_decode_inter ( MmContext s,
int  half_horiz,
int  half_vert 
)
static
Parameters
half_horizHalf horizontal resolution (0 or 1)
half_vertHalf vertical resolution (0 or 1)

Definition at line 137 of file mmvideo.c.

Referenced by mm_decode_frame().

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

Definition at line 188 of file mmvideo.c.

static av_cold int mm_decode_end ( AVCodecContext avctx)
static

Definition at line 232 of file mmvideo.c.

Variable Documentation

AVCodec ff_mmvideo_decoder
Initial value:
= {
.name = "mmvideo",
.long_name = NULL_IF_CONFIG_SMALL("American Laser Games MM Video"),
.priv_data_size = sizeof(MmContext),
.close = mm_decode_end,
.capabilities = AV_CODEC_CAP_DR1,
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static int mm_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: mmvideo.c:188
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
static av_cold int mm_decode_end(AVCodecContext *avctx)
Definition: mmvideo.c:232
static av_cold int mm_decode_init(AVCodecContext *avctx)
Definition: mmvideo.c:56
static int decode(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *pkt)
Definition: ffmpeg.c:2035
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:959

Definition at line 241 of file mmvideo.c.