FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
msmpeg4dec.c File Reference
#include "avcodec.h"
#include "internal.h"
#include "mpegutils.h"
#include "mpegvideo.h"
#include "msmpeg4.h"
#include "libavutil/imgutils.h"
#include "libavutil/x86/asm.h"
#include "h263.h"
#include "mpeg4video.h"
#include "msmpeg4data.h"
#include "vc1data.h"
#include "wmv2.h"

Go to the source code of this file.

Macros

#define DC_VLC_BITS   9
 
#define V2_INTRA_CBPC_VLC_BITS   3
 
#define V2_MB_TYPE_VLC_BITS   7
 
#define MV_VLC_BITS   9
 
#define V2_MV_VLC_BITS   9
 
#define TEX_VLC_BITS   9
 
#define DEFAULT_INTER_INDEX   3
 

Functions

static int msmpeg4v1_pred_dc (MpegEncContext *s, int n, int32_t **dc_val_ptr)
 
static int msmpeg4v2_decode_motion (MpegEncContext *s, int pred, int f_code)
 
static int msmpeg4v12_decode_mb (MpegEncContext *s, int16_t block[6][64])
 
static int msmpeg4v34_decode_mb (MpegEncContext *s, int16_t block[6][64])
 
av_cold int ff_msmpeg4_decode_init (AVCodecContext *avctx)
 
int ff_msmpeg4_decode_picture_header (MpegEncContext *s)
 
int ff_msmpeg4_decode_ext_header (MpegEncContext *s, int buf_size)
 
static int msmpeg4_decode_dc (MpegEncContext *s, int n, int *dir_ptr)
 
int ff_msmpeg4_decode_block (MpegEncContext *s, int16_t *block, int n, int coded, const uint8_t *scan_table)
 
int ff_msmpeg4_decode_motion (MpegEncContext *s, int *mx_ptr, int *my_ptr)
 

Variables

VLC ff_mb_non_intra_vlc [4]
 
static VLC v2_dc_lum_vlc
 
static VLC v2_dc_chroma_vlc
 
static VLC v2_intra_cbpc_vlc
 
static VLC v2_mb_type_vlc
 
static VLC v2_mv_vlc
 
VLC ff_inter_intra_vlc
 
AVCodec ff_msmpeg4v1_decoder
 
AVCodec ff_msmpeg4v2_decoder
 
AVCodec ff_msmpeg4v3_decoder
 
AVCodec ff_wmv1_decoder
 

Macro Definition Documentation

#define DC_VLC_BITS   9

Definition at line 38 of file msmpeg4dec.c.

Referenced by ff_msmpeg4_decode_init(), and msmpeg4_decode_dc().

#define V2_INTRA_CBPC_VLC_BITS   3

Definition at line 39 of file msmpeg4dec.c.

Referenced by ff_msmpeg4_decode_init(), and msmpeg4v12_decode_mb().

#define V2_MB_TYPE_VLC_BITS   7

Definition at line 40 of file msmpeg4dec.c.

Referenced by ff_msmpeg4_decode_init(), and msmpeg4v12_decode_mb().

#define MV_VLC_BITS   9

Definition at line 41 of file msmpeg4dec.c.

Referenced by ff_msmpeg4_decode_init(), and ff_msmpeg4_decode_motion().

#define V2_MV_VLC_BITS   9

Definition at line 42 of file msmpeg4dec.c.

Referenced by ff_msmpeg4_decode_init(), and msmpeg4v2_decode_motion().

#define TEX_VLC_BITS   9

Definition at line 43 of file msmpeg4dec.c.

Referenced by ff_msmpeg4_decode_block().

#define DEFAULT_INTER_INDEX   3

Definition at line 45 of file msmpeg4dec.c.

Referenced by msmpeg4v34_decode_mb().

Function Documentation

static int msmpeg4v1_pred_dc ( MpegEncContext s,
int  n,
int32_t **  dc_val_ptr 
)
inlinestatic

Definition at line 47 of file msmpeg4dec.c.

Referenced by msmpeg4_decode_dc().

static int msmpeg4v2_decode_motion ( MpegEncContext s,
int  pred,
int  f_code 
)
static

Definition at line 74 of file msmpeg4dec.c.

Referenced by msmpeg4v12_decode_mb().

static int msmpeg4v12_decode_mb ( MpegEncContext s,
int16_t  block[6][64] 
)
static

Definition at line 105 of file msmpeg4dec.c.

Referenced by ff_msmpeg4_decode_init().

static int msmpeg4v34_decode_mb ( MpegEncContext s,
int16_t  block[6][64] 
)
static

Definition at line 195 of file msmpeg4dec.c.

Referenced by ff_msmpeg4_decode_init().

av_cold int ff_msmpeg4_decode_init ( AVCodecContext avctx)

Definition at line 288 of file msmpeg4dec.c.

Referenced by vc1_decode_frame(), vc1_decode_init(), wmv2_decode_init(), and wmv9_init().

int ff_msmpeg4_decode_picture_header ( MpegEncContext s)

Definition at line 398 of file msmpeg4dec.c.

Referenced by ff_h263_decode_frame().

int ff_msmpeg4_decode_ext_header ( MpegEncContext s,
int  buf_size 
)

Definition at line 553 of file msmpeg4dec.c.

Referenced by ff_h263_decode_frame(), and ff_msmpeg4_decode_picture_header().

static int msmpeg4_decode_dc ( MpegEncContext s,
int  n,
int *  dir_ptr 
)
static

