FileTGA Class Reference

#include <filetga.h>

Inherits FileList.

Collaboration diagram for FileTGA:

Collaboration graph
[legend]

Public Member Functions

 FileTGA (Asset *asset, File *file)
 ~FileTGA ()
int read_frame_header (char *path)
int64_t get_memory_usage ()
int can_copy_from (Edit *edit, int64_t position)
int colormodel_supported (int colormodel)
int read_frame (VFrame *frame, VFrame *data)
int write_frame (VFrame *frame, VFrame *data, FrameWriterUnit *unit)
FrameWriterUnitnew_writer_unit (FrameWriter *writer)

Static Public Member Functions

static int check_sig (Asset *asset)
static void get_parameters (BC_WindowBase *parent_window, Asset *asset, BC_WindowBase *&format_window, int audio_options, int video_options)
static char * compression_to_str (char *compression)
static char * str_to_compression (char *string)
static void read_tga (Asset *asset, VFrame *frame, VFrame *data, VFrame *&temp)
static void write_tga (Asset *asset, VFrame *frame, VFrame *data, VFrame *&temp)
static int get_best_colormodel (Asset *asset, int driver)

Data Fields

VFrametemp

Static Private Member Functions

static void write_data (unsigned char *buffer, VFrame *data, int64_t &file_offset, int64_t len)
static void read_line (unsigned char *row, unsigned char *data, int64_t &file_offset, int image_type, int bpp, int image_compression, int bytes, int width, int fliphoriz, int alphabits, int data_size)
static void flip_line (unsigned char *row, int bytes, int width)
static void rle_read (unsigned char *row, unsigned char *data, int64_t &file_offset, int bytes, int width)
static void rle_write (unsigned char *buffer, int width, int bytes, VFrame *frame, int64_t &file_offset)
static void bgr2rgb (unsigned char *dest, unsigned char *src, int width, int bytes, int alpha)
static void upsample (unsigned char *dest, unsigned char *src, int width, int bytes)

Detailed Description

Definition at line 7 of file filetga.h.


Constructor & Destructor Documentation

FileTGA::FileTGA ( Asset asset,
File file 
)

Definition at line 23 of file filetga.C.

References temp.

FileTGA::~FileTGA (  ) 

Definition at line 29 of file filetga.C.

References temp.


Member Function Documentation

int FileTGA::check_sig ( Asset asset  )  [static]

Definition at line 34 of file filetga.C.

References fclose(), fopen(), fread(), Asset::path, and strrchr.

Referenced by File::open_file().

Here is the call graph for this function:

void FileTGA::get_parameters ( BC_WindowBase parent_window,
Asset asset,
BC_WindowBase *&  format_window,
int  audio_options,
int  video_options 
) [static]

Definition at line 79 of file filetga.C.

References TGAConfigVideo::create_objects(), BC_WindowBase::run_window(), and window.

Referenced by File::get_options().

Here is the call graph for this function:

int FileTGA::read_frame_header ( char *  path  )  [virtual]

Reimplemented from FileList.

Definition at line 189 of file filetga.C.

References FileBase::asset, eprintf, fclose(), fopen(), fread(), header, HEADERSIZE, Asset::height, Asset::path, TGA_RGB, TGA_RGB_RLE, TGA_RGBA, TGA_RGBA_RLE, Asset::vcodec, and Asset::width.

Here is the call graph for this function:

char * FileTGA::compression_to_str ( char *  compression  )  [static]

char * FileTGA::str_to_compression ( char *  string  )  [static]

Definition at line 121 of file filetga.C.

References compression_to_str(), TGA_RGB, TGA_RGB_RLE, TGA_RGBA, and TGA_RGBA_RLE.

Referenced by TGACompression::handle_event().

Here is the call graph for this function:

int64_t FileTGA::get_memory_usage (  )  [virtual]

Reimplemented from FileList.

Definition at line 173 of file filetga.C.

References VFrame::get_data_size(), FileList::get_memory_usage(), and temp.

Here is the call graph for this function:

void FileTGA::read_tga ( Asset asset,
VFrame frame,
VFrame data,
VFrame *&  temp 
) [static]

