【05 GPU ---How to callback NV21 buffer to AP】

如果需要 Camera Hal 层返回 NV21 的 buffer 给到 AP 做后续处理,则需要:

AP 在 config 阶段(也即 configureStreams)时,带下来的 surface 中包含有 YUV_420_888 (对应 HAL 层 format 是:HAL_PIXEL_FORMAT_YCBCR_420_888 ),且 usage 的值是 ( GRALLOC1_PRODUCER_USAGE_CAMERA = 1ULL << 17 ) 的 YUV buffer,再配合下面的修改,就可以出 NV21 的 YUV buffer 给 AP :

/vendor/mediatek/proprietary/hardware/gralloc_extra/platform/mtxxx/platform.c
static int _plt_gralloc_extra_get_platform_format(int in_format, uint64_t usage)
{
   
    
    
	.

猜你喜欢

转载自blog.csdn.net/Sugar_wolf/article/details/130112597
今日推荐