Status: BTIC1C + BC6H and BC7, Expanded RGB depth.

Published December 24, 2013
Advertisement
well, first off, recently did a test showing the image quality for BTIC1C:


this test was for a video at 1024x1024 with 8.6 Mbps and 0.55 bpp.

as noted, the quality degradation is noticeable, but "mostly passable".
some amount of it is due largely to the conversion to RGB555, rather than actual quantization artifacts (partly because video compression and dithering don't really mix well in my tests). however, some quantization artifacts are visible.


as usual, working spec:
http://cr88192.dyndns.org:8080/wiki/index.php/BTIC1C


other recent changes:

I have split apart BTIC1C and RPZA into different codecs, mostly as 1C has diverged sufficiently from RPZA that keeping them as a single codec was becoming problematic.

BTIC1C now has BC6H and BC7 decode routes, with single-thread decode speeds of around 320-340 Mpix/sec for BC7, and around 400 Mpix/sec for BC6H (the speed difference is mostly due to the lack of an alpha channel in 6H, and slightly awkward handling of alpha in BC7).

as-is, both effectively use a subset of the format (currently Mode 5 for BC7, and Mode 11 for 6H).


the (theoretical) color depth has been expanded, as it now supports 23-bit RGB and 31-bit RGB.
RGB23 will give (approximately) a full 24-bit color depth (mostly for BC7, possibly could be used for RGBA).

RGB31 will support HDR (for BC6H), and comes in signed and unsigned variants. as-is, it stores 10-bits per component (as floating-point).

likewise, the 256-color indexed block-modes have been expanded to support 23 and 31 bit RGB colors.

these modes are coerced to RGB565 for DXTn decoding, as well as RGB555 still being usable with BC7 and BC6H, ...
this means that video intended for one format can still be decoded for another if-needed (though videos will still have a "preferred format").


as-is, it will still require some work on the encoder end to be able to generate output supporting these color depths (likely moving from 128 to 256 blocks on the encoder end).

the current encoder basically uses a hacked form of DXT5 for its intermediate form, where:
(AlphaA>AlphaB) && (ColorA>ColorB)
basically the same as DXT5.
(AlphaA<=AlphaB) || (ColorA<=ColorB)
special cases (flat colors, skip blocks, ...)

however, there are no free bits for more color data (at least while keeping block-complexity "reasonable").
so, likely, it will be necessary to expand the block size to 256 bits and probably use a 128-bit color block.

ex:
64-bits: tag and metadata
64-bits: alpha block
128-bits: expanded color block.

this would not effect the output format, as these blocks are purely intermediate (used for frame conversion/quantization/encoding), but would require a bit of alteration to the encoder-side logic.


it sort of works I guess...


ADD:


video-texture, now with audio...

had an idea here for how to do a DXTn-space deblocking filter, but it would likely come with a bit of a speed cost.
may try it out and see if it works ok though.
0 likes 1 comments

Comments

cr88192

ADD, Comment:

just noticed that apparently posts can only contain a single video or something... (trying to add another will remove the one that was already there...).

here is the second video:

http://www.youtube.com/watch?v=-auo8LYEXY4

ADD 2:

I am running into a minor side-issue:

all the features that keep being added have generally turned the decoder into an evil/awful mess, and even then there are holes, like differential-colors + higher color-depths (or when using BC6H or BC7 as the output format) aren't actually implemented.

the giant switch for the DXTn decode path has now expanded to nearly 1500 lines.

ironically, the BC6 and BC7 paths are actually smaller, mostly because some more of the logic was factored out into functions.

another idle thought is if the extended 23-bit RGB mode were used for in-game video capture.

this mode would use 5 bpp block (vs 4 bpp blocks for the current capture), but could look a little better. ( the encoder used for capture is fairly naive, prioritizing fast encoding over good compression. )

December 28, 2013 06:50 AM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement