52 #define RBG323_TO_BGR8(x) ((((x) << 3) & 0xC0) |                                \ 
   53                            (((x) << 3) & 0x38) |                                \ 
   59     for (i = 0; i < 
size; i++)
 
   77     const uint8_t *src_end = src + src_size;
 
   89     while (src_end - src >= 2) {
 
   91         if (v > 0 && v < 0xC0) {
 
  101         } 
else if (v >= 0xC1) {
 
  105                 if (src_end - src < length || length <= 0)
 
This structure describes decoded (raw) audio or video data. 
ptrdiff_t const GLvoid * data
static int sgirle_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
static av_cold int init(AVCodecContext *avctx)
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx. 
static int decode_sgirle8(AVCodecContext *avctx, uint8_t *dst, const uint8_t *src, int src_size, int width, int height, ptrdiff_t linesize)
void void avpriv_request_sample(void *avc, const char *msg,...) av_printf_format(2
Log a generic warning message about a missing feature. 
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values. 
static av_always_inline void rbg323_to_bgr8(uint8_t *dst, const uint8_t *src, int size)
int av_frame_ref(AVFrame *dst, const AVFrame *src)
Set up a new reference to the data described by the source frame. 
static av_cold int sgirle_decode_end(AVCodecContext *avctx)
#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) ...
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g. 
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
const char * name
Name of the codec implementation. 
int ff_reget_buffer(AVCodecContext *avctx, AVFrame *frame)
Identical in function to av_frame_make_writable(), except it uses ff_get_buffer() to allocate the buf...
int width
picture width / height. 
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome. 
packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb) 
Libavcodec external API header. 
static av_cold int sgirle_decode_init(AVCodecContext *avctx)
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line. 
main external API structure. 
BYTE int const BYTE int int int height
AVCodec ff_sgirle_decoder
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes. 
static int decode(AVCodecContext *avctx, void *data, int *got_sub, AVPacket *avpkt)
common internal api header. 
common internal and external API header 
This structure stores compressed data. 
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.