gstreamer/gst/vaapi/Makefile.am
Sreerenj Balachandran 5750bd7850 FEI: plugin: Add vaapih264feienc element
A new FEI based encoder element for h264 is added: vaapih264feienc

FEI is a an extension to VA-API which is providing low level
advanced control over different stages of encoding.
Extending vaapih264enc with fei support is possible, but it will
make the code too much complicated and will be difficult
to debug. So adding the new encoder element, but keeping
the rank as 0 , vaapih264enc will stay as the primary
encoder for normal use cases.

The vaaih264feienc is mainly useful for customers who want to play
with MotionVectors and Macroblock Predictions. Also user can
do one stage of encoding(eg: only the Motion Vector Calculation)
in software and offload trasformation/entroy-coding etc to
Hardware (which is what PAK module is doing) using FEI element.

vaapih264feienc can work in  different modes using fei-mode properoty

eg: gst-launch-1.0 videotestsrc ! vaapih264feienc fei-mode=ENC+PAK ! filesink location=sample.264

Important Note: ENC only mode won't produce any encoded data which is expected.
But ENC alwys requires the output of PAK in order to do the inter-prediction
over reconstructed frames.
Similary PAK mode alway requires MV and MBCode as input, so unless there is an
upstream element providing those buffers, PAK only won't work as expected.

In a nutshell, ENC_PAK and the ENC+PAK modes are the only options we can verify
with vaapih264feienc. But ideally, EN+PAK mode verification is enough to make sure
that ENC and PAK are working as expected since ENC+PAK mode always invoke ENC and PAK
separately in vaapih264feienc.

People contributed:
        Wang, Yi <yi.a.wang@intel.com>
        Leilei <leilei.shang@intel.com>
        Zhong, Xiaoxia <xiaoxia.zhong@intel.com>
        xiaominc <xiaomin.chen@intel.com>
        Li, Jing B <jing.b.li@intel.com>

https://bugzilla.gnome.org/show_bug.cgi?id=785712
https://bugzilla.gnome.org/show_bug.cgi?id=784667

Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
2017-09-01 13:15:05 +02:00

186 lines
4.6 KiB
Makefile

