FFmpeg
Data Structures | Macros | Functions | Variables
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/internal.h"
#include "libavutil/intreadwrite.h"
#include "avcodec.h"
#include "internal.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, void *data, int *got_frame, 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 PALETTE_COUNT   256

Definition at line 38 of file msvideo1.c.

#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); \
}
#define av_log(a,...)
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
Definition: log.h:176
#define s(width, name)
Definition: cbs_vp9.c:257
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a it should return

Definition at line 39 of file msvideo1.c.

Referenced by msvideo1_decode_16bit(), and msvideo1_decode_8bit().

Function Documentation

static av_cold int msvideo1_decode_init ( AVCodecContext avctx)
static

Definition at line 59 of file msvideo1.c.

static void msvideo1_decode_8bit ( Msvideo1Context s)
static

Definition at line 86 of file msvideo1.c.

Referenced by msvideo1_decode_frame().

static void msvideo1_decode_16bit ( Msvideo1Context s)
static

Definition at line 186 of file msvideo1.c.

Referenced by msvideo1_decode_frame().

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

Definition at line 295 of file msvideo1.c.

static av_cold int msvideo1_decode_end ( AVCodecContext avctx)
static

Definition at line 342 of file msvideo1.c.

Variable Documentation

AVCodec ff_msvideo1_decoder
Initial value:
= {
.name = "msvideo1",
.long_name = NULL_IF_CONFIG_SMALL("Microsoft Video 1"),
.priv_data_size = sizeof(Msvideo1Context),
.capabilities = AV_CODEC_CAP_DR1,
}
static int msvideo1_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: msvideo1.c:295
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static void decode(AVCodecContext *dec_ctx, AVPacket *pkt, AVFrame *frame, FILE *outfile)
Definition: decode_audio.c:71
static av_cold int msvideo1_decode_end(AVCodecContext *avctx)
Definition: msvideo1.c:342
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static av_cold int msvideo1_decode_init(AVCodecContext *avctx)
Definition: msvideo1.c:59
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:405

Definition at line 351 of file msvideo1.c.