Hi, in this post I summarise all the work done on this project. Since our biggest goal to add EGLImage support was met so the project has been a success!
GSoC 2017 Project Link
https://summerofcode.withgoogle.com/archive/2017/projects/6355967214092288/
Final product
The individual patches can be found in this Google drive shared folder: https://drive.google.com/drive/folders/0BxYI-smGE0O1Sk5sZlQwS2p4NFk?usp=sharing
or
You can test out the patches directly from this branch on my mirror of the Mesa repository on github: https://github.com/gpalsingh/mesa/tree/gsoc-17-submission
Building
I use the following command line to compile it:
./autogen.sh --enable-texture-float --enable-gles1 --enable-gles2 --enable-glx --enable-egl --enable-llvm --enable-shared-glapi --enable-gbm --enable-glx-tls --enable-dri --enable-osmesa --with-platforms=x11,drm --with-gallium-drivers=radeonsi,swrast --with-dri-drivers=radeon,swrast --enable-vdpau --enable-omx-bellagio --enable-omx-tizonia --enable-va --enable-debug --prefix=/home/gpalsingh/gst/master/prefix && make -j8
Commits
Below I explain each individual patch. The first two commits are in preparation for the new state tracker:
- st/omx_bellagio: Rename state tracker and option : In response to Christian’s review the older omx state tracker was renamed. The option “–enable-omx” was disabled. Only “–enable-omx-bellagio” is accepted now.
- gallium: Refactor out vl_put_screen and vl_get_screen : This change moves the screen functions to gallium/auxiliary/vl to decrease code duplication.
- st/omx_tizonia: Add –enable-omx-tizonia flag and build files : Adds option to enable tizonia state tracker. This only adds “st/targets/omx-tizonia” and related changes to enable compilation. The “st/omx_tizonia ” directory containing the state tracker is added in the next commits.
- st/omx_tizonia: Add entrypoint : This commit adds common structure for all state trackers in “st/omx_tizonia”.
- st/omx_tizonia: Add H.264 decoder : First big change. Adds the H.264 decoder component.
- st/omx_tizonia: Add H.264 encoder : Another major change. Adds the H.264 encoder.
- st/omx_tizonia/h264d: Add EGLImage support : Adds a new feature that wasn’t available previously in the bellagio based state tracker. Makes changes to decoder to allow directly decoding to EGLImage. For the performance improvements check out my other post in which I compared the CPU usage.
After these changes both the state trackers can coexist i.e. “–enable-omx-bellagio” and “–enable-omx-tizonia” both can be used at the same time.
Future plan
The GSoC project might have been over but there are still improvements to be made to the state tracker.
- Refactor code before merge : After some discussion it was generally decided that the code should be refactored before committing it to the main mesa branch. The state tracker is supposed to replace the current state tracker completely. But since it still needs more work to add the other components the duplicated code should be refactored out. This will most likely a temporary (until it has all the components that are in the bellagio omx sate tracker) but required change. This will allow the users to directly use the code from main mesa git without having to use the patches or the project branch.
- Add other components : The state tracker is still missing some components like mepg decoder and HEVC decoder.
- Fix remaining issues : There are a number of small bugs / improvements still left that we’ve put to fix later on. You can check the issues’ current status on github.
I plan to keep on working on the state tracker in the future but won’t be able to give it as much time so only my free time updating the mesa clone before sending in patches.
Acknowledgements
Special thanks to Julien (GSoC mentor) and Juan (Tizonia OpenMAX IL owner) for providing constand guidance and help. Also thanks to everyone else involved for making this project a success!