#include <llimage.h>
Inheritance diagram for LLImageFormatted:
Public Member Functions | |
LLImageFormatted (S8 codec) | |
void | deleteData () |
U8 * | allocateData (S32 size=-1) |
U8 * | reallocateData (S32 size) |
void | dump () |
void | sanityCheck () |
virtual S32 | calcHeaderSize () |
virtual S32 | calcDataSize (S32 discard_level) |
virtual S32 | calcDiscardLevelBytes (S32 bytes) |
virtual S8 | getRawDiscardLevel () |
BOOL | load (const LLString &filename) |
BOOL | save (const LLString &filename) |
virtual BOOL | updateData ()=0 |
void | setData (U8 *data, S32 size) |
void | appendData (U8 *data, S32 size) |
virtual BOOL | decode (LLImageRaw *raw_image, F32 decode_time=0.0)=0 |
virtual BOOL | decode (LLImageRaw *raw_image, F32 decode_time, S32 first_channel, S32 max_channel) |
virtual BOOL | encode (const LLImageRaw *raw_image, F32 encode_time=0.0)=0 |
S8 | getCodec () const |
BOOL | isDecoding () const |
BOOL | isDecoded () const |
void | setDiscardLevel (S8 discard_level) |
S8 | getDiscardLevel () const |
Static Public Member Functions | |
static LLImageFormatted * | createFromType (S8 codec) |
static LLImageFormatted * | createFromExtension (const LLString &instring) |
Static Public Attributes | |
static S32 | sGlobalFormattedMemory = 0 |
Protected Member Functions | |
~LLImageFormatted () | |
BOOL | copyData (U8 *data, S32 size) |
Protected Attributes | |
S8 | mCodec |
S8 | mDecoding |
S8 | mDecoded |
S8 | mDiscardLevel |
Definition at line 230 of file llimage.h.
LLImageFormatted::~LLImageFormatted | ( | ) | [protected] |
LLImageFormatted::LLImageFormatted | ( | S8 | codec | ) |
Definition at line 1224 of file llimage.cpp.
References LLImageBase::mMemType, and LLMemType::MTYPE_IMAGEFORMATTED.
Reimplemented from LLImageBase.
Definition at line 1352 of file llimage.cpp.
References LLImageBase::allocateData(), LLImageBase::getDataSize(), and sGlobalFormattedMemory.
Referenced by copyData(), LLImageTGA::encode(), LLImagePNG::encode(), LLImageDXT::encode(), LLImageBMP::encode(), load(), and LLImageTGA::loadFile().
Definition at line 1416 of file llimage.cpp.
References LLImageBase::getData(), LLImageBase::getDataSize(), reallocateData(), S32, and setData().
Reimplemented in LLImageDXT, and LLImageJ2C.
Definition at line 1306 of file llimage.cpp.
References LLImageBase::getComponents(), LLImageBase::getHeight(), LLImageBase::getWidth(), llmax(), mDiscardLevel, and S32.
Referenced by calcDiscardLevelBytes().
Reimplemented in LLImageJ2C.
Definition at line 1319 of file llimage.cpp.
References calcDataSize(), llassert, MAX_IMAGE_MIP, and S32.
Referenced by LLImageDXT::updateData().
virtual S32 LLImageFormatted::calcHeaderSize | ( | ) | [inline, virtual] |
Definition at line 1394 of file llimage.cpp.
References allocateData(), deleteData(), LLImageBase::getData(), LLImageBase::getDataSize(), and TRUE.
LLImageFormatted * LLImageFormatted::createFromExtension | ( | const LLString & | instring | ) | [static] |
Definition at line 1275 of file llimage.cpp.
References codec, createFromType(), exten, and get_codec().
Referenced by LLViewerWindow::saveImageNumbered().
LLImageFormatted * LLImageFormatted::createFromType | ( | S8 | codec | ) | [static] |
Definition at line 1245 of file llimage.cpp.
References IMG_CODEC_BMP, IMG_CODEC_DXT, IMG_CODEC_J2C, IMG_CODEC_JPEG, IMG_CODEC_TGA, and NULL.
Referenced by createFromExtension(), and LLTextureCache::ReadResponder::setData().
BOOL LLImageFormatted::decode | ( | LLImageRaw * | raw_image, | |
F32 | decode_time, | |||
S32 | first_channel, | |||
S32 | max_channel | |||
) | [virtual] |
virtual BOOL LLImageFormatted::decode | ( | LLImageRaw * | raw_image, | |
F32 | decode_time = 0.0 | |||
) | [pure virtual] |
Implemented in LLImageBMP, LLImageDXT, LLImageJ2C, LLImageJPEG, LLImagePNG, and LLImageTGA.
Referenced by decode().
void LLImageFormatted::deleteData | ( | ) | [virtual] |
Reimplemented from LLImageBase.
Definition at line 1369 of file llimage.cpp.
References LLImageBase::deleteData(), LLImageBase::getDataSize(), and sGlobalFormattedMemory.
Referenced by copyData(), LLImageTGA::encode(), load(), LLImageTGA::loadFile(), setData(), and ~LLImageFormatted().
void LLImageFormatted::dump | ( | ) | [virtual] |
Reimplemented from LLImageBase.
Definition at line 1293 of file llimage.cpp.
References LLImageBase::dump(), llendl, llinfos, mCodec, mDecoded, mDecoding, and S32.
virtual BOOL LLImageFormatted::encode | ( | const LLImageRaw * | raw_image, | |
F32 | encode_time = 0.0 | |||
) | [pure virtual] |
Implemented in LLImageBMP, LLImageDXT, LLImageJ2C, LLImageJPEG, LLImagePNG, and LLImageTGA.
S8 LLImageFormatted::getCodec | ( | ) | const |
Definition at line 1497 of file llimage.cpp.
References mCodec.
Referenced by LLTextureFetchWorker::callbackCacheRead().
S8 LLImageFormatted::getDiscardLevel | ( | ) | const [inline] |
virtual S8 LLImageFormatted::getRawDiscardLevel | ( | ) | [inline, virtual] |
BOOL LLImageFormatted::isDecoded | ( | ) | const [inline] |
BOOL LLImageFormatted::isDecoding | ( | ) | const [inline] |
Definition at line 1436 of file llimage.cpp.
References allocateData(), deleteData(), FALSE, ll_apr_file_open(), LL_APR_RB, LLImageBase::resetLastError(), s, S32, LLImageBase::setLastError(), and updateData().
Reimplemented from LLImageBase.
Definition at line 1360 of file llimage.cpp.
References LLImageBase::getDataSize(), LLImageBase::reallocateData(), and sGlobalFormattedMemory.
Referenced by appendData().
void LLImageFormatted::sanityCheck | ( | ) | [virtual] |
Reimplemented from LLImageBase.
Definition at line 1378 of file llimage.cpp.
References IMG_CODEC_EOF, llendl, llerrs, mCodec, mDecoded, mDecoding, S32, and LLImageBase::sanityCheck().
Definition at line 1473 of file llimage.cpp.
References FALSE, LLImageBase::getData(), LLImageBase::getDataSize(), ll_apr_file_open(), ll_apr_file_write(), LL_APR_WB, LLImageBase::resetLastError(), LLImageBase::setLastError(), and TRUE.
Referenced by LLVOVolume::writeCAL3D().
Definition at line 1406 of file llimage.cpp.
References deleteData(), LLImageBase::getData(), LLImageBase::getDataSize(), LLImageBase::setDataAndSize(), and sGlobalFormattedMemory.
Referenced by appendData(), LLImageDXT::convertToDXR(), and LLImageJ2C::validate().
Definition at line 280 of file llimage.h.
References mDiscardLevel.
Referenced by LLImageJ2C::updateData(), and LLImageDXT::updateData().
virtual BOOL LLImageFormatted::updateData | ( | ) | [pure virtual] |
Implemented in LLImageBMP, LLImageDXT, LLImageJ2C, LLImageJPEG, LLImagePNG, and LLImageTGA.
Referenced by load().
S8 LLImageFormatted::mCodec [protected] |
S8 LLImageFormatted::mDecoded [protected] |
S8 LLImageFormatted::mDecoding [protected] |
Definition at line 288 of file llimage.h.
Referenced by LLImageJ2C::decode(), LLImageJ2C::decodeFailed(), dump(), isDecoding(), and sanityCheck().
S8 LLImageFormatted::mDiscardLevel [protected] |
Definition at line 290 of file llimage.h.
Referenced by LLImageDXT::calcDataSize(), calcDataSize(), getDiscardLevel(), LLImageDXT::getMipData(), getRawDiscardLevel(), setDiscardLevel(), and LLImageJ2C::updateRawDiscardLevel().
S32 LLImageFormatted::sGlobalFormattedMemory = 0 [static] |
Definition at line 293 of file llimage.h.
Referenced by allocateData(), deleteData(), output_statistics(), reallocateData(), setData(), and LLViewerImageList::updateImages().