YVU420PackedSemiPlanar32m4ka与YUV420PackedSemiPlanar64x32Tile2m8ka都是nv12变换来的。

*  YVU420PackedSemiPlanar       : Buffer containing all Y, and then V and U

*                                 interleaved.

*  YVU420PackedSemiPlanar32m4ka : YUV planar format, similar to the

*                                 YVU420PackedSemiPlanar format, but with the

*                                 following restrictions:

*

*                                 1. The width and height of both plane must

*                                 be a multiple of 32 texels.

*

*                                 2. The base address of both planes must be

*                                 aligned to a 4kB boundary.

*

*  YUV420PackedSemiPlanar16m2ka : YUV planar format, similar to the

*                                 YUV420PackedSemiPlanar format, but with the

*                                 following restrictions:

*

*                                 1. The width of the luma plane must be a

*                                 multiple of 16 pixels.

*

*                                 2. The address of both planes must be

*                                 aligned to a 2kB boundary.

*

*  YUV420PackedSemiPlanar64x32Tile2m8ka : YUV planar format, similar to the

*                                 YUV420PackedSemiPlanar format, but with the

*                                 following restrictions:

*

*                                 1. The data is laid out in a 4x2 MB tiling

*                                 memory structure

*

*                                 2. The width of each plane is a multiple of

*                                 2 4x2 MB tiles.

*

*                                 3. The height of each plan is a multiple of

*                                 a 4x2 MB tile.

*

*                                 4. The base address of both planes must be

*                                 aligned to an 8kB boundary.

*

*                                 5. The tiles are scanned in the order

*                                 defined in the MFCV5.1 User's Manual.

*/

YUV420PackedSemiPlanar64x32Tile2m8ka其实是V4L2_PIX_FMT_NV12MT(TM12)。

子块的内存布局为:

宽度需要与128倍数对齐,若模块竖向分辨率为奇数,则最后一行以线性布局。极限情况布局如下:

下面给出YVU420PackedSemiPlanar32m4ka转yv12的代码,以480x480为例:

void YUV420PackedSemiPlanar32mToYUV420(char* src,char* dst)

{

const int width =512;

const int height =480;

char* _yuv = dst;

char* _y = _yuv;

char* _u = _yuv + width*height;

char* _v = _u + width*height/4;

memset(_yuv, 0, width*height*3/2);

memcpy(_y,src,width*height);

char* pStart = src + width*height;

for (int i=0; i<height*width/4; i++) {

*_u++ = *pStart++;

*_v++ = *pStart++;

}

}

YVU420PackedSemiPlanar32m4ka与YUV420PackedSemiPlanar64x32Tile2m8ka相关推荐

  1. semiplannar 什么是,QOMX_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka颜色格式

    all Does anybody know details about QOMX_COLOR_FormatYUV420PackedSemiPlanar64x32Tile2m8ka format, it ...

  2. ijkplayer 学习笔记

    ijk概述 mediacodec相关 OpenGL相关 filter相关 setOption配置相关 metadata相关 h264编码器特有的设置域 线程相关 消息机制 音频输出 声道切换 SDL_ ...

最新文章

  1. Python 代码规范
  2. jenkins同平台发布
  3. 跟我学Spring3(8.2):对ORM的支持之集成Hibernate3
  4. 看完这份MySQL 性能调优文档,我把面试问我数据库调优的面试官虐哭了
  5. python时间戳转换并pandas批量转换时间戳
  6. Wintel物联网平台-Windows IoT新手入门指南
  7. PHP 标准AES加密算法类
  8. oracle高资源消耗sql,Oracle中定位重要(消耗资源多)的SQL
  9. css3制作广告栏效果的疑问?
  10. 终端terminal的颜色配置
  11. ssis 循环导入数据_使用集成服务(SSIS)包从Amazon S3 SSIS存储桶导入数据
  12. 获取当日零点 PHP
  13. 操作系统安全 基本概念
  14. python全栈马哥_马哥Python全栈+爬虫+高端自动化,资源教程下载
  15. 基于Android的虚拟校园移动学习系统
  16. php抽奖简单源码,php转盘抽奖 完整例子源码(含模拟数据)
  17. 用matlab编写程序求一组数的均值,用matlab编写一段程序,求加权平均值。
  18. 【Python实战】数据预处理(数据清理、集成、变换、归约)
  19. Uva 10158 War
  20. 华为手机word插件加载失败_c#调用word的组件时失败解决方法

热门文章

  1. 缓存框架——Redis(一)
  2. 十二、流程控制之条件运算符
  3. boost1.55.0在vs2013上编译序列化库失败的解决方法
  4. ASPack 2.x (without poly) - Alexey Solodovnikov [Overlay]脱壳
  5. SQL Server datetime数据类型设计与优化误区
  6. Jsoup进阶之获取指定数据
  7. 50 家硅谷 IT 公司技术博客
  8. Web 开发人员和设计师必读文章推荐【系列三十】
  9. 机器学习--支持向量机(五)核函数详解
  10. 一个树杈y图片_鬼脸纹:黄花梨树上一个树杈,反映到主干上时,会形成一个疖痕...