Another short update:
Looks like gl ImageProcessor works fine, here's my patched version:
https://gist.github.com/kvasdopil/2d9942bcf168d75c76bfa29ca26c72aa- i'm quite certain it is not actually needed, Mailbox converter should be able to perform the conversion. Besides a GL renderer should be capable of rendering YUV frames without any conversion.
- If you have a look at the shader, it does not perform the actual color space conversion, just unwraps from NV12 to BGRA Yet the video colors are fine, no idea why.
Anyways, the pipeline seems to work fine. Video frames are getting decoded and CPU load is ~10%, less that 100% for a single core, which is exactly what i'm looking for.
Now the last problem: the video output is not smooth, looks like a lot of frames are getting dropped, perceived fps is ~15.
I added a bunch of logs here and there, for example in mojo_video_decoder_service.cc a `Decode pts=XXXXX` is called 30 times per second with correct timestamps, and `VideoDecoderPipeline::OnFrameConverted` is called 30 times per second, also with correct timestamps. Considering low CPU load I assume there's no performance bottleneck in decoder.
So either frames aren't rendered in time, or IPC isn't delivering them in time (not even sure IPC is used for hw video frames), or decoder is rewriting older frames with a new ones before they are rendered. All options sound unlikely to me, but I got no better ideas. Not quite sure how I debug that, could not find the client end of mojo_video_decoder_service.cc, media/mojo/clients/mojo_video_decoder.cc does not seem to be used (perhaps because i'm using --in-process-gpu, without that i got software composing).
Any advices would be greatly appreciated.
четверг, 13 апреля 2023 г. в 04:04:12 UTC+2, Alexey Guskov: