Go to the documentation of this file.
45 #define RBG323_TO_BGR8(x) ((((x) << 3) & 0xC0) | \
46 (((x) << 3) & 0x38) | \
67 const uint8_t *
src,
int src_size,
70 const uint8_t *src_end =
src + src_size;
82 while (src_end -
src >= 2) {
84 if (v > 0 && v < 0xC0) {
94 }
else if (v >= 0xC1) {
98 if (src_end -
src < length || length <= 0)
static av_always_inline void rbg323_to_bgr8(uint8_t *dst, const uint8_t *src, int size)
static av_cold int sgirle_decode_init(AVCodecContext *avctx)
This structure describes decoded (raw) audio or video data.
int flags
Frame flags, a combination of AV_FRAME_FLAGS.
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
AVCodec p
The public AVCodec.
@ AV_PIX_FMT_BGR8
packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)
#define AV_FRAME_FLAG_KEY
A flag to mark frames that are keyframes.
#define FF_CODEC_DECODE_CB(func)
#define CODEC_LONG_NAME(str)
#define AVERROR_PATCHWELCOME
Not yet implemented in FFmpeg, patches welcome.
@ AV_PICTURE_TYPE_I
Intra.
enum AVPictureType pict_type
Picture type of the frame.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() or get_encode_buffer() for allocating buffers and supports custom allocators.
#define i(width, name, range_min, range_max)
const char * name
Name of the codec implementation.
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
#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)
const FFCodec ff_sgirle_decoder
main external API structure.
static int sgirle_decode_frame(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *avpkt)
#define avpriv_request_sample(...)
This structure stores compressed data.
int width
picture width / height.
int linesize[AV_NUM_DATA_POINTERS]
For video, a positive or negative value, which is typically indicating the size in bytes of each pict...
static int decode_sgirle8(AVCodecContext *avctx, uint8_t *dst, const uint8_t *src, int src_size, int width, int height, ptrdiff_t linesize)