¡@

Home 

c++ Programming Glossary: chromawidth

Problems converting YV12 to RGB through GLSL

http://stackoverflow.com/questions/8977489/problems-converting-yv12-to-rgb-through-glsl

new GLushort ImgWidth ImgHeight allocate an image int chromaWidth ImgWidth 2 int chromaHeight ImgHeight 2 2x2 luminance subsampling.. ImgWidth ImgHeight Cb block after Y const GLubyte pCr pCb chromaWidth chromaHeight Cr block after Cb get pointers to smaller Cb and.. i int x i ImgWidth int y i ImgWidth GLubyte cb pCb x 2 y 2 chromaWidth GLubyte cr pCr x 2 y 2 chromaWidth ImageYUV i memblock i 8 x..

Image scaling (KeepAspectRatioByExpanding) through OpenGL

http://stackoverflow.com/questions/9011108/image-scaling-keepaspectratiobyexpanding-through-opengl

tex uniform float ImgHeight chromaHeight_Half chromaWidth void main vec2 t gl_TexCoord 0 .xy get texcoord from fixed.. chromaHeight_Half floor t.y 4.0 float CbCrX floor t.x 2.0 chromaWidth floor mod t.y 2.0 float Cb texture2DRect tex vec2 CbCrX CbY.. 2 2 glUniform1f glGetUniformLocation _shader_program chromaWidth _frame width 2 glwidget.h #include QtOpenGL QGLWidget #include..