On Thu, 13 Apr 2023 21:24:30 GMT, Sergey Bylokhov <[email protected]> wrote:
>> Support of premultiplied alpha is added to the "accelerated" code path of >> the CMM. It is implemented on top of the new feature added to the littlecms >> library in 2.13 and 2.15. >> >> The next formats are now "supported": TYPE_INT_ARGB_PRE, >> TYPE_4BYTE_ABGR_PRE, and any custom images which use the >> ComponentColorModel+8-bit-precision like RGBApre or ApreBGR. >> >> After this patch, we will fully support all our standard types(8-bit >> precision), and mostly any combinations of blits between them, having two >> exceptions: >> * lcms does not convert pre-alpha for transparent src if dst is opaque >> * lcms does not set correct alpha(=1.0) for transparent dst if src is opaque >> >> Both of them are "features", so we probably need to implement a workaround >> someday, but for now we will use our generic/slow code. >> >> Performance results for the ColorConvertOp.filter() for images with >> premultiplied alpha. >> >> | Test | Base(avgt in us/op) | Fix(avgt in us/op) | Improvement % | >> | ------------- | ------------- | ------------- |------------- | >> | 32 Threads, from=sRGB:size=10:to=CIEXYZ | 97| 12| 708% | >> | 32 Threads, from=sRGB:size=100:to=CIEXYZ | 8 013 | 617 | 1199% | >> | 32 Threads, from=sRGB:size=1000:to=CIEXYZ | 651 838 | 104 969| 521% | >> | 1 Thread, from=sRGB:size=10:to=CIEXYZ | 21| 5| 320% | >> | 1 Thread, from=sRGB:size=100:to=CIEXYZ | 677 | 300 | 126% | >> | 1 Thread, from=sRGB:size=1000:to=CIEXYZ | 60 095 | 30 536 | 97% | > > Sergey Bylokhov has updated the pull request incrementally with one > additional commit since the last revision: > > SkipSampleModel re-ran all tests including your new one. This time everything definitely passes. ------------- Marked as reviewed by prr (Reviewer). PR Review: https://git.openjdk.org/jdk/pull/13095#pullrequestreview-1396111348
