0

In a camera preview function, I've been using yuv2rgb, and using the resulting bitmap.

This is slow, so I want to display the picture as it is.

I use example class

// public abstract class ViewBase extends SurfaceView implements
        SurfaceHolder.Callback, Runnable{}
leppie
  • 115,091
  • 17
  • 196
  • 297
  • 1
    Without more information, it will be hard to answer this. Please provide some more context, and be clear about what your question is. What language and platform are you using? What is the problem that you're having? If there are more tags that would be helpful, please add them. – Mogsdad Jan 31 '13 at 03:54

1 Answers1

0

Not sure why you want to render the preview frames yourself, given that the OS already has optimized flow for the preview frame from the camera driver to the video driver.

However, if you need to do it yourself, you can use OpenGL to create a YUV texture and then blit it to a plane. Check this SO question for sample code.

Community
  • 1
  • 1
Franci Penov
  • 74,861
  • 18
  • 132
  • 169