Created attachment 114178 [details] [review] gen7_mfd: Optimise the scan code search When playing HD mpeg2 content, mpeg2_get_slice_data_length() shows up at the top of my perf report. Attaching a patch inspired by the code in GStreamer to look for the scan code. With this patch, the CPU usage drops by like 60% for this function.
Thanks for the patch, but your patch is inspired from gstreamer which is licensed under LGPL, however our driver is licensed under MIT. there is license conflict.
Another option is to talk to the gst-plugins-vaapi guys, they already look for the scan code, you shouldn't be looking for it again, but instead somehow pass the information.
We (Collabora) own the copyright to the GStreamer code (we wrote it), so I'm contributing it under the MIT license to you.
Applied Thanks Haihao
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.