FFmpeg
Loading...
Searching...
No Matches
eamad.c File Reference

Electronic Arts Madcow Video Decoder. More...

#include "libavutil/mem.h"
#include "libavutil/mem_internal.h"
#include "avcodec.h"
#include "blockdsp.h"
#include "bytestream.h"
#include "bswapdsp.h"
#include "codec_internal.h"
#include "decode.h"
#include "get_bits.h"
#include "aandcttab.h"
#include "eaidct.h"
#include "mpeg12data.h"
#include "mpeg12vlc.h"

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 */
 

Functions

static av_cold int decode_init (AVCodecContext *avctx)
 
static void comp (unsigned char *dst, ptrdiff_t dst_stride, unsigned char *src, ptrdiff_t 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, int mb_x, int mb_y)
 
static void calc_quant_matrix (MadContext *s, int qscale)
 
static int decode_frame (AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
 
static av_cold int decode_end (AVCodecContext *avctx)
 

Variables

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

◆ EA_PREAMBLE_SIZE

#define EA_PREAMBLE_SIZE   8

Definition at line 46 of file eamad.c.

◆ MADk_TAG

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

Definition at line 47 of file eamad.c.

Referenced by ea_probe(), ea_read_packet(), and process_ea_header().

◆ MADm_TAG

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

Definition at line 48 of file eamad.c.

Referenced by decode_frame(), and ea_read_packet().

◆ MADe_TAG

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

Definition at line 49 of file eamad.c.

Referenced by decode_frame(), and ea_read_packet().

Function Documentation

◆ decode_init()

static av_cold int decode_init ( AVCodecContext * avctx)
static

Definition at line 63 of file eamad.c.

◆ comp()

static void comp ( unsigned char * dst,
ptrdiff_t dst_stride,
unsigned char * src,
ptrdiff_t src_stride,
int add )
inlinestatic

Definition at line 79 of file eamad.c.

Referenced by av_get_padded_bits_per_pixel(), av_image_fill_black(), av_image_fill_color(), av_image_fill_max_pixsteps(), av_read_image_line2(), av_write_image_line2(), bmp_decode_frame(), calc_cropping_offsets(), calculate_blur(), cleanup(), comp_block(), compile_single(), config_output(), config_props(), cuda_pad_pad(), cudatranspose_rotate(), decode_component(), dequantization_float(), dequantization_int(), dequantization_int_97(), dirac_decode_frame_internal(), encode_packets(), encode_tile(), extend_edges(), extract_from_packed(), ff_blend_mask(), ff_blend_rectangle(), ff_get_unscaled_swscale(), ff_hevc_parse_sps(), ff_jpeg2000_cleanup(), ff_jpeg2000_init_component(), ff_jpeg2000_reinit(), ff_sws_compiled_op_unref(), fill_coding_method_array(), filter(), filter(), filter_frame(), filter_frame(), filter_frame(), init_band(), init_noise(), init_prec(), init_tile(), init_tiles(), interleave_compare_dts(), jpeg2000_dec_cleanup(), jpeg2000_decode_packets_po_iteration(), ls_decode_line(), ls_encode_line(), ls_encode_run(), main(), makelayer(), makelayers(), noise(), op_pass_run(), op_pass_setup(), opencl_get_plane_format(), pps_scc_extension(), pps_scc_extension(), print_pkt_side_data(), qsv_fill_border(), qsvenc_fill_padding_area(), reinit_tables(), sad_hv_bilinear_filter_16width_msa(), set_meta(), set_meta(), set_meta(), set_meta(), set_meta(), set_meta(), sps_scc_extension(), svt_jpegxs_dec_decode(), svt_jpegxs_enc_encode(), swr_next_pts(), tile_codeblocks(), truncpasses(), vaapi_hevc_start_frame(), vk_apv_end_frame(), vp5_parse_vector_adjustment(), vp5_parse_vector_models(), vp6_parse_vector_adjustment(), and vp6_parse_vector_models().

◆ comp_block()

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 88 of file eamad.c.

Referenced by decode_mb().

◆ idct_put()

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

Definition at line 112 of file eamad.c.

Referenced by decode_mb().

◆ decode_block_intra()

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

Definition at line 127 of file eamad.c.

Referenced by decode_mb().

◆ decode_motion()

static int decode_motion ( GetBitContext * gb)
static

Definition at line 184 of file eamad.c.

Referenced by decode_mb().

◆ decode_mb()

static int decode_mb ( MadContext * s,
AVFrame * frame,
int inter,
int mb_x,
int mb_y )
static

Definition at line 195 of file eamad.c.

Referenced by decode_frame().

◆ calc_quant_matrix()

static void calc_quant_matrix ( MadContext * s,
int qscale )
static

Definition at line 228 of file eamad.c.

Referenced by decode_frame().

◆ decode_frame()

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

Definition at line 237 of file eamad.c.

◆ decode_end()

static av_cold int decode_end ( AVCodecContext * avctx)
static

Definition at line 321 of file eamad.c.

Variable Documentation

◆ ff_eamad_decoder

const FFCodec ff_eamad_decoder
Initial value:
= {
.p.name = "eamad",
CODEC_LONG_NAME("Electronic Arts Madcow Video"),
.p.type = AVMEDIA_TYPE_VIDEO,
.p.id = AV_CODEC_ID_MAD,
.priv_data_size = sizeof(MadContext),
.p.capabilities = AV_CODEC_CAP_DR1,
}
static av_cold void close(AVCodecParserContext *s)
Definition apv_parser.c:197
#define FF_CODEC_DECODE_CB(func)
#define CODEC_LONG_NAME(str)
int(* init)(AVBSFContext *ctx)
Definition dts2pts.c:608
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
Definition codec.h:49
@ AV_CODEC_ID_MAD
Definition codec_id.h:179
@ AVMEDIA_TYPE_VIDEO
Definition avutil.h:200
static av_cold int decode_init(AVCodecContext *avctx)
Definition 4xm.c:998
static av_cold int decode_end(AVCodecContext *avctx)
Definition 4xm.c:980
static int decode_frame(AVCodecContext *avctx, AVFrame *picture, int *got_frame, AVPacket *avpkt)
Definition 4xm.c:837

Definition at line 329 of file eamad.c.