FFmpeg
Data Structures | Macros | Functions | Variables
msvideo1.c File Reference
#include <string.h>
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "decode.h"

Go to the source code of this file.

Data Structures

struct  Msvideo1Context
 

Macros

#define PALETTE_COUNT   256
 
#define CHECK_STREAM_PTR(n)
 

Functions

static av_cold int msvideo1_decode_init (AVCodecContext *avctx)
 
static void msvideo1_decode_8bit (Msvideo1Context *s)
 
static void msvideo1_decode_16bit (Msvideo1Context *s)
 
static int msvideo1_decode_frame (AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt)
 
static av_cold int msvideo1_decode_end (AVCodecContext *avctx)
 

Variables

const FFCodec ff_msvideo1_decoder
 

Detailed Description

Microsoft Video-1 Decoder by Mike Melanson (melan.nosp@m.son@.nosp@m.pcisy.nosp@m.s.ne.nosp@m.t) For more information about the MS Video-1 format, visit: http://www.pcisys.net/~melanson/codecs/

Definition in file msvideo1.c.

Macro Definition Documentation

◆ PALETTE_COUNT

#define PALETTE_COUNT   256

Definition at line 37 of file msvideo1.c.

◆ CHECK_STREAM_PTR

#define CHECK_STREAM_PTR (   n)
Value:
if ((stream_ptr + n) > s->size ) { \
av_log(s->avctx, AV_LOG_ERROR, " MS Video-1 warning: stream_ptr out of bounds (%d >= %d)\n", \
stream_ptr + n, s->size); \
return; \
}

Definition at line 38 of file msvideo1.c.

Function Documentation

◆ msvideo1_decode_init()

static av_cold int msvideo1_decode_init ( AVCodecContext avctx)
static

Definition at line 58 of file msvideo1.c.

◆ msvideo1_decode_8bit()

static void msvideo1_decode_8bit ( Msvideo1Context s)
static

Definition at line 85 of file msvideo1.c.

Referenced by msvideo1_decode_frame().

◆ msvideo1_decode_16bit()

static void msvideo1_decode_16bit ( Msvideo1Context s)
static

Definition at line 185 of file msvideo1.c.

Referenced by msvideo1_decode_frame().

◆ msvideo1_decode_frame()

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

Definition at line 294 of file msvideo1.c.

◆ msvideo1_decode_end()

static av_cold int msvideo1_decode_end ( AVCodecContext avctx)
static

Definition at line 339 of file msvideo1.c.

Variable Documentation

◆ ff_msvideo1_decoder

const FFCodec ff_msvideo1_decoder
Initial value:
= {
.p.name = "msvideo1",
CODEC_LONG_NAME("Microsoft Video 1"),
.p.type = AVMEDIA_TYPE_VIDEO,
.priv_data_size = sizeof(Msvideo1Context),
.p.capabilities = AV_CODEC_CAP_DR1,
}

Definition at line 348 of file msvideo1.c.

Msvideo1Context
Definition: msvideo1.c:45
msvideo1_decode_init
static av_cold int msvideo1_decode_init(AVCodecContext *avctx)
Definition: msvideo1.c:58
msvideo1_decode_end
static av_cold int msvideo1_decode_end(AVCodecContext *avctx)
Definition: msvideo1.c:339
AV_LOG_ERROR
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:180
FF_CODEC_DECODE_CB
#define FF_CODEC_DECODE_CB(func)
Definition: codec_internal.h:287
s
#define s(width, name)
Definition: cbs_vp9.c:198
CODEC_LONG_NAME
#define CODEC_LONG_NAME(str)
Definition: codec_internal.h:272
msvideo1_decode_frame
static int msvideo1_decode_frame(AVCodecContext *avctx, AVFrame *rframe, int *got_frame, AVPacket *avpkt)
Definition: msvideo1.c:294
init
int(* init)(AVBSFContext *ctx)
Definition: dts2pts.c:365
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
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_CODEC_ID_MSVIDEO1
@ AV_CODEC_ID_MSVIDEO1
Definition: codec_id.h:98