aboutsummaryrefslogtreecommitdiff
path: root/guilib/DDSImage.h
diff options
context:
space:
mode:
authorjmarshallnz <jmarshallnz@svn>2010-03-21 06:19:36 +0000
committerjmarshallnz <jmarshallnz@svn>2010-03-21 06:19:36 +0000
commit5eac8635829a36183a8f8cc0c5354959be2c1215 (patch)
tree6c1d2810c96bc9f590aa883bc20d6da8fa36f81e /guilib/DDSImage.h
parent69b29f2294061510242c7e1bfd87ab01af73347d (diff)
added: Decompress of DXT images to CDDSImage
git-svn-id: https://xbmc.svn.sourceforge.net/svnroot/xbmc/trunk@28710 568bbfeb-2a22-0410-94d2-cc84cf5bfa90
Diffstat (limited to 'guilib/DDSImage.h')
-rw-r--r--guilib/DDSImage.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/guilib/DDSImage.h b/guilib/DDSImage.h
index 54bdc346a7..788cb501d8 100644
--- a/guilib/DDSImage.h
+++ b/guilib/DDSImage.h
@@ -50,6 +50,18 @@ public:
*/
bool Compress(unsigned int width, unsigned int height, unsigned int pitch, unsigned char const *argb, double maxMSE = 0);
+ /*! \brief Decompress a DXT1/3/5 image to the given buffer
+ Assumes the buffer has been allocated to at least width*height*4
+ \param argb pixel buffer to write to (at least width*height*4 bytes)
+ \param width width of the pixel buffer
+ \param height height of the pixel buffer
+ \param pitch pitch of the pixel buffer
+ \param dxt compressed dxt data
+ \param format format of the compressed dxt data
+ \return true on success, false otherwise
+ */
+ static bool Decompress(unsigned char *argb, unsigned int width, unsigned int height, unsigned int pitch, unsigned char const *dxt, unsigned int format);
+
private:
void Allocate(unsigned int width, unsigned int height, unsigned int format);
const char *GetFourCC(unsigned int format) const;