#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 | Rl2Context |
Defines | |
#define | EXTRADATA1_SIZE (6 + 256 * 3) |
video base, clr count, palette | |
Functions | |
static void | rl2_rle_decode (Rl2Context *s, const unsigned char *in, int size, unsigned char *out, int stride, int video_base) |
Run Length Decode a single 320x200 frame. | |
static av_cold int | rl2_decode_init (AVCodecContext *avctx) |
Initialize the decoder. | |
static int | rl2_decode_frame (AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt) |
Decode a single frame. | |
static av_cold int | rl2_decode_end (AVCodecContext *avctx) |
Uninit decoder. | |
Variables | |
AVCodec | rl2_decoder |
Definition in file rl2.c.
#define EXTRADATA1_SIZE (6 + 256 * 3) |
video base, clr count, palette
Definition at line 38 of file rl2.c.
Referenced by rl2_decode_init(), and rl2_read_header().
static av_cold int rl2_decode_end | ( | AVCodecContext * | avctx | ) | [static] |
static int rl2_decode_frame | ( | AVCodecContext * | avctx, | |
void * | data, | |||
int * | data_size, | |||
AVPacket * | avpkt | |||
) | [static] |
Decode a single frame.
avctx | decoder context | |
data | decoded frame | |
data_size | size of the decoded frame | |
buf | input buffer | |
buf_size | input buffer size |
get buffer
run length decode
make the palette available on the way out
report that the buffer was completely consumed
static av_cold int rl2_decode_init | ( | AVCodecContext * | avctx | ) | [static] |
static void rl2_rle_decode | ( | Rl2Context * | s, | |
const unsigned char * | in, | |||
int | size, | |||
unsigned char * | out, | |||
int | stride, | |||
int | video_base | |||
) | [static] |
Run Length Decode a single 320x200 frame.
s | rl2 context | |
buf | input buffer | |
size | input buffer size | |
out | ouput buffer | |
stride | stride of the output buffer | |
video_base | offset of the rle data inside the frame |
copy start of the background frame
decode the variable part of the frame
copy the rest from the background frame
Definition at line 59 of file rl2.c.
Referenced by rl2_decode_frame(), and rl2_decode_init().
Initial value:
{ "rl2", AVMEDIA_TYPE_VIDEO, CODEC_ID_RL2, sizeof(Rl2Context), rl2_decode_init, NULL, rl2_decode_end, rl2_decode_frame, CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("RL2 video"), }