plugin_LTLIBRARIES = libgstvaapi.la
libgstvaapi_CFLAGS = \
$(LIBVA_CFLAGS) \
-DGST_USE_UNSTABLE_API \
-I$(top_srcdir)/gst-libs \
-I$(top_builddir)/gst-libs \
$(NULL)
libgstvaapi_LIBS = $(top_builddir)/gst-libs/gst/vaapi/libgstvaapi.la
if USE_DRM
libgstvaapi_LIBS +=$(top_builddir)/gst-libs/gst/vaapi/libgstvaapi-drm.la
endif
if USE_X11
libgstvaapi_LIBS += \
$(X11_LIBS) \
$(top_builddir)/gst-libs/gst/vaapi/libgstvaapi-x11.la
endif
if USE_GLX
libgstvaapi_LIBS += $(top_builddir)/gst-libs/gst/vaapi/libgstvaapi-glx.la
endif
if USE_EGL
libgstvaapi_LIBS += $(top_builddir)/gst-libs/gst/vaapi/libgstvaapi-egl.la
endif
if USE_WAYLAND
libgstvaapi_CFLAGS += \
$(WAYLAND_CFLAGS) \
$(NULL)
libgstvaapi_LIBS += $(top_builddir)/gst-libs/gst/vaapi/libgstvaapi-wayland.la
endif
if USE_GST_GL_HELPERS
libgstvaapi_CFLAGS += $(GST_GL_CFLAGS)
libgstvaapi_LIBS += $(GST_GL_LIBS)
endif
libgstvaapi_source_c = \
gstvaapi.c \
gstvaapidecode.c \
gstvaapidecodedoc.c \
gstvaapipluginbase.c \
gstvaapipluginutil.c \
gstvaapipostproc.c \
gstvaapipostprocutil.c \
gstvaapisink.c \
gstvaapivideobuffer.c \
gstvaapivideocontext.c \
gstvaapivideometa.c \
gstvaapidecodebin.c \
gstvaapivideobufferpool.c \
gstvaapivideomemory.c \
gstvaapivideometa_texture.c \
gstvaapidecode_props.c \
$(NULL)
libgstvaapi_source_h = \
gstcompat.h \
gstvaapidecode.h \
gstvaapipluginbase.h \
gstvaapipluginutil.h \
gstvaapipostproc.h \
gstvaapipostprocutil.h \
gstvaapisink.h \
gstvaapivideobuffer.h \
gstvaapivideocontext.h \
gstvaapivideometa.h \
gstvaapidecodebin.h \
gstvaapivideobufferpool.h \
gstvaapivideomemory.h \
gstvaapivideometa_texture.h \
gstvaapidecode_props.h \
$(NULL)
libgstvaapi_enc_source_c = \
gstvaapiencode.c \
gstvaapiencode_h264.c \
gstvaapiencode_mpeg2.c \
$(NULL)
libgstvaapi_enc_source_h = \
gstvaapiencode.h \
gstvaapiencode_h264.h \
gstvaapiencode_mpeg2.h \
$(NULL)
if USE_ENCODERS
libgstvaapi_source_c += $(libgstvaapi_enc_source_c)
libgstvaapi_source_h += $(libgstvaapi_enc_source_h)
endif
libgstvaapi_jpegenc_source_c = gstvaapiencode_jpeg.c
libgstvaapi_jpegenc_source_h = gstvaapiencode_jpeg.h
if USE_JPEG_ENCODER
libgstvaapi_source_c += $(libgstvaapi_jpegenc_source_c)
libgstvaapi_source_h += $(libgstvaapi_jpegenc_source_h)
endif
libgstvaapi_vp8enc_source_c = gstvaapiencode_vp8.c
libgstvaapi_vp8enc_source_h = gstvaapiencode_vp8.h
if USE_VP8_ENCODER
libgstvaapi_source_c += $(libgstvaapi_vp8enc_source_c)
libgstvaapi_source_h += $(libgstvaapi_vp8enc_source_h)
endif
libgstvaapi_h265enc_source_c = gstvaapiencode_h265.c
libgstvaapi_h265enc_source_h = gstvaapiencode_h265.h
if USE_H265_ENCODER
libgstvaapi_source_c += $(libgstvaapi_h265enc_source_c)
libgstvaapi_source_h += $(libgstvaapi_h265enc_source_h)
endif
libgstvaapi_vp9enc_source_c = gstvaapiencode_vp9.c
libgstvaapi_vp9enc_source_h = gstvaapiencode_vp9.h
if USE_VP9_ENCODER
libgstvaapi_source_c += $(libgstvaapi_vp9enc_source_c)
libgstvaapi_source_h += $(libgstvaapi_vp9enc_source_h)
endif
libgstvaapi_h264feienc_source_c = \
gstvaapifeivideometa.c \
gstvaapiencode_h264_fei.c \
$(NULL)
libgstvaapi_h264feienc_source_h = \
gstvaapifeivideometa.h \
gstvaapiencode_h264_fei.h \
$(NULL)
if USE_H264_FEI_ENCODER
libgstvaapi_source_c += $(libgstvaapi_h264feienc_source_c)
libgstvaapi_source_h += $(libgstvaapi_h264feienc_source_h)
endif
libgstvaapi_la_SOURCES = $(libgstvaapi_source_c)
noinst_HEADERS = $(libgstvaapi_source_h)
libgstvaapi_la_CFLAGS = \
$(libgstvaapi_CFLAGS) \
$(GST_CFLAGS) \
$(GST_BASE_CFLAGS) \
$(GST_VIDEO_CFLAGS) \
$(GST_PBUTILS_CFLAGS) \
$(GST_INTERFACES_CFLAGS) \
$(GST_BASEVIDEO_CFLAGS) \
$(GST_PLUGINS_BASE_CFLAGS) \
$(GST_ALLOCATORS_CFLAGS)
libgstvaapi_la_LIBADD = \
$(libgstvaapi_LIBS) \
$(GST_LIBS) \
$(GST_BASE_LIBS) \
$(GST_VIDEO_LIBS) \
$(GST_PBUTILS_LIBS) \
$(GST_INTERFACES_LIBS) \
$(GST_BASEVIDEO_LIBS) \
$(GST_PLUGINS_BASE_LIBS) \
$(GST_ALLOCATORS_LIBS)
libgstvaapi_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstvaapi_la_LIBTOOLFLAGS = --tag=disable-static
EXTRA_DIST = \
$(libgstvaapi_enc_source_c) \
$(libgstvaapi_enc_source_h) \
$(libgstvaapi_jpegenc_source_c) \
$(libgstvaapi_jpegenc_source_h) \
$(libgstvaapi_vp8enc_source_c) \
$(libgstvaapi_vp8enc_source_h) \
$(libgstvaapi_h265enc_source_c) \
$(libgstvaapi_h265enc_source_h) \
$(libgstvaapi_vp9enc_source_c) \
$(libgstvaapi_vp9enc_source_h) \
$(libgstvaapi_h264feienc_source_c) \
$(libgstvaapi_h264feienc_source_h) \
$(libgstvaapi_egl_source_c) \
$(libgstvaapi_egl_source_h) \
$(libgstvaapi_1_2p_source_c) \
$(libgstvaapi_1_2p_source_h) \
$(NULL)
-include $(top_srcdir)/git.mk