Definition at line 581 of file msmpeg4dec.c.

Referenced by ff_msmpeg4_decode_block().

int ff_msmpeg4_decode_block ( MpegEncContext s,
int16_t *  block,
int  n,
int  coded,
const uint8_t scan_table 
)
int ff_msmpeg4_decode_motion ( MpegEncContext s,
int *  mx_ptr,
int *  my_ptr 
)

Definition at line 880 of file msmpeg4dec.c.

Referenced by msmpeg4v34_decode_mb(), and wmv2_decode_motion().

Variable Documentation

VLC ff_mb_non_intra_vlc[4]

Definition at line 65 of file msmpeg4dec.c.

Referenced by ff_wmv2_decode_mb().

VLC v2_dc_lum_vlc
static

Definition at line 66 of file msmpeg4dec.c.

VLC v2_dc_chroma_vlc
static

Definition at line 67 of file msmpeg4dec.c.

VLC v2_intra_cbpc_vlc
static

Definition at line 68 of file msmpeg4dec.c.

VLC v2_mb_type_vlc
static

Definition at line 69 of file msmpeg4dec.c.

VLC v2_mv_vlc
static

Definition at line 70 of file msmpeg4dec.c.

VLC ff_inter_intra_vlc

Definition at line 71 of file msmpeg4dec.c.

Referenced by ff_wmv2_decode_mb().

AVCodec ff_msmpeg4v1_decoder
Initial value:
= {
.name = "msmpeg4v1",
.long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 1"),
.priv_data_size = sizeof(MpegEncContext),
.max_lowres = 3,
.pix_fmts = (const enum AVPixelFormat[]) {
},
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:175
int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: h263dec.c:409
#define AV_CODEC_CAP_DRAW_HORIZ_BAND
Decoder can use draw_horiz_band callback.
Definition: avcodec.h:851
static enum AVPixelFormat pix_fmts[]
Definition: libkvazaar.c:209
MpegEncContext.
Definition: mpegvideo.h:88
static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avpkt)
Definition: ccaption_dec.c:523
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:63
int ff_h263_decode_end(AVCodecContext *avctx)
Definition: h263dec.c:149
AVPixelFormat
Pixel format.
Definition: pixfmt.h:61
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:857
av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx)
Definition: msmpeg4dec.c:288

Definition at line 918 of file msmpeg4dec.c.

AVCodec ff_msmpeg4v2_decoder
Initial value:
= {
.name = "msmpeg4v2",
.long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 2"),
.priv_data_size = sizeof(MpegEncContext),
.max_lowres = 3,
.pix_fmts = (const enum AVPixelFormat[]) {
},
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:175
int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: h263dec.c:409
#define AV_CODEC_CAP_DRAW_HORIZ_BAND
Decoder can use draw_horiz_band callback.
Definition: avcodec.h:851
static enum AVPixelFormat pix_fmts[]
Definition: libkvazaar.c:209
MpegEncContext.
Definition: mpegvideo.h:88
static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avpkt)
Definition: ccaption_dec.c:523
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:63
int ff_h263_decode_end(AVCodecContext *avctx)
Definition: h263dec.c:149
AVPixelFormat
Pixel format.
Definition: pixfmt.h:61
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:857
av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx)
Definition: msmpeg4dec.c:288

Definition at line 935 of file msmpeg4dec.c.

AVCodec ff_msmpeg4v3_decoder
Initial value:
= {
.name = "msmpeg4",
.long_name = NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 3"),
.priv_data_size = sizeof(MpegEncContext),
.max_lowres = 3,
.pix_fmts = (const enum AVPixelFormat[]) {
},
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:175
int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: h263dec.c:409
#define AV_CODEC_CAP_DRAW_HORIZ_BAND
Decoder can use draw_horiz_band callback.
Definition: avcodec.h:851
static enum AVPixelFormat pix_fmts[]
Definition: libkvazaar.c:209
MpegEncContext.
Definition: mpegvideo.h:88
static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avpkt)
Definition: ccaption_dec.c:523
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:63
int ff_h263_decode_end(AVCodecContext *avctx)
Definition: h263dec.c:149
AVPixelFormat
Pixel format.
Definition: pixfmt.h:61
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:857
av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx)
Definition: msmpeg4dec.c:288

Definition at line 952 of file msmpeg4dec.c.

AVCodec ff_wmv1_decoder
Initial value:
= {
.name = "wmv1",
.long_name = NULL_IF_CONFIG_SMALL("Windows Media Video 7"),
.priv_data_size = sizeof(MpegEncContext),
.max_lowres = 3,
.pix_fmts = (const enum AVPixelFormat[]) {
},
}
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:175
int ff_h263_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: h263dec.c:409
#define AV_CODEC_CAP_DRAW_HORIZ_BAND
Decoder can use draw_horiz_band callback.
Definition: avcodec.h:851
static enum AVPixelFormat pix_fmts[]
Definition: libkvazaar.c:209
MpegEncContext.
Definition: mpegvideo.h:88
static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avpkt)
Definition: ccaption_dec.c:523
planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
Definition: pixfmt.h:63
int ff_h263_decode_end(AVCodecContext *avctx)
Definition: h263dec.c:149
AVPixelFormat
Pixel format.
Definition: pixfmt.h:61
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:857
av_cold int ff_msmpeg4_decode_init(AVCodecContext *avctx)
Definition: msmpeg4dec.c:288

Definition at line 969 of file msmpeg4dec.c.