Yu-Ping Wu has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/45235 )
Change subject: libpayload: cbgfx: Fix 'equals' counter for Lanczos resampling ......................................................................
Patch Set 4:
(1 comment)
https://review.coreboot.org/c/coreboot/+/45235/3/payloads/libpayload/drivers... File payloads/libpayload/drivers/video/graphics.c:
https://review.coreboot.org/c/coreboot/+/45235/3/payloads/libpayload/drivers... PS3, Line 882: sample[sx][sy] = *last_sample;
I'm confused what you're trying to add with the whole last_sample thing, it doesn't seem to be neces […]
This is not all about the speed. It's just not easy to initialize with the right order while keeping the code clean. Considering that
1. The sample array for 0 <= sx < S0 needs to be initialized first, since the case 'sx - S0 >= dim_org->width' will need these values (another bug in the original implementation). 2. I'd like to have only one occurrence of pal_to_rgb() in this block of code. 3. I'd also like to avoid too many calls to pal_to_rgb() for 0 <= sx < S0
this is the best way I can think of right now. Dropping condition #3, we could get rid of 'last_sample' (see PS4). Do you think it's better?