FFmpeg
Macros | Functions | Variables
sgirledec.c File Reference

Silicon Graphics RLE 8-bit video decoder. More...

#include "libavutil/common.h"
#include "avcodec.h"
#include "internal.h"

Go to the source code of this file.

Macros

#define RBG323_TO_BGR8(x)
 Convert SGI RBG323 pixel into AV_PIX_FMT_BGR8 SGI RGB data is packed as 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 rbg323_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, ptrdiff_t linesize)
 
static int sgirle_decode_frame (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 

Variables

AVCodec ff_sgirle_decoder
 

Detailed Description

Silicon Graphics RLE 8-bit video decoder.

Note
Data is packed in rbg323 with rle, contained in mv or mov. The algorithm and pixfmt are subtly different from SGI images.

Definition in file sgirledec.c.

Macro Definition Documentation

#define RBG323_TO_BGR8 (   x)
Value:
((((x) << 3) & 0xC0) | \
(((x) << 3) & 0x38) | \
(((x) >> 5) & 7))

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

Definition at line 44 of file sgirledec.c.

Referenced by decode_sgirle8(), and rbg323_to_bgr8().

#define INC_XY (   n)
Value:
x += n; \
if (x >= width) { \
y++; \
if (y >= height) \
return 0; \
x = 0; \
}
#define height
#define width
if(ret)
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several the filter must be ready for frames arriving randomly on any input any filter with several inputs will most likely require some kind of queuing mechanism It is perfectly acceptable to have a limited queue and to drop frames when the inputs are too unbalanced request_frame For filters that do not use the this method is called when a frame is wanted on an output For a it should directly call filter_frame on the corresponding output For a if there are queued frames already one of these frames should be pushed If the filter should request a frame on one of its repeatedly until at least one frame has been pushed Return or at least make progress towards producing a it should return

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 rbg323_to_bgr8 ( uint8_t dst,
const uint8_t src,
int  size 
)
static

Definition at line 48 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,
ptrdiff_t  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 65 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 112 of file sgirledec.c.

Variable Documentation

AVCodec ff_sgirle_decoder
Initial value:
= {
.name = "sgirle",
.long_name = NULL_IF_CONFIG_SMALL("Silicon Graphics RLE 8-bit video"),
.capabilities = AV_CODEC_CAP_DR1,
}
static int sgirle_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: sgirledec.c:112
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static av_cold int sgirle_decode_init(AVCodecContext *avctx)
Definition: sgirledec.c:34
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:405

Definition at line 134 of file sgirledec.c.