Rockbox Technical Forums

Rockbox Development => Feature Ideas => Topic started by: EricLecarde on June 07, 2020, 08:06:59 PM

Title: I branched my own version of PictureFlow, and I fixed a few bugs!
Post by: EricLecarde on June 07, 2020, 08:06:59 PM
I'm new in this forum so... first things first: hello Rockbox community!  :D

I've been using Rockbox for quite a while and I think it is really cool.

One thing I never liked though, was the lack of "Cover Flow" integration, as I think its an important part of the user experience. I love to scroll across my album collection while listening to the music, I find it very suggesting. I think for some users this could be a deal-breaker.

I know PictureFlow is included as a demo plugin, but for me it is contradictory to have PictureFlow integration through the WPS menu, but to have PictureFlow placed in an obscure deep corner of the OS menus. So... I started by modifying RockBox to include this feature as a Main Menu item.
Then, after using PictureFlow I realized some stuff could be improved or fixed, so I decided to take a look into the source code and I changed some stuff. I made my own version of PictureFlow with the following changes:

   - Albums are now grouped by Artist
   - Text shows Album and Artist. There is an option to configure whether you want to show one, both or none of them, and also the position of the text.
   - Album collisions are fixed. Albums with the same title merged. This is annoying since for example, many artist have a "MTV Unplugged". In my iPod, Mike Oldfield's "Discovery" merged with Daft Punk's one. Artwork was messed up too.
   - Album updating can be forced through a menu option. See "technical details" below.
   - I changed the empty slide bitmap.
   - I added some extra fields to the language file: I need them for the new configuration options. English and Spanish (I changed some stuff in there too as the translation was not 100% my style).
   - Going from WPS to PictureFlow dint work properly when more than one album with the same title. Fixed too.
   - Blank messages when re-scanning were fixed (minor fix, but a fix).

I recorded this demonstration to show the changes (sorry for the menus in spanish):

https://youtu.be/tgSRhnXLJa8 (https://youtu.be/tgSRhnXLJa8)

Technical details:

To achieve the mentioned functionality, I changed the query that builds up the album list to perform first an artist search. Buffer now keeps information of the artists. This works nice, however there is a downturn: the new query tends to perform very slow when the hard drive is spinning. Since I don't want to wait 50secs every time I open PictureFlow when the HD is spinning, I decided to implement a solution: After the scan, PictureFlow creates a binary file to keep the buffer information, and since then, every time PictureFlow is launched, this file is read. This solved the problem but now PictureFlow is unable to detect changes in the Database by itself. Every time we launch Pictureflow, the album list will be the same, and that is undesired.
My fix is silly: I simply added a menu option to perform a new re-scan and update of the album covers. It works and its convenient: In the past, I found myself fixing some artwork file in order to make it readable for PictureFlow, only to realize that I had to re-build all the cover information from the beginning in order to get my new non-progressive jpg files scanned. Now this wont happen, as the re-scan option will build the album index and will search only for the missing artwork cover files.

Well I think that's all, sorry for the long post.

I would be happy to share my changes with the Rockbox community if anyone is interested. Let me know what you think!

Regards and keep rockin! 
Title: Re: I branched my own version of PictureFlow, and I fixed a few bugs!
Post by: __builtin on June 07, 2020, 10:18:11 PM
We'd certainly be interested in your changes. If you're comfortable with Git (and using your real name so we can assign credit properly), see https://www.rockbox.org/wiki/UsingGit.

Otherwise you can upload your code somewhere accessible, and we can take care of it.
Title: Re: I branched my own version of PictureFlow, and I fixed a few bugs!
Post by: darkcity on June 08, 2020, 12:23:10 AM
Great work. Does album collision affect the text menu selection using search on 'Album'?
Title: Re: I branched my own version of PictureFlow, and I fixed a few bugs!
Post by: EricLecarde on June 08, 2020, 04:40:49 AM
Great work. Does album collision affect the text menu selection using search on 'Album'?

No, it is only a PictureFlow thing, due to the lack of Artist filter in the search algorithm.
Title: Re: I branched my own version of PictureFlow, and I fixed a few bugs!
Post by: EricLecarde on June 08, 2020, 04:46:02 AM
We'd certainly be interested in your changes. If you're comfortable with Git (and using your real name so we can assign credit properly), see https://www.rockbox.org/wiki/UsingGit.

Otherwise you can upload your code somewhere accessible, and we can take care of it.

