void NV21_T_RGB(unsigned int width , unsigned int height , unsigned char *yuyv)// , unsigned char *rgb
{
const int nv_start = width * height ;
test_rgb = calloc(width*height*3, 1);
u32 i, j, index = 0, rgb_index = 0;
u8 y, u, v;
int r, g, b, nv_index = 0;
for(i = 0; i < height ; i++)
{
for(j = 0; j < width; j++){
//nv_index = (rgb_index / 2 - width / 2 * ((i + 1) / 2)) * 2;
nv_index = i / 2 * width + j - j % 2;
y = yuyv[rgb_index];
u = yuyv[nv_start + nv_index ];
v = yuyv[nv_start + nv_index + 1];
r = y + (140 * (v-128))/100; //r
g = y
最后
以上就是温柔眼神最近收集整理的关于NV12转rgb24的全部内容,更多相关NV12转rgb24内容请搜索靠谱客的其他文章。
发表评论 取消回复