04-17-2012, 07:18 PM | #91 |
Zealot
Posts: 130
Karma: 10000
Join Date: Mar 2012
Device: Kindle 3G, Kindle Touch 3G, iRiver Story HD, Sony Reader
|
One thing I noticed with website is that is doe snot actually flash - as in painting the entire screen black and then white and then repainting, but simply repaints everything in black and white, and then paiting in the grey.
Regarding what geekmaster said about only dithering the video portion, actually it may work. I noticed that not the entire screen is updated, only a selected area. It should be possible to have an algorithm that initiall paints everything in gray. But if an area is updated 3 or 5 times consecutively, it starts to be dithered. Thanks, James |
04-17-2012, 11:05 PM | #92 |
Zealot
Posts: 130
Karma: 10000
Join Date: Mar 2012
Device: Kindle 3G, Kindle Touch 3G, iRiver Story HD, Sony Reader
|
One other observation regarding dithering. I opened up a xls file with the VNC. It seems that what appears black is dithered and what appears white is also dithered. If you can set a lower cutoff, below which it is considered black and shown as black and not dithered, and an uppder cutoff, above which it is considered white and shown as white and not dithered, I think it will greatly improve the algorithm.
I wish I can compile c programs to make changes. Unfortunatley I only have an Win 7 system... |
Advert | |
|
04-18-2012, 12:37 AM | #93 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
|
|
04-18-2012, 12:45 AM | #94 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
Or it could be integer round-off error. When doing fixed-point math, you need to add half the divisor to the numerator before dividing. In dithering a 6-bit value, that would put the "error in the middle (value 32) instead of at white or black. Last edited by geekmaster; 04-18-2012 at 12:48 AM. |
|
04-18-2012, 02:07 AM | #95 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
(reserved). (information I HAD here needs updating).
Last edited by geekmaster; 04-18-2012 at 02:10 AM. |
Advert | |
|
04-18-2012, 08:15 PM | #96 |
Zealot
Posts: 130
Karma: 10000
Join Date: Mar 2012
Device: Kindle 3G, Kindle Touch 3G, iRiver Story HD, Sony Reader
|
Hi,
I am not sure this is dithering error. I am not sure that the original Windows screen is pure black or pure white, and this causes dithering to show dots. With cutoffs, this can make the screen look much better. Thanks, James |
04-19-2012, 01:46 AM | #97 |
Zealot
Posts: 130
Karma: 10000
Join Date: Mar 2012
Device: Kindle 3G, Kindle Touch 3G, iRiver Story HD, Sony Reader
|
Hi,
I am trying to compile the vnc client on tcc in the kindle itself. I don't have the lua or rfb libraries. It is OK to comment out the lua, correct? Do you know where I can get the rfb, and maybe lua? Thanks, James |
04-19-2012, 03:20 AM | #98 |
Wizard
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
|
Yep, the dithering (in this case: halftoning) is not really fit to the input parameters, I think. Thus a few "frackles" are left on pure-white areas (I think, or were it the pure-black areas?). However, this mode isn't really made for reading text. The resolution is _low_. But it was asked for, so I did it (and I was curious, too).
jmseight: It will be OK to comment out Lua, but you won't have input support then. However there is no way around libvncclient (it brings the set of rfb* functions). It's (ironically) part of libvncserver. http://libvncserver.sourceforge.net/ It will probably a bit of work to compile it with a TCC toolchain, though. Though I could be wrong. I never tried (yet). |
04-19-2012, 04:59 AM | #99 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
Spoiler:
You need to remember when scaling that the range for an 8x8 table is 65, not 64 values. If you have 6-bit values, you will either lose pure black, or you will lose pure white. You *could* subtract one from all the numbers above 32, sacrificing the 50-percent checkerboard (the best gray). You need to throw away ONE of the shades of gray somewhere in the palette to get 0-63... I still cannot remember why I thought I needed to add one to all my palette values. Last edited by geekmaster; 04-19-2012 at 05:27 AM. |
|
04-19-2012, 02:16 PM | #100 |
Zealot
Posts: 130
Karma: 10000
Join Date: Mar 2012
Device: Kindle 3G, Kindle Touch 3G, iRiver Story HD, Sony Reader
|
Hi,
I was thinking of something like this in the rfb16ToHalftonedFramebuffer4() function. From: Code:
if(c < *mp++) { dval |= 0x0F; } Code:
if(c <= BLK || (c <= WHT && c < *mp++)) { dval |= 0x0F; } Maybe BLK = 4 and WHT = 11 or something else. This would allow easy testing instead of changing the dithering table. I am not sure how to do this in geekmaster's formula... Thanks, James Last edited by jmseight; 04-19-2012 at 02:18 PM. |
04-19-2012, 02:48 PM | #101 |
Wizard
Posts: 1,379
Karma: 2155307
Join Date: Nov 2010
Location: Goettingen, Germany
Device: Kindle Paperwhite, Kobo Mini
|
Ah, yes, additional cut-offs. That would indeed be interesting. I'll try it :-) Might take a day, though...
|
04-19-2012, 04:01 PM | #102 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
I will make a new 8x8 dither version that uses values in the 0-255 range, adjusting the values in the dither table accordingly. That way we can display 8-bit PNG files without needing to rescale the pixel values to 0-64. In fact, I already tested this without changing the dither table by adding a little extra code (for testing). You can adjust brightness, contrast, gamma, invert (negative), and clamping (forcing values NEAR black or white to pure black or white), all by replacing numbers in the dither table. I am thinking of having multiple pre-computed dither tables, and you select which table you want when you call the setpx() function. I need a function that COMPUTES a dither table during one-time initialization, or any time you adjust display settings (brightness, contrast, gamma, etc.). It is nice when ALL the adjustments can be done by precomputing the dither table. Last edited by geekmaster; 04-19-2012 at 04:12 PM. |
|
04-19-2012, 07:41 PM | #103 |
Zealot
Posts: 130
Karma: 10000
Join Date: Mar 2012
Device: Kindle 3G, Kindle Touch 3G, iRiver Story HD, Sony Reader
|
Yep, I tried to replace the value in the table with your palpump demo.
I think the ability to generate dither table based on set of parameter will be very interesting. Thanks, James |
04-19-2012, 11:20 PM | #104 | |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
Quote:
I suppose I should publish a "Theory of Operation" for "Geekmaster Formula 42" at some point too. It took a few sleepless nights laying awake thinking about it, in order to figure it out in the first place. Last edited by geekmaster; 04-19-2012 at 11:41 PM. |
|
04-19-2012, 11:41 PM | #105 |
Carpe diem, c'est la vie.
Posts: 6,433
Karma: 10773668
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
|
AHA! EUREKA! (whatever) -- Clipping boundary values to limits DOES work, except you replace all values below 16 with 16 (not 0), and you replace all values above 48 with 48 (not 64). It all makes sense now. Any, I want to add sliders to my dithermatron (controlled by touch or 5-way pad) to adjust brightness, contrast, gamma, and high and low clipping pedestals in real-time, while it is running the animation.
Here is my 16-48 clipped dither table: PHP Code:
EDIT: Clipping the entire first row to all black really shows how BAD the ghosting is after individual black pixels are changed to white and then back to black again. The result is that pure black pixels only look dark gray. White on black background does not work acceptably for animation, IMHO. So we need to avoid black backgrounds when possible. Because the electric field that controls pixels affects neighboring pixels, you really need to change large areas to solid white or solid black to do a proper "reset" on the pixels to restore their full contrast range. A full flash erase assures that there are no edge pixels that get partial electric field crossover at high contrast boundaries on the display. Last edited by geekmaster; 04-19-2012 at 11:54 PM. |
Tags |
application, kindle, source, viewer, vnc |
Thread Tools | Search this Thread |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Free (GPLv2) Translation Dictionaries | Elleo | Amazon Kindle | 3 | 01-11-2011 10:57 PM |
Calibre native app on iphone for reading news? | bigreat | Calibre | 2 | 07-21-2010 11:50 PM |
Android Android App: VNC | leo315 | enTourage Archive | 4 | 05-13-2010 06:06 PM |
Android VNC viewer (use your PC from the eDGe!) | devseev | enTourage Archive | 2 | 04-11-2010 01:21 AM |
PalmPDF - native PDF Viewer for Palm OS 5.x | Colin Dunstan | Reading and Management | 2 | 11-23-2005 02:09 PM |