private static void flipDXT1orDXTA3Block(byte[] block, int h){
        byte tmp;
        switch (h){
            case 1:
                return;
            case 2:
                // keep header intact (the two colors)
                // header takes 4 bytes

                // flip only two top rows
                tmp = block[4+1];
                block[4+1] = block[4+0];
                block[4+0] = tmp;
                return;
            default:
                // keep header intact (the two colors)
                // header takes 4 bytes

                // flip first & fourth row
                tmp = block[4+3];
                block[4+3] = block[4+0];
                block[4+0] = tmp;

                // flip second and third row
                tmp = block[4+2];
                block[4+2] = block[4+1];
                block[4+1] = tmp;
                return;
        }
    }
Flips a DXT color block or a DXT3 alpha block
@param block
@param h
jme3-core/src/plugins/java/com/jme3/texture/plugins/DXTFlipper.java