|
- memcpy(buf_nv12, output_info.YVirAddr, iBufWidth * iBufHeight);
- memcpy(&buf_nv12[iBufWidth * iBufHeight], output_info.CVirAddr,
- iBufWidth * iBufHeight >> 1);
- // write(fd,buf_nv12,iBufWidth * iBufHeight*3/2);
- // fwrite(buf_nv12, 1, iBufWidth * iBufHeight*3/2, fNv12);
- // printf("write nv12\n");
- _tile_to_linear_64x32_4x2_neon((unsigned char *) buf_nv12,
- (unsigned char *) output_info.YVirAddr, output_info.img_width,
- output_info.img_height);
- _tile_to_linear_64x32_4x2_uv_neon(
- (unsigned char *) buf_nv12 + iBufWidth * iBufHeight,
- (unsigned char *) output_info.CVirAddr, output_info.img_width,
- output_info.img_height >> 1);
- // write(fd_yuv,buf_nv12,iBufWidth * iBufHeight*3/2);
- // fwrite(buf_nv12, 1, iBufWidth * iBufHeight*3/2, fYuv);
- // printf("write yuv\n");
- ccvt_420p_rgb565(iBufWidth, iBufHeight, buf_nv12,
- (unsigned short *) rgb565);
复制代码 这个是从NV12转成rgb565的代码,使用libformat.so,头文件见附件,即可完成转换。
|
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有账号?注册
×
|