Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RFC: Static libva builds with embedded drivers #118

Closed
tmm1 opened this issue Sep 19, 2017 · 4 comments
Closed

RFC: Static libva builds with embedded drivers #118

tmm1 opened this issue Sep 19, 2017 · 4 comments

Comments

@tmm1
Copy link

tmm1 commented Sep 19, 2017

Hi, I've been using the following patch along with CFLAGS="-DSTATIC_DRIVER" to build libva statically (combined with a static build of the intel-driver) and link it together with a static build of ffmpeg: https://github.com/01org/libva/compare/6b8fbf6ea348bb2970af2df9b8e0b3493e3e86f5...ad5f1f4b3491ccef390074f791cf36f4ec39b065

Is there any interest in including something like this in libva, perhaps with ./configure --enable-static? If so, I'm happy to submit a PR to do so.

At the moment, my patch hacks in an extern VADriverInit __vaDriverInit_0_XX and expects the embedded driver to expose that symbol. This means only a single driver can be embedded. Perhaps it makes sense to generalize this approach further to allow multiple drivers to all be linked statically together along with a static libva.

@fhvwy
Copy link
Contributor

fhvwy commented Sep 19, 2017

No comment on the code, but if you want to do this then please be very careful about licensing because the combined work will be covered by more than the MIT licence of libva. In particular, the Intel driver contains proprietary blobs without source code, and is therefore incompatible with many licences. For example, an ffmpeg linked with a combined libva+intel driver and libx264 would not be distributable, and that really should be detectable at ffmpeg configure time to avoid accidental GPL violations.

@tmm1
Copy link
Author

tmm1 commented Nov 9, 2017

Thanks for the heads up about licensing.

The intel-vaapi-driver has an MIT license here: https://github.com/01org/intel-vaapi-driver/blob/master/COPYING

Can you point me at the proprietary blobs present in that driver? I'm having a hard time finding them.

@fhvwy
Copy link
Contributor

fhvwy commented Nov 9, 2017

The MIT licence indeed applies to the source code which is available, but it says nothing about that source code being complete.

See code like https://github.com/01org/intel-vaapi-driver/blob/master/src/i965_avc_encoder_kernels.c, which is compiled from some other source and included as a binary embedded in a source file. Technically this generated source file is copyable/editable under MIT terms, but it definitely wouldn't count as the full "Corresponding Source" required by the GPL.

(intel/intel-vaapi-driver#220 has a more complete list of files without source code.)

@xhaihao
Copy link
Contributor

xhaihao commented Nov 17, 2017

Thanks, but we haven't a plan to support static libva build

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants