Libav
Data Structures | Macros | Functions | Variables
sgienc.c File Reference
#include "libavutil/opt.h"
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
#include "sgi.h"
#include "rle.h"

Go to the source code of this file.

Data Structures

struct  SgiContext
 

Macros

#define SGI_SINGLE_CHAN   2
 
#define SGI_MULTI_CHAN   3
 
#define OFFSET(x)   offsetof(SgiContext, x)
 
#define VE   AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM
 

Functions

static av_cold int encode_init (AVCodecContext *avctx)
 
static int sgi_rle_encode (PutByteContext *pbc, const uint8_t *src, int w, int bpp)
 
static int encode_frame (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
 

Variables

static const AVOption options []
 
static const AVClass sgi_class
 
AVCodec ff_sgi_encoder
 

Macro Definition Documentation

◆ SGI_SINGLE_CHAN

#define SGI_SINGLE_CHAN   2

Definition at line 30 of file sgienc.c.

Referenced by encode_frame().

◆ SGI_MULTI_CHAN

#define SGI_MULTI_CHAN   3

Definition at line 31 of file sgienc.c.

Referenced by encode_frame().

◆ OFFSET

#define OFFSET (   x)    offsetof(SgiContext, x)

Definition at line 265 of file sgienc.c.

◆ VE

Definition at line 266 of file sgienc.c.

Function Documentation

◆ encode_init()

static av_cold int encode_init ( AVCodecContext avctx)
static

Definition at line 39 of file sgienc.c.

◆ sgi_rle_encode()

static int sgi_rle_encode ( PutByteContext pbc,
const uint8_t src,
int  w,
int  bpp 
)
static

Definition at line 50 of file sgienc.c.

Referenced by encode_frame().

◆ encode_frame()

static int encode_frame ( AVCodecContext avctx,
AVPacket pkt,
const AVFrame frame,
int *  got_packet 
)
static

Definition at line 91 of file sgienc.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "rle", "Use run-length compression", OFFSET(rle), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 1, VE },
{ NULL },
}
NULL
Definition: eval.c:55
#define VE
Definition: sgienc.c:266
#define OFFSET(x)
Definition: sgienc.c:265

Definition at line 267 of file sgienc.c.

◆ sgi_class

const AVClass sgi_class
static
Initial value:
= {
.class_name = "sgi",
.item_name = av_default_item_name,
.option = options,
}
static const AVOption options[]
Definition: sgienc.c:267
LIBAVUTIL_VERSION_INT
Definition: eval.c:55
av_default_item_name
Definition: dnxhdenc.c:55

Definition at line 273 of file sgienc.c.

◆ ff_sgi_encoder

AVCodec ff_sgi_encoder
Initial value:
= {
.name = "sgi",
.long_name = NULL_IF_CONFIG_SMALL("SGI image"),
.priv_data_size = sizeof(SgiContext),
.priv_class = &sgi_class,
.encode2 = encode_frame,
.pix_fmts = (const enum AVPixelFormat[]) {
},
}
static const AVClass sgi_class
Definition: sgienc.c:273
packed RGB 8:8:8, 24bpp, RGBRGB...
Definition: pixfmt.h:61
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as lit...
Definition: pixfmt.h:107
packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is st...
Definition: pixfmt.h:196
static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
Definition: sgienc.c:91
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:148
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
Definition: pixfmt.h:90
static av_cold int encode_init(AVCodecContext *avctx)
Definition: sgienc.c:39
Y , 16bpp, big-endian.
Definition: pixfmt.h:94
static enum AVPixelFormat pix_fmts[]
Definition: libkvazaar.c:257
Y , 8bpp.
Definition: pixfmt.h:67
packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big...
Definition: pixfmt.h:106
static av_cold int init(AVCodecParserContext *s)
Definition: h264_parser.c:582
Y , 16bpp, little-endian.
Definition: pixfmt.h:95
AVPixelFormat
Pixel format.
Definition: pixfmt.h:57
packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is st...
Definition: pixfmt.h:197

Definition at line 280 of file sgienc.c.