msvideo1.c File Reference

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/. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libavutil/intreadwrite.h"
#include "avcodec.h"

Go to the source code of this file.

Data Structures

struct  Msvideo1Context
 

Macros

#define PALETTE_COUNT   256
 
#define CHECK_STREAM_PTR(n)
 

Typedefs

typedef struct Msvideo1Context Msvideo1Context
 

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, void *data, int *data_size, AVPacket *avpkt)
 
static av_cold int msvideo1_decode_end (AVCodecContext *avctx)
 

Variables

AVCodec 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

#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; \
}
void av_log(void *avcl, int level, const char *fmt,...)
Definition: log.c:140
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:111

Definition at line 38 of file msvideo1.c.

Referenced by msvideo1_decode_16bit(), and msvideo1_decode_8bit().

#define PALETTE_COUNT   256

Definition at line 37 of file msvideo1.c.

Typedef Documentation

Function Documentation

static void msvideo1_decode_16bit ( Msvideo1Context s)
static

Definition at line 178 of file msvideo1.c.

Referenced by msvideo1_decode_frame().

static void msvideo1_decode_8bit ( Msvideo1Context s)
static

Definition at line 78 of file msvideo1.c.

Referenced by msvideo1_decode_frame().

static av_cold int msvideo1_decode_end ( AVCodecContext avctx)
static

Definition at line 326 of file msvideo1.c.

static int msvideo1_decode_frame ( AVCodecContext avctx,
void data,
int *  data_size,
AVPacket avpkt 
)
static

Definition at line 287 of file msvideo1.c.

static av_cold int msvideo1_decode_init ( AVCodecContext avctx)
static

Definition at line 58 of file msvideo1.c.

Variable Documentation

AVCodec ff_msvideo1_decoder
Initial value:
= {
.name = "msvideo1",
.priv_data_size = sizeof(Msvideo1Context),
.capabilities = CODEC_CAP_DR1,
.long_name= NULL_IF_CONFIG_SMALL("Microsoft Video 1"),
}
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
Definition: mimic.c:228
static av_cold int msvideo1_decode_end(AVCodecContext *avctx)
Definition: msvideo1.c:326
static int init(AVCodecParserContext *s)
Definition: h264_parser.c:336
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:719
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:191
static int msvideo1_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
Definition: msvideo1.c:287
static void close(AVCodecParserContext *s)
Definition: h264_parser.c:327
static av_cold int msvideo1_decode_init(AVCodecContext *avctx)
Definition: msvideo1.c:58
struct Msvideo1Context Msvideo1Context

Definition at line 336 of file msvideo1.c.