![]() |
#196 |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
The (implied) question being answered was: "My application has a slow start-up from KUAL, I have to use . . .".
No reference made to amount of memory being used by cvm, either before, during, or after. |
![]() |
![]() |
![]() |
#197 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
I am recompressing bunny.gmv to bunny.gmv.xz as follows:
xz -z9 bunny.gmv For some reason the xv in the busybox-armv5l was not happy with the previous version. If this fails, I will see about building the xv in usbnet, because it worked with gmplay on my k5. For my pre-dithered videos, xz compresses them to about one-fourth the size of gzip versions. |
![]() |
![]() |
Advert | |
|
![]() |
#198 | |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
Anyway, I will have gmplay playing movies (with sound) on my K1 (and newer kindles) very soon (though I have chores to do, so hobby time is about to go on hold). |
|
![]() |
![]() |
![]() |
#199 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Aware of that. No kindlets unless somebody ADDS such support, anyway. I do not plan to do that, though I may make my native mode launcher menu KUAL-compatible to some extent. There is no reason to NOT add java support (and lua too) to a K1, is there?
![]() |
![]() |
![]() |
![]() |
#200 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Now this is strange. Even the bunny.gmv.gz that is a fresh download, working with gmplay (and zcat) on a K5, fails on the K1. For some reason, zcat reports "bad magic" when decompressing the video. I just compressed xv and bzip2 versions using my linux mint, but the .gz version did not change.
I could TRY using the zcat in the busybox-armv4l instead of /bin/zcat, but its xv already failed on me. I am curious why the (pre-build) decompressors are failing on the K1... I have yet to try bzcat though -- I will do that now. Perhaps it is because I compressed the files with -9 compression? Hmm... bzcat "decompression failed" too. Maybe old versions do not support -9 compression? Okay, time to copy the 300MB raw uncompressed video to my K1, and just use "cat"... Oops, K1 only has a 180MB userstore -- need to find my SD card and put vids there. Last edited by geekmaster; 05-14-2016 at 09:05 AM. |
![]() |
![]() |
Advert | |
|
![]() |
#201 | |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
Once you have figured out building dynamically linked applications for the K1. (Lua depends on using dlopen - it can only be built static for a specific purpose (I.E: all modules are statically linked in) ). I don't recall if Java pre-dates ARMv4 or not, I think it does. Maybe a little searching for ARMv4JT<...> would help answer that question. (I think Jazerle (sp?) implies thumb also) |
|
![]() |
![]() |
![]() |
#202 | |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#203 | |
Going Viral
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
The comment about 'j' option was just to coordinate the dates. The sources of the hardware assisted JVM are still under NDA. So only the relative dates of JVM introduction and ARMv4 being in use are possibly relevant. |
|
![]() |
![]() |
![]() |
#204 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
|
![]() |
![]() |
![]() |
#205 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
After modifying gmplay (my kindle video player) to use "/dev/fb/0" if "/dev/fb0" fails, it is now playing video on my K1. Though "playing" is relative. I am not packing the dithered pixels into 2-bit pixels, so the pixels are displaying double-width. And the video is negative (like the K4 in one of its modes). And it is only displaying about one frame every 2.5 seconds (significantly slower than on the DX).
I can probably speed it up if I shrink the video and only do partial updates of that smaller image. I already know I can do that on the DX and DXG, from how fast "newtrix" displays eink updates when the "random temporal dither" demo shrinks the work area way down. I can do that for video too. However, I am actually surprised that the ioctl video updates (two versions) in gmplay work on the K1, and that gmplay did not do the fallback to eips '' (which does not work on the K1). I need to tweak the "formula" so it treats the K1 like the K4, and inverts the video so no longer a negative image, and to do 2-bit packing so the pixels are no longer double width (displaying only the bottom half of the rotated image). Considering that gmplay had to have tweaks for each kindle model, and for various firmware versions, and for both main and diags boots, I was quite surprised to see it work with no changes on the PW1 (and later), and now also on the K1 by just changing the file name of the video framebuffer. When I do the output display size adjustments for higher speed, the DX and DXG should be a lot faster too. I guess what surprises me most is that display updates are even triggered by the existing code, considering that it does not use the "update_display" /proc file. EDIT: For this test, I piped the UNCOMPRESSED bunny.gmv into gmplay, because for some reason the built-in (busybox) zcat and bzcat (and the xz busybox-armv4l downloaded from busybox.net) ALL fail on the K1 when trying to decompress bunny.gmv.gz, or bunny.gmv,bz2, or bunny.gmv.xz, even though all those compression formats decompress just fine on newer kindles. I had to put the uncompressed bunny.gmv on SD card because it was much too big (286MB) for the 180MB K1 userstore. Interestingly, it my pre-dithered video is so "predictable" that it compresses all the way down to 15MB using xz (16MB for some versions of vx), about 20x compression ratio. I find it very strange that ALL the K1 decompressors claim the various formats of compressed files are "corrupt". What's up with that? Could it be that I used maximum (-9) compression, and the K1 decompressors are just too old to support that? Last edited by geekmaster; 05-15-2016 at 04:34 PM. |
![]() |
![]() |
![]() |
#206 |
BLAM!
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 13,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
|
@geekmaster: If you were using -9, it *might* be an OOM issue?
|
![]() |
![]() |
![]() |
#207 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Good point. Putting a swap file on SD card might resolve Out-Of-Memory issues, but with SD access SO SLOW on the K1, it may be a lot better to just use a lower compression rate (smaller compression block sizes). I cannot do swap over nbd when the K1 has no USB networking (or wifi), eh?
![]() ![]() Regarding the low video frame rate on my K1, I already pointed out how the SD card is PAINFULLY SLOW when mounted in the K1. I have not done speed tests, but it is HUGELY FASTER to remove the SD card and connect it directly to my computer to transfer files. I suspect that either the K1 is doing 1-bit serial access (SPI) to the SD card, or the mmc kernel driver has the same problems it did when I "fixed" it (made it MUCH faster, then lost my source code) a decade ago: http://uanr.com/mmc/ Beware that a bad power supply can kill your work drive and ALL your backup hard drives. I should have backed up to CD and/or DVD back then... Another problem is that gmplay naively does simple blocking reads and writes (and ioctl calls), to keep the code short and to the point (i.e. a demo). I could do async calls with double buffering, so the slow SD access overlaps the slow eink updates (but there was no need to add such extra complexity until now, discounting the slowness on DX/DXG). It all depends on how I want to invest my limited hobby time (unless somebody is willing to PAY me to do kindle development). ![]() Last edited by geekmaster; 05-15-2016 at 03:39 PM. |
![]() |
![]() |
![]() |
#208 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Instead of using the huge busybox-armv4l (with tons of features, as listed previously in this thread), which was downloaded from busybox.net (only used so far to decompress xz archives), I see that busybox in the aboriginal armv4l rootfs is tiny (few functions) and still supports xz decompression:
PHP Code:
|
![]() |
![]() |
![]() |
#209 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Just to put these all in one place, here are all the busybox versions I found that work on my K1:
PHP Code:
As can easily be seen, the busybox_k1 had no xv function, and the busybox-armv4l was more than a megabyte larger than the aborignal armv4l busybox. That memory savings more than makes up for the maximum buffer size needed for xv -9 compression (unless xv uses double-buffering, of course). We shall see. I am about to test with -4 compression. Last edited by geekmaster; 05-15-2016 at 05:22 PM. |
![]() |
![]() |
![]() |
#210 |
Carpe diem, c'est la vie.
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 6,433
Karma: 10773670
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Woohoo! xz-compressed (level -4) is playing video on my K1. There is no problem using 900KB compression buffers if you use a version of busybox that is more than 1MB smaller than the version that fails. That huge full-featured busybox-v4l is fine and dandy, provided you only do stuff that needs very little RAM.
And now Big Buck Bunny is playing at about 2.5FPS (it will say how many measured FPS in the log file when in finishes), reading COMPRESSED data from SD card. I will try again with -9 compression instead of -4 compression, and that should increase the framerate (still limited by sequential waits for SD card reads AND framebuffer updates). Eventually, though it will make my code bigger, I will do double buffering, so I can do simultaneous waitings (as opposed to much less efficient simultaneous waits). Asynchronous I/O has its benefits when extra speed is essential, as is using multithreaded execution (the simplest way to go when we add sound playback into the mix). So yeah, as mentioned in that 10-year-old "mmc" link I provided recently, reading from really slow SD card interfaces is much less of a problem if you are reading highly compressed data, and pre-dithered video compresses quite highly, which is a good thing when using eink displays. I have chores to do now -- I will fix my "double-width pixel" problem by adding 2-bit pixels packing to gmplay, and then I will port my changes into my "video plus sound" version of gmplay. EDIT: Big Buck Bunny finished played, and it reported on competion: 1163 frames in 621.7 secs = 1.9 FPS I thought it was faster than that, but that means that my estimated speed was probably also slower for the uncompressed video playing from SD card. Now I am going to try -9 xz compressed playback. The videos are copying to my SD card (slowly via the kindle on USB) now. EDIT2: Nope! With -9 compression it is reporting "xzcat: corrupted data" just like before. Perhaps the busybox xz function *is* double-buffering (which makes sense for a production program) and it needs almost 2MB to support a pair of 900KB compression buffers, and my smaller busybox only freed up about half that. That seems like an inappropriate error message though, in this case. I guess I could binary-search compression buffer sizes to see what works, but I may end up using something that will break on the next firmware update (if it leaves less free memory). I will just stick with -4 compression for now (diminishing returns, and other things to do with my limited time). EDIT3: I suspect that at some point I *will* add a swapfile (or swap partition on my SD card), and then perhaps I will revisit using xz -9 compression on my kindle videos, to see it it *can* work on my K1. I do not see any other way to free up RAM, because I am already running in the "update install" environment (though I *could* free up some by having my install script "exec /mnt/us/RUNME.sh" instead of "sh /mnt/us/RUNME.sh", but then my install script would have no opportunity to clean up after itself -- but I can design for that). Last edited by geekmaster; 05-15-2016 at 06:11 PM. |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
geekmaster vacation | geekmaster | Kindle Developer's Corner | 2 | 03-19-2012 09:18 PM |