Kodi Community Forum
New JPEG encoder discussion - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
+--- Thread: New JPEG encoder discussion (/showthread.php?tid=118967)



New JPEG encoder discussion - Kempniu - 2012-01-06

I am starting this thread as per theuni's request in pull request #604 discussion. I hope this forum is the correct one. I have tried out the brand new JPEG encoder implemented by theuni in his GIT repo. Unfortunately I haven't seen any real speed improvement for thumbnail generation, which is why I am posting a debug log from my box.

http://paste2.org/p/1854667

Speed demonstration (Intel Atom CPU):

http://www.youtube.com/watch?v=thuaxQS9ASc


- theuni - 2012-01-07

Looking at your log, I just don't see how it wouldn't be at least 4x faster. Could you please do a quick "before" video showing the thumbnailing of the same images?

One other thing to try: the line for a 1/8 decode for a 12mpix picture is 500pix. Mind setting your thumb size to 480 and trying again? Just for giggles.

http://wiki.xbmc.org/index.php?title=Userdata/advancedsettings.xml#.3Cthumbsize.3E


- Kempniu - 2012-01-07

First, please accept my apology - the new JPEG encoder is indeed faster. Here is a video demonstrating thumbnailing speed of the same images on Eden Beta 1:

http://www.youtube.com/watch?v=woLdLUaKEks

Second, setting <thumbsize>480</thumbsize> increases thumbnailing speed even more. Here's a video:

http://www.youtube.com/watch?v=jdytELchIKw

And here's the log:

http://paste2.org/p/1856068

Third, for a collection of several hundred photos, I still cannot deem that speed as satisfying. That's my personal opinion of course. That said, I've rarely seen 12 Mpix+ photos in other people's collections. Gathering input from more users would probably be useful.


- theuni - 2012-01-07

Ok, that makes me feel better.

I've done a good bit of testing, and it looks like diminishing returns are involved here. Normal (~720p) images are massively sped up. Huge (12-20mpix) images are only sped up somewhat. But they're still faster, so I'll take it.

You'll see another big gain by switching to libjpeg-turbo if you haven't already.


- Kempniu - 2012-01-09

I've already switched to jpeg-turbo some time ago. It was quite an improvement.

Regarding the original pull request, feel free to close it if you wish. As I've mentioned above, I'm still sticking with my patch anyway - most of my folders contain several hundred 12 Mpix images, so I can't afford waiting 5 minutes for thumbnail generation. I guess Atom simply can't do any better. My opinion would probably be quite different if I owned an i5.


- dtviewer - 2012-01-10

Kempniu Wrote:I've already switched to jpeg-turbo some time ago. It was quite an improvement.

Regarding the original pull request, feel free to close it if you wish. As I've mentioned above, I'm still sticking with my patch anyway - most of my folders contain several hundred 12 Mpix images, so I can't afford waiting 5 minutes for thumbnail generation. I guess Atom simply can't do any better. My opinion would probably be quite different if I owned an i5.

The number one reason I recently retired my Atom (Revo 1600) and built an inexpensive XBMC HTPC is because it was so painfully slow when viewing my photos.
Photography is a big hobby of mine and like you I have hundreds of fairly large jpg files in folders.

(BTW, the htpc I built uses an AMD A4-3400 w/windows 7 and scrolling through hundreds of pictures is pretty much instant and there is basically no waiting for thumbnails render. As I scroll down they are there.)


- Robotica - 2012-01-11

dtviewer Wrote:The number one reason I recently retired my Atom (Revo 1600) and built an inexpensive XBMC HTPC is because it was so painfully slow when viewing my photos.
Photography is a big hobby of mine and like you I have hundreds of fairly large jpg files in folders.

(BTW, the htpc I built uses an AMD A4-3400 w/windows 7 and scrolling through hundreds of pictures is pretty much instant and there is basically no waiting for thumbnails render. As I scroll down they are there.)



Good to know an a4-3400 is capable but XBMC is designed to run on low powered hardware and most people still run their atom/ion. Only problem is that the picture-section doesn't had the attention the video-section had. But it's getting better and better.


- bharath23 - 2012-02-14

I was wondering what needs to be done to switch to jpeg-turbo. I have installed jpeg-turbo to /usr/local/lib configure doesnt seem to pick it up do I need to pass some specific option to configure to pick it up.


- jmarshall - 2012-02-15

The ideal would be to do both (exif decode first, full decode that replaces that second).

Really though, it's only an issue the very first time you view the directory, and at < 1 second a file, even for several hundred it isn't that much of an issue.

In fact, part of the slowness for later images is the way the picture thumb loader works - it's a single threaded, so if you scroll to the bottom those won't get their thumbs until all the others are generated. This has changed in one of the branches I have - i.e. thumbs are all handled purely in the texture cache and are cached via jobs (independent threads) - the texture load threads have higher priority, so if you scroll down to the end, those images will be decoded before some of the ones you scrolled past. This basically means that you really only have to wait for what you're looking at to load, no matter where you are in the list.

I might see if I can merge that in before I'm done with the rest of my changes (video thumbs to the texture cache).

Cheers,
Jonathan


- davilla - 2012-02-15

bharath23 Wrote:I was wondering what needs to be done to switch to jpeg-turbo. I have installed jpeg-turbo to /usr/local/lib configure doesnt seem to pick it up do I need to pass some specific option to configure to pick it up.

libjpeg-turbo creates a lib that 'looks' identical to libjpeg. ldd xbmc.bin and see that it's using the one you created.


- bharath23 - 2012-02-16

Thanks, I just needed to set my LD_LIBRARY_PATH for xbmc to pick it up. I really dont have to pass anything to configure script.