Talk:Smedia Glamo 3362

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(Blitting Test doesn't work with hardware acceleartion)
 
(Audio Engine: format text)
 
(7 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Blitting Acceleration with X11 did not work. Wrote a sample programm to test it. It blits 32x32 tiles on 640x480. Speed is ca. the same as in SDL which uses software blitting. Its around 12 FPS. On my Ubuntu Desktop X11 there were 50%+ cpu using during SDL software blitting and 20% cpu usage during XLib hardware blitting using the same code (just other bits per pixel, 24 on desktop 16 on freerunner).
+
Blitting with XsetClipMask which isnt maybe supported in hardware. But quite fast. 50 FPS but every third second there only 11 FPS. Then it went up again to 50 FPS for 2 seconds. Dont know why maybe my code is messed up. There is a hardware accelerated method of blitting. But its not easy.  
  
Maybe I did something wrong like color spaces etc. Here is my source. Maybe someone can look over it. We have to say cleary what works and what not. Some programmers get angry when they trust a documentation and find out that is it wrong and their code wont work the way they want. Maybe we have to change this page and tell the people the accelerated blits dont work or that there some restrictions / dependencies. Link to source: [http://astabs.de/playground/xblit.tar.gz]
+
Source used for testing with images (just type make for building for the freerunner):
 +
http://www.easy-share.com/1911768113/myblit.zip
 +
 
 +
Faster Method:
 +
METHOD 2:
 +
    XCopyArea(display, pixmap, window, gcxor, 0, 0, w, h, x, y);
 +
    XSetForeground(display, gcand, 0);
 +
    XSetBackground(display, gcand, ~0);
 +
    XCopyPlane(display, mask, window, gcand, 0, 0, w, h, x, y, 1L);
 +
    XCopyArea(display, pixmap, window, gcxor, 0, 0, w, h, x, y);
 +
 
 +
  NOTE:  pixmap = colour pixmap    mask = 1 plane pixmap
 +
  It is pretty quick and you don't need clip masks, shape extensions etc.
 +
                              -- Justin Kibell  jck@jaguar.catt.citri.edu.au
 +
 
 +
http://www.int.gu.edu.au/~anthony/info/X/Programing.hints
  
 
----
 
----
 +
 +
Blitting with hardware acceleration is only supported in xlib '''NOT''' in SDL. The Size of the tiles should be big. I used 128x160 in a 640x480 resolution. Speed tests:
 +
 +
SDL:  32x32 tiles -> 13 FPS
 +
      128x160 tiles -> 3 FPS
 +
 +
 +
xlib: 32x32 tiles -> 12-13 FPS (300 blits)
 +
      128x160 tiles -> 35 FPS (15 blits)
 +
 +
You can try it for xlib. Scale bg.png up an down. You will notice the difference.
 +
oblit is the SDL blit, xblit is the xlib blit. I think that blitting is accelerated but sending blitting commands takes to much time. So a few big blits (maybe 20 or 30) are better then 300 small ones.
 +
Link to source: [http://astabs.de/playground/blits.tar.gz]
 +
 +
----
 +
 +
== Known Features ==
 +
 +
=== Audio Engine ===
 +
Is '''Audio Engine''' available?
 +
In case it can added to [[Smedia_Glamo_3362#Known_Features]].
 +
 +
Audio I/O:
 +
  '''DGPIO''' (Default DGPIO0 for audio codec IIC SCLK),
 +
  '''DGPIO1''' (Default DGPIO1 for audio codec IIC SDA),
 +
  '''DGPIO2''',
 +
  '''DGPIO3'''
 +
are accessible over Test-Points.
 +
 +
Audio I2S Bus:
 +
  '''ASDIN''' (I2S audio-in serial data)
 +
is accessible on resistor.
 +
 +
Description of Audio PIN:
 +
[http://people.openmoko.org/sean/datasheets/glamo3362/Glamo%203365%20Application%20Note%20V0.92-FIC.pdf Glamo 3365 Application Note V0.92-FIC.pdf]

Latest revision as of 19:05, 21 December 2011

Blitting with XsetClipMask which isnt maybe supported in hardware. But quite fast. 50 FPS but every third second there only 11 FPS. Then it went up again to 50 FPS for 2 seconds. Dont know why maybe my code is messed up. There is a hardware accelerated method of blitting. But its not easy.

Source used for testing with images (just type make for building for the freerunner): http://www.easy-share.com/1911768113/myblit.zip

Faster Method: METHOD 2:

   XCopyArea(display, pixmap, window, gcxor, 0, 0, w, h, x, y);
   XSetForeground(display, gcand, 0);
   XSetBackground(display, gcand, ~0);
   XCopyPlane(display, mask, window, gcand, 0, 0, w, h, x, y, 1L);
   XCopyArea(display, pixmap, window, gcxor, 0, 0, w, h, x, y);
 NOTE:  pixmap = colour pixmap    mask = 1 plane pixmap
 It is pretty quick and you don't need clip masks, shape extensions etc.
                             -- Justin Kibell  jck@jaguar.catt.citri.edu.au

http://www.int.gu.edu.au/~anthony/info/X/Programing.hints


Blitting with hardware acceleration is only supported in xlib NOT in SDL. The Size of the tiles should be big. I used 128x160 in a 640x480 resolution. Speed tests:

SDL: 32x32 tiles -> 13 FPS

     128x160 tiles -> 3 FPS


xlib: 32x32 tiles -> 12-13 FPS (300 blits)

     128x160 tiles -> 35 FPS (15 blits)

You can try it for xlib. Scale bg.png up an down. You will notice the difference. oblit is the SDL blit, xblit is the xlib blit. I think that blitting is accelerated but sending blitting commands takes to much time. So a few big blits (maybe 20 or 30) are better then 300 small ones. Link to source: [1]


[edit] Known Features

[edit] Audio Engine

Is Audio Engine available? In case it can added to Smedia_Glamo_3362#Known_Features.

Audio I/O:

 DGPIO (Default DGPIO0 for audio codec IIC SCLK),
 DGPIO1 (Default DGPIO1 for audio codec IIC SDA),
 DGPIO2,
 DGPIO3

are accessible over Test-Points.

Audio I2S Bus:

 ASDIN (I2S audio-in serial data)

is accessible on resistor.

Description of Audio PIN: Glamo 3365 Application Note V0.92-FIC.pdf

Personal tools

Blitting Acceleration with X11 did not work. Wrote a sample programm to test it. It blits 32x32 tiles on 640x480. Speed is ca. the same as in SDL which uses software blitting. Its around 12 FPS. On my Ubuntu Desktop X11 there were 50%+ cpu using during SDL software blitting and 20% cpu usage during XLib hardware blitting using the same code (just other bits per pixel, 24 on desktop 16 on freerunner).

Maybe I did something wrong like color spaces etc. Here is my source. Maybe someone can look over it. We have to say cleary what works and what not. Some programmers get angry when they trust a documentation and find out that is it wrong and their code wont work the way they want. Maybe we have to change this page and tell the people the accelerated blits dont work or that there some restrictions / dependencies. Link to source: [1]