[maemo-developers] N800 WebCam example - poor performance - how to solve

From: Edgard Lima edgard.lima at indt.org.br
Date: Tue Feb 27 16:18:33 EET 2007
For people try the example bellow

http://maemo.org/platform/docs/howtos/howto_camera_api_bora.html

We have a the following problem:

1- ffmpecolorspace element is consuming almost all cpu to convert from 
yuv (captured from camera) to rgb (to be converted to jpeg) in the 
example above

2- try to remove the code that save it to jpeg and ffmpegfcolorspace 
together with it

The problem is:

v4l2 drive and v4l2src works with both yuv and rgb on N800

...But

xvimagesink works only with yuv on N800 and the algoritm to convert to jpeg

try to compile ximagesink (not xVimagesink) and put the camera to work 
in rgb mode (v4l2src ! caps file rgb ! ximagesink ...)- unfortunatelly 
ximagesink is too slow (may be it is better than use ffmpegcolor 
space...try it)

try also sdlvideosink (I think it use X, I really don't know if it will 
also have the rgb limitation...try it)

try to modify create_jpeg algorithm to work with yuv. it fdoesn't work 
will end-up the same cpu penality as use ffmpegcolorspace

How to solve the example that saves it to jpeg :

assossiate gst_pad_add_buffer_probe(cb_have_date) before 
ffmpegcolorspace and change the size of the buffer (GstBuffer) to zero 
...I hope it works (if not....tell me I will think about a way to make 
ffmpegcolorspace work only when it is time to save the image )

BR,
Edgard Lima
edgard.lima at indt.org.br



More information about the maemo-developers mailing list