New JPEG encoder discussion

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Kempniu Offline
Member
Posts: 66
Joined: Apr 2011
Reputation: 0
Post: #1
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
(This post was last modified: 2012-01-06 12:51 by Kempniu.)
find quote
theuni Offline
Team-XBMC Communication Manager
Posts: 1,105
Joined: Oct 2007
Reputation: 2
Location: Atlanta, Ga, USA
Post: #2
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=Use...umbsize.3E
find quote
Kempniu Offline
Member
Posts: 66
Joined: Apr 2011
Reputation: 0
Post: #3
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.
find quote
theuni Offline
Team-XBMC Communication Manager
Posts: 1,105
Joined: Oct 2007
Reputation: 2
Location: Atlanta, Ga, USA
Post: #4
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.
find quote
Kempniu Offline
Member
Posts: 66
Joined: Apr 2011
Reputation: 0
Post: #5
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.
find quote
dtviewer Offline
Fan
Posts: 664
Joined: Jul 2008
Reputation: 1
Post: #6
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.)
find quote
Robotica Offline
Banned
Posts: 1,202
Joined: Aug 2010
Post: #7
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.
find quote
bharath23 Offline
Senior Member
Posts: 120
Joined: May 2011
Reputation: 0
Post: #8
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.
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 26,230
Joined: Oct 2003
Reputation: 177
Post: #9
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

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
davilla Offline
Retired-Team-XBMC Developer
Posts: 11,508
Joined: Feb 2008
Reputation: 64
Post: #10
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.


MediaInfo : http://mediainfo.sourceforge.net/
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
find quote
bharath23 Offline
Senior Member
Posts: 120
Joined: May 2011
Reputation: 0
Post: #11
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.
find quote