#include <stdio.h>#include <stdlib.h>#include <string.h>#include <unistd.h>#include "common.h"#include "avcodec.h"#include "dsputil.h"

Go to the source code of this file.
Data Structures | |
| struct | Msvideo1Context |
Defines | |
| #define | PALETTE_COUNT 256 |
| #define | CHECK_STREAM_PTR(n) |
Functions | |
| static 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, uint8_t *buf, int buf_size) |
| static int | msvideo1_decode_end (AVCodecContext *avctx) |
Variables | |
| AVCodec | msvideo1_decoder |
This decoder outputs either PAL8 or RGB555 data, depending on the whether a RGB palette was passed through palctrl; if it's present, then the data is PAL8; RGB555 otherwise.
Definition in 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); \ return; \ }
Definition at line 42 of file msvideo1.c.
| #define PALETTE_COUNT 256 |
Definition at line 41 of file msvideo1.c.
| static void msvideo1_decode_16bit | ( | Msvideo1Context * | s | ) | [static] |
Definition at line 190 of file msvideo1.c.
References Msvideo1Context::avctx, Msvideo1Context::buf, CHECK_STREAM_PTR, colors, Msvideo1Context::frame, AVCodecContext::height, LE_16, pixels, stride, and AVCodecContext::width.
Referenced by msvideo1_decode_frame().
| static void msvideo1_decode_8bit | ( | Msvideo1Context * | s | ) | [static] |
Definition at line 85 of file msvideo1.c.
References Msvideo1Context::avctx, AVPALETTE_SIZE, Msvideo1Context::buf, CHECK_STREAM_PTR, colors, Msvideo1Context::frame, AVCodecContext::height, memcpy, AVCodecContext::palctrl, AVPaletteControl::palette, AVPaletteControl::palette_changed, AVCodecContext::pix_fmt, PIX_FMT_PAL8, pixels, stride, and AVCodecContext::width.
Referenced by msvideo1_decode_frame().
| static int msvideo1_decode_end | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 327 of file msvideo1.c.
References Msvideo1Context::frame, AVCodecContext::priv_data, AVCodecContext::release_buffer, and s.
| static int msvideo1_decode_frame | ( | AVCodecContext * | avctx, | |
| void * | data, | |||
| int * | data_size, | |||
| uint8_t * | buf, | |||
| int | buf_size | |||
| ) | [static] |
Definition at line 299 of file msvideo1.c.
References av_log(), AV_LOG_ERROR, Msvideo1Context::avctx, Msvideo1Context::buf, FF_BUFFER_HINTS_PRESERVE, FF_BUFFER_HINTS_REUSABLE, FF_BUFFER_HINTS_VALID, Msvideo1Context::frame, Msvideo1Context::mode_8bit, msvideo1_decode_16bit(), msvideo1_decode_8bit(), AVCodecContext::priv_data, AVCodecContext::reget_buffer, s, and Msvideo1Context::size.

| static int msvideo1_decode_init | ( | AVCodecContext * | avctx | ) | [static] |
Definition at line 62 of file msvideo1.c.
References Msvideo1Context::avctx, Msvideo1Context::dsp, dsputil_init(), Msvideo1Context::frame, AVCodecContext::has_b_frames, Msvideo1Context::mode_8bit, NULL, AVCodecContext::palctrl, AVCodecContext::pix_fmt, PIX_FMT_PAL8, PIX_FMT_RGB555, AVCodecContext::priv_data, and s.

Initial value:
{
"msvideo1",
CODEC_TYPE_VIDEO,
CODEC_ID_MSVIDEO1,
sizeof(Msvideo1Context),
msvideo1_decode_init,
NULL,
msvideo1_decode_end,
msvideo1_decode_frame,
CODEC_CAP_DR1,
}
Definition at line 337 of file msvideo1.c.
Referenced by avcodec_register_all().
1.5.5