View Single Post
Old 10-22-2012, 10:27 AM   #35
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021142
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by Lydovig View Post
Sorry for my English.

Here:

http://www.mobileread.com/forums/sho...h+video+player

a moving image is formed faster and better, is it possible to apply this principle in your flash player?
After ANOTHER enormous amount of messing around. I still cant get the gst stuff to work mate

I would politely suggest that what is in fact needed is an ordered dither algorithm http://www.mobileread.com/forums/sho...d.php?t=176802
there is one implementation.

Also the source code for GnuBoy contains a 2 bit ordered dither implementation IIRC. I should go check. and probably the VNC client that hawhill built has one in too.

Obviously the Geekmaster video player also calls on this method (albeit a slightly older version IIRC)

The code is out there. needs welding back into the other apps.

I am struggling if I am honest with the concepts and currently failing to implement an ordered dither in SDL. but this is the solution probably.

: ) HTH

EDIT: There is quite a lot of "fiddling about" to be done to support all the various devices.

falling back to a simple system("eips ''") at least should invoke some response of all of them rather than the system level driver calls like:
ioctl(fd, FBIOGET_FSCREENINFO, &finfo) as they fail on my device. and others.


EDIT...

Here's a bit ripped from gnuboy's pallete update section....
I think this is the bit that refactors the pallete. Could be wrong

Spoiler:
PHP Code:

uint8_t odither_e
[] = { 0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF,
0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF,
0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF,
0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF,
0xFF0xFF0xFF0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F,
0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F,
0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F,
0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F,
0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F,
0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F,
0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F,
0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F0x0F,
0x0F0x000x000x000x000x000x000x000x000x000x000x000x00,
0x000x000x000x000x000x000x000x000x000x000x000x000x00,
0x000x000x000x000x000x000x000x000x000x000x000x000x00,
0x000x000x000x000x000x000x000x000x000x000x000x000x00,
0x000x000x000x000x000x000x000x000x000x000x000x000x00,
0x000x000x000x000x000x000x000x000x000x000x000x000x00,
0x000x000x000x000x000x000x000x000x000x000x000x000x00,
0x000x000x000x000x000x000x000x000x000x000x000x00 };
uint8_t odither_o[] = { 0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF,
0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF,
0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF,
0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF,
0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF,
0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF,
0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF,
0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF0xFF,
0xFF0xFF0xF00xF00xF00xF00xF00xF00xF00xF00xF00xF00xF0,
0xF00xF00xF00xF00xF00xF00xF00xF00xF00xF00xF00xF00xF0,
0xF00xF00xF00xF00xF00xF00xF00xF00xF00xF00xF00xF00xF0,
0xF00xF00xF00xF00xF00xF00xF00xF00xF00xF00xF00xF00xF0,
0xF00xF00xF00xF00xF00xF00xF00xF00xF00xF00xF00xF00xF0,
0xF00xF00xF00xF00xF00xF00xF00xF00xF00xF00xF00xF00xF0,
0xF00xF00xF00xF00xF00xF00xF00xF00xF00xF00xF00xF00xF0,
0xF00xF00xF00xF00xF00xF00xF00xF00xF00xF00xF00xF00xF0,
0x000x000x000x000x000x000x000x000x000x000x000x000x00,
0x000x000x000x000x000x000x000x000x000x000x000x000x00,
0x000x000x000x000x000x000x000x000x000x000x000x000x00,
0x000x000x000x000x000x000x000x000x000x000x000x00 };

void vid_end()
{
    
int xy;
    
uint8_t *src;
    
uint8_t *dst_e;
    
uint8_t *dst_o;
    
int skip finfo.line_length*160 * (vinfo.bits_per_pixel >> 2);

//    if(0 == c++ % 2) { /*frameskip*/
        
src fbtemp;
        if(
vinfo.bits_per_pixel == 4) {
            
dst_e fbdata + (xoffs >> 1) + yoffs finfo.line_length;
            
dst_o dst_e finfo.line_length;

            for(
0144y++) {
                for(
0160x++) {
                    *
dst_e odither_e[*src];
                    *
dst_o odither_o[*src];
                    
dst_e++;
                    
dst_o++;
                    
src++;
                }
                
dst_e += skip;
                
dst_o += skip;
            }
        } else { 
// 8bpp
            
dst_e fbdata xoffs yoffs finfo.line_length;
            
dst_o dst_e finfo.line_length;

            for(
0144y++) {
                for(
0160x++) {
                    *
dst_e odither_e[*src] & 0xF0;
                    *
dst_e = *dst_e | (*dst_e >> 4);
                    
dst_e++;
                    *
dst_e odither_e[*src] & 0x0F;
                    *
dst_e = *dst_e | (*dst_e << 4);
                    
dst_e++;
                    *
dst_o odither_o[*src] & 0xF0;
                    *
dst_o = *dst_o | (*dst_o >> 4);
                    
dst_o++;
                    *
dst_e odither_o[*src] & 0x0F;
                    *
dst_e = *dst_o | (*dst_o << 4);
                    
dst_o++;
                    
src++;
                }
                
dst_e += skip;
                
dst_o += skip;
            }
        }
        
update_area_t myarea;
        
myarea.x1 xoffs;
        
myarea.x2 320 xoffs;
        
myarea.y1 yoffs;
        
myarea.y2 288 yoffs;
        
myarea.buffer NULL;
        
myarea.which_fx fx_update_partial;
        
ioctl(fdFBIO_EINK_UPDATE_DISPLAY_AREA, &myarea);
//    }



the last bit: ioctl(fd, FBIO_EINK_UPDATE_DISPLAY_AREA, &myarea);
I would probably shelve and just update the lot.

you get the idea anyways.
bit shift palette to black and white in an ordered way.

This would be a code level change. for sure.

Last edited by twobob; 10-22-2012 at 10:45 AM. Reason: links
twobob is offline   Reply With Quote