libavcodec/targa.c File Reference

#include "libavutil/intreadwrite.h"
#include "libavutil/imgutils.h"
#include "avcodec.h"
#include "bytestream.h"
#include "targa.h"

Go to the source code of this file.

Data Structures

struct  TargaContext


#define CHECK_BUFFER_SIZE(buf, buf_end, needed, where)


static int targa_decode_rle (AVCodecContext *avctx, TargaContext *s, const uint8_t *src, int src_size, uint8_t *dst, int w, int h, int stride, int bpp)
static int decode_frame (AVCodecContext *avctx, void *data, int *data_size, AVPacket *avpkt)
static av_cold int targa_init (AVCodecContext *avctx)
static av_cold int targa_end (AVCodecContext *avctx)


AVCodec ff_targa_decoder

Define Documentation

#define CHECK_BUFFER_SIZE ( buf,
where   ) 


if(needed > buf_end - buf){ \
        av_log(avctx, AV_LOG_ERROR, "Problem: unexpected end of data while reading " where "\n"); \
        return -1; \
    } \

Definition at line 37 of file targa.c.

Referenced by decode_frame(), and targa_decode_rle().

Function Documentation

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

Definition at line 101 of file targa.c.

static int targa_decode_rle ( AVCodecContext avctx,
TargaContext s,
const uint8_t *  src,
int  src_size,
uint8_t *  dst,
int  w,
int  h,
int  stride,
int  bpp 
) [static]

Definition at line 43 of file targa.c.

Referenced by decode_frame().

static av_cold int targa_end ( AVCodecContext avctx  )  [static]

Definition at line 273 of file targa.c.

static av_cold int targa_init ( AVCodecContext avctx  )  [static]

Definition at line 264 of file targa.c.

Variable Documentation

Initial value:

    .name           = "targa",
    .type           = AVMEDIA_TYPE_VIDEO,
    .id             = CODEC_ID_TARGA,
    .priv_data_size = sizeof(TargaContext),
    .init           = targa_init,
    .close          = targa_end,
    .decode         = decode_frame,
    .capabilities   = CODEC_CAP_DR1,
    .long_name = NULL_IF_CONFIG_SMALL("Truevision Targa image"),

Definition at line 282 of file targa.c.

Generated on Fri Oct 26 02:43:49 2012 for FFmpeg by  doxygen 1.5.8