FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions | Variables
xpmdec.c File Reference
#include "libavutil/parseutils.h"
#include "libavutil/avstring.h"
#include "avcodec.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  XPMDecContext
 
struct  ColorEntry
 

Functions

static int color_table_compare (const void *lhs, const void *rhs)
 
static unsigned hex_char_to_number (uint8_t x)
 
static size_t mod_strcspn (const char *string, const char *reject)
 
static uint32_t color_string_to_rgba (const char *p, int len)
 
static int ascii2index (const uint8_t *cpixel, int cpp)
 
static int xpm_decode_frame (AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
 
static av_cold int xpm_decode_close (AVCodecContext *avctx)
 

Variables

static const ColorEntry color_table []
 
AVCodec ff_xpm_decoder
 

Function Documentation

static int color_table_compare ( const void lhs,
const void rhs 
)
static

Definition at line 41 of file xpmdec.c.

Referenced by color_string_to_rgba().

static unsigned hex_char_to_number ( uint8_t  x)
static

Definition at line 190 of file xpmdec.c.

Referenced by color_string_to_rgba().

static size_t mod_strcspn ( const char *  string,
const char *  reject 
)
static

Definition at line 206 of file xpmdec.c.

Referenced by xpm_decode_frame().

static uint32_t color_string_to_rgba ( const char *  p,
int  len 
)
static

Definition at line 232 of file xpmdec.c.

Referenced by xpm_decode_frame().

static int ascii2index ( const uint8_t cpixel,
int  cpp 
)
static

Definition at line 287 of file xpmdec.c.

Referenced by xpm_decode_frame().

static int xpm_decode_frame ( AVCodecContext avctx,
void data,
int got_frame,
AVPacket avpkt 
)
static

Definition at line 301 of file xpmdec.c.

static av_cold int xpm_decode_close ( AVCodecContext avctx)
static

Definition at line 423 of file xpmdec.c.

Variable Documentation

const ColorEntry color_table[]
static

Definition at line 46 of file xpmdec.c.

Referenced by ff_get_qtpalette(), rgtc1_block_internal(), and seq_decode_op1().

AVCodec ff_xpm_decoder
Initial value:
= {
.name = "xpm",
.priv_data_size = sizeof(XPMDecContext),
.close = xpm_decode_close,
.capabilities = AV_CODEC_CAP_DR1,
.long_name = NULL_IF_CONFIG_SMALL("XPM (X PixMap) image")
}
static int xpm_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
Definition: xpmdec.c:301
static av_cold int xpm_decode_close(AVCodecContext *avctx)
Definition: xpmdec.c:423
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:179
static int decode(AVCodecContext *avctx, AVFrame *frame, int *got_frame, AVPacket *pkt)
Definition: ffmpeg.c:2257
#define AV_CODEC_CAP_DR1
Codec uses get_buffer() for allocating buffers and supports custom allocators.
Definition: avcodec.h:994

Definition at line 434 of file xpmdec.c.