This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

YUV -> RGB based on extension: GL_EXT_YUV_target

hello everyone

i want to render a yuv data by opengles on mobile phone

It seems that i have to convert yuv to rgb in my shader.

according to the link: https://www.khronos.org/registry/OpenGL/extensions/EXT/EXT_YUV_target.txt

I add below code to my fragment shader:

uniform __samplerExternal2DY2YEXT   u_sTexture;

But how can i send the yuv raw data to a txture and bind to the sampler u_sTexture?

Thanks

GuDuJian
Parents
  • Do you want to read the data as YUV, or do you want to load it as color-converted to RGB?

    If you use GL_OES_EGL_image_external you can directly read a YUV surface from e.g. the Android media stack and samples will be automatically converted into RGB.

Reply
  • Do you want to read the data as YUV, or do you want to load it as color-converted to RGB?

    If you use GL_OES_EGL_image_external you can directly read a YUV surface from e.g. the Android media stack and samples will be automatically converted into RGB.

Children