From: Øyvind Kolås Date: Thu, 23 Mar 2023 09:34:46 +0000 (+0100) Subject: LUT: initialize LUTs from 4bpp with full alpha X-Git-Tag: archive/raspbian/1%0.1.106-3+rpi1^2~15^2^2~14 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=359a2a391f55c9201b96ed7fb3f5ffed8af3a6d9;p=babl.git LUT: initialize LUTs from 4bpp with full alpha Use alpha=255 in seeding of premultiplied - this might not be enough we might also have to disassociate and reassociate alpha during conversion. --- diff --git a/babl/babl-fish-path.c b/babl/babl-fish-path.c index 90135c3..9c1e48a 100644 --- a/babl/babl-fish-path.c +++ b/babl/babl-fish-path.c @@ -352,7 +352,7 @@ static inline int babl_fish_lut_process_maybe (const Babl *babl, { lut = malloc (256 * 256 * 256 * 4); for (int o = 0; o < 256 * 256 * 256; o++) - lut[o] = o; + lut[o] = o | 0xff000000; process_conversion_path (babl->fish_path.conversion_list, lut, 4, lut, 4, @@ -365,7 +365,7 @@ static inline int babl_fish_lut_process_maybe (const Babl *babl, uint32_t *temp_lut = malloc (256 * 256 * 256 * 4); lut = malloc (256 * 256 * 256 * 16); for (int o = 0; o < 256 * 256 * 256; o++) - temp_lut[o] = o; + temp_lut[o] = o | 0xff000000; process_conversion_path (babl->fish_path.conversion_list, temp_lut, 4, lut, 16, @@ -377,7 +377,7 @@ static inline int babl_fish_lut_process_maybe (const Babl *babl, uint32_t *temp_lut = malloc (256 * 256 * 256 * 4); lut = malloc (256 * 256 * 256 * 8); for (int o = 0; o < 256 * 256 * 256; o++) - temp_lut[o] = o; + temp_lut[o] = o | 0xff000000; process_conversion_path (babl->fish_path.conversion_list, temp_lut, 4, lut, 8, @@ -971,7 +971,6 @@ _babl_fish_prepare_bpp (Babl *babl) int dest_not_associated = ((babl->conversion.destination->format.model->flags & BABL_MODEL_FLAG_ASSOCIATED)==0); - if ( (babl->conversion.source->format.type[0]->bits < 32)