4 ms·
Isn't there hardware support for JPEG decoding on most mobile devices? If so, I imagine it couldn't compete performance and battery life wise. I remember Mozil
by tambourine_man 12y ago
Isn't there hardware support for JPEG decoding on most mobile devices?
If so, I imagine it couldn't compete performance and battery life wise.
I remember Mozilla did a software video decoder once in JavaScript.
Still, it is quite amazing.
- leeoniya 12y agothis will definitely need to be hardware-supported for decoding. on my phone, the decode time far exceeds the time it would take to serve up a bigger jpg file. the demos reminded me what browsing on dialup was like. in fact dialup was better cause at least the decoding/loading was progressive/incremental, which doesnt seem to be the case here. i assume it's just the way the decoder is implemented?
- 0x0 12y agoAlso unfortunately it seems to crash MobilrSafari something fierce when you start to zoom. :-/
- vidarh 12y agoIt just needs to be implemented natively. On the demo page the decoding is done in javascript.
- dletozeun 12y agoA native implementation like the JPEG decoder would be fine. The bundled JS decoder implementation is elegant but not efficient on mobile platform (stalling here for seconds on iPad 3 / iOS 8 / chrome while JPEG ones are displayed instantaneously)
- expr- 12y agoI decided to give it a try on a low-spec Android tablet, running latest version of Firefox. Got coloured horizontal stripes instead of a proper picture for every BPG example – and not just once; I was unable to view the images on the tablet. Not quite production-ready, I think.
- masklinn 12y agoSimilar issue with Firefox/Android, the Lena BPG images are completely scrambled to hell. Safari/iOS and Chrome/Android worked with no issue. Desktop Firefox also worked.
- TD-Linux 12y agoSome devices do have hardware JPEG decoding, however all mobile browsers do software JPEG decoding, often with the SIMD-accelerated libjpeg-turbo. This is the software video decoder, by the way: https://github.com/brion/ogv.js https://github.com/brion/ogv.js
- mronge 12y agoHow come all mobile browser uses software JPEG decoding? Is it because of the startup latency of the hardware decoder?
- josephagoss 12y agoMy guess is that the average mobile CPU speed makes decoding a minor time factor within the process of getting an image from server to the clients screen. If this is the case, then putting in a hardware decoder would be a needless expense.
- jlebar 12y agoI used to own the jpeg decoder at Mozilla, and this was certainly the case last time I looked at it. Even without SIMD, JPEG decoding is pretty cheap compared to most of the things the browser does. I certainly wasn't clamoring for someone to burn JPEG into silicon; I had other things keeping me up at night.
- acqq 12y agoStrange: JPG is, when compressed, order of times smaller than uncompressed, so if the graphic card would accept the compressed image, the amount of used memory bandwidth can significantly decrease. I also believe that the graphic card can achieve more parallelisation and therefore handle much bigger JPG images, which we produce all the time with always bigger cameras. I believe that some browsers actually keep in RAM all the images uncompressed, that can acually be the reason that makes the potential for optimizations less obvious.