#include "avcodec.h"
#include "bytestream.h"
#include "codec_internal.h"
#include "decode.h"
#include "sgi.h"
Go to the source code of this file.
|
#define | MAP(in_idx, out_idx) |
|
|
static int | expand_rle_row8 (void *logctx, uint8_t *out_buf, GetByteContext *g, unsigned width) |
| Expand an RLE row into a channel. More...
|
|
static int | expand_rle_row16 (void *logctx, uint16_t *out_buf, GetByteContext *g, unsigned width) |
|
static int | read_rle_sgi (void *logctx, uint8_t *out[4], ptrdiff_t stride[4], GetByteContext *g, unsigned width, int height, unsigned nb_components, unsigned bytes_per_channel) |
| Read a run length encoded SGI image. More...
|
|
static int | read_uncompressed_sgi (uint8_t *const out[4], const ptrdiff_t stride[4], GetByteContext *g, unsigned width, int height, unsigned nb_components, unsigned bytes_per_channel) |
| Read an uncompressed SGI image. More...
|
|
static int | decode_frame (AVCodecContext *avctx, AVFrame *p, int *got_frame, AVPacket *avpkt) |
|
◆ MAP
#define MAP |
( |
|
in_idx, |
|
|
|
out_idx |
|
) |
| |
Value: out[(in_idx)] = p->data[(out_idx)]; \
linesize[(in_idx)] = p->linesize[(out_idx)]
◆ expand_rle_row8()
static int expand_rle_row8 |
( |
void * |
logctx, |
|
|
uint8_t * |
out_buf, |
|
|
GetByteContext * |
g, |
|
|
unsigned |
width |
|
) |
| |
|
static |
Expand an RLE row into a channel.
- Parameters
-
logctx | a logcontext |
out_buf | Points to one line after the output buffer. |
g | GetByteContext used to read input from |
width | length of out_buf in nb of elements |
- Returns
- nb of elements written, else return error code.
Definition at line 36 of file sgidec.c.
Referenced by read_rle_sgi().
◆ expand_rle_row16()
static int expand_rle_row16 |
( |
void * |
logctx, |
|
|
uint16_t * |
out_buf, |
|
|
GetByteContext * |
g, |
|
|
unsigned |
width |
|
) |
| |
|
static |
◆ read_rle_sgi()
static int read_rle_sgi |
( |
void * |
logctx, |
|
|
uint8_t * |
out[4], |
|
|
ptrdiff_t |
stride[4], |
|
|
GetByteContext * |
g, |
|
|
unsigned |
width, |
|
|
int |
height, |
|
|
unsigned |
nb_components, |
|
|
unsigned |
bytes_per_channel |
|
) |
| |
|
static |
Read a run length encoded SGI image.
- Parameters
-
out_buf | output buffer |
s | the current image state |
- Returns
- 0 if no error, else return error code.
Definition at line 116 of file sgidec.c.
Referenced by decode_frame().
◆ read_uncompressed_sgi()
static int read_uncompressed_sgi |
( |
uint8_t *const |
out[4], |
|
|
const ptrdiff_t |
stride[4], |
|
|
GetByteContext * |
g, |
|
|
unsigned |
width, |
|
|
int |
height, |
|
|
unsigned |
nb_components, |
|
|
unsigned |
bytes_per_channel |
|
) |
| |
|
static |
Read an uncompressed SGI image.
- Parameters
-
out_buf | output buffer |
s | the current image state |
- Returns
- 0 if read success, else return error code.
Definition at line 155 of file sgidec.c.
Referenced by decode_frame().
◆ decode_frame()
◆ ff_sgi_decoder
Initial value:
Definition at line 270 of file sgidec.c.