2013-07-29 05:34:06 +00:00
|
|
|
/*
|
|
|
|
* gstvaapiencoder_objects.h - VA encoder objects abstraction
|
|
|
|
*
|
2014-01-22 17:54:14 +00:00
|
|
|
* Copyright (C) 2013-2014 Intel Corporation
|
2014-01-22 17:49:20 +00:00
|
|
|
* Author: Wind Yuan <feng.yuan@intel.com>
|
2013-07-29 05:34:06 +00:00
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public License
|
|
|
|
* as published by the Free Software Foundation; either version 2.1
|
|
|
|
* of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free
|
|
|
|
* Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
* Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef GST_VAAPI_ENCODER_OBJECTS_H
|
|
|
|
#define GST_VAAPI_ENCODER_OBJECTS_H
|
|
|
|
|
|
|
|
#include <gst/vaapi/gstvaapicodec_objects.h>
|
|
|
|
#include <gst/vaapi/gstvaapidecoder_objects.h>
|
|
|
|
#include <gst/vaapi/gstvaapiencoder.h>
|
|
|
|
|
2017-08-10 00:54:27 +00:00
|
|
|
#if USE_H264_FEI_ENCODER
|
|
|
|
#include <gst/vaapi/gstvaapifei_objects.h>
|
|
|
|
#endif
|
|
|
|
|
2013-07-29 05:34:06 +00:00
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
typedef struct _GstVaapiEncPicture GstVaapiEncPicture;
|
|
|
|
typedef struct _GstVaapiEncSequence GstVaapiEncSequence;
|
|
|
|
typedef struct _GstVaapiEncMiscParam GstVaapiEncMiscParam;
|
|
|
|
typedef struct _GstVaapiEncSlice GstVaapiEncSlice;
|
2015-02-04 09:15:38 +00:00
|
|
|
typedef struct _GstVaapiEncQMatrix GstVaapiEncQMatrix;
|
|
|
|
typedef struct _GstVaapiEncHuffmanTable GstVaapiEncHuffmanTable;
|
2013-07-29 05:34:06 +00:00
|
|
|
typedef struct _GstVaapiEncPackedHeader GstVaapiEncPackedHeader;
|
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------- */
|
|
|
|
/* --- Encoder Packed Header --- */
|
|
|
|
/* ------------------------------------------------------------------------- */
|
|
|
|
|
2014-01-14 11:01:11 +00:00
|
|
|
#define GST_VAAPI_ENC_PACKED_HEADER(obj) \
|
|
|
|
((GstVaapiEncPackedHeader *) (obj))
|
2013-07-29 05:34:06 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GstVaapiEncPackedHeader:
|
|
|
|
*
|
2014-01-14 11:01:11 +00:00
|
|
|
* A #GstVaapiCodecObject holding a packed header (param/data) for the
|
|
|
|
* encoder.
|
2013-07-29 05:34:06 +00:00
|
|
|
*/
|
|
|
|
struct _GstVaapiEncPackedHeader
|
|
|
|
{
|
2014-01-14 11:01:11 +00:00
|
|
|
/*< private >*/
|
2013-07-29 05:34:06 +00:00
|
|
|
GstVaapiCodecObject parent_instance;
|
|
|
|
|
2014-01-14 11:01:11 +00:00
|
|
|
/*< public >*/
|
2013-07-29 05:34:06 +00:00
|
|
|
VABufferID param_id;
|
|
|
|
gpointer param;
|
|
|
|
VABufferID data_id;
|
|
|
|
gpointer data;
|
|
|
|
};
|
|
|
|
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
GstVaapiEncPackedHeader *
|
|
|
|
gst_vaapi_enc_packed_header_new (GstVaapiEncoder * encoder,
|
|
|
|
gconstpointer param, guint param_size, gconstpointer data, guint data_size);
|
|
|
|
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
gboolean
|
2014-01-14 11:01:11 +00:00
|
|
|
gst_vaapi_enc_packed_header_set_data (GstVaapiEncPackedHeader * header,
|
2013-07-29 05:34:06 +00:00
|
|
|
gconstpointer data, guint data_size);
|
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------- */
|
|
|
|
/* --- Encoder Sequence --- */
|
|
|
|
/* ------------------------------------------------------------------------- */
|
|
|
|
|
2014-01-14 11:01:11 +00:00
|
|
|
#define GST_VAAPI_ENC_SEQUENCE(obj) \
|
|
|
|
((GstVaapiEncSequence *) (obj))
|
2013-07-29 05:34:06 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GstVaapiEncSequence:
|
|
|
|
*
|
2014-01-14 11:01:11 +00:00
|
|
|
* A #GstVaapiCodecObject holding a sequence parameter for encoding.
|
2013-07-29 05:34:06 +00:00
|
|
|
*/
|
|
|
|
struct _GstVaapiEncSequence
|
|
|
|
{
|
2014-01-14 11:01:11 +00:00
|
|
|
/*< private >*/
|
2013-07-29 05:34:06 +00:00
|
|
|
GstVaapiCodecObject parent_instance;
|
|
|
|
|
2014-01-14 11:01:11 +00:00
|
|
|
/*< public >*/
|
2013-07-29 05:34:06 +00:00
|
|
|
VABufferID param_id;
|
|
|
|
gpointer param;
|
|
|
|
};
|
|
|
|
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
GstVaapiEncSequence *
|
|
|
|
gst_vaapi_enc_sequence_new (GstVaapiEncoder * encoder,
|
|
|
|
gconstpointer param, guint param_size);
|
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------- */
|
|
|
|
/* --- Encoder Slice --- */
|
|
|
|
/* ------------------------------------------------------------------------- */
|
|
|
|
|
2014-01-14 11:01:11 +00:00
|
|
|
#define GST_VAAPI_ENC_SLICE(obj) \
|
|
|
|
((GstVaapiEncSlice *) (obj))
|
2013-07-29 05:34:06 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GstVaapiEncSlice:
|
|
|
|
*
|
2014-01-14 11:01:11 +00:00
|
|
|
* A #GstVaapiCodecObject holding a slice parameter used for encoding.
|
2013-07-29 05:34:06 +00:00
|
|
|
*/
|
|
|
|
struct _GstVaapiEncSlice
|
|
|
|
{
|
2014-01-14 11:01:11 +00:00
|
|
|
/*< private >*/
|
2013-07-29 05:34:06 +00:00
|
|
|
GstVaapiCodecObject parent_instance;
|
|
|
|
|
2014-01-14 11:01:11 +00:00
|
|
|
/*< public >*/
|
2013-07-29 05:34:06 +00:00
|
|
|
VABufferID param_id;
|
|
|
|
gpointer param;
|
2014-06-05 12:30:38 +00:00
|
|
|
GPtrArray *packed_headers;
|
2013-07-29 05:34:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
GstVaapiEncSlice *
|
|
|
|
gst_vaapi_enc_slice_new (GstVaapiEncoder * encoder,
|
|
|
|
gconstpointer param, guint param_size);
|
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------- */
|
|
|
|
/* --- Encoder Misc Parameter Buffer --- */
|
|
|
|
/* ------------------------------------------------------------------------- */
|
|
|
|
|
2014-01-14 11:01:11 +00:00
|
|
|
#define GST_VAAPI_ENC_MISC_PARAM(obj) \
|
|
|
|
((GstVaapiEncMiscParam *) (obj))
|
2013-07-29 05:34:06 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* GstVaapiEncMiscParam:
|
|
|
|
*
|
2014-01-14 11:01:11 +00:00
|
|
|
* A #GstVaapiCodecObject holding a misc parameter and associated data
|
|
|
|
* used for controlling the encoder dynamically.
|
2013-07-29 05:34:06 +00:00
|
|
|
*/
|
|
|
|
struct _GstVaapiEncMiscParam
|
|
|
|
{
|
2014-01-14 11:01:11 +00:00
|
|
|
/*< private >*/
|
2013-07-29 05:34:06 +00:00
|
|
|
GstVaapiCodecObject parent_instance;
|
|
|
|
gpointer param;
|
|
|
|
|
2014-01-14 11:01:11 +00:00
|
|
|
/*< public >*/
|
2013-07-29 05:34:06 +00:00
|
|
|
VABufferID param_id;
|
2014-01-14 11:01:11 +00:00
|
|
|
gpointer data;
|
2013-07-29 05:34:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
GstVaapiEncMiscParam *
|
|
|
|
gst_vaapi_enc_misc_param_new (GstVaapiEncoder * encoder,
|
2014-01-14 11:01:11 +00:00
|
|
|
VAEncMiscParameterType type, guint data_size);
|
2013-07-29 05:34:06 +00:00
|
|
|
|
2015-02-04 09:15:38 +00:00
|
|
|
/* ------------------------------------------------------------------------- */
|
|
|
|
/* --- Quantization Matrices --- */
|
|
|
|
/* ------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
#define GST_VAAPI_ENC_Q_MATRIX_CAST(obj) \
|
|
|
|
((GstVaapiEncQMatrix *) (obj))
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GstVaapiEncQMatrix:
|
|
|
|
*
|
|
|
|
* A #GstVaapiCodecObject holding a quantization matrix parameter.
|
|
|
|
*/
|
|
|
|
struct _GstVaapiEncQMatrix
|
|
|
|
{
|
|
|
|
/*< private >*/
|
|
|
|
GstVaapiCodecObject parent_instance;
|
|
|
|
VABufferID param_id;
|
|
|
|
|
|
|
|
/*< public >*/
|
|
|
|
gpointer param;
|
|
|
|
};
|
|
|
|
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
GstVaapiEncQMatrix *
|
|
|
|
gst_vaapi_enc_q_matrix_new (GstVaapiEncoder * encoder, gconstpointer param,
|
|
|
|
guint param_size);
|
|
|
|
|
|
|
|
/* ------------------------------------------------------------------------- */
|
|
|
|
/* --- JPEG Huffman Tables --- */
|
|
|
|
/* ------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
#define GST_VAAPI_ENC_HUFFMAN_TABLE_CAST(obj) \
|
|
|
|
((GstVaapiEncHuffmanTable *) (obj))
|
|
|
|
|
|
|
|
/**
|
|
|
|
* GstVaapiEncHuffmanTable:
|
|
|
|
*
|
|
|
|
* A #GstVaapiCodecObject holding huffman table.
|
|
|
|
*/
|
|
|
|
struct _GstVaapiEncHuffmanTable
|
|
|
|
{
|
|
|
|
/*< private >*/
|
|
|
|
GstVaapiCodecObject parent_instance;
|
|
|
|
VABufferID param_id;
|
|
|
|
|
|
|
|
/*< public >*/
|
|
|
|
gpointer param;
|
|
|
|
};
|
|
|
|
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
GstVaapiEncHuffmanTable *
|
|
|
|
gst_vaapi_enc_huffman_table_new (GstVaapiEncoder * encoder, guint8 * data,
|
|
|
|
guint data_size);
|
|
|
|
|
2013-07-29 05:34:06 +00:00
|
|
|
/* ------------------------------------------------------------------------- */
|
|
|
|
/* --- Encoder Picture --- */
|
|
|
|
/* ------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
#define GST_VAAPI_ENC_PICTURE(obj) \
|
2014-01-14 11:01:11 +00:00
|
|
|
((GstVaapiEncPicture *) (obj))
|
2013-07-29 05:34:06 +00:00
|
|
|
|
|
|
|
typedef enum
|
|
|
|
{
|
2016-07-27 13:41:01 +00:00
|
|
|
GST_VAAPI_ENC_PICTURE_FLAG_IDR = (GST_VAAPI_CODEC_OBJECT_FLAG_LAST << 0),
|
|
|
|
GST_VAAPI_ENC_PICTURE_FLAG_REFERENCE = (GST_VAAPI_CODEC_OBJECT_FLAG_LAST << 1),
|
|
|
|
GST_VAAPI_ENC_PICTURE_FLAG_LAST = (GST_VAAPI_CODEC_OBJECT_FLAG_LAST << 2),
|
2013-07-29 05:34:06 +00:00
|
|
|
} GstVaapiEncPictureFlags;
|
|
|
|
|
|
|
|
#define GST_VAAPI_ENC_PICTURE_FLAGS GST_VAAPI_MINI_OBJECT_FLAGS
|
|
|
|
#define GST_VAAPI_ENC_PICTURE_FLAG_IS_SET GST_VAAPI_MINI_OBJECT_FLAG_IS_SET
|
|
|
|
#define GST_VAAPI_ENC_PICTURE_FLAG_SET GST_VAAPI_MINI_OBJECT_FLAG_SET
|
|
|
|
#define GST_VAAPI_ENC_PICTURE_FLAG_UNSET GST_VAAPI_MINI_OBJECT_FLAG_UNSET
|
|
|
|
|
|
|
|
#define GST_VAAPI_ENC_PICTURE_IS_IDR(picture) \
|
|
|
|
GST_VAAPI_ENC_PICTURE_FLAG_IS_SET(picture, GST_VAAPI_ENC_PICTURE_FLAG_IDR)
|
|
|
|
|
2016-07-27 13:41:01 +00:00
|
|
|
#define GST_VAAPI_ENC_PICTURE_IS_REFRENCE(picture) \
|
|
|
|
GST_VAAPI_ENC_PICTURE_FLAG_IS_SET(picture, GST_VAAPI_ENC_PICTURE_FLAG_REFERENCE)
|
|
|
|
|
2013-07-29 05:34:06 +00:00
|
|
|
/**
|
|
|
|
* GstVaapiEncPicture:
|
|
|
|
*
|
2014-01-14 11:01:11 +00:00
|
|
|
* A #GstVaapiCodecObject holding a picture parameter for encoding.
|
2013-07-29 05:34:06 +00:00
|
|
|
*/
|
|
|
|
struct _GstVaapiEncPicture
|
|
|
|
{
|
2014-01-14 11:01:11 +00:00
|
|
|
/*< private >*/
|
2013-07-29 05:34:06 +00:00
|
|
|
GstVaapiCodecObject parent_instance;
|
|
|
|
GstVideoCodecFrame *frame;
|
2013-11-28 14:56:53 +00:00
|
|
|
GstVaapiSurfaceProxy *proxy;
|
2013-07-29 05:34:06 +00:00
|
|
|
GstVaapiSurface *surface;
|
|
|
|
VABufferID param_id;
|
|
|
|
guint param_size;
|
|
|
|
|
2014-01-14 11:01:11 +00:00
|
|
|
/* Additional data to pass down */
|
|
|
|
GstVaapiEncSequence *sequence;
|
|
|
|
GPtrArray *packed_headers;
|
|
|
|
GPtrArray *misc_params;
|
|
|
|
|
|
|
|
/*< public >*/
|
2013-07-29 05:34:06 +00:00
|
|
|
GstVaapiPictureType type;
|
|
|
|
VASurfaceID surface_id;
|
|
|
|
gpointer param;
|
2014-01-14 11:01:11 +00:00
|
|
|
GPtrArray *slices;
|
2015-02-04 09:15:38 +00:00
|
|
|
GstVaapiEncQMatrix *q_matrix;
|
|
|
|
GstVaapiEncHuffmanTable *huf_table;
|
2013-07-29 05:34:06 +00:00
|
|
|
GstClockTime pts;
|
|
|
|
guint frame_num;
|
|
|
|
guint poc;
|
2016-07-28 12:12:05 +00:00
|
|
|
guint temporal_id;
|
2017-08-10 00:54:27 +00:00
|
|
|
#if USE_H264_FEI_ENCODER
|
|
|
|
GstVaapiEncFeiMbControl *mbcntrl;
|
|
|
|
GstVaapiEncFeiMvPredictor *mvpred;
|
|
|
|
GstVaapiEncFeiQp *qp;
|
|
|
|
GstVaapiEncFeiMbCode *mbcode;
|
|
|
|
GstVaapiEncFeiMv *mv;
|
|
|
|
GstVaapiEncFeiDistortion *dist;
|
|
|
|
#endif
|
2013-07-29 05:34:06 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
GstVaapiEncPicture *
|
|
|
|
gst_vaapi_enc_picture_new (GstVaapiEncoder * encoder,
|
|
|
|
gconstpointer param, guint param_size, GstVideoCodecFrame * frame);
|
|
|
|
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
void
|
|
|
|
gst_vaapi_enc_picture_set_sequence (GstVaapiEncPicture * picture,
|
|
|
|
GstVaapiEncSequence * sequence);
|
|
|
|
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
void
|
|
|
|
gst_vaapi_enc_picture_add_packed_header (GstVaapiEncPicture * picture,
|
|
|
|
GstVaapiEncPackedHeader * header);
|
|
|
|
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
void
|
2014-01-14 11:01:11 +00:00
|
|
|
gst_vaapi_enc_picture_add_misc_param (GstVaapiEncPicture * picture,
|
2013-07-29 05:34:06 +00:00
|
|
|
GstVaapiEncMiscParam * misc);
|
|
|
|
|
|
|
|
G_GNUC_INTERNAL
|
|
|
|
void
|
|
|
|
gst_vaapi_enc_picture_add_slice (GstVaapiEncPicture * picture,
|
|
|
|
GstVaapiEncSlice * slice);
|
|
|
|
|
2014-06-05 12:30:38 +00:00
|
|
|
G_GNUC_INTERNAL
|
|
|
|
void
|
|
|
|
gst_vaapi_enc_slice_add_packed_header (GstVaapiEncSlice *slice,
|
|
|
|
GstVaapiEncPackedHeader * header);
|
|
|
|
|
2013-07-29 05:34:06 +00:00
|
|
|
G_GNUC_INTERNAL
|
|
|
|
gboolean
|
|
|
|
gst_vaapi_enc_picture_encode (GstVaapiEncPicture * picture);
|
|
|
|
|
2014-01-14 11:01:11 +00:00
|
|
|
#define gst_vaapi_enc_picture_ref(picture) \
|
|
|
|
gst_vaapi_codec_object_ref (picture)
|
|
|
|
#define gst_vaapi_enc_picture_unref(picture) \
|
|
|
|
gst_vaapi_codec_object_unref (picture)
|
|
|
|
#define gst_vaapi_enc_picture_replace(old_picture_ptr, new_picture) \
|
|
|
|
gst_vaapi_codec_object_replace (old_picture_ptr, new_picture)
|
2013-07-29 05:34:06 +00:00
|
|
|
|
2014-01-14 11:01:11 +00:00
|
|
|
/* ------------------------------------------------------------------------- */
|
|
|
|
/* --- Helpers to create codec-dependent objects --- */
|
|
|
|
/* ------------------------------------------------------------------------- */
|
2013-07-29 05:34:06 +00:00
|
|
|
|
2014-01-14 11:01:11 +00:00
|
|
|
/* GstVaapiEncSequence */
|
2013-07-29 05:34:06 +00:00
|
|
|
#define GST_VAAPI_ENC_SEQUENCE_NEW(codec, encoder) \
|
2014-01-14 11:01:11 +00:00
|
|
|
gst_vaapi_enc_sequence_new (GST_VAAPI_ENCODER_CAST (encoder), \
|
|
|
|
NULL, sizeof (G_PASTE (VAEncSequenceParameterBuffer, codec)))
|
2013-07-29 05:34:06 +00:00
|
|
|
|
2014-01-14 11:01:11 +00:00
|
|
|
/* GstVaapiEncMiscParam */
|
2013-07-29 05:34:06 +00:00
|
|
|
#define GST_VAAPI_ENC_MISC_PARAM_NEW(type, encoder) \
|
2014-01-14 11:01:11 +00:00
|
|
|
gst_vaapi_enc_misc_param_new (GST_VAAPI_ENCODER_CAST (encoder), \
|
|
|
|
G_PASTE (VAEncMiscParameterType, type), \
|
|
|
|
sizeof (G_PASTE (VAEncMiscParameter, type)))
|
2013-07-29 05:34:06 +00:00
|
|
|
|
2017-05-12 09:11:48 +00:00
|
|
|
/* GstVaapiEncQualityLevelMiscParam */
|
encoders: add quality level tuning
This patch adds the handling of VAEncMiscParameterTypeQualityLevel,
in gstreamer-vaapi encoders:
The encoding quality could be set through this structure, if the
implementation supports multiple quality levels. The quality level set
through this structure is persistent over the entire coded sequence, or
until a new structure is being sent. The quality level range can be queried
through the VAConfigAttribEncQualityRange attribute. A lower value means
higher quality, and a value of 1 represents the highest quality. The quality
level setting is used as a trade-off between quality and speed/power
consumption, with higher quality corresponds to lower speed and higher power
consumption.
The quality level is set by the element's parameter "quality-level" with a
hard-coded range of 1 to 8.
Later, when the encoder is configured in run time, just before start
processing, the quality level is scaled to the codec range. If
VAConfigAttribEncQualityRange is not available in the used VA backend, then
the quality level is set to zero, which means "disabled".
All the available codecs now process this parameter if it is available.
https://bugzilla.gnome.org/show_bug.cgi?id=778733
Signed-off-by: Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
2017-04-19 20:04:44 +00:00
|
|
|
#define GST_VAAPI_ENC_QUALITY_LEVEL_MISC_PARAM_NEW(encoder) \
|
|
|
|
gst_vaapi_enc_misc_param_new (GST_VAAPI_ENCODER_CAST (encoder), \
|
|
|
|
VAEncMiscParameterTypeQualityLevel, \
|
|
|
|
sizeof (VAEncMiscParameterBufferQualityLevel))
|
|
|
|
|
2019-05-08 15:39:20 +00:00
|
|
|
/* GstVaapiEncQuantizationMiscParam */
|
|
|
|
#define GST_VAAPI_ENC_QUANTIZATION_MISC_PARAM_NEW(encoder) \
|
|
|
|
gst_vaapi_enc_misc_param_new (GST_VAAPI_ENCODER_CAST (encoder), \
|
|
|
|
VAEncMiscParameterTypeQuantization, \
|
|
|
|
sizeof (VAEncMiscParameterQuantization))
|
|
|
|
|
2014-01-14 11:01:11 +00:00
|
|
|
/* GstVaapiEncPicture */
|
2013-07-29 05:34:06 +00:00
|
|
|
#define GST_VAAPI_ENC_PICTURE_NEW(codec, encoder, frame) \
|
2014-01-14 11:01:11 +00:00
|
|
|
gst_vaapi_enc_picture_new (GST_VAAPI_ENCODER_CAST (encoder), \
|
|
|
|
NULL, sizeof (G_PASTE (VAEncPictureParameterBuffer, codec)), frame)
|
|
|
|
|
|
|
|
/* GstVaapiEncSlice */
|
|
|
|
#define GST_VAAPI_ENC_SLICE_NEW(codec, encoder) \
|
|
|
|
gst_vaapi_enc_slice_new (GST_VAAPI_ENCODER_CAST (encoder), \
|
|
|
|
NULL, sizeof(G_PASTE (VAEncSliceParameterBuffer, codec)))
|
2013-07-29 05:34:06 +00:00
|
|
|
|
2015-02-04 09:15:38 +00:00
|
|
|
/* GstVaapiEncQuantMatrix */
|
|
|
|
#define GST_VAAPI_ENC_Q_MATRIX_NEW(codec, encoder) \
|
|
|
|
gst_vaapi_enc_q_matrix_new (GST_VAAPI_ENCODER_CAST (encoder), \
|
|
|
|
NULL, sizeof (G_PASTE (VAQMatrixBuffer, codec)))
|
|
|
|
|
|
|
|
/* GstVaapiEncHuffmanTable */
|
|
|
|
#define GST_VAAPI_ENC_HUFFMAN_TABLE_NEW(codec, encoder) \
|
|
|
|
gst_vaapi_enc_huffman_table_new (GST_VAAPI_ENCODER_CAST (encoder), \
|
|
|
|
NULL, sizeof (G_PASTE (VAHuffmanTableBuffer, codec)))
|
|
|
|
|
2013-07-29 05:34:06 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* GST_VAAPI_ENCODER_OBJECTS_H */
|