I have some code to load DDS image files into OpenGL textures, and I'd like to extend it to support the BC6 and BC7 compressed formats introduced in D3D11. Since DirectX and OpenGL disagree about whether a texture's origin is in the upper-left or lower-left corner, my DDS loader flips each image's pixels along the Y axis before passing the pixels to OpenGL.

Flipping compressed textures presents an additional wrinkle: in addition to flipping each row of 4x4-pixel blocks, you also need to flip the pixels within each block. I found code [here](http://www.racer.nl/tech/dds.htm) to flip BC1/BC2/BC3 blocks, and from the block diagrams [on MSDN](http://msdn.microsoft.com/en-us/library/windows/desktop/bb694531%28v=vs.85%29.aspx) it was easy to adapt the BC3-flipping code to handle BC4 and BC5. The [BC6](http://msdn.microsoft.com/en-us/library/windows/desktop/hh308952%28v=vs.85%29.aspx) and [BC7](http://msdn.microsoft.com/en-us/library/windows/desktop/hh308953%28v=vs.85%29.aspx) formats look significantly more intimidating, though. Is there a similar bit-twiddling trick to flip these formats, or would I have to fully decompress and recompress each block?

**UPDATE:** It turns out the texture flip was only necessary because my texture coordinates were being incorrectly inverted at export time. Removing both flips made the code both simpler *and* faster (thanks Humus!). Flipping BC6/BC7 blocks may still be an interesting challenge, but it's no longer relevant to my original scenario.