void FileTGA::write_tga ( Asset asset,
VFrame frame,
VFrame data,
VFrame *&  temp 
) [static]

int FileTGA::can_copy_from ( Edit edit,
int64_t  position 
) [virtual]

Reimplemented from FileBase.

Definition at line 130 of file filetga.C.

References Edit::asset, and Asset::format.

int FileTGA::get_best_colormodel ( Asset asset,
int  driver 
) [static]

Definition at line 145 of file filetga.C.

References BC_RGB888, BC_RGBA8888, TGA_RGB, TGA_RGB_RLE, TGA_RGBA, TGA_RGBA_RLE, and Asset::vcodec.

Referenced by File::get_best_colormodel().

int FileTGA::colormodel_supported ( int  colormodel  )  [virtual]

Reimplemented from FileBase.

Definition at line 140 of file filetga.C.

int FileTGA::read_frame ( VFrame frame,
VFrame data 
) [virtual]

Reimplemented from FileList.

Definition at line 154 of file filetga.C.

References FileBase::asset, read_tga(), and temp.

Here is the call graph for this function:

int FileTGA::write_frame ( VFrame frame,
VFrame data,
FrameWriterUnit unit 
) [virtual]

Reimplemented from FileList.

Definition at line 160 of file filetga.C.

References FileBase::asset, TGAUnit::temp, and write_tga().

Here is the call graph for this function:

FrameWriterUnit * FileTGA::new_writer_unit ( FrameWriter writer  )  [virtual]

Reimplemented from FileList.

Definition at line 168 of file filetga.C.

void FileTGA::write_data ( unsigned char *  buffer,
VFrame data,
int64_t &  file_offset,
int64_t  len 
) [static, private]

Definition at line 555 of file filetga.C.

References VFrame::allocate_compressed_data(), VFrame::get_compressed_allocated(), VFrame::get_compressed_size(), VFrame::get_data(), and VFrame::set_compressed_size().

Referenced by rle_write(), and write_tga().

Here is the call graph for this function:

void FileTGA::read_line ( unsigned char *  row,
unsigned char *  data,
int64_t &  file_offset,
int  image_type,
int  bpp,
int  image_compression,
int  bytes,
int  width,
int  fliphoriz,
int  alphabits,
int  data_size 
) [static, private]

Definition at line 575 of file filetga.C.

References bgr2rgb(), flip_line(), rle_read(), TGA_COMP_RLE, TGA_TYPE_COLOR, and upsample().

Referenced by read_tga().

Here is the call graph for this function:

void FileTGA::flip_line ( unsigned char *  row,
int  bytes,
int  width 
) [static, private]

Definition at line 625 of file filetga.C.

References s, and temp.

Referenced by read_line().

void FileTGA::rle_read ( unsigned char *  row,
unsigned char *  data,
int64_t &  file_offset,
int  bytes,
int  width 
) [static, private]

Definition at line 647 of file filetga.C.

Referenced by read_line().

void FileTGA::rle_write ( unsigned char *  buffer,
int  width,
int  bytes,
VFrame frame,
int64_t &  file_offset 
) [static, private]

Definition at line 701 of file filetga.C.

References memcmp, output, and write_data().

Referenced by write_tga().

Here is the call graph for this function:

void FileTGA::bgr2rgb ( unsigned char *  dest,
unsigned char *  src,
int  width,
int  bytes,
int  alpha 
) [static, private]

Definition at line 788 of file filetga.C.

References b, and r.

Referenced by read_line(), read_tga(), and write_tga().

void FileTGA::upsample ( unsigned char *  dest,
unsigned char *  src,
int  width,
int  bytes 
) [static, private]

Definition at line 828 of file filetga.C.

Referenced by read_line(), and read_tga().


Field Documentation

Reimplemented from FileList.

Definition at line 36 of file filetga.h.

Referenced by FileTGA(), flip_line(), get_memory_usage(), read_frame(), and ~FileTGA().


The documentation for this class was generated from the following files:

Generated on Mon Apr 28 14:25:41 2008 for Cinelerra by  doxygen 1.5.5