libs: encoder: delete get_default_properties of feienc

This commit is contained in:
He Junyan 2019-08-29 15:16:26 +08:00
parent 8ac7dd556b
commit 80992191a3
2 changed files with 0 additions and 333 deletions

View file

@ -2119,8 +2119,6 @@ gst_vaapi_feienc_h264_class_init (GstVaapiFeiEncH264Class * klass)
encoder_class->class_data = &fei_enc_class_data; encoder_class->class_data = &fei_enc_class_data;
encoder_class->reconfigure = gst_vaapi_feienc_h264_reconfigure; encoder_class->reconfigure = gst_vaapi_feienc_h264_reconfigure;
encoder_class->get_default_properties =
gst_vaapi_feienc_h264_get_default_properties;
encoder_class->reordering = gst_vaapi_feienc_h264_reordering; encoder_class->reordering = gst_vaapi_feienc_h264_reordering;
encoder_class->encode = gst_vaapi_feienc_h264_fake_encode; encoder_class->encode = gst_vaapi_feienc_h264_fake_encode;
encoder_class->flush = gst_vaapi_feienc_h264_flush; encoder_class->flush = gst_vaapi_feienc_h264_flush;
@ -2465,334 +2463,6 @@ gst_vaapi_feienc_h264_new (GstVaapiDisplay * display)
return g_object_new (GST_TYPE_VAAPI_FEI_ENC_H264, "display", display, NULL); return g_object_new (GST_TYPE_VAAPI_FEI_ENC_H264, "display", display, NULL);
} }
/**
* gst_vaapi_feienc_h264_get_fei_properties:
*
* Determines the set of common and H.264 Fei specific feienc properties.
* The caller owns an extra reference to the resulting array of
* #GstVaapiEncoderPropInfo elements, so it shall be released with
* g_ptr_array_unref() after usage.
*
* Return value: the set of feienc properties for #GstVaapiFeiEncH264,
* or %NULL if an error occurred.
*/
static GPtrArray *
gst_vaapi_feienc_h264_get_fei_properties (GPtrArray * props)
{
/**
* GstVaapiFeiEncH264:num_mv_predictors_l0:
*
* The number of mv predict
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_FEI_H264_ENC_PROP_NUM_MV_PREDICT_L0,
g_param_spec_uint ("num-mvpredict-l0",
"Num mv predict l0",
"Indicate how many predictors should be used for l0",
0, 3, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiFeiEncH264:num_mv_predictors_l1:
*
* The number of mv predict
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_FEI_H264_ENC_PROP_NUM_MV_PREDICT_L1,
g_param_spec_uint ("num-mvpredict-l1",
"Num mv predict l1",
"Indicate how many predictors should be used for l1",
0, 3, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiFeiEncH264:search-window:
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_FEI_H264_ENC_PROP_SEARCH_WINDOW,
g_param_spec_enum ("search-window",
"search window",
"Specify one of the predefined search path",
GST_VAAPI_TYPE_FEI_H264_SEARCH_WINDOW,
GST_VAAPI_FEI_H264_SEARCH_WINDOW_DEFAULT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiFeiEncH264:len-sp:
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_FEI_H264_ENC_PROP_LEN_SP,
g_param_spec_uint ("len-sp",
"len sp",
"This value defines number of search units in search path",
1, 63, 32, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiFeiEncH264:search-path:
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_FEI_H264_ENC_PROP_SEARCH_PATH,
g_param_spec_enum ("search-path",
"search path",
"Specify search path",
GST_VAAPI_TYPE_FEI_H264_SEARCH_PATH,
GST_VAAPI_FEI_H264_SEARCH_PATH_DEFAULT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiFeiEncH264:ref-width:
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_FEI_H264_ENC_PROP_REF_WIDTH,
g_param_spec_uint ("ref-width",
"ref width",
"Width of search region in pixel, must be multiple of 4",
4, 64, 32, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiFeiEncH264:ref-height:
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_FEI_H264_ENC_PROP_REF_HEIGHT,
g_param_spec_uint ("ref-height",
"ref height",
"Height of search region in pixel, must be multiple of 4",
4, 32, 32, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiFeiEncH264:submb-mask:
* Defines the bit-mask for disabling sub-partition
*
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_FEI_H264_ENC_PROP_SUBMB_MASK,
g_param_spec_flags ("submbpart-mask",
"submb part mask",
"defines the bit-mask for disabling sub mb partition",
GST_VAAPI_TYPE_FEI_H264_SUB_MB_PART_MASK,
GST_VAAPI_FEI_H264_SUB_MB_PART_MASK_DEFAULT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiFeiEncH264:subpel-mode:
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_FEI_H264_ENC_PROP_SUBPEL_MODE,
g_param_spec_enum ("subpel-mode",
"subpel mode",
"Sub pixel precision for motion estimation",
GST_VAAPI_TYPE_FEI_H264_SUB_PEL_MODE,
GST_VAAPI_FEI_H264_SUB_PEL_MODE_DEFAULT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiFeiEncH264:intrapart-mask:
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_FEI_H264_ENC_PROP_INTRA_PART_MASK,
g_param_spec_flags ("intrapart-mask",
"intra part mask",
"What block and sub-block partitions are disabled for intra MBs",
GST_VAAPI_TYPE_FEI_H264_INTRA_PART_MASK,
GST_VAAPI_FEI_H264_INTRA_PART_MASK_DEFAULT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiFeiEncH264:intra-sad:
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_FEI_H264_ENC_PROP_INTRA_SAD,
g_param_spec_enum ("intra-sad",
"intra sad",
"Specifies distortion measure adjustments used in the motion search SAD comparison for intra MB",
GST_VAAPI_TYPE_FEI_H264_SAD_MODE, GST_VAAPI_FEI_H264_SAD_MODE_DEFAULT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiFeiEncH264:inter-sad:
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_FEI_H264_ENC_PROP_INTER_SAD,
g_param_spec_enum ("inter-sad",
"inter sad",
"Specifies distortion measure adjustments used in the motion search SAD comparison for inter MB",
GST_VAAPI_TYPE_FEI_H264_SAD_MODE, GST_VAAPI_FEI_H264_SAD_MODE_DEFAULT,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiFeiEncH264:adaptive-search:
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_FEI_H264_ENC_PROP_ADAPT_SEARCH,
g_param_spec_boolean ("adaptive-search",
"adaptive-search",
"Enable adaptive search",
FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiFeiEncH264:multi-predL0:
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_FEI_H264_ENC_PROP_MULTI_PRED_L0,
g_param_spec_boolean ("multi-predL0",
"multi predL0",
"Enable multi prediction for ref L0 list",
FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiFeiEncH264:multi-predL0:
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_FEI_H264_ENC_PROP_MULTI_PRED_L1,
g_param_spec_boolean ("multi-predL1",
"multi predL1",
"Enable multi prediction for ref L1 list",
FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
return props;
}
/**
* gst_vaapi_feienc_h264_get_default_properties:
*
* Determines the set of common and H.264 specific feienc properties.
* The caller owns an extra reference to the resulting array of
* #GstVaapiEncoderPropInfo elements, so it shall be released with
* g_ptr_array_unref() after usage.
*
* Return value: the set of feienc properties for #GstVaapiFeiEncH264,
* or %NULL if an error occurred.
*/
GPtrArray *
gst_vaapi_feienc_h264_get_default_properties (void)
{
const GstVaapiEncoderClassData *class_data = &fei_enc_class_data;
GPtrArray *props;
props = gst_vaapi_encoder_properties_get_default (class_data);
if (!props)
return NULL;
/**
* GstVaapiFeiEncH264:max-bframes:
*
* The number of B-frames between I and P.
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_FEI_H264_ENC_PROP_MAX_BFRAMES,
g_param_spec_uint ("max-bframes",
"Max B-Frames", "Number of B-frames between I and P", 0, 10, 0,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiFeiEncH264:init-qp:
*
* The initial quantizer value.
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_FEI_H264_ENC_PROP_INIT_QP,
g_param_spec_uint ("init-qp",
"Initial QP", "Initial quantizer value", 1, 51, 26,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiFeiEncH264:min-qp:
*
* The minimum quantizer value.
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_FEI_H264_ENC_PROP_MIN_QP,
g_param_spec_uint ("min-qp",
"Minimum QP", "Minimum quantizer value", 1, 51, 1,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiFeiEncH264:num-slices:
*
* The number of slices per frame.
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_FEI_H264_ENC_PROP_NUM_SLICES,
g_param_spec_uint ("num-slices",
"Number of Slices",
"Number of slices per frame",
1, 200, 1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiFeiEncH264:cabac:
*
* Enable CABAC entropy coding mode for improved compression ratio,
* at the expense that the minimum target profile is Main. Default
* is CAVLC entropy coding mode.
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_FEI_H264_ENC_PROP_CABAC,
g_param_spec_boolean ("cabac",
"Enable CABAC",
"Enable CABAC entropy coding mode",
FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiFeiEncH264:dct8x8:
*
* Enable adaptive use of 8x8 transforms in I-frames. This improves
* the compression ratio by the minimum target profile is High.
* Default is to use 4x4 DCT only.
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_FEI_H264_ENC_PROP_DCT8X8,
g_param_spec_boolean ("dct8x8",
"Enable 8x8 DCT",
"Enable adaptive use of 8x8 transforms in I-frames",
FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiFeiEncH264:cpb-length:
*
* The size of the CPB buffer in milliseconds.
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_FEI_H264_ENC_PROP_CPB_LENGTH,
g_param_spec_uint ("cpb-length",
"CPB Length", "Length of the CPB buffer in milliseconds",
1, 10000, DEFAULT_CPB_LENGTH,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiFeiEncH264:num-views:
*
* The number of views for MVC encoding .
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_FEI_H264_ENC_PROP_NUM_VIEWS,
g_param_spec_uint ("num-views",
"Number of Views",
"Number of Views for MVC encoding",
1, MAX_NUM_VIEWS, 1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiFeiEncH264:view-ids:
*
* The view ids for MVC encoding .
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_FEI_H264_ENC_PROP_VIEW_IDS,
gst_param_spec_array ("view-ids",
"View IDs", "Set of View Ids used for MVC encoding",
g_param_spec_uint ("view-id-value", "View id value",
"view id values used for mvc encoding", 0, MAX_VIEW_ID, 0,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS),
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
/**
* GstVaapiFeiEncH264:num-ref:
*
* The number of reference frames.
*/
GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
GST_VAAPI_FEI_H264_ENC_PROP_NUM_REF,
g_param_spec_uint ("num-ref",
"Num Ref",
"reference frame number",
1, 6, 1, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
props = gst_vaapi_feienc_h264_get_fei_properties (props);
return props;
}
/** /**
* gst_vaapi_feienc_h264_set_max_profile: * gst_vaapi_feienc_h264_set_max_profile:
* @feienc: a #GstVaapiFeiEncH264 * @feienc: a #GstVaapiFeiEncH264

View file

@ -94,9 +94,6 @@ gst_vaapi_feienc_h264_get_type (void) G_GNUC_CONST;
GstVaapiEncoder * GstVaapiEncoder *
gst_vaapi_feienc_h264_new (GstVaapiDisplay * display); gst_vaapi_feienc_h264_new (GstVaapiDisplay * display);
GPtrArray *
gst_vaapi_feienc_h264_get_default_properties (void);
gboolean gboolean
gst_vaapi_feienc_h264_set_max_profile (GstVaapiFeiEncH264 * feienc, gst_vaapi_feienc_h264_set_max_profile (GstVaapiFeiEncH264 * feienc,
GstVaapiProfile profile); GstVaapiProfile profile);