I don't know, if calcTextureSize is just used for memory statistics, which need not (and cannot) be too accurate but I think the computation for the DXT compressed sizes should replace
Code:
... std::max( width / 4, 1 ) * std::max( height / 4, 1 ) ...
with
Code:
... ( (width+3) / 4 ) * ( (height+3) / 4 ) ...
as I think the DXT formats should round up, to not loose information. If it is loaded from file it should always fit, but perhaps Horde3D sometime in the future supports compression on the fly (which OpenGL imo does when using glTexImage2D on compressed textures).