{"action":"created","issue":{"url":"https://api.github.com/repos/libjpeg-turbo/libjpeg-turbo/issues/49","labels_url":"https://api.github.com/repos/libjpeg-turbo/libjpeg-turbo/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/libjpeg-turbo/libjpeg-turbo/issues/49/comments","events_url":"https://api.github.com/repos/libjpeg-turbo/libjpeg-turbo/issues/49/events","html_url":"https://github.com/libjpeg-turbo/libjpeg-turbo/pull/49","id":126777520,"number":49,"title":"ARM64 NEON SIMD encoding functions","user":{"login":"mayeut","id":9768336,"avatar_url":"https://avatars.githubusercontent.com/u/9768336?v=3","gravatar_id":"","url":"https://api.github.com/users/mayeut","html_url":"https://github.com/mayeut","followers_url":"https://api.github.com/users/mayeut/followers","following_url":"https://api.github.com/users/mayeut/following{/other_user}","gists_url":"https://api.github.com/users/mayeut/gists{/gist_id}","starred_url":"https://api.github.com/users/mayeut/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mayeut/subscriptions","organizations_url":"https://api.github.com/users/mayeut/orgs","repos_url":"https://api.github.com/users/mayeut/repos","events_url":"https://api.github.com/users/mayeut/events{/privacy}","received_events_url":"https://api.github.com/users/mayeut/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2016-01-15T00:06:32Z","updated_at":"2016-01-17T03:32:08Z","closed_at":"2016-01-16T01:37:28Z","pull_request":{"url":"https://api.github.com/repos/libjpeg-turbo/libjpeg-turbo/pulls/49","html_url":"https://github.com/libjpeg-turbo/libjpeg-turbo/pull/49","diff_url":"https://github.com/libjpeg-turbo/libjpeg-turbo/pull/49.diff","patch_url":"https://github.com/libjpeg-turbo/libjpeg-turbo/pull/49.patch"},"body":"Compression speedups relative to libjpeg-turbo 1.4.2:\r\n\r\nApple A7 (iPhone 5S), iOS, 64-bit\r\nartificial.ppm Q100 4:4:4 +104%\r\nartificial.ppm Q95 4:4:4 +129%\r\nartificial.ppm Q95 4:2:2 +146%\r\nartificial.ppm Q95 4:2:0 +150%\r\nnightshot_iso_100.ppm Q100 4:4:4 +58%\r\nnightshot_iso_100.ppm Q95 4:4:4 +113%\r\nnightshot_iso_100.ppm Q95 4:2:2 +124%\r\nnightshot_iso_100.ppm Q95 4:2:0 +128%\r\n\r\nRefer to #44 for more details.\r\n\r\nThis commit also removes the unnecessary\r\n`if (simd_support & JSIMD_ARM_NEON)`\r\nstatements from the jsimd* algorithm functions.  See commit 499c470b63fb427791b2602fcc0d3f165a81144c\r\n\r\nDoes not include Huffman encoding. Refer to #47"},"comment":{"url":"https://api.github.com/repos/libjpeg-turbo/libjpeg-turbo/issues/comments/172287013","html_url":"https://github.com/libjpeg-turbo/libjpeg-turbo/pull/49#issuecomment-172287013","issue_url":"https://api.github.com/repos/libjpeg-turbo/libjpeg-turbo/issues/49","id":172287013,"user":{"login":"ssvb","id":78642,"avatar_url":"https://avatars.githubusercontent.com/u/78642?v=3","gravatar_id":"","url":"https://api.github.com/users/ssvb","html_url":"https://github.com/ssvb","followers_url":"https://api.github.com/users/ssvb/followers","following_url":"https://api.github.com/users/ssvb/following{/other_user}","gists_url":"https://api.github.com/users/ssvb/gists{/gist_id}","starred_url":"https://api.github.com/users/ssvb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ssvb/subscriptions","organizations_url":"https://api.github.com/users/ssvb/orgs","repos_url":"https://api.github.com/users/ssvb/repos","events_url":"https://api.github.com/users/ssvb/events{/privacy}","received_events_url":"https://api.github.com/users/ssvb/received_events","type":"User","site_admin":false},"created_at":"2016-01-17T03:32:08Z","updated_at":"2016-01-17T03:32:08Z","body":"@mayeut\r\n> seems there are some nice things in all of this. I will try all of those on iPhone 5S & check that performances are improved.\r\n\r\nYes, the ``INS`` instructions removal and the change from ``LD2+UADDL`` to ``LD1+UADALP`` should be good for the performance on all ARM64 devices, including iPhone 5S.\r\n\r\n> The one change I doubt about on this specific SOC is replacing LD3 in jsimd_extrgb_ycc_convert_neon by a bunch of LD1\r\n\r\nThese patches had been presented mostly for an illustrative purpose only. Using 24 LD1 instructions is likely not the best approach and we can do a better job. They are just there to show that even this naive code easily outperforms the LD3 instruction on ThunderX. And because we can't rely on nice 3-element structure load instructions (which are a perfect fit for RGB24 data), some ideas about reordering channels can be probably borrowed from the SSE2 code.\r\n\r\nIt is always possible to do a runtime detection of ThunderX or other ARM processor variants (by reading /proc/cpuinfo) and have more than one implementation for some functions. Testing may become a pain though (multiple runs of 'make test' with different overrides via the use of environment variables).\r\n\r\n> One thing that I think may remain slow in jsimd_h2v2_downsample_neon on Cavium ThunderX (apart from what you said about pipelining) is how the last column block is handled (the expand right stuff). \r\n\r\nYes, sure. It was not the final variant of the code and it is also still missing the pipelining optimizations. My ARM Cortex-A53 based Pine64 board is still on the way from China to Europe (this may probably take 1 or 2 weeks) and I would like to make sure that the ARM64 code is fast on both Cortex-A53 and ThunderX instead of wasting time on prematurely fine-tuning it for just ThunderX alone.\r\n\r\n@dcommander \r\n> The RunAbove instance will likely go away soon, so it would be nice to get a finalized implementation before that happens.\r\n\r\nThey will switch the service from Alpha to Beta testing phase and this only means that people will have to apply for paid RunAbove instances when this happens. The service is still going to be affordable (something like $1 or $2 per month?). But registering an account with a credit card information is an extra inconvenience."}}