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.5f, 0, 31) << 0;
> +
> + min16 = av_clip((at2_r * xx - at1_r * xy) * frb + 0.5f, 0, 31) <<
> 11;
> + min16 |= av_clip((at2_g * xx - at1_g * xy) * fg + 0.5f, 0, 63) << 5;
> + min16 |= av_clip((at2_b * xx - at1_b * xy) * frb + 0.5f, 0, 31) << 0;
av_clip_uintp2().
[...]
> +/* 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 */
> + mn = mx = block[3];
> + for (j = 0; j < 4; j++) {
> + for (i = 0; i < 4; i++) {
> + int val = block[3 + i * 4 + j * stride];
> + if (val < mn)
> + mn = val;
> + else if (val > mx)
> + mx = val;
> + }
> + }
> +
> + AV_WL32(dst, 0);
> + AV_WL32(dst + 4, 0);
AV_WL64 or AV_ZERO64?
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel