1 overlay可能支持的颜色格式
/* possible overlay formats可能支持的颜色格式 */
enum {
    OVERLAY_FORMAT_RGBA_8888    = HAL_PIXEL_FORMAT_RGBA_8888,
    OVERLAY_FORMAT_RGB_565      = HAL_PIXEL_FORMAT_RGB_565,
    OVERLAY_FORMAT_BGRA_8888    = HAL_PIXEL_FORMAT_BGRA_8888,
    OVERLAY_FORMAT_YCbCr_422_SP = HAL_PIXEL_FORMAT_YCbCr_422_SP,
    OVERLAY_FORMAT_YCbCr_420_SP = HAL_PIXEL_FORMAT_YCbCr_420_SP,
    OVERLAY_FORMAT_YCbYCr_422_I = HAL_PIXEL_FORMAT_YCbCr_422_I,
    OVERLAY_FORMAT_YCbYCr_420_I = HAL_PIXEL_FORMAT_YCbCr_420_I,
    OVERLAY_FORMAT_CbYCrY_422_I = HAL_PIXEL_FORMAT_CbYCrY_422_I,
    OVERLAY_FORMAT_CbYCrY_420_I = HAL_PIXEL_FORMAT_CbYCrY_420_I,
    OVERLAY_FORMAT_DEFAULT      = 99    // The actual color format is determined
                                        // by the overlay
};

2 overlay_control_device_t结构的子函数

/* get static informations about the capabilities of the overlay engine 获取overlay引擎的固定信息*/
    int (*get)(struct overlay_control_device_t *dev, int name);

/* creates an overlay matching the given parameters as closely as possible.根据所给的参数,尽可能得创建一个overlay。
     * returns an error if no more overlays are available. The actual 如果没有更多的overlay可获取,返回错误。
     * size and format is returned in overlay_t. 实际的尺寸和格式通过overlay_t结构返回*/
    overlay_t* (*createOverlay)(struct overlay_control_device_t *dev,
            uint32_t w, uint32_t h, int32_t format);
   
    /* destroys an overlay. This call releases all 销毁一个overlay,释放所有资源
     * resources associated with overlay_t and make it invalid */
    void (*destroyOverlay)(struct overlay_control_device_t *dev,
            overlay_t* overlay);

/* set position and scaling of the given overlay as closely as possible. 根据所给的参数,尽可能的设置坐标和缩放。
     * if scaling cannot be performed, overlay must be centered. 如果无法执行尺寸变化,必须为中心覆盖*/
    int (*setPosition)(struct overlay_control_device_t *dev,
            overlay_t* overlay,
            int x, int y, uint32_t w, uint32_t h);

/* returns the actual position and size of the overlay 获取overlay的实际位置*/
    int (*getPosition)(struct overlay_control_device_t *dev,
            overlay_t* overlay,
            int* x, int* y, uint32_t* w, uint32_t* h);

/* sets configurable parameters for this overlay. returns an error if not设置配置参数,如果不支持返回错误
     * supported. */
    int (*setParameter)(struct overlay_control_device_t *dev,
            overlay_t* overlay, int param, int value);
/*以下两个函数没有实现*/
    int (*stage)(struct overlay_control_device_t *dev, overlay_t* overlay);
    int (*commit)(struct overlay_control_device_t *dev, overlay_t* overlay);

3、 overlay_data_device_t结构体函数子函数
    /* initialize the overlay from the given handle. this associates this通过传入的handle初始化overlay
     * overlay data module to its control module将data模块附加到控制模块上 */
    int (*initialize)(struct overlay_data_device_t *dev,
            overlay_handle_t handle);

/* can be called to change the width and height of the overlay.改变overlay的宽度和高度 */
    int (*resizeInput)(struct overlay_data_device_t *dev,
            uint32_t w, uint32_t h);
/*以下三个函数没有实现*/
    int (*setCrop)(struct overlay_data_device_t *dev,
            uint32_t x, uint32_t y, uint32_t w, uint32_t h) ;

int (*getCrop)(struct overlay_data_device_t *dev,
       uint32_t* x, uint32_t* y, uint32_t* w, uint32_t* h) ;

int (*setParameter)(struct overlay_data_device_t *dev,
            int param, int value);

/* blocks until an overlay buffer is available and return that buffer.阻塞直到一个overlay释放buffer */
    int (*dequeueBuffer)(struct overlay_data_device_t *dev,
           overlay_buffer_t *buf);

/* release the overlay buffer and post it释放overlay buffer,post我理解是贴到screen上 */
    int (*queueBuffer)(struct overlay_data_device_t *dev,
            overlay_buffer_t buffer);

/* returns the address of a given buffer if supported, NULL otherwise.返回given buffer的地址 */
    void* (*getBufferAddress)(struct overlay_data_device_t *dev,
            overlay_buffer_t buffer);
/*暂未实现*/
    int (*getBufferCount)(struct overlay_data_device_t *dev);

4、get()函数可以提供的种类
enum {
    /* Maximum amount of minification supported by the hardware硬件支持的最大缩小倍数*/
    OVERLAY_MINIFICATION_LIMIT      = 1,
    /* Maximum amount of magnification supported by the hardware硬件支持的最大放大倍数 */
    OVERLAY_MAGNIFICATION_LIMIT     = 2,
    /* Number of fractional bits support by the overlay scaling engine 缩放引擎支持的小数位数 */
    OVERLAY_SCALING_FRAC_BITS       = 3,
    /* Supported rotation step in degrees. 旋转步进*/
    OVERLAY_ROTATION_STEP_DEG       = 4,
    /* horizontal alignment in pixels 像素中的水平对齐?*/
    OVERLAY_HORIZONTAL_ALIGNMENT    = 5,
    /* vertical alignment in pixels 像素中的垂直对齐*/
    OVERLAY_VERTICAL_ALIGNMENT      = 6,
    /* width alignment restrictions. negative number for max. power-of-two 宽度对齐限制。负数为最大值。双功率?*/
    OVERLAY_WIDTH_ALIGNMENT         = 7,
    /* height alignment restrictions. negative number for max. power-of-two 高度对齐限制。负数为最大值。双功率?*/
    OVERLAY_HEIGHT_ALIGNMENT        = 8,
};

5、设置setParameter()函数可设置的种类
enum {
    /* rotation of the source image in degrees (0 to 359)源图像旋转角度(0 到 359)6410好像还不支持任意角度旋转 */
    OVERLAY_ROTATION_DEG = 1,
    /* enable or disable dithering */
    OVERLAY_DITHER        = 3,
    /* transformation applied (this is a superset of COPYBIT_ROTATION_DEG) */
    OVERLAY_TRANSFORM    = 4,
};

第二部分 overlay 架构初探的更多相关文章

  1. 云原生时代, Kubernetes 多集群架构初探

    为什么我们需要多集群? 近年来,多集群架构已经成为“老生常谈”.我们喜欢高可用,喜欢异地多可用区,而多集群架构天生就具备了这样的能力.另一方面我们也希望通过多集群混合云来降低成本,利用到不同集群各自的 ...

  2. scrapy架构初探

    scrapy架构初探 引言 Python即时网络爬虫启动的目标是一起把互联网变成大数据库.单纯的开放源代码并不是开源的全部,开源的核心是"开放的思想",聚合最好的想法.技术.人员, ...

  3. OceanBase 架构初探

    OceanBase 架构初探 原创衣舞晨风 发布于2018-11-13 08:44:14 阅读数 1417  收藏 展开 1.设计思路 OceanBase的目标是支持数百TB的数据量以及数十万TPS. ...

  4. Android开发学习之路--Android系统架构初探

    环境搭建好了,最简单的app也运行过了,那么app到底是怎么运行在手机上的,手机又到底怎么能运行这些应用,一堆的电子元器件最后可以运行这么美妙的界面,在此还是需要好好研究研究.这里从芯片及硬件模块-& ...

  5. 《深入理解bootstrap》读书笔记:第二章 整体架构

    一.  整体架构   1. CSS-12栅格系统 把网页宽度均分为12等分(保留15位精度)--这是bootstrap的核心功能. 2.基础布局组件 包括排版.按钮.表格.布局.表单等等. 3.jQu ...

  6. React Native For Android 架构初探

    版权声明:本文由王少鸣原创文章,转载请注明出处: 文章原文链接:https://www.qcloud.com/community/article/171 来源:腾云阁 https://www.qclo ...

  7. Scrapy的架构初探

    Scrapy,Python开发的一个web抓取框架. 1,引言 Python即时网络爬虫启动的目标是一起把互联网变成大数据库.单纯的开放源代码并不是开源的全部,开源的核心是“开放的思想”,聚合最好的想 ...

  8. DDD「领域驱动设计」分层架构初探

    前言 基于 DDD 传统分层架构实现. 项目 github地址:https://github.com/WuMortal/DDDSample 这个分层架构是工作中项目正在使用的分层架构,使用了一段时间发 ...

  9. Android架构初探

    #一 背景点评美团合并之后,业务需要整合,我们部门的几条业务需要往美团平台迁移,为了降低迁移成本,开发和维护成本,以及将来可能要做的单元测试,需要对架构进行相应的调整.之前的代码都堆在Activity ...

随机推荐

  1. 【Delphi】无标题移动窗体

    procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Inte ...

  2. 《疯狂的android讲义第3版》读书笔记

    第一章.开始启程,你的第一行android代码 1.android系统架构: 1)linux内核层:为底层硬件提供驱动,如显示驱动.音频驱动.照相机驱动.蓝牙驱动.Wifi驱动.电源管理等 2)系统运 ...

  3. Visual C++2010开发权威指南 中文高清PDF - VC.NET

    第一部分  Visual C++ 2010开发与新特性第1章  Visual C++ 2010开发环境简介 11.1  Visual C++ 2010简介 11.2  Visual C++ 2010下 ...

  4. 《C和指针》 读书笔记 -- 第13章 高级指针话题

    1.函数指针 int (*f)(); int *(*f[])(); 用途: [1]回调函数 e.g. /*在一个单链表中查找指定值*/ Node *search_list(Node *node,voi ...

  5. 拓展,Fibonacci螺旋

    #该程序由023递归这课中的fibonacci数列递归写法修改而成 #在写的过程中发现,如果要正确引导用户的每一次输入,写的代码比主程序还要多 #当然,为了使程序在用户交互过程中显得更加友好,提供错误 ...

  6. JS和JSP的区别

    最近很多同学在纠结于名词缩写之间的相似性,因此本人也来写一篇,讲讲JS和JSP的区别. SUN首先发展出SERVLET,其功能比较强劲,体系设计也很先进,只是,它输出HTML语句还是采用了老的CGI方 ...

  7. oracle闪回表详解

    --- 说明闪回数据库 --- 使用闪回表将表内容还原到过去的特定时间点 --- 从删除表中进行恢复 --- 使用闪回查询查看截止到任一时间点的数据库内容 --- 使用闪回版本查询查看某一行在一段时间 ...

  8. js截取所需字符串长度

    //title :字符串  :interceptLength:所需的长度 function TitleThumbnail(title, interceptLength, thumbnailCharac ...

  9. 【BZOJ 1951】 [Sdoi2010]古代猪文

    Description “在那山的那边海的那边有一群小肥猪.他们活泼又聪明,他们调皮又灵敏.他们自由自在生活在那绿色的大草坪,他们善良勇敢相互都关心……” ——选自猪王国民歌 很久很久以前,在山的那边 ...

  10. Windows 7下载

    原版的ISO:windows 7 旗舰版:32位: ed2k://|file|cn_windows_7_ultimate_x86_dvd_x15-65907.iso|2604238848|D6F139 ...