summaryrefslogtreecommitdiff
path: root/gst-libs
diff options
context:
space:
mode:
authorHe Junyan <junyan.he@hotmail.com>2019-08-29 15:14:14 +0800
committerHe Junyan <junyan.he@hotmail.com>2019-08-30 21:21:04 +0800
commit8ac7dd556bc557ed7522224f561ad01cad8e95cc (patch)
treecefc6c54d3043f18fe653a72d7626ec7902f9e3b /gst-libs
parentf65647ec25f4ef435d64f3736cd7448a80a7b7d4 (diff)
libs: encoder: delete get_default_properties of H264 Fei
Diffstat (limited to 'gst-libs')
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder_h264_fei.c415
-rw-r--r--gst-libs/gst/vaapi/gstvaapiencoder_h264_fei.h3
2 files changed, 0 insertions, 418 deletions
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h264_fei.c b/gst-libs/gst/vaapi/gstvaapiencoder_h264_fei.c
index f462f8c4..c1ef4d3b 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder_h264_fei.c
+++ b/gst-libs/gst/vaapi/gstvaapiencoder_h264_fei.c
@@ -47,7 +47,6 @@
#define DEBUG 1
#include "gstvaapidebug.h"
-GPtrArray *gst_vaapi_encoder_h264_fei_get_default_properties (void);
static gboolean
gst_vaapi_encoder_h264_fei_ensure_secondary_context (GstVaapiEncoder *
base_encoder);
@@ -4052,269 +4051,6 @@ cleanup:
return success;
}
-/**
- * gst_vaapi_encoder_h264_get_fei_properties:
- *
- * Determines the set of common and H.264 Fei specific encoder 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 encoder properties for #GstVaapiEncoderH264,
- * or %NULL if an error occurred.
- */
-static GPtrArray *
-gst_vaapi_encoder_h264_get_fei_properties (GPtrArray * props)
-{
- /**
- * GstVaapiEncoderH264: disable-fei:
- *
- * Disable FEI mode Encode: disabling fei will results
- * the encoder to use VAEntrypointEncSlice, which means
- * vaapi-intel-driver will be using a different media kerenl.
- * And most of the properties associated with this element
- * will be non functional.
- */
- GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
- GST_VAAPI_ENCODER_H264_PROP_FEI_DISABLE,
- g_param_spec_boolean ("disable-fei",
- "Disable FEI Mode Encode",
- "Disable Flexible Encoding Infrasturcture", FALSE,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
-
- /**
- * GstVaapiEncoderH264: stats-out:
- *
- * Enable outputting fei buffers MV, MBCode and Distortion.
- * If enabled, encoder will allocate memory for these buffers
- * and submit to the driver even for ENC_PAK mode so that
- * the output data can be extraced for analysis after the
- * complettion of each frame ncode
- */
- GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
- GST_VAAPI_ENCODER_H264_PROP_ENABLE_STATS_OUT,
- g_param_spec_boolean ("stats-out",
- "stats out",
- "Enable stats out for fei",
- TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
- /**
- * GstVaapiEncoderH264:num_mv_predictors_l0:
- * Indicate how many mv predictors should be used for l0 frames.
- * Only valid if MVPredictor input has been enabled.
- */
- GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
- GST_VAAPI_ENCODER_H264_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,"
- "only valid if MVPredictor input enabled",
- 0, 3, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
- /**
- * GstVaapiEncoderH264:num_mv_predictors_l1:
- * Indicate how many mv predictors should be used for l1 frames.
- * Only valid if MVPredictor input has been enabled.
- *
- */
- GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
- GST_VAAPI_ENCODER_H264_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,"
- "only valid if MVPredictor input enabled",
- 0, 3, 0, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
- /**
- * GstVaapiEncoderH264:search-window:
- * Use predefined Search Window
- */
- GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
- GST_VAAPI_ENCODER_H264_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));
-
- /**
- * GstVaapiEncoderH264:len-sp:
- * Defines the maximum number of Search Units per reference.
- */
- GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
- GST_VAAPI_ENCODER_H264_PROP_LEN_SP,
- g_param_spec_uint ("len-sp",
- "length of search path",
- "This value defines number of search units in search path",
- 1, 63, 32, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
- /**
- * GstVaapiEncoderH264:search-path:
- * SearchPath defines the motion search method.
- * Zero means full search, 1 indicate diamond search.
- */
- GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
- GST_VAAPI_ENCODER_H264_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));
-
- /**
- * GstVaapiEncoderH264:ref-width:
- * Specifies the search region width in pixels.
- */
- GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
- GST_VAAPI_ENCODER_H264_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));
-
- /**
- * GstVaapiEncoderH264:ref-height:
- * Specifies the search region height in pixels.
- */
- GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
- GST_VAAPI_ENCODER_H264_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));
- /**
- * GstVaapiEncoderH264:submb-mask:
- * Defines the bit-mask for disabling sub-partition
- *
- */
- GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
- GST_VAAPI_ENCODER_H264_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));
-
- /**
- * GstVaapiEncoderH264:subpel-mode:
- * defines the half/quarter pel modes
- * 00: integer mode searching
- * 01: half-pel mode searching
- * 11: quarter-pel mode searching
- */
- GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
- GST_VAAPI_ENCODER_H264_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));
- /**
- * GstVaapiEncoderH264:intrapart-mask:
- * Specifies which Luma Intra partition is enabled/disabled
- * for intra mode decision
- */
- GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
- GST_VAAPI_ENCODER_H264_PROP_INTRA_PART_MASK,
- g_param_spec_flags ("intrapart-mask",
- "intra part mask",
- "Specifies which Luma Intra partition is enabled/disabled for"
- "intra mode decision",
- GST_VAAPI_TYPE_FEI_H264_INTRA_PART_MASK,
- GST_VAAPI_FEI_H264_INTRA_PART_MASK_DEFAULT,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
- /**
- * GstVaapiEncoderH264:intra-sad:
- * Specifies distortion measure adjustments used for
- * the motion search SAD comparison.
- */
- GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
- GST_VAAPI_ENCODER_H264_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));
-
- /**
- * GstVaapiEncoderH264:inter-sad:
- * Specifies distortion measure adjustments used
- * in the motion search SAD comparison for inter MB
- */
- GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
- GST_VAAPI_ENCODER_H264_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));
-
- /**
- * GstVaapiEncoderH264:adaptive-search:
- * Defines whether adaptive searching is enabled for IME
- */
- GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
- GST_VAAPI_ENCODER_H264_PROP_ADAPT_SEARCH,
- g_param_spec_boolean ("adaptive-search",
- "adaptive-search",
- "Enable adaptive search",
- FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
- /**
- * GstVaapiEncoderH264:multi-predL0:
- * When set to 1, neighbor MV will be used as predictor for list L0,
- * otherwise no neighbor MV will be used as predictor
- */
- GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
- GST_VAAPI_ENCODER_H264_PROP_MULTI_PRED_L0,
- g_param_spec_boolean ("multi-predL0",
- "multi predL0",
- "Enable multi prediction for ref L0 list, when set neighbor MV will be used"
- "as predictor, no neighbor MV will be used otherwise",
- FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
- /**
- * GstVaapiEncoderH264:multi-predL1:
- * When set to 1, neighbor MV will be used as predictor
- * when set to 0, no neighbor MV will be used as predictor.
- */
- GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
- GST_VAAPI_ENCODER_H264_PROP_MULTI_PRED_L1,
- g_param_spec_boolean ("multi-predL1",
- "multi predL1",
- "Enable multi prediction for ref L1 list, when set neighbor MV will be used"
- "as predictor, no neighbor MV will be used otherwise",
- FALSE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
- /**
- * GstVaapiEncoderH264Fei: fei-mode:
- *
- * Cose ENC, PAK, ENC_PAK, or ENC+PAK
- * ENC: Only the Motion Estimation, no transformation or entropy coding
- * PAK: transformation, quantization and entropy coding
- * ENC_PAK: default mode, enc an pak are invoked by driver, middleware has
- control over ENC input only
- * ENC+PAK: enc and pak invoked separately, middleware has control over the ENC input,
- ENC output, and PAK input
- * Encoding mode which can be used for FEI
- */
- GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
- GST_VAAPI_ENCODER_H264_PROP_FEI_MODE,
- g_param_spec_flags ("fei-mode",
- "FEI Encoding Mode",
- "Functional mode of FEI Encoding",
- GST_VAAPI_TYPE_FEI_MODE, GST_VAAPI_FEI_MODE_DEFAULT,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
- return props;
-
-}
-
static const GstVaapiEncoderClassData fei_encoder_class_data = {
.codec = GST_VAAPI_CODEC_H264,
.packed_headers = SUPPORTED_PACKED_HEADERS,
@@ -4334,8 +4070,6 @@ gst_vaapi_encoder_h264_fei_class_init (GstVaapiEncoderH264FeiClass * klass)
encoder_class->class_data = &fei_encoder_class_data;
encoder_class->reconfigure = gst_vaapi_encoder_h264_fei_reconfigure;
- encoder_class->get_default_properties =
- gst_vaapi_encoder_h264_fei_get_default_properties;
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;
@@ -4752,155 +4486,6 @@ gst_vaapi_encoder_h264_fei_class_init (GstVaapiEncoderH264FeiClass * klass)
}
/**
- * gst_vaapi_encoder_h264_fei_get_default_properties:
- *
- * Determines the set of common and H.264 specific encoder 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 encoder properties for #GstVaapiEncoderH264Fei,
- * or %NULL if an error occurred.
- */
-GPtrArray *
-gst_vaapi_encoder_h264_fei_get_default_properties (void)
-{
- const GstVaapiEncoderClassData *class_data = &fei_encoder_class_data;
- GPtrArray *props;
-
- props = gst_vaapi_encoder_properties_get_default (class_data);
- if (!props)
- return NULL;
-
- /**
- * GstVaapiEncoderH264Fei:max-bframes:
- *
- * The number of B-frames between I and P.
- */
- GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
- GST_VAAPI_ENCODER_H264_FEI_PROP_MAX_BFRAMES,
- g_param_spec_uint ("max-bframes",
- "Max B-Frames", "Number of B-frames between I and P", 0, 10, 1,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
- /**
- * GstVaapiEncoderH264Fei:init-qp:
- *
- * The initial quantizer value.
- */
- GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
- GST_VAAPI_ENCODER_H264_FEI_PROP_INIT_QP,
- g_param_spec_uint ("init-qp",
- "Initial QP", "Initial quantizer value", 0, 51, 26,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
- /**
- * GstVaapiEncoderH264Fei:min-qp:
- *
- * The minimum quantizer value.
- */
- GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
- GST_VAAPI_ENCODER_H264_FEI_PROP_MIN_QP,
- g_param_spec_uint ("min-qp",
- "Minimum QP", "Minimum quantizer value", 0, 51, 1,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
- /**
- * GstVaapiEncoderH264Fei:max-qp:
- *
- * The maximum quantizer value.
- *
- * Since: 1.18
- */
- GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
- GST_VAAPI_ENCODER_H264_FEI_PROP_MAX_QP,
- g_param_spec_uint ("max-qp",
- "Maximum QP", "Maximum quantizer value", 0, 51, 51,
- G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
- /**
- * GstVaapiEncoderH264Fei:num-slices:
- *
- * The number of slices per frame.
- */
- GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
- GST_VAAPI_ENCODER_H264_FEI_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));
-
- /**
- * GstVaapiEncoderH264Fei: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_ENCODER_H264_FEI_PROP_CABAC,
- g_param_spec_boolean ("cabac",
- "Enable CABAC",
- "Enable CABAC entropy coding mode",
- TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
- /**
- * GstVaapiEncoderH264Fei: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_ENCODER_H264_FEI_PROP_DCT8X8,
- g_param_spec_boolean ("dct8x8",
- "Enable 8x8 DCT",
- "Enable adaptive use of 8x8 transforms in I-frames",
- TRUE, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
-
- /**
- * GstVaapiEncoderH264Fei:cpb-length:
- *
- * The size of the CPB buffer in milliseconds.
- */
- GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
- GST_VAAPI_ENCODER_H264_FEI_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));
-
- /**
- * GstVaapiEncoderH264Fei:num-views:
- *
- * The number of views for MVC encoding .
- */
- GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
- GST_VAAPI_ENCODER_H264_FEI_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));
- /**
- * GstVaapiEncoderH264Fei:view-ids:
- *
- * The view ids for MVC encoding .
- */
- GST_VAAPI_ENCODER_PROPERTIES_APPEND (props,
- GST_VAAPI_ENCODER_H264_FEI_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));
-
- props = gst_vaapi_encoder_h264_get_fei_properties (props);
-
- return props;
-}
-
-/**
* gst_vaapi_encoder_h264_fei_set_max_profile:
* @encoder: a #GstVaapiEncoderH264Fei
* @profile: an H.264 #GstVaapiProfile
diff --git a/gst-libs/gst/vaapi/gstvaapiencoder_h264_fei.h b/gst-libs/gst/vaapi/gstvaapiencoder_h264_fei.h
index 3ea86a71..38b7a64d 100644
--- a/gst-libs/gst/vaapi/gstvaapiencoder_h264_fei.h
+++ b/gst-libs/gst/vaapi/gstvaapiencoder_h264_fei.h
@@ -96,9 +96,6 @@ gst_vaapi_encoder_h264_fei_get_type (void) G_GNUC_CONST;
GstVaapiEncoder *
gst_vaapi_encoder_h264_fei_new (GstVaapiDisplay * display);
-GPtrArray *
-gst_vaapi_encoder_h264_fei_get_default_properties (void);
-
gboolean
gst_vaapi_encoder_h264_fei_set_max_profile (GstVaapiEncoderH264Fei * encoder,
GstVaapiProfile profile);