libavcodec/fraps.c File Reference

Lossless Fraps 'FPS1' decoder. More...

#include "avcodec.h"
#include "bitstream.h"
#include "huffman.h"
#include "bytestream.h"
#include "dsputil.h"

Go to the source code of this file.

Data Structures

struct  FrapsContext
 local variable storage More...

Defines

#define FPS_TAG   MKTAG('F', 'P', 'S', 'x')

Typedefs

typedef struct FrapsContext FrapsContext
 local variable storage

Functions

static av_cold int decode_init (AVCodecContext *avctx)
 initializes decoder
static int huff_cmp (const void *va, const void *vb)
 Comparator - our nodes should ascend by count but with preserved symbol order.
static int fraps2_decode_plane (FrapsContext *s, uint8_t *dst, int stride, int w, int h, const uint8_t *src, int size, int Uoff, const int step)
 decode Fraps v2 packed plane
static int decode_frame (AVCodecContext *avctx, void *data, int *data_size, const uint8_t *buf, int buf_size)
 decode a frame
static av_cold int decode_end (AVCodecContext *avctx)
 closes decoder

Variables

AVCodec fraps_decoder

Detailed Description

Lossless Fraps 'FPS1' decoder.

Author:
Roine Gustafsson <roine at="" users="" sf="" net>="">
Konstantin Shishkov

Codec algorithm for version 0 is taken from Transcode <www.transcoding.org>

Version 2 files support by Konstantin Shishkov

Definition in file fraps.c.


Define Documentation

#define FPS_TAG   MKTAG('F', 'P', 'S', 'x')

Definition at line 40 of file fraps.c.

Referenced by decode_frame().


Typedef Documentation

typedef struct FrapsContext FrapsContext

local variable storage


Function Documentation

static av_cold int decode_end ( AVCodecContext avctx  )  [static]

closes decoder

Parameters:
avctx codec context
Returns:
0 on success or negative if fails

Definition at line 354 of file fraps.c.

static int decode_frame ( AVCodecContext avctx,
void *  data,
int *  data_size,
const uint8_t *  buf,
int  buf_size 
) [static]

decode a frame

Parameters:
avctx codec context
data output AVFrame
data_size size of output data or 0 if no picture is returned
buf input data frame
buf_size size of input data frame
Returns:
number of consumed bytes on success or negative if decode fails

Fraps v2 is Huffman-coded YUV420 planes Fraps v4 is virtually the same

Definition at line 131 of file fraps.c.

static av_cold int decode_init ( AVCodecContext avctx  )  [static]

initializes decoder

Parameters:
avctx codec context
Returns:
0 on success or negative if fails

Definition at line 58 of file fraps.c.

static int fraps2_decode_plane ( FrapsContext s,
uint8_t *  dst,
int  stride,
int  w,
int  h,
const uint8_t *  src,
int  size,
int  Uoff,
const int  step 
) [static]

decode Fraps v2 packed plane

Definition at line 86 of file fraps.c.

Referenced by decode_frame().

static int huff_cmp ( const void *  va,
const void *  vb 
) [static]

Comparator - our nodes should ascend by count but with preserved symbol order.

Definition at line 78 of file fraps.c.

Referenced by fraps2_decode_plane().


Variable Documentation

Initial value:

Definition at line 366 of file fraps.c.

Generated on Wed Dec 21 18:42:29 2011 for ffmpeg by  doxygen 1.6.3