FFmpeg
Data Structures | Macros | Functions | Variables
sgienc.c File Reference
#include "libavutil/opt.h"
#include "avcodec.h"
#include "bytestream.h"
#include "encode.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
 
const AVCodec ff_sgi_encoder
 

Macro Definition Documentation

◆ SGI_SINGLE_CHAN

#define SGI_SINGLE_CHAN   2

Definition at line 31 of file sgienc.c.

◆ SGI_MULTI_CHAN

#define SGI_MULTI_CHAN   3

Definition at line 32 of file sgienc.c.

◆ OFFSET

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

Definition at line 259 of file sgienc.c.

◆ VE

Definition at line 260 of file sgienc.c.

Function Documentation

◆ encode_init()

static av_cold int encode_init ( AVCodecContext avctx)
static

Definition at line 40 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 52 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 93 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 },
}

Definition at line 261 of file sgienc.c.

◆ sgi_class

const AVClass sgi_class
static
Initial value:
= {
.class_name = "sgi",
.item_name = av_default_item_name,
.option = options,
}

Definition at line 267 of file sgienc.c.

◆ ff_sgi_encoder

const AVCodec ff_sgi_encoder
Initial value:

Definition at line 274 of file sgienc.c.

FF_CODEC_CAP_INIT_THREADSAFE
#define FF_CODEC_CAP_INIT_THREADSAFE
The codec does not modify any global variables in the init function, allowing to call the init functi...
Definition: internal.h:42
AVPixelFormat
AVPixelFormat
Pixel format.
Definition: pixfmt.h:64
init
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:31
AV_PIX_FMT_RGBA64BE
@ AV_PIX_FMT_RGBA64BE
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:195
rle
static int rle(uint8_t *dst, const uint8_t *src, int compressed_size, int uncompressed_size)
Definition: exr.c:215
OFFSET
#define OFFSET(x)
Definition: sgienc.c:259
AV_PIX_FMT_GRAY16BE
@ AV_PIX_FMT_GRAY16BE
Y , 16bpp, big-endian.
Definition: pixfmt.h:97
encode_init
static av_cold int encode_init(AVCodecContext *avctx)
Definition: sgienc.c:40
options
static const AVOption options[]
Definition: sgienc.c:261
pix_fmts
static enum AVPixelFormat pix_fmts[]
Definition: libkvazaar.c:290
sgi_class
static const AVClass sgi_class
Definition: sgienc.c:267
AV_PIX_FMT_RGBA
@ AV_PIX_FMT_RGBA
packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
Definition: pixfmt.h:93
LIBAVUTIL_VERSION_INT
#define LIBAVUTIL_VERSION_INT
Definition: version.h:85
NULL
#define NULL
Definition: coverity.c:32
AV_PIX_FMT_RGB48LE
@ AV_PIX_FMT_RGB48LE
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:103
av_default_item_name
const char * av_default_item_name(void *ptr)
Return the context name.
Definition: log.c:235
AV_PIX_FMT_RGBA64LE
@ AV_PIX_FMT_RGBA64LE
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
AV_PIX_FMT_GRAY8
@ AV_PIX_FMT_GRAY8
Y , 8bpp.
Definition: pixfmt.h:74
SgiContext
Definition: sgienc.c:34
AV_PIX_FMT_RGB24
@ AV_PIX_FMT_RGB24
packed RGB 8:8:8, 24bpp, RGBRGB...
Definition: pixfmt.h:68
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:117
encode_frame
static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
Definition: sgienc.c:93
AV_PIX_FMT_RGB48BE
@ AV_PIX_FMT_RGB48BE
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:102
AV_PIX_FMT_NONE
@ AV_PIX_FMT_NONE
Definition: pixfmt.h:65
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:224
AVMEDIA_TYPE_VIDEO
@ AVMEDIA_TYPE_VIDEO
Definition: avutil.h:201
AV_PIX_FMT_GRAY16LE
@ AV_PIX_FMT_GRAY16LE
Y , 16bpp, little-endian.
Definition: pixfmt.h:98
AV_CODEC_ID_SGI
@ AV_CODEC_ID_SGI
Definition: codec_id.h:151
VE
#define VE
Definition: sgienc.c:260