Closed mikeversteeg closed 2 years ago
See file SimdFont.hpp. The file contains simple functions to draw text (for debug purposes) built in Simd.
P.S. I tried to draw text and other primitives (lines, rectangles, ellipses) direct to YUV. It works for YUV444P, but for YUV420P the result is not good mainly due to different resolution of Y, U and V planes.
Drawing lines and rectangles indeed is also what I need to do, as well as text (but I need to be able to pick my own font). So I will use the RGB route for this then. Thanks!
P.S. I tried to draw text and other primitives (lines, rectangles, ellipses) direct to YUV. It works for YUV444P, but for YUV420P the result is not good mainly due to different resolution of Y, U and V planes.
Thinking of this some more: drawing text to YUV444P and then convert this to the YUV420P target would, I assume, still be a lot faster then drawing text to an RGB bitmap, convert that to YUV420P and then copy it to the YUV420P target?
I think that YUV444P to UV420P conversion is very fast (SimdReduceGray2x2 function), so first method is preferable.
I think that YUV444P to UV420P conversion is very fast (SimdReduceGray2x2 function), so first method is preferable.
So does that mean you are thinking about adding (optimised) text support after all?
No. I think that current solution (Simd::Font) is enough for debug purposes. The developing of full-fledged text renderer lies outside the sphere of my interests.
Just wanted to confirm there are no plans to add text functions in the making? I realise this may fall outside the purpose of this library. Not a big problem if there are no plans, I'll just write text to RGB using Windows functions, convert that to YUV and then alpha blend it over the YUV image.. Thanks.