Sure! I'll take a look and if I find some problem, I will let you know and just share the code directly. Thanks
Title: Re: I branched my own version of PictureFlow, and I fixed a few bugs!
Post by: Frankenpod on June 08, 2020, 12:11:28 PM
Wow, sounds great if you have that working.  I've been hoping for ages that someone could amend pictureflow so that you could browse albums grouped by artist, not just by album-name.  Tried to look into it myself but gave up (because I really couldn't figure out how the existing plug-in prepared it's database).  Does your patch make that a selectable option or does it make it that way by default? [Edit - I guess to allow that choice, there could be two seperate plug-ins, one that does it as the existing one does, plus one that does it by artist name as yours does...though that would require both to build their own art database separately, it might be the simplest way of allowing a choice]

I've also noticed that 'merging albums with same title' thing (comes up with all those "Best of" and "greatest hits").  That fix sounds like good work as well.  Hope this can be merged into the main release.  You have my thanks if it can be.
Title: Re: I branched my own version of PictureFlow, and I fixed a few bugs!
Post by: EricLecarde on June 08, 2020, 01:33:56 PM
Umm it is the way it works now by default. I thought about this...  and it is not easy to implement that option... I mean... Its possible but not straight forward, due to the way PictureFlow stores the information. PictureFlow keeps the information the way is provided by tagcache (database) after launching the initial query. To present the albums in an specific order you either have two options: 1 modifying the initial query or 2 provide data structures and algorithmic solutions to sort the information you got previously. It could be an extension for the future, why not.

What really bugs my mind though, is the fact that you have to provide non-progressive jpg files if you want PictureFlow to read the art of your albums. Right now I have a recursive bash script for linux that basically transforms any file named "[Cc]over.jpg" or "[Cc]over.png" into a proper non-progressive file. Lets say that I have a discography that I want to be shown properly within PictureFlow... What I usually do is to download the covers from google, and then I run the script before copying everything to the iPod and everything looks neat. It works for me... But I assume the average user can be annoyed by this limitation, and I would like to find a solution.
Title: Re: I branched my own version of PictureFlow, and I fixed a few bugs!
Post by: EricLecarde on June 08, 2020, 03:23:43 PM
We'd certainly be interested in your changes. If you're comfortable with Git (and using your real name so we can assign credit properly), see https://www.rockbox.org/wiki/UsingGit.

Otherwise you can upload your code somewhere accessible, and we can take care of it.

Uploaded, but with no reviewers assigned!

https://gerrit.rockbox.org/r/#/c/2411/ (https://gerrit.rockbox.org/r/#/c/2411/)

There are conflicts with other patches caused by the language files... life is hard.
Title: Re: I branched my own version of PictureFlow, and I fixed a few bugs!
Post by: millim on May 19, 2021, 01:01:30 PM
I'm new in this forum so... first things first: hello Rockbox community! :)

I am owning an ipod classic 6g since 2009. I came in touch with Rockbox somewhere around 2014/2015 time frame, putting it on the device and was really disappointed about the performance, user experience and battery life. So I moved back to the original firmware immediately, done..

Some weeks ago, I was searching for a picture flow souce code for another project I had in mind. It flashed to my mind that there was one implemented in Rockbox - from my first experience with Rockbox. Well, times go by and I have also reassessed the application to my ipod again. I have seen that there have been done a lot of improvements to the support of the classic 6g. Finally, I gave it a second try... hurray!

It is really impressive now how Rockbox performs on the classic 6g!!, WELL DONE! Battery life is comparable with the original FW, still with the original battery, and getting away from iTunes finally.. hurray!!

I have also checked the source code on adding DSP functions, have checked the sound quality processing, dithering, and the CS42L55 DAC management. Excellent work!! My idea was about digital room correction FIRs. But, dropped the idea quickly. However, the 108MHz/216MHz CPU might be capable to do FIRs up to 1000 taps, but the power efficiency / audiophile gain would be fairly limited.

Now back to the topic I am working on a solution...

I know PictureFlow is included as a demo plugin, but for me it is contradictory to have PictureFlow integration through the WPS menu, but to have PictureFlow placed in an obscure deep corner of the OS menus. So... I started by modifying RockBox to include this feature as a Main Menu item.

Well, it is a "shame" that the coverflow feature is hidden in the demo section of the plugins. I did the checkout of this patch together with the latest version available, compiled and copied to the device, reboot. Still, I see the plugin in the demo folder. Can somebody guide me where to do the modifications to see it at the root menu?

millim