Open GoogleCodeExporter opened 8 years ago
its possible with Directx DXVA
Original comment by ved_k...@ymail.com
on 6 Oct 2011 at 6:38
Vsfilter doesn't support DXVA and using vsfilter stops any process, e.g.
decoding, before it from getting DXVA. I don't know if vsfilter stop filters
before it from using CUDA.
I don't have enough knowledge to touch that part of code. Mpc-hc's internal
subtitle render is vsfilter based and support DXVA, but it's not a standalone
filter. There must be a reason for which they don't make it standalone.
Original comment by YuZhuoHu...@gmail.com
on 6 Oct 2011 at 8:03
The simple problem is that the standalone vsfilter is designed to draw the
subtitles directly on the video image which is coming through the input pin.
For that to work the video must be coming through the vsfilter input pin in
uncompressed (e.g. YV12) form. However, when using DXVA all any DirectShow
filter ever gets in the input pin is *compressed* video. The video is only
uncompressed in GPU RAM and is never copied back to system RAM. As a result
vsfilter doesn't have access to the uncompressed video to draw the subtitles on.
The only way to solve this is to change the way the subtitles are rendered.
Drawing on the video coming through the vsfilter input pin won't work with
DXVA. Basically vsfilter would have to work together with the renderer to make
rendering work at all. There are 2 options here:
(1) Either the renderer gives vsfilter access to the Direct3D surface of the
rendered frame. Then vsfilter could draw the subtitles on the Direct3D surface.
For that to work vsfilter would have to learn how to upload subtitles to the
GPU and how to alpha blend them via Direct3D APIs.
(2) Or vsfilter could provide the renderer with RGBA subpictures, so the
renderer itself can blend the subtitles onto the video image. This can be
achieved on 2 difference ways: (a) Either vsfilter provides an RGBA output pin.
This would require the renderer to support an additional RGBA input pin. And it
would require the media player to connect the pins correctly. Or (b) vsfilter
and renderer could agree on a private communication channel to transport the
subtitle data.
The MPC-HC internal subtitle renderer uses (1), as does PotPlayer. The J.River
MC16/17 uses a (2b), when rendering with madVR.
Original comment by mad...@gmail.com
on 18 Nov 2011 at 9:30
The best solution would be to get VSFilter to output an RGBA pin. This would
easily work with VRM9, and EVR. This is also how DVD playback works with
subtitles with the MS renderers.
Original comment by I.Cur...@gmail.com
on 1 Jan 2012 at 4:20
Original issue reported on code.google.com by
ved_k...@ymail.com
on 6 Oct 2011 at 6:20