<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
<META NAME="GENERATOR" CONTENT="GtkHTML/4.2.3">
</HEAD>
<BODY>
Hello BogDan<BR>
<BR>
I am making some work with android multimedia too, but in Camera support and I make some progress that I can share with you.<BR>
<BR>
<BR>
I started with QtCamera.java/androidcamjni.cpp available in your sdk, and tried direct render the image previews received in androidcamjni.cpp to a QDeclarativeItem. The performance was not good.<BR>
<BR>
I look in QtCamera.java and saw that frames are encoded to jpeg , and later loaded to QImage, I decided elimate this step, sending the bytearrey of preview direct to CPP side and use a Method from Ketai project! (decodeYUV420SP) to decode frame. After running, it continue slow.<BR>
<BR>
However, I am running qt with opengl enabled, then I decided upload YUV frame like a texture and make de YUV decode in a shader. It now it is fast. I can't see differences in my camera support (800x600) and the camera from Android application. <BR>
<BR>
I have only one problem implementing the shader. the YUV format appears like that:<BR>
YYYYYYYYY<BR>
UVUV<BR>
<BR>
When I tried to load this like textures, I choose first load in two textures, one with Y component of type GL_LUMINANCE and other with UV component with a type GL_LUMINANCE_ALPHA . In fragment shader I tried load these components but the GL_LUMINANCE_ALPHA has some kind of bug that the components are not load correctly. Then I decided to unscramble the image in this format:<BR>
YYYYYYYYY<BR>
UUVV<BR>
<BR>
Then I load the U and V texture separately. <BR>
<BR>
<BR>
On Thu, 2012-05-03 at 19:07 +0300, BogDan Vatra wrote:<BR>
<BLOCKQUOTE TYPE=CITE>
<TT><FONT COLOR="#2e3436">RGB,</FONT></TT>
</BLOCKQUOTE>
</BODY>
</HTML>