vulkan从小白到专家——YUV处理

1 YUV使用场景

在这里插入图片描述

通过生产者消费者模式,底层照相机,录制视频生成buffer,图形渲染模块作为消费者,
拿到的通常是多层平面表示的像素格式,即YCbCr格式。图像信息通常由多层图片构成,

如果gles开发,开发者需要维护两套纹理,分别保存YUV的多层平面信息,然后再fragment shader中分别采样,结果再进行混合。。非常繁琐
基于vulkan YUV扩展,驱动自动生成shader,从多个图像的平面上采样,然后将结果转化成rgba的格式,
yuv有多种不同格式:nv12、nv21、420p。

youtube上的vulkanised24上的视频:https://www.youtube.com/watch?v=RABV11Nr-gE&t=1348s

2 VK_KHR_sampler_ycbcr_conversion

The use of Y′CBCR sampler conversion is an area in 3D graphics not used by most Vulkan developers. It is mainly used for processing inputs from video decoders and cameras. The use of the extension assumes basic knowledge of Y′CBCR concepts.

This extension provides the ability to perform specified color space conversions during texture sampling operations for the Y′CBCR color space natively. It also adds a selection of multi-
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值