高通Camera驱动(6)-- process_capture_result

 

前文回顾

上一篇文章,简单讲述 notify的过程

一、 process_capture_result流程

    1.1 原文解析

 * 10. After some pipeline delay, the HAL begins to return completed captures to
 *    the framework with camera3_callback_ops_t->process_capture_result(). These
 *    are returned in the same order as the requests were submitted. Multiple
 *    requests can be in flight at once, depending on the pipeline depth of the
 *    camera HAL device.
 *
 *    >= CAMERA_DEVICE_API_VERSION_3_2:
 *
 *    Once a buffer is returned by process_capture_result as part of the
 *    camera3_stream_buffer_t array, and the fence specified by release_fence
 *    has been signaled (this is a no-op for -1 fences), the ownership of that
 *    buffer is considered to be transferred back to the framework. After that,
 *    the HAL must no longer retain that particular buffer, and the
 *    framework may clean up the memory for it immediately.
 *
 *    process_capture_result may be called multiple times for a single frame,
 *    each time with a new disjoint piece of metadata and/or set of gralloc
 *    buffers. The framework will accumulate these partial metadata results
 *    into one result.
 *
 *    In particular, it is legal for a process_capture_result to be called
 *    simultaneously for both a frame N and a frame N+1 as long as the
 *    above rule holds for gralloc buffers (both input and output).

10、上传处理result:经过一些pipeline延迟之后,HAL开始使用camera3_callback_ops返回处理后Capture给framewrok, camera3_callback_ops_t->process_capture_result()。返回的顺序与提交请求的顺序相同。根据camera HAL设备的pipeline深度,可以同时处理多个request。
     API3.2-> 
(1)一旦process_capture_result返回buffer作为camera3_stream_buffer_t数组,release_fence指定的栅已经被触发(这是-1栅的无操作),该buffer的所有权被认为已转移回framework。之后,HAL必须不再保留该特定buffer,并且framework可以立即为其清除内存。

(2)对于单个帧,  每次带有新的不相交的元数据和或一套gralloc  buffer,可以多次调用process_capture_result.

(3)framework会将这些部分元数据result合并为一个result。 特别是,只要上述规则对于gralloc buffer(输入和输出)均成立,则同时为帧N和帧N + 1调用process_capture_result是合法的。
 

    1.2 官网文档

《80-pc212-1_a_chi_api_specifications_for_qualcomm_spectra_2xx_camera.pdf》简单介绍process_result的过程

     1.3 代码分析

 

//TODO,喝口水,远眺下,继续撸代码

  • 1
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值