叠加就位变换过滤器-YUV中的图形 [英] overlay in-place transform filter - Drawing in YUV

查看:95
本文介绍了叠加就位变换过滤器-YUV中的图形的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个小的叠加式就地转换过滤器(CTransInPlaceFilter),以取乐.它应该能够在视频上显示文本(字幕).

I'm building a small overlay in-place transform filter (CTransInPlaceFilter) for fun. It should be able to display text (subtitle) on a video.

我偶然发现了一个障碍:如何绘制YUV?

I've stumbled on to a bit of a snag: How to draw in YUV ?

将YUV与RGB转换非常昂贵,这就是为什么我要绘制视频使用的格式.这样,我根本不需要进行任何转换.

Converting YUV to and from RGB is very expensive, that is why i want to draw in the format the video use. That way i do not need to do any converting at all.

我尚未在互联网上找到有关此信息的任何信息.

I have not found any information about this on internet.

这不是其他重叠式滤镜执行的方法吗?

So is this not how other overlay filters do it ?

他们使用其他技术吗?

如果您知道执行此操作的更好方法,请分享.

If you know of a better way to do this please share.

任何信息都可以提供帮助.

Any and all information can be helpful.

推荐答案

如果通过绘图表示使用GDI,则GDI仅支持RGB.

If by drawing you mean using GDI, then GDI only supports RGB.

DirectDraw和Direct3D(可能还有GDI +?)支持YUV.

DirectDraw and Direct3D (and possibly GDI+?) support YUV.

其他播放器具有用于视频渲染器的自定义分配器表示器,因此他们可以使用高质量的DD/D3D绘图.过滤器具有自己的自定义绘图代码.

Other players have a custom allocator-presenter for the video renderer, so that they can use high-quality DD/D3D drawing. Filters have their own custom drawing code.


这篇关于叠加就位变换过滤器-YUV中的图形的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