Bug 89507

Summary: Optimise the scan code search
Product: libva Reporter: Olivier Crête <olivier.crete>
Component: intelAssignee: haihao <haihao.xiang>
Status: RESOLVED FIXED QA Contact: Sean V Kelley <seanvk>
Severity: normal    
Priority: medium CC: vjaquez
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: gen7_mfd: Optimise the scan code search

Description Olivier Crête 2015-03-09 22:27:56 UTC
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.
Comment 1 haihao 2015-03-10 06:19:07 UTC
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.
Comment 2 Olivier Crête 2015-03-10 13:59:46 UTC
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.
Comment 3 Olivier Crête 2015-03-10 14:02:58 UTC
We (Collabora) own the copyright to the GStreamer code (we wrote it), so I'm contributing it under the MIT license to you.
Comment 4 haihao 2015-03-26 00:46:05 UTC
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.