Hi Vittorio

+++ b/libavcodec/dxtc_dec.c
>

Couldn't the existing s3tc.c be refactored and extended instead of
rewritten from scratch?


> +static av_always_inline void dxt13_block_internal(uint8_t *dst,
> +                                                  const uint8_t *block,
> +                                                  ptrdiff_t stride,
> +                                                  const uint8_t
> *alpha_tab)
> +{
>
<snip>

> +
> +    if (color0 > color1) {
>

No - add a parameter to indicate when the block is DXT1 and only perform
this check for DXT1: DXT3 always uses the 4 colour version.

As the treatment of colour is identical for DXT1, 3 and 5 with the
exception of the check for transparent black in DXT1, dxt13_block_internal
and dxt5_block_internal could share a common function to unpack the 4
colours rather than duplicating quite so much code.
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to