Hi Marti,
More info related to the cmsFLAGS_COPY_ALPHA flag...
Please allow me to make some suggestions to improve the speed of
in-place color conversions (i.e., conversions of colors in a single
image, where no copy is occurring from one buffer to another):
1. Add these statements to the _cmsHandleExtraChannels() function:
// Exit early if in-place color-management is occurring -
no need to copy extra channels to themselves.
if (p->InputFormat == p->OutputFormat && in == out)
return;
I've tested the above and it does make a difference in speed for the
common/typical operation of in-place color-management.
2. I've also tested hand-optimizing copying the extra info for one
extra channel each for input/output - another very typical scenario -
and by reducing the array variables to simple variables the entire
innermost loop can be run only from registers. It does make a
difference in the speed when one extra channel is copied (e.g., for
RGBA). That actually brought the LittleCMS time to do the task on 8 bit
to 8 bit transforms in line with the optimized code we had already
written.
Here is a copy of the optimized c file. It's all yours to include in
the package if you'd like to use it. All of the changes are in the
_cmsHandleExtraChannels() function.
http://Noel.ProDigitalSoftware.com/temp/cmsalpha.c
Using Visual Studio 2015, the assembly instructions for the innermost
per-pixel loop for the optimized "one extra field" function are reduced
by the optimizer to this quite efficient set:
$LL7@cmsHandleE:
; 466 :
copyValueFn(DestPtr, SourcePtr);
mov rdx, rbx
mov rcx, rdi
call r15
; 468 : SourcePtr +=
SourceIncrements[0];
add rbx, r14
; 469 : DestPtr +=
DestIncrements[0];
add rdi, r12
sub rsi, 1
jne SHORT $LL7@cmsHandleE
-Noel
From: Marti Maria [mailto:marti.ma...@littlecms.com]
Sent: Mon, June 6, 2016 3:36 PM
To: lcms-user@lists.sourceforge.net
Subject: [Lcms-user] lcms2-2.8 release candidate 1 available for testing
Hi,
After some time of inactivity I've taken again the development of lcms,
so here is the first release candidate for lcms 2.8
Most of code is sponsored by Alien Skin Software, thank you so much for
this great contribution!
Aside of bugfixes, 2.8 does support alpha channel transportation and a
new transform stride function and plug-in which can be used to increase
significantly the processing speed.
See here the release candidate
http://www.littlecms.com/lcms2-2.8rc1.tar.gz
Best regards
Marti Maria
The LittleCMS project
http://www.littlecms.com
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
Lcms-user mailing list
Lcms-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lcms-user