On Sat, Jun 6, 2015 at 4:27 AM, James Almer wrote:
> On 02/06/15 8:09 AM, Vittorio Giovara wrote:
>> +/* Alpha compression function */
>> +static void compress_alpha(uint8_t *dst, ptrdiff_t stride, const uint8_t
>> *block)
>> +{
>> +int i, j;
>> +int dist, bias, dist4, dist2, bits, mask;
On 02/06/15 8:09 AM, Vittorio Giovara wrote:
> +/* Alpha compression function */
> +static void compress_alpha(uint8_t *dst, ptrdiff_t stride, const uint8_t
> *block)
> +{
> +int i, j;
> +int dist, bias, dist4, dist2, bits, mask;
> +int mn, mx;
> +
> +/* Find min/max color */
> +
This module implements generic texture decompression from different
families (DXTC, RGTC, BCn) and texture compression DXTC 1, 3, and 5.
Signed-off-by: Vittorio Giovara
---
Updated with Justin's and James' comments (thanks).
Vittorio
configure | 2 +
libavcodec/Makefile
On 31/05/15 8:41 AM, Vittorio Giovara wrote:
> +/* Solve */
> +max16 = av_clip((at1_r * yy - at2_r * xy) * frb + 0.5f, 0, 31) <<
> 11;
> +max16 |= av_clip((at1_g * yy - at2_g * xy) * fg + 0.5f, 0, 63) << 5;
> +max16 |= av_clip((at1_b * yy - at2_b * xy) * frb + 0.5
On 05/31/2015 07:41 AM, Vittorio Giovara wrote:
+/** Convert a premultiplied alpha pixel to a straigth alpha pixel. */
+static av_always_inline void premult2straight(uint8_t *src)
+{
+int r = src[0];
+int g = src[1];
+int b = src[2];
+int a = src[3];
+
+src[0] = (uint8_t) r *
This module implements generic texture decompression from different
families (DXTC, RGTC, BCn) and texture compression DXTC 1, 3, and 5.
Signed-off-by: Vittorio Giovara
---
configure | 2 +
libavcodec/Makefile| 3 +
libavcodec/texturedsp.c| 615 ++