libavcodec/iff.c File Reference

IFF PBM/ILBM bitmap decoder. More...

#include "bytestream.h"
#include "avcodec.h"
#include "get_bits.h"
#include "iff.h"

Go to the source code of this file.

Data Structures

struct  IffContext

Defines

#define DECLARE_DECODEPLANE(suffix, type)
 Decode interleaved plane buffer.

Functions

int ff_cmap_read_palette (AVCodecContext *avctx, uint32_t *pal)
 Convert CMAP buffer (stored in extradata) to lavc palette format.
static av_cold int decode_init (AVCodecContext *avctx)
static int decode_frame_ilbm (AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
static int decode_frame_byterun1 (AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
static av_cold int decode_end (AVCodecContext *avctx)

Variables

AVCodec iff_ilbm_decoder
AVCodec iff_byterun1_decoder


Detailed Description

IFF PBM/ILBM bitmap decoder.

Definition in file iff.c.


Define Documentation

#define DECLARE_DECODEPLANE ( suffix,
type   ) 

Value:

static void decodeplane##suffix(void *dst, const uint8_t *const buf, int buf_size, int bps, int plane) \
{ \
    GetBitContext gb; \
    int i, b; \
    init_get_bits(&gb, buf, buf_size * 8); \
    for(i = 0; i < (buf_size * 8 + bps - 1) / bps; i++) { \
        for (b = 0; b < bps; b++) { \
            ((type *)dst)[ i*bps + b ] |= get_bits1(&gb) << plane; \
        } \
    } \
}
Decode interleaved plane buffer.

Parameters:
dst Destination buffer
buf Source buffer
buf_size 
bps bits_per_coded_sample
plane plane number to decode as

Definition at line 97 of file iff.c.


Function Documentation

static av_cold int decode_end ( AVCodecContext avctx  )  [static]

Definition at line 210 of file iff.c.

static int decode_frame_byterun1 ( AVCodecContext avctx,
void *  data,
int *  data_size,
AVPacket avpkt 
) [static]

Definition at line 145 of file iff.c.

static int decode_frame_ilbm ( AVCodecContext avctx,
void *  data,
int *  data_size,
AVPacket avpkt 
) [static]

Definition at line 112 of file iff.c.

static av_cold int decode_init ( AVCodecContext avctx  )  [static]

Definition at line 61 of file iff.c.

int ff_cmap_read_palette ( AVCodecContext avctx,
uint32_t *  pal 
)

Convert CMAP buffer (stored in extradata) to lavc palette format.

Definition at line 41 of file iff.c.

Referenced by decode_init(), and iff_read_packet().


Variable Documentation

Initial value:

Definition at line 232 of file iff.c.

Initial value:

Definition at line 219 of file iff.c.


Generated on Tue Apr 20 17:39:32 2010 for FFmpeg by  doxygen 1.5.6