当前位置: 首页 > news >正文

深圳企业做网站公司有哪些上海网站建设关键词排名

深圳企业做网站公司有哪些,上海网站建设关键词排名,网站主页图片尺寸,wordpress原始分页共一、简介#xff1a;libyuv 最初是由Google开发的#xff0c;主要是为了支持WebRTC项目中的视频处理需求。用于处理YUV格式图像数据的开源库。它提供了一系列的函数#xff0c;用于转换、缩放、旋转和其他操作YUV图像数据。 二、执行下面的命令下载和安装libyuv。 git clo… 一、简介libyuv 最初是由Google开发的主要是为了支持WebRTC项目中的视频处理需求。用于处理YUV格式图像数据的开源库。它提供了一系列的函数用于转换、缩放、旋转和其他操作YUV图像数据。 二、执行下面的命令下载和安装libyuv。 git clone https://github.com/lemenkov/libyuv.git cd libyuv mkdir build cd build cmake .. make sudo make install三、测试实例convert_yuv_to_rgb.cpp,使用c编译的时候I420ToRGB24前面就不要有libyuv::。 #include stdio.h #include stdlib.h #include libyuv/convert_from.h #include libyuv/convert.hint main() {FILE *input_file fopen(cowboy_girl_1024X1280_yuv420p_i420.yuv, rb);if (!input_file) {printf(Error opening input file.\n);return 1;}int width 1024;int height 1280;size_t uv_size (width * height) / 2;uint8_t *yuv_data (uint8_t *)malloc(width * height * 3 / 2);if (!yuv_data) {printf(Memory allocation error.\n);fclose(input_file);return 1;}fread(yuv_data, sizeof(uint8_t), width * height * 3 / 2, input_file);fclose(input_file);// Convert YUV to RGB24uint8_t *rgb_data (uint8_t *)malloc(width * height * 3);if (!rgb_data) {printf(Memory allocation error.\n);free(yuv_data);return 1;}libyuv::I420ToRGB24(yuv_data, width, yuv_data width * height, width / 2,yuv_data width * height * 5 / 4, width / 2,rgb_data, width * 3, width, height); /*libyuv::I420ToRAW(yuv_data, width, yuv_data width * height, width / 2,yuv_data width * height * 5 / 4, width / 2,rgb_data, width * 3, width, height); */// Save RGB image to fileFILE *output_file fopen(output.rgb, wb);if (!output_file) {printf(Error opening output file.\n);free(yuv_data);free(rgb_data);return 1;}fwrite(rgb_data, sizeof(uint8_t), width * height * 3, output_file);fclose(output_file);free(yuv_data);free(rgb_data);printf(Conversion complete.\n);return 0; }四、测试运行结果 g -o convert_yuv_to_rgb convert_yuv_to_rgb.cpp -lyuv ./convert_yuv_to_rgb 五、上面的测试得出的yuv文件显示出来的效果有点异常R和B对换了为啥呢这个问题困扰了我许久。直到我看到我看到libyuv/include/libyuv/convert.h里面有这一段才豁然开朗因为RGB24ToI420也是存在这个问题解决方法是使用I420ToRAW、RAWToI420对换。 // RGB little endian (bgr in memory) to I420. LIBYUV_API int RGB24ToI420(const uint8_t* src_rgb24,int src_stride_rgb24,uint8_t* dst_y,int dst_stride_y,uint8_t* dst_u,int dst_stride_u,uint8_t* dst_v,int dst_stride_v,int width,int height);六、如果运行的时候提示找不到libyuv.so库按照下面的方法运行sudo ldconfig更新动态链接库缓存。也可以直接用gcc -o yuv yuv.c  /usr/local/lib/libyuv.so这种编译形式。 编辑配置文件并使新安装的库生效 sudo vi /etc/ld.so.conf 在末尾加入如下行 include /usr/local/libsudo ldconfig
http://www.hkea.cn/news/14571042/

相关文章:

  • 做外贸网站应该关注哪些地方centos6.3 网站开发
  • 怎么优化网站关键词wordpress 自动加载下一页
  • 手机软件制作和做网站相同汕头网络推广团队
  • 免费推广网站注册入口编程软件手机
  • 网站信息化建设案例怎么创建网站快捷方式
  • 网站一直维护意味着什么sspai 少数派wordpress
  • 沈阳今天最新通知新网站内部优化怎么做
  • 谷歌官方网站注册网络信息设计是什么专业
  • 云南网站优化公司页面网站缓存如何做
  • 做问卷的几个网站wordpress后台504
  • 沙田网站仿做wordpress 网站建设中
  • 大连模板建站定制网站网站到期不想续费
  • 定制旅游哪个网站好用大连网站建设外包公司
  • 营销型网站建设 课程农行网站不出动画怎么做
  • 电商网站开发模版网站搭建文案
  • 分阶段建设网站wordpress插件盗版
  • iis默认网站启动不了家具定制app
  • 聊城推广网站拖拽式可视化编辑网站
  • asp.net 网站 结构怎么在微信公众号上做网站
  • 如何用word做网站微网站栏目
  • 网站制作 技术html语言做网站
  • 企业宣传型的网站株洲网站制作公司
  • 湖北省建设银行网站网店运营模式有哪些
  • 专业外贸网站建设公司排名网站建设实战案例
  • 家私公司网站建设多少钱通辽网站建设0475seo
  • 微网站开发第三方平台属于c2c网站的有哪几个
  • 梅州建站找哪家网站建设销售经理职责
  • 开发网站开始的工作口碑好的邵阳网站建设
  • 怀柔重庆网站建设河北省建设厅网站工程师查询
  • 美食网站首页设计如何衡量一个网站的价值