mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-20 06:08:14 +00:00
libs: encoder: delete old set_property and property enum in h264 fei
This commit is contained in:
parent
617ffd8156
commit
64f8f62021
2 changed files with 0 additions and 192 deletions
|
@ -3488,147 +3488,6 @@ get_view_ids (GstVaapiEncoderH264Fei * const encoder, GValue * value)
|
|||
g_value_unset (&id);
|
||||
}
|
||||
|
||||
static GstVaapiEncoderStatus
|
||||
_gst_vaapi_encoder_h264_fei_set_property (GstVaapiEncoder * base_encoder,
|
||||
gint prop_id, const GValue * value)
|
||||
{
|
||||
GstVaapiEncoderH264Fei *const encoder =
|
||||
GST_VAAPI_ENCODER_H264_FEI_CAST (base_encoder);
|
||||
GstVaapiEncoder *enc_base_encoder = GST_VAAPI_ENCODER_CAST (encoder->feienc);
|
||||
GstVaapiEncoderStatus status;
|
||||
|
||||
switch (prop_id) {
|
||||
case GST_VAAPI_ENCODER_H264_FEI_PROP_MAX_BFRAMES:
|
||||
encoder->num_bframes = g_value_get_uint (value);
|
||||
break;
|
||||
case GST_VAAPI_ENCODER_H264_FEI_PROP_INIT_QP:
|
||||
encoder->init_qp = g_value_get_uint (value);
|
||||
break;
|
||||
case GST_VAAPI_ENCODER_H264_FEI_PROP_MIN_QP:
|
||||
encoder->min_qp = g_value_get_uint (value);
|
||||
break;
|
||||
case GST_VAAPI_ENCODER_H264_FEI_PROP_NUM_SLICES:
|
||||
encoder->num_slices = g_value_get_uint (value);
|
||||
break;
|
||||
case GST_VAAPI_ENCODER_H264_FEI_PROP_CABAC:
|
||||
encoder->use_cabac = g_value_get_boolean (value);
|
||||
break;
|
||||
case GST_VAAPI_ENCODER_H264_FEI_PROP_DCT8X8:
|
||||
encoder->use_dct8x8 = g_value_get_boolean (value);
|
||||
break;
|
||||
case GST_VAAPI_ENCODER_H264_FEI_PROP_CPB_LENGTH:
|
||||
encoder->cpb_length = g_value_get_uint (value);
|
||||
break;
|
||||
case GST_VAAPI_ENCODER_H264_FEI_PROP_NUM_VIEWS:
|
||||
encoder->num_views = g_value_get_uint (value);
|
||||
break;
|
||||
case GST_VAAPI_ENCODER_H264_FEI_PROP_VIEW_IDS:
|
||||
set_view_ids (encoder, value);
|
||||
break;
|
||||
case GST_VAAPI_ENCODER_H264_PROP_FEI_DISABLE:
|
||||
encoder->is_fei_disabled = g_value_get_boolean (value);
|
||||
if (!encoder->is_fei_disabled)
|
||||
encoder->entrypoint = GST_VAAPI_ENTRYPOINT_SLICE_ENCODE_FEI;
|
||||
break;
|
||||
case GST_VAAPI_ENCODER_H264_PROP_NUM_MV_PREDICT_L0:
|
||||
encoder->num_mv_predictors_l0 = g_value_get_uint (value);
|
||||
break;
|
||||
case GST_VAAPI_ENCODER_H264_PROP_NUM_MV_PREDICT_L1:
|
||||
encoder->num_mv_predictors_l1 = g_value_get_uint (value);
|
||||
break;
|
||||
case GST_VAAPI_ENCODER_H264_PROP_SEARCH_WINDOW:
|
||||
encoder->search_window = g_value_get_enum (value);
|
||||
break;
|
||||
case GST_VAAPI_ENCODER_H264_PROP_LEN_SP:
|
||||
encoder->len_sp = g_value_get_uint (value);
|
||||
break;
|
||||
case GST_VAAPI_ENCODER_H264_PROP_SEARCH_PATH:
|
||||
encoder->search_path = g_value_get_enum (value);
|
||||
break;
|
||||
case GST_VAAPI_ENCODER_H264_PROP_REF_WIDTH:
|
||||
encoder->ref_width = g_value_get_uint (value);
|
||||
break;
|
||||
case GST_VAAPI_ENCODER_H264_PROP_REF_HEIGHT:
|
||||
encoder->ref_height = g_value_get_uint (value);
|
||||
break;
|
||||
case GST_VAAPI_ENCODER_H264_PROP_SUBMB_MASK:
|
||||
encoder->submb_part_mask = g_value_get_flags (value);
|
||||
break;
|
||||
case GST_VAAPI_ENCODER_H264_PROP_SUBPEL_MODE:
|
||||
encoder->subpel_mode = g_value_get_enum (value);
|
||||
break;
|
||||
case GST_VAAPI_ENCODER_H264_PROP_INTRA_PART_MASK:
|
||||
encoder->intra_part_mask = g_value_get_flags (value);
|
||||
break;
|
||||
case GST_VAAPI_ENCODER_H264_PROP_INTRA_SAD:
|
||||
encoder->intra_sad = g_value_get_enum (value);
|
||||
break;
|
||||
case GST_VAAPI_ENCODER_H264_PROP_INTER_SAD:
|
||||
encoder->inter_sad = g_value_get_enum (value);
|
||||
break;
|
||||
case GST_VAAPI_ENCODER_H264_PROP_ADAPT_SEARCH:
|
||||
encoder->adaptive_search = g_value_get_boolean (value) ? 1 : 0;
|
||||
break;
|
||||
case GST_VAAPI_ENCODER_H264_PROP_MULTI_PRED_L0:
|
||||
encoder->multi_predL0 = g_value_get_boolean (value) ? 1 : 0;
|
||||
break;
|
||||
case GST_VAAPI_ENCODER_H264_PROP_MULTI_PRED_L1:
|
||||
encoder->multi_predL1 = g_value_get_boolean (value) ? 1 : 0;
|
||||
break;
|
||||
case GST_VAAPI_ENCODER_H264_PROP_ENABLE_STATS_OUT:
|
||||
encoder->is_stats_out_enabled = g_value_get_boolean (value);
|
||||
break;
|
||||
case GST_VAAPI_ENCODER_H264_PROP_FEI_MODE:
|
||||
encoder->fei_mode = g_value_get_flags (value);
|
||||
if (encoder->fei_mode == GST_VAAPI_FEI_MODE_ENC) {
|
||||
g_warning ("============= ENC only mode selected ============ \n"
|
||||
"We internally run the PAK stage because, the ENC operation requires the reconstructed output of PAK mode. Right now we have no infrastructure to provide reconstructed surfaces to ENC with out running the PAK \n");
|
||||
/*Fixme: Support ENC only mode with out running PAK */
|
||||
encoder->fei_mode = GST_VAAPI_FEI_MODE_ENC | GST_VAAPI_FEI_MODE_PAK;
|
||||
} else if (encoder->fei_mode == GST_VAAPI_FEI_MODE_PAK) {
|
||||
g_warning ("============ PAK only mode selected ============ \n"
|
||||
"This mode can work as expected, only if there is a custom user specific upstream element which provides mb_code and mv_vectors. If you are running the pipeline only for verification, We recommand to use the fei-mod ENC+PAK which will run the ENC operation and generate what ever input needed for PAK \n");
|
||||
}
|
||||
|
||||
break;
|
||||
case GST_VAAPI_ENCODER_H264_FEI_PROP_MAX_QP:
|
||||
encoder->max_qp = g_value_get_uint (value);
|
||||
break;
|
||||
|
||||
default:
|
||||
return GST_VAAPI_ENCODER_STATUS_ERROR_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if ((prop_id != GST_VAAPI_ENCODER_H264_PROP_FEI_MODE) &&
|
||||
(prop_id != GST_VAAPI_ENCODER_H264_PROP_FEI_DISABLE) &&
|
||||
(prop_id != GST_VAAPI_ENCODER_H264_PROP_ENABLE_STATS_OUT)) {
|
||||
|
||||
if (enc_base_encoder) {
|
||||
status =
|
||||
gst_vaapi_feienc_h264_set_property (enc_base_encoder, prop_id, value);
|
||||
if (status != GST_VAAPI_ENCODER_STATUS_SUCCESS) {
|
||||
GST_ERROR ("failed to set enc property");
|
||||
return status;
|
||||
}
|
||||
}
|
||||
|
||||
if ((prop_id == GST_VAAPI_ENCODER_H264_FEI_PROP_MAX_BFRAMES) ||
|
||||
(prop_id == GST_VAAPI_ENCODER_H264_FEI_PROP_VIEW_IDS) ||
|
||||
(prop_id == GST_VAAPI_ENCODER_H264_FEI_PROP_NUM_VIEWS)) {
|
||||
if (encoder->feipak) {
|
||||
status =
|
||||
gst_vaapi_feipak_h264_set_property (encoder->feipak, prop_id,
|
||||
value);
|
||||
if (status != GST_VAAPI_ENCODER_STATUS_SUCCESS) {
|
||||
GST_ERROR ("failed to set pak property");
|
||||
return status;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return GST_VAAPI_ENCODER_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ENCODER_H264_FEI_PROP_RATECONTROL: Rate control (#GstVaapiRateControl).
|
||||
* @ENCODER_H264_FEI_PROP_TUNE: The tuning options (#GstVaapiEncoderTune).
|
||||
|
@ -4073,7 +3932,6 @@ gst_vaapi_encoder_h264_fei_class_init (GstVaapiEncoderH264FeiClass * klass)
|
|||
encoder_class->reordering = gst_vaapi_encoder_h264_fei_reordering;
|
||||
encoder_class->encode = gst_vaapi_encoder_h264_fei_encode;
|
||||
encoder_class->flush = gst_vaapi_encoder_h264_fei_flush;
|
||||
encoder_class->set_property = _gst_vaapi_encoder_h264_fei_set_property;
|
||||
encoder_class->get_codec_data = gst_vaapi_encoder_h264_fei_get_codec_data;
|
||||
encoder_class->ensure_secondary_context =
|
||||
gst_vaapi_encoder_h264_fei_ensure_secondary_context;
|
||||
|
|
|
@ -40,56 +40,6 @@ G_BEGIN_DECLS
|
|||
typedef struct _GstVaapiEncoderH264Fei GstVaapiEncoderH264Fei;
|
||||
typedef struct _GstVaapiEncoderH264FeiClass GstVaapiEncoderH264FeiClass;
|
||||
|
||||
/**
|
||||
* GstVaapiEncoderH264FeiProp:
|
||||
* @GST_VAAPI_ENCODER_H264_FEI_PROP_MAX_BFRAMES: Number of B-frames between I
|
||||
* and P (uint).
|
||||
* @GST_VAAPI_ENCODER_H264_FEI_PROP_INIT_QP: Initial quantizer value (uint).
|
||||
* @GST_VAAPI_ENCODER_H264_FEI_PROP_MIN_QP: Minimal quantizer value (uint).
|
||||
* @GST_VAAPI_ENCODER_H264_FEI_PROP_NUM_SLICES: Number of slices per frame (uint).
|
||||
* @GST_VAAPI_ENCODER_H264_FEI_PROP_CABAC: Enable CABAC entropy coding mode (bool).
|
||||
* @GST_VAAPI_ENCODER_H264_FEI_PROP_DCT8X8: Enable adaptive use of 8x8
|
||||
* transforms in I-frames (bool).
|
||||
* @GST_VAAPI_ENCODER_H264_FEI_PROP_CPB_LENGTH: Length of the CPB buffer
|
||||
* in milliseconds (uint).
|
||||
* @GST_VAAPI_ENCODER_H264_FEI_PROP_NUM_VIEWS: Number of views per frame.
|
||||
* @GST_VAAPI_ENCODER_H264_FEI_PROP_VIEW_IDS: View IDs
|
||||
* @GST_VAAPI_ENCODER_H264_FEI_PROP_MAX_QP: Maximal quantizer value (uint).
|
||||
*
|
||||
* The set of H.264 encoder specific configurable properties.
|
||||
*/
|
||||
typedef enum {
|
||||
GST_VAAPI_ENCODER_H264_FEI_PROP_MAX_BFRAMES = -1,
|
||||
GST_VAAPI_ENCODER_H264_FEI_PROP_INIT_QP = -2,
|
||||
GST_VAAPI_ENCODER_H264_FEI_PROP_MIN_QP = -3,
|
||||
GST_VAAPI_ENCODER_H264_FEI_PROP_NUM_SLICES = -4,
|
||||
GST_VAAPI_ENCODER_H264_FEI_PROP_CABAC = -5,
|
||||
GST_VAAPI_ENCODER_H264_FEI_PROP_DCT8X8 = -6,
|
||||
GST_VAAPI_ENCODER_H264_FEI_PROP_CPB_LENGTH = -7,
|
||||
GST_VAAPI_ENCODER_H264_FEI_PROP_NUM_VIEWS = -8,
|
||||
GST_VAAPI_ENCODER_H264_FEI_PROP_VIEW_IDS = -9,
|
||||
GST_VAAPI_ENCODER_H264_PROP_FEI_DISABLE= -11,
|
||||
GST_VAAPI_ENCODER_H264_PROP_NUM_MV_PREDICT_L0 = -12,
|
||||
GST_VAAPI_ENCODER_H264_PROP_NUM_MV_PREDICT_L1 = -13,
|
||||
GST_VAAPI_ENCODER_H264_PROP_SEARCH_WINDOW = -14,
|
||||
GST_VAAPI_ENCODER_H264_PROP_LEN_SP = -15,
|
||||
GST_VAAPI_ENCODER_H264_PROP_SEARCH_PATH = -16,
|
||||
GST_VAAPI_ENCODER_H264_PROP_REF_WIDTH = -17,
|
||||
GST_VAAPI_ENCODER_H264_PROP_REF_HEIGHT = -18,
|
||||
GST_VAAPI_ENCODER_H264_PROP_SUBMB_MASK = -19,
|
||||
GST_VAAPI_ENCODER_H264_PROP_SUBPEL_MODE = -20,
|
||||
GST_VAAPI_ENCODER_H264_PROP_INTRA_PART_MASK = -21,
|
||||
GST_VAAPI_ENCODER_H264_PROP_INTRA_SAD = -22,
|
||||
GST_VAAPI_ENCODER_H264_PROP_INTER_SAD = -23,
|
||||
GST_VAAPI_ENCODER_H264_PROP_ADAPT_SEARCH = -24,
|
||||
GST_VAAPI_ENCODER_H264_PROP_MULTI_PRED_L0 = -25,
|
||||
GST_VAAPI_ENCODER_H264_PROP_MULTI_PRED_L1 = -26,
|
||||
GST_VAAPI_ENCODER_H264_PROP_ENABLE_STATS_OUT = -27,
|
||||
GST_VAAPI_ENCODER_H264_PROP_FEI_MODE = -28,
|
||||
GST_VAAPI_ENCODER_H264_FEI_PROP_MAX_QP = -29,
|
||||
|
||||
} GstVaapiEncoderH264FeiProp;
|
||||
|
||||
GType
|
||||
gst_vaapi_encoder_h264_fei_get_type (void) G_GNUC_CONST;
|
||||
|
||||
|
|
Loading…
Reference in a new issue