libavcodec/rl2.c File Reference

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.

Data Structures

struct  Rl2Context


#define EXTRADATA1_SIZE   (6 + 256 * 3)
 video base, clr count, palette


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.


AVCodec ff_rl2_decoder

Detailed Description

RL2 Video Decoder.

Sascha Sommer ( For more information about the RL2 format, visit:

Definition in file rl2.c.

Define Documentation

#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().

Function Documentation

static av_cold int rl2_decode_end ( AVCodecContext avctx  )  [static]

Uninit decoder.

avctx decoder context
0 success, -1 on error

Definition at line 210 of file rl2.c.

static int rl2_decode_frame ( AVCodecContext avctx,
void *  data,
int *  data_size,
AVPacket avpkt 
) [static]

get buffer

run length decode

make the palette available on the way out

report that the buffer was completely consumed

Definition at line 173 of file rl2.c.

static av_cold int rl2_decode_init ( AVCodecContext avctx  )  [static]

Initialize the decoder.

avctx decoder context
0 success, -1 on error

parse extra data

get frame_offset

initialize palette

decode background frame if present

Definition at line 130 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.

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 59 of file rl2.c.

Referenced by rl2_decode_frame(), and rl2_decode_init().

Variable Documentation

Initial value:

Definition at line 223 of file rl2.c.

Generated on Fri Oct 26 02:39:46 2012 for FFmpeg by  doxygen 1.5.8