#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "libavutil/internal.h"
#include "libavutil/intreadwrite.h"
#include "libavutil/mem.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) |
static av_cold int | rl2_decode_end (AVCodecContext *avctx) |
Uninit decoder. | |
Variables | |
AVCodec | ff_rl2_decoder |
Definition in file rl2.c.
#define EXTRADATA1_SIZE (6 + 256 * 3) |
video base, clr count, palette
Definition at line 39 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] |
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 | |
in | input buffer | |
size | input buffer size | |
out | output 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 60 of file rl2.c.
Referenced by rl2_decode_frame(), and rl2_decode_init().
Initial value:
{ .name = "rl2", .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_RL2, .priv_data_size = sizeof(Rl2Context), .init = rl2_decode_init, .close = rl2_decode_end, .decode = rl2_decode_frame, .capabilities = CODEC_CAP_DR1, .long_name = NULL_IF_CONFIG_SMALL("RL2 video"), }