FFmpeg
Data Structures | Macros | Functions | Variables
mmvideo.c File Reference
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.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, AVFrame *rframe, int *got_frame, AVPacket *avpkt)
 
static av_cold int mm_decode_end (AVCodecContext *avctx)
 

Variables

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

◆ MM_PREAMBLE_SIZE

#define MM_PREAMBLE_SIZE   6

Definition at line 40 of file mmvideo.c.

◆ MM_TYPE_INTER

#define MM_TYPE_INTER   0x5

Definition at line 42 of file mmvideo.c.

◆ MM_TYPE_INTRA

#define MM_TYPE_INTRA   0x8

Definition at line 43 of file mmvideo.c.

◆ MM_TYPE_INTRA_HH

#define MM_TYPE_INTRA_HH   0xc

Definition at line 44 of file mmvideo.c.

◆ MM_TYPE_INTER_HH

#define MM_TYPE_INTER_HH   0xd

Definition at line 45 of file mmvideo.c.

◆ MM_TYPE_INTRA_HHV

#define MM_TYPE_INTRA_HHV   0xe

Definition at line 46 of file mmvideo.c.

◆ MM_TYPE_INTER_HHV

#define MM_TYPE_INTER_HHV   0xf

Definition at line 47 of file mmvideo.c.

◆ MM_TYPE_PALETTE

#define MM_TYPE_PALETTE   0x31

Definition at line 48 of file mmvideo.c.

Function Documentation

◆ mm_decode_init()

static av_cold int mm_decode_init ( AVCodecContext avctx)
static

Definition at line 57 of file mmvideo.c.

◆ mm_decode_pal()

static void mm_decode_pal ( MmContext s)
static

Definition at line 79 of file mmvideo.c.

Referenced by mm_decode_frame().

◆ mm_decode_intra()

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 94 of file mmvideo.c.

Referenced by mm_decode_frame().

◆ mm_decode_inter()

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 138 of file mmvideo.c.

Referenced by mm_decode_frame().

◆ mm_decode_frame()

static int mm_decode_frame ( AVCodecContext avctx,
AVFrame rframe,
int got_frame,
AVPacket avpkt 
)
static

Definition at line 189 of file mmvideo.c.

◆ mm_decode_end()

static av_cold int mm_decode_end ( AVCodecContext avctx)
static

Definition at line 232 of file mmvideo.c.

Variable Documentation

◆ ff_mmvideo_decoder

const FFCodec ff_mmvideo_decoder
Initial value:
= {
.p.name = "mmvideo",
.p.long_name = NULL_IF_CONFIG_SMALL("American Laser Games MM Video"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(MmContext),
.close = mm_decode_end,
.p.capabilities = AV_CODEC_CAP_DR1,
.caps_internal = FF_CODEC_CAP_INIT_THREADSAFE,
}

Definition at line 241 of file mmvideo.c.

init
static int init
Definition: av_tx.c:47
mm_decode_end
static av_cold int mm_decode_end(AVCodecContext *avctx)
Definition: mmvideo.c:232
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:254
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
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
AV_CODEC_ID_MMVIDEO
@ AV_CODEC_ID_MMVIDEO
Definition: codec_id.h:130
FF_CODEC_CAP_INIT_THREADSAFE
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: codec_internal.h:31
mm_decode_frame
static int mm_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt)
Definition: mmvideo.c:189
MmContext
Definition: mmvideo.c:50
mm_decode_init
static av_cold int mm_decode_init(AVCodecContext *avctx)
Definition: mmvideo.c:57
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201