the old Video Renderer, the Overlay Mixer, the VMR-7 and the VMR-9 区别!

来源:互联网 发布:淘宝如何实名制 编辑:程序博客网 时间:2024/04/28 14:26
VMR (Video Mixing Renderer)

In terms of both performance and breadth of features, the Video Mixing Renderer (VMR) filter represents the next generation in video rendering on the Windows platform. The VMR replaces the Overlay Mixer and Video Renderer, and adds many new mixing features.

The VMR was first made available for the Windows XP platforms only. Beginning with DirectX 9.0, a separate version of the VMR, called the VMR-9, is available for redistribution on all platforms supported by DirectX. The two VMR filters are very similar in their implementation and the interfaces that they expose. The primary difference is that the original VMR (now called the VMR-7) uses DirectDraw 7 internally to control the video hardware, while the new version of VMR (called the VMR-9) uses Direct3D 9.



VMR vs. Previous DirectShow Renderers

With the old filters, different renderers would be required in the graph depending on the hardware configuration.

The Video Renderer filter was used to render a single video stream in non-video port scenarios. It was based on graphics hardware technology which is now over five years old, and on an older version of DirectDraw. In certain scenarios, it uses GDI for rendering. This is done either to conserve video resources, which were much more limited five years ago, or else to overcome limitations in DirectDraw that were related to multi-monitor support. Neither the VMR-7 nor the VMR-9 ever uses GDI for rendering; the VMR-7 is based completely on DirectDraw 7 and the VMR-9 is based on Direct3D 9.

In scenarios involving either a video port or multiple video input streams, prior to the VMR the Overlay Mixer filter was used for rendering. This filter only uses the hardware overlay on the graphics card, and so is generally limited to the one overlay surface provided by most cards. The Overlay Mixer performs destination color keying, but it is not capable of alpha blending. Because it does not have a window manager, it must use a second filter, the Video Renderer, for window management. The VMR is capable of true alpha blending, and can create multiple overlays in software in addition to the hardware overlays.

The VMR is more robust than the earlier renderers, in part because it only uses DirectDraw 7 (or Direct3D 9 if you are using the VMR-9) interfaces, as opposed to the old renderers which used a mixture of interfaces from older and newer versions of DirectDraw. The VMR also employs a new image presentation mechanism which is designed for current and future generations of adapters, which have support for Direct3D, increased VRAM and video memory bandwidth, and hardware acceleration features.



VMR System Requirements

The VMR uses the graphics-processing capabilities of the computer's display card exclusively; the VMR does not perform any blending or rendering of video using the host processor, because to do so would greatly impact the frame rate and quality of the video being displayed. When taking advantage of the new features offered by the VMR, particularly blending of multiple video streams and/or application images, the overall performance obtained is highly dependent on the capabilities of the graphics card being used on the computer. Graphics cards that perform well with the VMR have the following hardware support built into them:

- Support for YUV and "non-power of 2" Direct3D texture surfaces.
- The ability to StretchBlt from YUV to RGB DirectDraw surfaces.
- At least 16MB of video memory if multiple video streams are to be blended together. The actual amount of memory required is dependent on the image size of the video streams and resolution of the display mode being used.
- Support for an RGB overlay or the ability to blend to a YUV overlay surface.
- Hardware-accelerated video (support for DirectX Video Acceleration) decoding.
- High pixel fill rates.

* Note The VMR requires that the system monitor be set for a color depth of at least 16 bits. The VMR cannot be put into a run state if the monitor is set for 256 colors. Also, some video cards cannot perform Direct3D operations when the display is set to 24 bits per pixel.



Choosing the Right Renderer

With DirectX 9.0, DirectShow provides four separate video renderers: the old Video Renderer, the Overlay Mixer, the VMR-7 and the VMR-9. For various reasons, no single renderer is preferable in all scenarios. The following guidelines should help you decide which renderer to use in your application:

- Existing applications that require only basic video rendering, with no mixing
Use the VMR-9 for its improved de-interlacing and ProcAmp support. Use the old default video renderer if you know in advance that the video hardware is not sufficient to support the VMR-7 or VMR-9.

- Applications based on devices that use video ports
Use the Overlay Mixer if support on platforms earlier than Windows XP is required. If the application will only run on Windows XP, then use the VMR-7. The VMR-9 does not support video ports.

- Applications that require any of the special capabilities of the VMR
Use the VMR-9 rather than the VMR-7 because the VMR-9 supports the latest Direct3D capabilities and is supported on all platforms supported by DirectX. If you specifically target the VMR-7, your application will run only on Windows XP.


Extract from MSDN

z
11-05-2005, 12:36 AM
Video Renderers that support in KMPlayer.

1. Old Video Renderer
2. Overlay Mixer
3. VMR7 windowed/renderless
4. VMR9 windowed/renderless
5. DirectDraw RGB/Overlay ; for studying, maybe
6. OpenGL RGB24(3D Texture)
7. Direct 3D(DirectX 7) YUV/RGB Surface(Direct rendering through Direct 3D interface)
8. Direct 3D(DirectX 9) YUV/RGB Surface(Direct rendering through Direct 3D interface)

To turn Vsync on when using OpenGL renderer will remove tearing.

z
11-05-2005, 12:36 AM
Old Video Renderer
This is the default renderer of Windows 9x/me/2k. Depending on the visiblity of the video window and your video card's abilities, it will switch between GDI, DirectDraw, Overlay rendering modes dynamically. Not recommended.


Overlay Mixer
Always renders in overlay. Generally only YUV formats are allowed, but they are presented directly without any color conversion to RGB. This is the fastest rendering method of all and the only where you can be sure about full screen video mirroring to tv-out activating. The Overlay Mixer allows for proper Aspect Ratio and Hardware Color Controls if the videocard/drivers support it.



<VMR Renderless Settings>

Offscreen plain Surface - Video surface will be allocated as a regular offscreen surface.

2D Texture Surface - Video surface will be allocated as a texture but still the 2d functions will be used to copy and stretch it onto the backbuffer. Requires a video card which can allocate 32bit, RGBA, non-power-of-two sized textures and at least in the resolution of the video.

3D Texture Surface - Video surface will be allocated as a texture and drawn as two triangles in 3d. Antialiasing turned on at the display settings may have a bad effect on the rendering speed.


Alternative Texture
A texture surface is created to hold the incoming video stream. Using alternative texture is to map a video clip onto another type of texture surface. The video output quailty varies depending on your video card with this option. At least, it really improves the screen quality in my Radeon. You can easily verify by pressing tab when playing ; the output could be seen to RGB32-BF.

(Note. This Option only works in VMR9 Renderless Mode)

In the latest Catalyst 4.10(2004/10/14), Alternative texture output has been redirected to YUV. To get the same quality as before, it is highly recommended to use Direct 3D RGB Surface Renderer.
原创粉丝点击