Closed simonprovost closed 6 years ago
Not sure what conversion you are trying to do. In my sample app it converts YUV420 to RGBA in GL shader. If you want to render directly RGB frame (or RGBA) you need to create you own OpenGL renderer and GL shaders. If you need to convert some different format (not YUV420) to RGB in order to render frame you would need to modify GL renderer/shaders or create new one.
I have a function which have an algorithm and she must need an RGB buffer, then with you Draw function you received a YUV buffer, I'll convert it and play with it and reconvert it to send to your function which convert yuv to rgba and you'll draw..
It is too long because I don't a multi threading between my function which contain the algorithm and acquisitions and drawing, then I think about it and produce a multi threading and come back but I think that will be much better.
Thank you.
It will not work faster if you are going to use separate thread for conversion, it depends on your algorithm, but you can use GPU (GL shaders) for RGB conversion and processing video frame.
Oh really ? Ok ok thanks for it. Then :
first conversion (opencv native) (YUV TO RGB FOR MY ALGORITHM) take 11 ~ 18 ms . My algorithm take in general : 110 ~ 160 ms. And the last conversion (RGV TO YUV) and memcpy into final buffer take : 3 ~ 6 ms.
And next step is ->Draw(...)
Hello Again,
In
VideoRendererContext::draw
I've added to it some things which is great for my application, but I have a question:Without my modification we can see that the CPU is used at 15%, 20% in general, then we can note that your application is very good in performance in 720P.
However, if I write theses lines:
It will grow up to 80 % of my CPU, it is too weird ? Now I think that the conversion is not good for CPU. Do you know how can I decrease this grew up?
Could I make this on the GPU? I do not know anything, that's why I tell you my request. Thank you advance Dude. Regards.