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

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


Detailed Description

RL2 Video Decoder.

Author:
Sascha Sommer (saschasommer@freenet.de) For more information about the RL2 format, visit: http://wiki.multimedia.cx/index.php?title=RL2

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.

Parameters:
avctx decoder context
Returns:
0 success, -1 on error

Definition at line 218 of file rl2.c.

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

Decode a single frame.

Parameters:
avctx decoder context
data decoded frame
data_size size of the decoded frame
buf input buffer
buf_size input buffer size
Returns:
0 success, -1 on error

get buffer

run length decode

make the palette available on the way out

report that the buffer was completely consumed

Definition at line 181 of file rl2.c.

static av_cold int rl2_decode_init ( AVCodecContext avctx  )  [static]

Initialize the decoder.

Parameters:
avctx decoder context
Returns:
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.

Parameters:
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().


Variable Documentation

Initial value:

Definition at line 231 of file rl2.c.


Generated on Fri Oct 26 02:36:53 2012 for FFmpeg by  doxygen 1.5.8