sunrastenc.c File Reference
#include "avcodec.h"
#include "bytestream.h"
#include "internal.h"
#include "sunrast.h"
Include dependency graph for sunrastenc.c:

Go to the source code of this file.

Data Structures

struct  SUNRASTContext
 

Macros

#define GET_VALUE   y >= avctx->height ? 0 : x >= len ? ptr[len-1] : ptr[x]
 

Typedefs

typedef struct SUNRASTContext SUNRASTContext
 

Functions

static void sunrast_image_write_header (AVCodecContext *avctx)
 
static void sunrast_image_write_image (AVCodecContext *avctx, const uint8_t *pixels, const uint32_t *palette_data, int linesize)
 
static av_cold int sunrast_encode_init (AVCodecContext *avctx)
 
static int sunrast_encode_frame (AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
 

Variables

static const AVCodecDefault sunrast_defaults []
 
AVCodec ff_sunrast_encoder
 

Macro Definition Documentation

#define GET_VALUE   y >= avctx->height ? 0 : x >= len ? ptr[len-1] : ptr[x]

Typedef Documentation

Function Documentation

static int sunrast_encode_frame ( AVCodecContext avctx,
AVPacket avpkt,
const AVFrame frame,
int *  got_packet_ptr 
)
static

Definition at line 181 of file sunrastenc.c.

static av_cold int sunrast_encode_init ( AVCodecContext avctx)
static

Definition at line 136 of file sunrastenc.c.

static void sunrast_image_write_header ( AVCodecContext avctx)
static

Definition at line 38 of file sunrastenc.c.

Referenced by sunrast_encode_frame().

static void sunrast_image_write_image ( AVCodecContext avctx,
const uint8_t pixels,
const uint32_t *  palette_data,
int  linesize 
)
static

Definition at line 52 of file sunrastenc.c.

Referenced by sunrast_encode_frame().

Variable Documentation

AVCodec ff_sunrast_encoder
Initial value:
= {
.name = "sunrast",
.priv_data_size = sizeof(SUNRASTContext),
.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_BGR24,
.long_name = NULL_IF_CONFIG_SMALL("Sun Rasterfile image"),
}
static const AVCodecDefault sunrast_defaults[]
Definition: sunrastenc.c:205
static av_cold int init(AVCodecContext *avctx)
Definition: avrndec.c:35
static int sunrast_encode_frame(AVCodecContext *avctx, AVPacket *avpkt, const AVFrame *frame, int *got_packet_ptr)
Definition: sunrastenc.c:181
8 bit with PIX_FMT_RGB32 palette
Definition: pixfmt.h:79
static const AVCodecDefault defaults[]
Definition: libspeexenc.c:344
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
packed RGB 8:8:8, 24bpp, BGRBGR...
Definition: pixfmt.h:71
static av_cold int sunrast_encode_init(AVCodecContext *avctx)
Definition: sunrastenc.c:136
Y , 8bpp.
Definition: pixfmt.h:76
Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb...
Definition: pixfmt.h:77
struct SUNRASTContext SUNRASTContext
AVPixelFormat
Pixel format.
Definition: pixfmt.h:66

Definition at line 210 of file sunrastenc.c.

const AVCodecDefault sunrast_defaults[]
static
Initial value:
= {
{ "coder", "rle" },
{ NULL },
}
NULL
Definition: eval.c:55

Definition at line 205 of file sunrastenc.c.