¡@

Home 

2014/10/16 ¤W¤È 08:14:19

android Programming Glossary: gltexsubimage2d

YUV to RGB conversion by fragment shader

http://stackoverflow.com/questions/12130790/yuv-to-rgb-conversion-by-fragment-shader

GLES20.GL_TEXTURE2 GLES20.glBindTexture GLES20.GL_TEXTURE_2D muTextureName before call to any glTexImage2D. and glTexSubImage2D You can also use glTexSubImage2D with every frame and glTexImage2D once. size of U and V is same atleast for YV12 System.arraycopy.. GLES20.GL_TEXTURE_2D muTextureName before call to any glTexImage2D. and glTexSubImage2D You can also use glTexSubImage2D with every frame and glTexImage2D once. size of U and V is same atleast for YV12 System.arraycopy data U_INDEX uData 0 LENGTH_4..

Android Video Player Using NDK, OpenGL ES, and FFmpeg

http://stackoverflow.com/questions/4676178/android-video-player-using-ndk-opengl-es-and-ffmpeg

Using this technique I have been able to get 60 FPS even on first generation hardware. EDIT regarding glTexImage2D vs glTexSubImage2D for this approach. Calling glTexImage2D will allocate video memory for your texture and copy the pixels you pass it into.. video memory for your texture and copy the pixels you pass it into that memory if you don't pass NULL . Calling glTexSubImage2D will update the pixels you specify in an already allocated texture. If you update all of the texture then there's little.. difference calling one or the other in fact glTexImage2D is usually faster. But if you only update part of the texture glTexSubImage2D wins out on speed. You have to use power of 2 texture sizes so in covering the screen on hi res devices requires a 1024x512..