FFmpeg  2.1.1
Data Structures | Macros | Functions | Variables
sgirledec.c File Reference

SGI RLE 8-bit decoder. More...

#include "avcodec.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  SGIRLEContext
 

Macros

#define RGB332_TO_BGR8(x)   (((x << 3) & 0xC0) | ((x << 3) & 0x38) | ((x >> 5) & 7))
 Convert SGI RGB332 pixel into AV_PIX_FMT_BGR8 SGI RGB332 is packed RGB 3:3:2, 8bpp, (msb)3R 2B 3G(lsb) More...
 
#define INC_XY(n)
 

Functions

static av_cold int sgirle_decode_init (AVCodecContext *avctx)
 
static av_always_inline void memcpy_rgb332_to_bgr8 (uint8_t *dst, const uint8_t *src, int size)
 
static int decode_sgirle8 (AVCodecContext *avctx, uint8_t *dst, const uint8_t *src, int src_size, int width, int height, int linesize)
 
static int sgirle_decode_frame (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 
static av_cold int sgirle_decode_end (AVCodecContext *avctx)
 

Variables

AVCodec ff_sgirle_decoder
 

Detailed Description

SGI RLE 8-bit decoder.

Definition in file sgirledec.c.

Macro Definition Documentation

#define RGB332_TO_BGR8 (   x)    (((x << 3) & 0xC0) | ((x << 3) & 0x38) | ((x >> 5) & 7))

Convert SGI RGB332 pixel into AV_PIX_FMT_BGR8 SGI RGB332 is packed RGB 3:3:2, 8bpp, (msb)3R 2B 3G(lsb)

Definition at line 48 of file sgirledec.c.

Referenced by decode_sgirle8(), and memcpy_rgb332_to_bgr8().

#define INC_XY (   n)
Value:
x += n; \
if (x >= width) { \
y++; \
if (y >= height) \
return 0; \
x = 0; \
}
if((e=av_dict_get(options,"", NULL, AV_DICT_IGNORE_SUFFIX)))
Definition: avfilter.c:965
return
float y
int n
Definition: avisynth_c.h:588
static int width
Definition: utils.c:158
BYTE int const BYTE int int int height
Definition: avisynth_c.h:713

Referenced by decode_sgirle8().

Function Documentation

static av_cold int sgirle_decode_init ( AVCodecContext avctx)
static

Definition at line 34 of file sgirledec.c.

static av_always_inline void memcpy_rgb332_to_bgr8 ( uint8_t dst,
const uint8_t src,
int  size 
)
static

Definition at line 50 of file sgirledec.c.

Referenced by decode_sgirle8().

static int decode_sgirle8 ( AVCodecContext avctx,
uint8_t dst,
const uint8_t src,
int  src_size,
int  width,
int  height,
int  linesize 
)
static
Parameters
[out]dstDestination buffer
[in]srcSource buffer
src_sizeSource buffer size (bytes)
widthWidth of destination buffer (pixels)
heightHeight of destination buffer (pixels)
linesizeLine size of destination buffer (bytes)
Returns
<0 on error

Definition at line 66 of file sgirledec.c.

Referenced by sgirle_decode_frame().

static int sgirle_decode_frame ( AVCodecContext avctx,
void data,
int *  got_frame,
AVPacket avpkt 
)
static

Definition at line 111 of file sgirledec.c.

static av_cold int sgirle_decode_end ( AVCodecContext avctx)
static

Definition at line 132 of file sgirledec.c.

Variable Documentation

AVCodec ff_sgirle_decoder
Initial value:
= {
.name = "sgirle",
.long_name = NULL_IF_CONFIG_SMALL("SGI RLE 8-bit"),
.priv_data_size = sizeof(SGIRLEContext),
.capabilities = CODEC_CAP_DR1,
}
static int sgirle_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: sgirledec.c:111
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
#define CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:742
static av_cold int sgirle_decode_end(AVCodecContext *avctx)
Definition: sgirledec.c:132
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:151
static av_cold int sgirle_decode_init(AVCodecContext *avctx)
Definition: sgirledec.c:34
static void close(AVCodecParserContext *s)
Definition: h264_parser.c:538
static int decode(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: crystalhd.c:868

Definition at line 141 of file sgirledec.c.