[FFmpeg-devel] [PATCH] qsv: Use the installed mfx include headers if possibile
Li, Zhong
zhong.li at intel.com
Tue May 15 08:33:50 EEST 2018
> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf
> Of Xiang, Haihao
> Sent: Monday, May 14, 2018 10:38 AM
> To: ffmpeg-devel at ffmpeg.org
> Subject: Re: [FFmpeg-devel] [PATCH] qsv: Use the installed mfx include
> headers if possibile
>
> On Mon, 2018-05-14 at 00:50 +0000, Xiang, Haihao wrote:
> > > On 11/05/18 08:52, Haihao Xiang wrote:
> > > > Currently an extra copy of mfx include headers from
> > > > {MSDK_INSTALL_PREFIX}/include to
> {MSDK_INSTALL_PREFIX}/include/mfx
> > > > is required when using pkg-config for libmfx detection. This fix
> > > > checks the installed mfx include headers first, and falls back to
> > > > the legacy way if that fails
> > > >
> > > > Signed-off-by: Haihao Xiang <haihao.xiang at intel.com>
> > > > ---
> > > > configure | 3 ++-
> > > > fftools/ffmpeg_qsv.c | 5 +++++
> > > > libavcodec/qsv.c | 10 ++++++++++
> > > > libavcodec/qsv.h | 4 ++++
> > > > libavcodec/qsv_internal.h | 4 ++++
> > > > libavcodec/qsvdec.c | 4 ++++
> > > > libavcodec/qsvdec.h | 4 ++++
> > > > libavcodec/qsvdec_h2645.c | 4 ++++
> > > > libavcodec/qsvdec_other.c | 4 ++++
> > > > libavcodec/qsvenc.c | 5 +++++
> > > > libavcodec/qsvenc.h | 4 ++++
> > > > libavcodec/qsvenc_h264.c | 4 ++++
> > > > libavcodec/qsvenc_hevc.c | 4 ++++
> > > > libavcodec/qsvenc_jpeg.c | 4 ++++
> > > > libavcodec/qsvenc_mpeg2.c | 4 ++++
> > > > libavfilter/qsvvpp.h | 4 ++++
> > > > libavfilter/vf_deinterlace_qsv.c | 4 ++++
> > > > libavfilter/vf_scale_qsv.c | 4 ++++
> > > > libavutil/hwcontext_opencl.c | 4 ++++
> > > > libavutil/hwcontext_qsv.c | 4 ++++
> > > > libavutil/hwcontext_qsv.h | 4 ++++
> > > > 21 files changed, 90 insertions(+), 1 deletion(-)
> > >
> > > I don't think it's a good idea to put an #ifdef like this in every file.
> > >
> > > >
> > > > diff --git a/configure b/configure index a1f13a7109..e1f72495fb
> > > > 100755
> > > > --- a/configure
> > > > +++ b/configure
> > > > @@ -6007,7 +6007,8 @@ enabled libkvazaar &&
> require_pkg_config
> > > > libkvazaar "kvazaar >= 0.8.1" kv
> > > > # Media SDK or Intel Media Server Studio, these don't come with
> > > > # pkg-config support. Instead, users should make sure that the
> > > > build # can find the libraries and headers through other means.
> > > > -enabled libmfx && { check_pkg_config libmfx libmfx
> > > > "mfx/mfxvideo.h" MFXInit ||
> > > > +enabled libmfx && { { check_pkg_config libmfx libmfx
> > > > "mfxvideo.h" MFXInit && add_cflags -DMFX_DEFAULT_INC_PATH; } ||
> > > > + { check_pkg_config libmfx
> libmfx
> > > > "mfx/mfxvideo.h" MFXInit; } ||
> > > > { require libmfx
> "mfx/mfxvideo.h"
> > > > MFXInit
> > > > "-
> > > > llibmfx $advapi32_extralibs" && warn "using libmfx without
> > > > pkg-config"; } }
> > > > enabled libmodplug && require_pkg_config libmodplug
> libmodplug
> > > > libmodplug/modplug.h ModPlug_Load
> > > > enabled libmp3lame && require "libmp3lame >= 3.98.3"
> lame/lame.h
> > > > lame_set_VBR_quality -lmp3lame $libm_extralibs
> > >
> > > So in the current code, the first test is for the open-source
> > > dispatcher (<htt ps://github.com/lu-zero/mfx_dispatch>), which gets
> > > used everywhere that pkgconfig is supported, including mingw on
> > > Windows. The second test is for Windows cases where you can't make
> > > make pkgconfig work.
> > >
> > > What installs the headers directly in $PREFIX/include? Presumably
> > > this is a new change - can we ask them not to do that? (Because
> > > organising them in a subdirectory is I think much more sensible.)
> > >
> >
> > Link below is the open-source version of MediaSDK which installs the
> > headers directly in $PREFIX/include. User needn't the open-source
> > dispatcher any more on Linux
> >
> > https://github.com/Intel-Media-SDK/MediaSDK
> >
>
> I filed https://github.com/Intel-Media-SDK/MediaSDK/issues/199, hope they
> can change the install path for mfx headers.
Changing it in open source MSDK should be a better solution.
>
> Thanks
> Haihao
More information about the ffmpeg-devel
mailing list