Log in

View Full Version : Can Direct2D render YUV420P8?


stax76
26th December 2019, 15:00
I've recently migrated StaxRip to render using Direct2D, it still creates a script with ConvertToRGB though. I wonder if it's easy enough to render YUV420P8, YUV420P10 and other popular AviSynth/VapourSynth formats directly in hardware with high quality scaling and Windows 7 compatibility?

https://github.com/staxrip/staxrip/blob/master/General/VideoRenderer.vb#L224

https://github.com/staxrip/staxrip/blob/master/General/VideoRenderer.vb#L196

LoRd_MuldeR
26th December 2019, 20:12
Have you checked this document?
https://docs.microsoft.com/en-us/windows/win32/direct2d/supported-pixel-formats-and-alpha-modes

(especially the section about "Supported YUV Formats")

stax76
26th December 2019, 22:01
I'll study this document, thank you.

stax76
23rd January 2020, 01:53
It seems Direct2D can only handle RGB, for my purpose it's good enough however.

Ascet
23rd September 2022, 14:12
If I can express my opinion, you don't have to stop at Direct2D. If you're happy with it now, you'll soon need to learn Direct3D or maybe even Blender immediately. My friend proved to me by example that in today's reality, Blender is preferable to master and is easier to configure and administer than Direct3D. My friend can use 3d models (https://forgehub.net) from Nebula for his work and post his work there. Let Direct2D is a hardware-accelerated API for 2D graphics which provides high performance and high-quality display of 2D geometry and text. But what if you want to work with three-dimensional objects?