FFmpeg
Data Structures | Functions | Variables
mdec.c File Reference

Sony PlayStation MDEC (Motion DECoder) This is very similar to intra-only MPEG-1. More...

#include "avcodec.h"
#include "blockdsp.h"
#include "bswapdsp.h"
#include "idctdsp.h"
#include "mpeg12.h"
#include "thread.h"

Go to the source code of this file.

Data Structures

struct  MDECContext
 

Functions

static int mdec_decode_block_intra (MDECContext *a, int16_t *block, int n)
 
static int decode_mb (MDECContext *a, int16_t block[6][64])
 
static void idct_put (MDECContext *a, AVFrame *frame, int mb_x, int mb_y)
 
static int decode_frame (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 
static av_cold int decode_init (AVCodecContext *avctx)
 
static av_cold int decode_end (AVCodecContext *avctx)
 

Variables

AVCodec ff_mdec_decoder
 

Detailed Description

Sony PlayStation MDEC (Motion DECoder) This is very similar to intra-only MPEG-1.

Definition in file mdec.c.

Function Documentation

static int mdec_decode_block_intra ( MDECContext a,
int16_t *  block,
int  n 
)
inlinestatic

Definition at line 59 of file mdec.c.

Referenced by decode_mb().

static int decode_mb ( MDECContext a,
int16_t  block[6][64] 
)
inlinestatic

Definition at line 132 of file mdec.c.

Referenced by decode_frame().

static void idct_put ( MDECContext a,
AVFrame frame,
int  mb_x,
int  mb_y 
)
inlinestatic

Definition at line 149 of file mdec.c.

Referenced by decode_frame().

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

Definition at line 169 of file mdec.c.

static av_cold int decode_init ( AVCodecContext avctx)
static

Definition at line 213 of file mdec.c.

static av_cold int decode_end ( AVCodecContext avctx)
static

Definition at line 254 of file mdec.c.

Variable Documentation

AVCodec ff_mdec_decoder
Initial value:
= {
.name = "mdec",
.long_name = NULL_IF_CONFIG_SMALL("Sony PlayStation MDEC (Motion DECoder)"),
.priv_data_size = sizeof(MDECContext),
.close = decode_end,
.init_thread_copy = ONLY_IF_THREADS_ENABLED(decode_init_thread_copy)
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
the pkt_dts and pkt_pts fields in AVFrame will work as usual Restrictions on codec whose streams don t reset across will not work because their bitstreams cannot be decoded in parallel *The contents of buffers must not be read before as well as code calling up to before the decode process starts Call have add an init_thread_copy() which re-allocates them for other threads.Add AV_CODEC_CAP_FRAME_THREADS to the codec capabilities.There will be very little speed gain at this point but it should work.If there are inter-frame dependencies
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: mdec.c:169
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
#define AV_CODEC_CAP_FRAME_THREADS
Codec supports frame-level multithreading.
Definition: avcodec.h:1038
#define ONLY_IF_THREADS_ENABLED(x)
Define a function with only the non-default version specified.
Definition: internal.h:225
static av_cold int decode_end(AVCodecContext *avctx)
Definition: mdec.c:254
static av_cold int decode_init(AVCodecContext *avctx)
Definition: mdec.c:213
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:982

Definition at line 264 of file mdec.c.