且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在OpenGl中显示YUV

更新时间:2023-11-10 13:32:46

下一步尝试:) 我认为您的uv缓冲区不是交错的.看起来U值先出现,然后是V值数组.将行更改为

Next try :) I think you're uv buffer is not interleaved. It looks like the U values come first and then the array of V values. Changing the lines to

unsigned int voffset = YUV_HEIGHT * YUV_WIDTH / 2;
float U = lookupTableU [uvBuffer [ y * (YUV_WIDTH / 2) + x/2] ]; 
float V = lookupTableV [uvBuffer [ voffset + y * (YUV_WIDTH / 2) + x/2] ];

可能指示是否确实如此.

might indicate if this is really the case.