FEI: libs: Add fei codec objects to GstVaapiEncPicture
authorSreerenj Balachandran <sreerenj.balachandran@intel.com>
Thu, 10 Aug 2017 00:54:27 +0000 (17:54 -0700)
committerVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Fri, 1 Sep 2017 09:32:24 +0000 (11:32 +0200)
All the codec objects(vaapi buffers) supposed to be
submited in vaRenderPicutre are associated with a GstVaapiEncPicture
for each frame, follow the same design for FEI too.

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

gst-libs/gst/vaapi/gstvaapiencoder_objects.c
gst-libs/gst/vaapi/gstvaapiencoder_objects.h

index 02149d239e7862c13cd5ec2b3de1e52bea6c0236..ef72b5906c043f6b189e8ceaca08f540522385ef 100644 (file)
@@ -351,6 +351,15 @@ gst_vaapi_enc_picture_destroy (GstVaapiEncPicture * picture)
 
   gst_vaapi_codec_object_replace (&picture->sequence, NULL);
 
+#if USE_H264_FEI_ENCODER
+  gst_vaapi_codec_object_replace (&picture->mvpred, NULL);
+  gst_vaapi_codec_object_replace (&picture->mbcntrl, NULL);
+  gst_vaapi_codec_object_replace (&picture->qp, NULL);
+  gst_vaapi_codec_object_replace (&picture->mbcode, NULL);
+  gst_vaapi_codec_object_replace (&picture->mv, NULL);
+  gst_vaapi_codec_object_replace (&picture->dist, NULL);
+#endif
+
   gst_vaapi_surface_proxy_replace (&picture->proxy, NULL);
   picture->surface_id = VA_INVALID_ID;
   picture->surface = NULL;
index 8ca594679a345037bd7000a19f21b78e0d84bfb4..a4179ff06dc06f4dee819e490f1c3aaae606f822 100644 (file)
 #include <gst/vaapi/gstvaapidecoder_objects.h>
 #include <gst/vaapi/gstvaapiencoder.h>
 
+#if USE_H264_FEI_ENCODER
+#include <gst/vaapi/gstvaapifei_objects.h>
+#endif
+
 G_BEGIN_DECLS
 
 typedef struct _GstVaapiEncPicture GstVaapiEncPicture;
@@ -261,6 +265,14 @@ struct _GstVaapiEncPicture
   GstClockTime pts;
   guint frame_num;
   guint poc;
+#if USE_H264_FEI_ENCODER
+  GstVaapiEncFeiMbControl *mbcntrl;
+  GstVaapiEncFeiMvPredictor *mvpred;
+  GstVaapiEncFeiQp *qp;
+  GstVaapiEncFeiMbCode *mbcode;
+  GstVaapiEncFeiMv *mv;
+  GstVaapiEncFeiDistortion *dist;
+#endif
 };
 
 G_GNUC_INTERNAL