Uses clz and bsr instructions for bit counting on ARM64 platforms as well.


git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1413 632fc199-4ca6-4c93-a231-07263d6284db
Make TJCompressor.close() and TJDecompressor.close() idempotent


git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1415 632fc199-4ca6-4c93-a231-07263d6284db
Sometimes the sampling factors in grayscale images can be > 1 (for instance, if compressing using 'cjpeg -sample 2x2 -grayscale'.)  Technically, sampling factors have no meaning with grayscale JPEGs, and the libjpeg decompressor ignores them in that case.  Thus, the TurboJPEG decompressor should ignore them as well.


git-svn-id: svn://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1417 632fc199-4ca6-4c93-a231-07263d6284db