/**************************************************************************************************/
/* func: change the cross to the plannar format
/**************************************************************************************************/
/* src -I the rgb rgb image
* dst -O the rr..gg..bb image
* width -I the width of the image
* height -I the height of the image
* channel -I the channel of the image
** note:
*/
void TEST_Cross2Plannar(U08 *src, U08 *dst, S32 width, S32 height ,S32 channel)
{
S32 mem_size = channel * width * height;
S32 single_size = width * height;
S32 cross_count = 0;
S32 plannar_count = 0;
S32 channel_c = 0;
for (cross_count = 0; cross_count < mem_size; cross_count+= channel)
{
for (channel_c = 0; channel_c < channel; channel_c++)
{
dst[plannar_count + channel_c * single_size] = src[cross_count + channel_c];
}
plannar_count++;
}
}
图像格式转换-cross-plannar
猜你喜欢
转载自blog.csdn.net/myzhouwang/article/details/83893658
今日推荐
周排行