RL2 Video Decoder.
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.
#define EXTRADATA1_SIZE (6 + 256 * 3) |
Uninit decoder.
- Parameters
-
- Returns
- 0 success, -1 on error
Definition at line 208 of file rl2.c.
get buffer
run length decode
make the palette available on the way out
report that the buffer was completely consumed
Definition at line 171 of file rl2.c.
Initialize the decoder.
- Parameters
-
- Returns
- 0 success, -1 on error
parse extra data
get frame_offset
initialize palette
decode background frame if present
Definition at line 129 of file rl2.c.
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.
- Parameters
-
s | rl2 context |
in | 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 58 of file rl2.c.
Referenced by rl2_decode_frame(), and rl2_decode_init().
Initial value:= {
.name = "rl2",
}
static av_cold int rl2_decode_end(AVCodecContext *avctx)
Uninit decoder.
static int decode(MimicContext *ctx, int quality, int num_coeffs, int is_iframe)
static int init(AVCodecParserContext *s)
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
static void close(AVCodecParserContext *s)
static int rl2_decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
static av_cold int rl2_decode_init(AVCodecContext *avctx)
Initialize the decoder.
struct Rl2Context Rl2Context
Definition at line 221 of file rl2.c.