Re: [PATCH] cmake: Default to PNG_ARM_NEON=off for arm targets
John Bowler <[email protected]> Wed, 12 Oct 2022 09:49:35 -0700
| Newsgroups | gmane.comp.graphics.png.devel |
|---|---|
| Message-ID | <CAP7U39-zYrWLY7hLw1UTRJjRvwv5PM_MA0k4i=2khXGWw+oo=w@mail.gmail.com> |
--===============9119379608292802126== Content-Type: multipart/alternative; boundary="00000000000024cdd905ead92e68" --00000000000024cdd905ead92e68 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, Oct 12, 2022 at 12:30 AM Martin Storsj=C3=B6 <[email protected]> wro= te: > This matches the configure script - unless the user has requested > anything, no hardware optimizations are autoenabled. > In the configure build the default is to determine the optimizations to use based on the compiler; this is what all the checking in pngpriv.h does and note that it only does that checking if PNG_ARM_NEON_OPT is undefined. In other words the design is the libpng does hardware opts automagically and the only purpose of the configure --enable stuff is to override the compiler. If you check scripts/pnglibconf.h.prebuilt you will see than "PNG_ALIGNED_MEMORY" is set to on (defined) so the hardware opts which need it can be enabled, however the alignment is also there for general performance in the transforms by trying to align rows to cache boundaries (in fact it doesn't help much...) Setting PNG_ARM_NEON_OPT to anything overrides the code in pngpriv.h and means that a multilib build will not work as expected. IRC I wanted to actually remove the configure options but, of course, nothing must ever be removed... --00000000000024cdd905ead92e68 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div dir=3D"ltr">On Wed, Oct 12, 2022 at 12:30 AM Martin S= torsj=C3=B6 <<a href=3D"mailto:[email protected]">[email protected]</a>>= ; wrote:<br></div><div class=3D"gmail_quote"><blockquote class=3D"gmail_quo= te" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204= );padding-left:1ex">This matches the configure script - unless the user has= requested<br> anything, no hardware optimizations are autoenabled.<br></blockquote><div><= br></div><div>In the configure build the default is to determine the optimi= zations to use based on the compiler; this is what all the checking in pngp= riv.h does and note that it only does that checking if PNG_ARM_NEON_OPT is = undefined.</div><div><br></div><div>In other words the design is the libpng= does hardware opts automagically and the only purpose of the configure --e= nable stuff is to override the compiler.=C2=A0 If you check scripts/pnglibc= onf.h.prebuilt you will see than "PNG_ALIGNED_MEMORY" is set to o= n (defined) so the hardware opts which need it can be enabled, however the = alignment is also there for general performance in the transforms by trying= to align rows to cache boundaries (in fact it doesn't help much...)</d= iv><div><br></div><div>Setting PNG_ARM_NEON_OPT to anything overrides the c= ode in pngpriv.h and means that a multilib build will not work as expected.= </div><div><br></div><div>IRC I wanted to actually remove the configure opt= ions but, of course, nothing must ever be removed...</div></div></div> --00000000000024cdd905ead92e68-- --===============9119379608292802126== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============9119379608292802126== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ png-mng-implement mailing list png-mng-implement-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/png-mng-implement --===============9119379608292802126==--