From c5e241932c962c52c168e1d382d682863c686b33 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Sat, 10 Feb 2024 01:45:44 +0900 Subject: [PATCH] amfcodec: Update plugin cache Adding AV1 encoder documentation (added in 1.22) with various new properties Part-of: --- .../docs/plugins/gst_plugins_cache.json | 1108 ++++++++++++++++- .../sys/amfcodec/gstamfav1enc.cpp | 135 ++ .../sys/amfcodec/gstamfh264enc.cpp | 181 +++ .../sys/amfcodec/gstamfh265enc.cpp | 134 ++ 4 files changed, 1556 insertions(+), 2 deletions(-) diff --git a/subprojects/gst-plugins-bad/docs/plugins/gst_plugins_cache.json b/subprojects/gst-plugins-bad/docs/plugins/gst_plugins_cache.json index 712fa02558..5314d94cfb 100644 --- a/subprojects/gst-plugins-bad/docs/plugins/gst_plugins_cache.json +++ b/subprojects/gst-plugins-bad/docs/plugins/gst_plugins_cache.json @@ -1743,6 +1743,438 @@ "amfcodec": { "description": "AMD AMF Codec plugin", "elements": { + "amfav1enc": { + "author": "Seungha Yang , Evgeny Pavlov ", + "description": "Encode AV1 video streams using AMF API", + "hierarchy": [ + "GstAmfAv1Enc", + "GstAmfEncoder", + "GstVideoEncoder", + "GstElement", + "GstObject", + "GInitiallyUnowned", + "GObject" + ], + "interfaces": [ + "GstPreset" + ], + "klass": "Codec/Encoder/Video/Hardware", + "pad-templates": { + "sink": { + "caps": "video/x-raw(memory:D3D11Memory):\n format: { NV12, P010_10LE }\n width: [ 128, 4096 ]\n height: [ 128, 4096 ]\nvideo/x-raw:\n format: { NV12, P010_10LE }\n width: [ 128, 4096 ]\n height: [ 128, 4096 ]\n", + "direction": "sink", + "presence": "always" + }, + "src": { + "caps": "video/x-av1:\n width: [ 128, 4096 ]\n height: [ 128, 4096 ]\n profile: main\n stream-format: obu-stream\n alignment: tu\n", + "direction": "src", + "presence": "always" + } + }, + "properties": { + "adapter-luid": { + "blurb": "DXGI Adapter LUID (Locally Unique Identifier) of associated GPU", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "0", + "max": "9223372036854775807", + "min": "-9223372036854775808", + "mutable": "null", + "readable": true, + "type": "gint64", + "writable": false + }, + "bitrate": { + "blurb": "Target bitrate in kbit/sec (0: USAGE default)", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "0", + "max": "2147483", + "min": "0", + "mutable": "playing", + "readable": true, + "type": "guint", + "writable": true + }, + "gop-size": { + "blurb": "Number of pictures within a GOP", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "30", + "max": "2147483647", + "min": "0", + "mutable": "playing", + "readable": true, + "type": "guint", + "writable": true + }, + "max-bitrate": { + "blurb": "Maximum bitrate in kbit/sec (0: USAGE default)", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "0", + "max": "2147483", + "min": "0", + "mutable": "playing", + "readable": true, + "type": "guint", + "writable": true + }, + "max-qp-i": { + "blurb": "Maximum allowed QP value for I frames (-1: USAGE default)", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "-1", + "max": "255", + "min": "-1", + "mutable": "playing", + "readable": true, + "type": "gint", + "writable": true + }, + "max-qp-p": { + "blurb": "Maximum allowed QP value for P frames (-1: USAGE default)", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "-1", + "max": "255", + "min": "-1", + "mutable": "playing", + "readable": true, + "type": "gint", + "writable": true + }, + "min-qp-i": { + "blurb": "Minimum allowed QP value for I frames (-1: USAGE default)", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "-1", + "max": "255", + "min": "-1", + "mutable": "playing", + "readable": true, + "type": "gint", + "writable": true + }, + "min-qp-p": { + "blurb": "Minimum allowed QP value for P frames (-1: USAGE default)", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "-1", + "max": "255", + "min": "-1", + "mutable": "playing", + "readable": true, + "type": "gint", + "writable": true + }, + "pa-activity-type": { + "blurb": "Set the type of activity analysis for pre-analysis", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "y (0)", + "mutable": "null", + "readable": true, + "type": "GstAmfEncPAActivityType", + "writable": true + }, + "pa-caq-strength": { + "blurb": "Content Adaptive Quantization strength for pre-analysis", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "medium (1)", + "mutable": "null", + "readable": true, + "type": "GstAmfEncPACAQStrength", + "writable": true + }, + "pa-frame-sad": { + "blurb": "Enable Frame SAD algorithm", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "true", + "mutable": "null", + "readable": true, + "type": "gboolean", + "writable": true + }, + "pa-hqmb-mode": { + "blurb": "Set the PA high motion quality boost mode", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "none (0)", + "mutable": "null", + "readable": true, + "type": "GstAmfEncPAHQMBMode", + "writable": true + }, + "pa-initial-qp": { + "blurb": "The QP value that is used immediately after a scene change", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "0", + "max": "51", + "min": "0", + "mutable": "null", + "readable": true, + "type": "guint", + "writable": true + }, + "pa-lookahead-buffer-depth": { + "blurb": "Set the PA lookahead buffer size", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "0", + "max": "41", + "min": "0", + "mutable": "null", + "readable": true, + "type": "guint", + "writable": true + }, + "pa-ltr": { + "blurb": "Enable long term reference frame management", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "false", + "mutable": "null", + "readable": true, + "type": "gboolean", + "writable": true + }, + "pa-max-qp": { + "blurb": "The QP threshold to allow a skip frame", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "35", + "max": "51", + "min": "0", + "mutable": "null", + "readable": true, + "type": "guint", + "writable": true + }, + "pa-paq-mode": { + "blurb": "Set the perceptual adaptive quantization mode", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "none (0)", + "mutable": "null", + "readable": true, + "type": "GstAmfEncPAPAQMode", + "writable": true + }, + "pa-scene-change-detection": { + "blurb": "Enable scene change detection for pre-analysis", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "true", + "mutable": "null", + "readable": true, + "type": "gboolean", + "writable": true + }, + "pa-scene-change-detection-sensitivity": { + "blurb": "Set the sensitivity of scene change detection for pre-analysis", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "medium (1)", + "mutable": "null", + "readable": true, + "type": "GstAmfEncPASceneChangeDetectionSensitivity", + "writable": true + }, + "pa-static-scene-detection": { + "blurb": "Enable static scene detection for pre-analysis", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "false", + "mutable": "null", + "readable": true, + "type": "gboolean", + "writable": true + }, + "pa-static-scene-detection-sensitivity": { + "blurb": "Set the sensitivity of static scene detection for pre-analysis", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "high (2)", + "mutable": "null", + "readable": true, + "type": "GstAmfEncPAStaticSceneDetectionSensitivity", + "writable": true + }, + "pa-taq-mode": { + "blurb": "Set the temporal adaptive quantization mode", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "none (0)", + "mutable": "null", + "readable": true, + "type": "GstAmfEncPATAQMode", + "writable": true + }, + "pre-analysis": { + "blurb": "Enable pre-analysis", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "false", + "mutable": "playing", + "readable": true, + "type": "gboolean", + "writable": true + }, + "pre-encode": { + "blurb": "Enable pre-encode", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "false", + "mutable": "playing", + "readable": true, + "type": "gboolean", + "writable": true + }, + "preset": { + "blurb": "Preset", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "default (-1)", + "mutable": "playing", + "readable": true, + "type": "GstAmfAv1EncPreset", + "writable": true + }, + "qp-i": { + "blurb": "Constant QP for I frames", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "26", + "max": "255", + "min": "0", + "mutable": "playing", + "readable": true, + "type": "guint", + "writable": true + }, + "qp-p": { + "blurb": "Constant QP for P frames", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "26", + "max": "255", + "min": "0", + "mutable": "playing", + "readable": true, + "type": "guint", + "writable": true + }, + "rate-control": { + "blurb": "Rate Control Method", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "default (-1)", + "mutable": "playing", + "readable": true, + "type": "GstAmfAv1EncRateControl", + "writable": true + }, + "ref-frames": { + "blurb": "Number of reference frames", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "1", + "max": "8", + "min": "0", + "mutable": "playing", + "readable": true, + "type": "guint", + "writable": true + }, + "smart-access-video": { + "blurb": "Enable AMF SmartAccess Video feature for optimal distribution between multiple AMD hardware instances", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "false", + "mutable": "playing", + "readable": true, + "type": "gboolean", + "writable": true + }, + "usage": { + "blurb": "Target usage", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "transcoding (0)", + "mutable": "playing", + "readable": true, + "type": "GstAmfAv1EncUsage", + "writable": true + } + }, + "rank": "none" + }, "amfh264enc": { "author": "Seungha Yang ", "description": "Encode H.264 video streams using AMF API", @@ -1786,6 +2218,18 @@ "type": "gint64", "writable": false }, + "adaptive-mini-gop": { + "blurb": "Enable Adaptive MiniGOP. Determines the number of B-frames to be inserted between I and P frames, or between two consecutive P-frames", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "false", + "mutable": "playing", + "readable": true, + "type": "gboolean", + "writable": true + }, "aud": { "blurb": "Use AU (Access Unit) delimiter", "conditionally-available": false, @@ -1798,6 +2242,32 @@ "type": "gboolean", "writable": true }, + "b-frames": { + "blurb": "Number of consecutive B-frames in a GOP. If b-frames > max-b-frames, then b-frames set to max-b-frames (-1: USAGE default)", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "0", + "max": "3", + "min": "-1", + "mutable": "playing", + "readable": true, + "type": "gint", + "writable": true + }, + "b-reference": { + "blurb": "Enables or disables using B-pictures as references", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "true", + "mutable": "playing", + "readable": true, + "type": "gboolean", + "writable": true + }, "bitrate": { "blurb": "Target bitrate in kbit/sec (0: USAGE default)", "conditionally-available": false, @@ -1838,6 +2308,20 @@ "type": "gint", "writable": true }, + "max-b-frames": { + "blurb": "Maximum number of consecutive B Pictures. Suggestion set to 3 if b-frames is not 0", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "0", + "max": "3", + "min": "0", + "mutable": "playing", + "readable": true, + "type": "guint", + "writable": true + }, "max-bitrate": { "blurb": "Maximum bitrate in kbit/sec (0: USAGE default)", "conditionally-available": false, @@ -1880,6 +2364,204 @@ "type": "gint", "writable": true }, + "pa-activity-type": { + "blurb": "Set the type of activity analysis for pre-analysis", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "y (0)", + "mutable": "null", + "readable": true, + "type": "GstAmfEncPAActivityType", + "writable": true + }, + "pa-caq-strength": { + "blurb": "Content Adaptive Quantization strength for pre-analysis", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "medium (1)", + "mutable": "null", + "readable": true, + "type": "GstAmfEncPACAQStrength", + "writable": true + }, + "pa-frame-sad": { + "blurb": "Enable Frame SAD algorithm", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "true", + "mutable": "null", + "readable": true, + "type": "gboolean", + "writable": true + }, + "pa-hqmb-mode": { + "blurb": "Set the PA high motion quality boost mode", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "none (0)", + "mutable": "null", + "readable": true, + "type": "GstAmfEncPAHQMBMode", + "writable": true + }, + "pa-initial-qp": { + "blurb": "The QP value that is used immediately after a scene change", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "0", + "max": "51", + "min": "0", + "mutable": "null", + "readable": true, + "type": "guint", + "writable": true + }, + "pa-lookahead-buffer-depth": { + "blurb": "Set the PA lookahead buffer size", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "0", + "max": "41", + "min": "0", + "mutable": "null", + "readable": true, + "type": "guint", + "writable": true + }, + "pa-ltr": { + "blurb": "Enable long term reference frame management", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "false", + "mutable": "null", + "readable": true, + "type": "gboolean", + "writable": true + }, + "pa-max-qp": { + "blurb": "The QP threshold to allow a skip frame", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "35", + "max": "51", + "min": "0", + "mutable": "null", + "readable": true, + "type": "guint", + "writable": true + }, + "pa-paq-mode": { + "blurb": "Set the perceptual adaptive quantization mode", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "none (0)", + "mutable": "null", + "readable": true, + "type": "GstAmfEncPAPAQMode", + "writable": true + }, + "pa-scene-change-detection": { + "blurb": "Enable scene change detection for pre-analysis", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "true", + "mutable": "null", + "readable": true, + "type": "gboolean", + "writable": true + }, + "pa-scene-change-detection-sensitivity": { + "blurb": "Set the sensitivity of scene change detection for pre-analysis", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "medium (1)", + "mutable": "null", + "readable": true, + "type": "GstAmfEncPASceneChangeDetectionSensitivity", + "writable": true + }, + "pa-static-scene-detection": { + "blurb": "Enable static scene detection for pre-analysis", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "false", + "mutable": "null", + "readable": true, + "type": "gboolean", + "writable": true + }, + "pa-static-scene-detection-sensitivity": { + "blurb": "Set the sensitivity of static scene detection for pre-analysis", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "high (2)", + "mutable": "null", + "readable": true, + "type": "GstAmfEncPAStaticSceneDetectionSensitivity", + "writable": true + }, + "pa-taq-mode": { + "blurb": "Set the temporal adaptive quantization mode", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "none (0)", + "mutable": "null", + "readable": true, + "type": "GstAmfEncPATAQMode", + "writable": true + }, + "pre-analysis": { + "blurb": "Enable pre-analysis", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "false", + "mutable": "playing", + "readable": true, + "type": "gboolean", + "writable": true + }, + "pre-encode": { + "blurb": "Enable pre-encode", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "false", + "mutable": "playing", + "readable": true, + "type": "gboolean", + "writable": true + }, "preset": { "blurb": "Preset", "conditionally-available": false, @@ -1946,6 +2628,18 @@ "type": "guint", "writable": true }, + "smart-access-video": { + "blurb": "Enable AMF SmartAccess Video feature for optimal distribution between multiple AMD hardware instances", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "false", + "mutable": "playing", + "readable": true, + "type": "gboolean", + "writable": true + }, "usage": { "blurb": "Target usage", "conditionally-available": false, @@ -1979,12 +2673,12 @@ "klass": "Codec/Encoder/Video/Hardware", "pad-templates": { "sink": { - "caps": "video/x-raw(memory:D3D11Memory):\n format: NV12\n width: [ 128, 4096 ]\n height: [ 128, 4096 ]\nvideo/x-raw:\n format: NV12\n width: [ 128, 4096 ]\n height: [ 128, 4096 ]\n", + "caps": "video/x-raw(memory:D3D11Memory):\n format: { NV12, P010_10LE }\n width: [ 128, 4096 ]\n height: [ 128, 4096 ]\nvideo/x-raw:\n format: { NV12, P010_10LE }\n width: [ 128, 4096 ]\n height: [ 128, 4096 ]\n", "direction": "sink", "presence": "always" }, "src": { - "caps": "video/x-h265:\n width: [ 128, 4096 ]\n height: [ 128, 4096 ]\n profile: main\n stream-format: byte-stream\n alignment: au\n", + "caps": "video/x-h265:\n width: [ 128, 4096 ]\n height: [ 128, 4096 ]\n profile: { (string)main, (string)main-10 }\n stream-format: byte-stream\n alignment: au\n", "direction": "src", "presence": "always" } @@ -2114,6 +2808,204 @@ "type": "gint", "writable": true }, + "pa-activity-type": { + "blurb": "Set the type of activity analysis for pre-analysis", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "y (0)", + "mutable": "null", + "readable": true, + "type": "GstAmfEncPAActivityType", + "writable": true + }, + "pa-caq-strength": { + "blurb": "Content Adaptive Quantization strength for pre-analysis", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "medium (1)", + "mutable": "null", + "readable": true, + "type": "GstAmfEncPACAQStrength", + "writable": true + }, + "pa-frame-sad": { + "blurb": "Enable Frame SAD algorithm", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "true", + "mutable": "null", + "readable": true, + "type": "gboolean", + "writable": true + }, + "pa-hqmb-mode": { + "blurb": "Set the PA high motion quality boost mode", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "none (0)", + "mutable": "null", + "readable": true, + "type": "GstAmfEncPAHQMBMode", + "writable": true + }, + "pa-initial-qp": { + "blurb": "The QP value that is used immediately after a scene change", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "0", + "max": "51", + "min": "0", + "mutable": "null", + "readable": true, + "type": "guint", + "writable": true + }, + "pa-lookahead-buffer-depth": { + "blurb": "Set the PA lookahead buffer size", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "0", + "max": "41", + "min": "0", + "mutable": "null", + "readable": true, + "type": "guint", + "writable": true + }, + "pa-ltr": { + "blurb": "Enable long term reference frame management", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "false", + "mutable": "null", + "readable": true, + "type": "gboolean", + "writable": true + }, + "pa-max-qp": { + "blurb": "The QP threshold to allow a skip frame", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "35", + "max": "51", + "min": "0", + "mutable": "null", + "readable": true, + "type": "guint", + "writable": true + }, + "pa-paq-mode": { + "blurb": "Set the perceptual adaptive quantization mode", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "none (0)", + "mutable": "null", + "readable": true, + "type": "GstAmfEncPAPAQMode", + "writable": true + }, + "pa-scene-change-detection": { + "blurb": "Enable scene change detection for pre-analysis", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "true", + "mutable": "null", + "readable": true, + "type": "gboolean", + "writable": true + }, + "pa-scene-change-detection-sensitivity": { + "blurb": "Set the sensitivity of scene change detection for pre-analysis", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "medium (1)", + "mutable": "null", + "readable": true, + "type": "GstAmfEncPASceneChangeDetectionSensitivity", + "writable": true + }, + "pa-static-scene-detection": { + "blurb": "Enable static scene detection for pre-analysis", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "false", + "mutable": "null", + "readable": true, + "type": "gboolean", + "writable": true + }, + "pa-static-scene-detection-sensitivity": { + "blurb": "Set the sensitivity of static scene detection for pre-analysis", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "high (2)", + "mutable": "null", + "readable": true, + "type": "GstAmfEncPAStaticSceneDetectionSensitivity", + "writable": true + }, + "pa-taq-mode": { + "blurb": "Set the temporal adaptive quantization mode", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "none (0)", + "mutable": "null", + "readable": true, + "type": "GstAmfEncPATAQMode", + "writable": true + }, + "pre-analysis": { + "blurb": "Enable pre-analysis", + "conditionally-available": false, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "false", + "mutable": "playing", + "readable": true, + "type": "gboolean", + "writable": true + }, + "pre-encode": { + "blurb": "Enable pre-encode", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "false", + "mutable": "playing", + "readable": true, + "type": "gboolean", + "writable": true + }, "preset": { "blurb": "Preset", "conditionally-available": false, @@ -2180,6 +3072,18 @@ "type": "guint", "writable": true }, + "smart-access-video": { + "blurb": "Enable AMF SmartAccess Video feature for optimal distribution between multiple AMD hardware instances", + "conditionally-available": true, + "construct": false, + "construct-only": false, + "controllable": false, + "default": "false", + "mutable": "playing", + "readable": true, + "type": "gboolean", + "writable": true + }, "usage": { "blurb": "Target usage", "conditionally-available": false, @@ -2199,6 +3103,206 @@ "filename": "gstamfcodec", "license": "LGPL", "other-types": { + "GstAmfAv1EncPreset": { + "kind": "enum", + "values": [ + { + "desc": "Default, depends on USAGE", + "name": "default", + "value": "-1" + }, + { + "desc": "High quality", + "name": "high-quality", + "value": "0" + }, + { + "desc": "Quality", + "name": "quality", + "value": "30" + }, + { + "desc": "Balanced", + "name": "balanced", + "value": "70" + }, + { + "desc": "Speed", + "name": "speed", + "value": "100" + } + ] + }, + "GstAmfAv1EncRateControl": { + "kind": "enum", + "values": [ + { + "desc": "Default, depends on Usage", + "name": "default", + "value": "-1" + }, + { + "desc": "Constant QP", + "name": "cqp", + "value": "0" + }, + { + "desc": "Latency Constrained VBR", + "name": "lcvbr", + "value": "1" + }, + { + "desc": "Peak Constrained VBR", + "name": "vbr", + "value": "2" + }, + { + "desc": "Constant Bitrate", + "name": "cbr", + "value": "3" + } + ] + }, + "GstAmfAv1EncUsage": { + "kind": "enum", + "values": [ + { + "desc": "Transcoding", + "name": "transcoding", + "value": "0" + }, + { + "desc": "Low Latency", + "name": "low-latency", + "value": "1" + } + ] + }, + "GstAmfEncPAActivityType": { + "kind": "enum", + "values": [ + { + "desc": "Luma (Y) component only", + "name": "y", + "value": "0" + }, + { + "desc": "Luma and Chroma components (YUV)", + "name": "yuv", + "value": "1" + } + ] + }, + "GstAmfEncPACAQStrength": { + "kind": "enum", + "values": [ + { + "desc": "Low", + "name": "low", + "value": "0" + }, + { + "desc": "Medium", + "name": "medium", + "value": "1" + }, + { + "desc": "High", + "name": "high", + "value": "2" + } + ] + }, + "GstAmfEncPAHQMBMode": { + "kind": "enum", + "values": [ + { + "desc": "None", + "name": "none", + "value": "0" + }, + { + "desc": "Auto", + "name": "auto", + "value": "1" + } + ] + }, + "GstAmfEncPAPAQMode": { + "kind": "enum", + "values": [ + { + "desc": "None", + "name": "none", + "value": "0" + }, + { + "desc": "Content Adaptive Quantization (CAQ) mode", + "name": "caq", + "value": "1" + } + ] + }, + "GstAmfEncPASceneChangeDetectionSensitivity": { + "kind": "enum", + "values": [ + { + "desc": "Low", + "name": "low", + "value": "0" + }, + { + "desc": "Medium", + "name": "medium", + "value": "1" + }, + { + "desc": "High", + "name": "high", + "value": "2" + } + ] + }, + "GstAmfEncPAStaticSceneDetectionSensitivity": { + "kind": "enum", + "values": [ + { + "desc": "Low", + "name": "low", + "value": "0" + }, + { + "desc": "Medium", + "name": "medium", + "value": "1" + }, + { + "desc": "High", + "name": "high", + "value": "2" + } + ] + }, + "GstAmfEncPATAQMode": { + "kind": "enum", + "values": [ + { + "desc": "None", + "name": "none", + "value": "0" + }, + { + "desc": "Mode_1 is suitable for non-gaming applications", + "name": "mode1", + "value": "1" + }, + { + "desc": "Mode_2 is suitable for gaming applications", + "name": "mode2", + "value": "2" + } + ] + }, "GstAmfEncoder": { "hierarchy": [ "GstAmfEncoder", diff --git a/subprojects/gst-plugins-bad/sys/amfcodec/gstamfav1enc.cpp b/subprojects/gst-plugins-bad/sys/amfcodec/gstamfav1enc.cpp index 12be1a68fe..448c3da09c 100644 --- a/subprojects/gst-plugins-bad/sys/amfcodec/gstamfav1enc.cpp +++ b/subprojects/gst-plugins-bad/sys/amfcodec/gstamfav1enc.cpp @@ -437,13 +437,29 @@ gst_amf_av1_enc_class_init (GstAmfAv1EncClass * klass, gpointer data) g_object_class_install_property (object_class, PROP_REF_FRAMES, g_param_spec_uint ("ref-frames", "Reference Frames", "Number of reference frames", 0, 8, DEFAULT_REF_FRAMES, param_flags)); + if (cdata->dev_caps.pre_encode_supported) { + /** + * GstAmfAv1Enc:pre-encode: + * + * Enable pre-encode assisted rate control + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PRE_ENCODE, g_param_spec_boolean ("pre-encode", "Pre-encode", "Enable pre-encode", DEFAULT_PRE_ENCODE, (GParamFlags) (param_flags | GST_PARAM_CONDITIONALLY_AVAILABLE))); } + if (cdata->dev_caps.smart_access_supported) { + /** + * GstAmfAv1Enc:smart-access-video: + * + * Enable AMF SmartAccess Video feature + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_SMART_ACCESS, g_param_spec_boolean ("smart-access-video", "Smart Access Video", "Enable AMF SmartAccess Video feature for optimal distribution" @@ -454,17 +470,40 @@ gst_amf_av1_enc_class_init (GstAmfAv1EncClass * klass, gpointer data) } if (dev_caps->pre_analysis) { + /** + * GstAmfAv1Enc:pre-analysis: + * + * Enable the pre-analysis module + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PRE_ANALYSIS, g_param_spec_boolean ("pre-analysis", "Pre-analysis", "Enable pre-analysis", DEFAULT_PRE_ANALYSIS, param_flags)); + if (pa_supported->activity_type) { + /** + * GstAmfAv1Enc:pa-activity-type: + * + * Set the type of activity analysis for pre-analysis + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_ACTIVITY_TYPE, g_param_spec_enum ("pa-activity-type", "Pre-analysis activity type", "Set the type of activity analysis for pre-analysis", GST_TYPE_AMF_ENC_PA_ACTIVITY_TYPE, DEFAULT_PA_ACTIVITY_TYPE, pa_param_flags)); } + if (pa_supported->scene_change_detection) { + /** + * GstAmfAv1Enc:pa-scene-change-detection: + * + * Enable scene change detection for pre-analysis + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_SCENE_CHANGE_DETECTION, g_param_spec_boolean ("pa-scene-change-detection", @@ -472,7 +511,15 @@ gst_amf_av1_enc_class_init (GstAmfAv1EncClass * klass, gpointer data) "Enable scene change detection for pre-analysis", DEFAULT_PA_SCENE_CHANGE_DETECTION, pa_param_flags)); } + if (pa_supported->scene_change_detection_sensitivity) { + /** + * GstAmfAv1Enc:pa-scene-change-detection-sensitivity: + * + * Pre-analysis scene change detection sensitivity + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_SCENE_CHANGE_DETECTION_SENSITIVITY, g_param_spec_enum ("pa-scene-change-detection-sensitivity", @@ -481,7 +528,15 @@ gst_amf_av1_enc_class_init (GstAmfAv1EncClass * klass, gpointer data) GST_TYPE_AMF_ENC_PA_SCENE_CHANGE_DETECTION_SENSITIVITY, DEFAULT_PA_SCENE_CHANGE_DETECTION_SENSITIVITY, pa_param_flags)); } + if (pa_supported->static_scene_detection) { + /** + * GstAmfAv1Enc:pa-static-scene-detection: + * + * Enable static scene detection for pre-analysis + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_STATIC_SCENE_DETECTION, g_param_spec_boolean ("pa-static-scene-detection", @@ -489,7 +544,15 @@ gst_amf_av1_enc_class_init (GstAmfAv1EncClass * klass, gpointer data) "Enable static scene detection for pre-analysis", DEFAULT_PA_STATIC_SCENE_DETECTION, pa_param_flags)); } + if (pa_supported->static_scene_detection_sensitivity) { + /** + * GstAmfAv1Enc:pa-static-scene-detection-sensitivity: + * + * Pre-analysis static scene detection sensitivity + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_STATIC_SCENE_DETECTION_SENSITIVITY, g_param_spec_enum ("pa-static-scene-detection-sensitivity", @@ -498,38 +561,86 @@ gst_amf_av1_enc_class_init (GstAmfAv1EncClass * klass, gpointer data) GST_TYPE_AMF_ENC_PA_STATIC_SCENE_DETECTION_SENSITIVITY, DEFAULT_PA_STATIC_SCENE_DETECTION_SENSITIVITY, pa_param_flags)); } + if (pa_supported->initial_qp) { + /** + * GstAmfAv1Enc:pa-initial-qp: + * + * Pre-analysis initial QP + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_INITIAL_QP, g_param_spec_uint ("pa-initial-qp", "Pre-analysis initial QP", "The QP value that is used immediately after a scene change", 0, 51, DEFAULT_PA_INITIAL_QP, pa_param_flags)); } + if (pa_supported->max_qp) { + /** + * GstAmfAv1Enc:pa-max-qp: + * + * Pre-analysis max QP + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_MAX_QP, g_param_spec_uint ("pa-max-qp", "Pre-analysis max QP", "The QP threshold to allow a skip frame", 0, 51, DEFAULT_PA_MAX_QP, pa_param_flags)); } + if (pa_supported->caq_strength) { + /** + * GstAmfAv1Enc:pa-caq-strength: + * + * Content Adaptive Quantization strength for pre-analysis + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_CAQ_STRENGTH, g_param_spec_enum ("pa-caq-strength", "Pre-analysis CAQ strength", "Content Adaptive Quantization strength for pre-analysis", GST_TYPE_AMF_ENC_PA_CAQ_STRENGTH, DEFAULT_PA_CAQ_STRENGTH, pa_param_flags)); } + if (pa_supported->frame_sad) { + /** + * GstAmfAv1Enc:pa-frame-sad: + * + * Enable Frame SAD algorithm + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_FRAME_SAD, g_param_spec_boolean ("pa-frame-sad", "Pre-analysis SAD algorithm", "Enable Frame SAD algorithm", DEFAULT_PA_FRAME_SAD, pa_param_flags)); } + if (pa_supported->ltr) { + /** + * GstAmfAv1Enc:pa-ltr: + * + * Enable long term reference frame management + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_LTR, g_param_spec_boolean ("pa-ltr", "Pre-analysis LTR", "Enable long term reference frame management", DEFAULT_PA_LTR, pa_param_flags)); } + if (pa_supported->lookahead_buffer_depth) { + /** + * GstAmfAv1Enc:pa-lookahead-buffer-depth: + * + * Pre-analysis lookahead buffer depth + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_LOOKAHEAD_BUFFER_DEPTH, g_param_spec_uint ("pa-lookahead-buffer-depth", @@ -537,21 +648,45 @@ gst_amf_av1_enc_class_init (GstAmfAv1EncClass * klass, gpointer data) "Set the PA lookahead buffer size", 0, 41, DEFAULT_PA_LOOKAHEAD_BUFFER_DEPTH, pa_param_flags)); } + if (pa_supported->paq_mode) { + /** + * GstAmfAv1Enc:pa-paq-mode: + * + * Set the perceptual adaptive quantization mode + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_PAQ_MODE, g_param_spec_enum ("pa-paq-mode", "Pre-analysis PAQ mode", "Set the perceptual adaptive quantization mode", GST_TYPE_AMF_ENC_PA_PAQ_MODE, DEFAULT_PA_PAQ_MODE, pa_param_flags)); } + if (pa_supported->taq_mode) { + /** + * GstAmfAv1Enc:pa-taq-mode: + * + * Set the temporal adaptive quantization mode + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_TAQ_MODE, g_param_spec_enum ("pa-taq-mode", "Pre-analysis TAQ mode", "Set the temporal adaptive quantization mode", GST_TYPE_AMF_ENC_PA_TAQ_MODE, DEFAULT_PA_TAQ_MODE, pa_param_flags)); } + if (pa_supported->hmqb_mode) { + /** + * GstAmfAv1Enc:pa-hqmb-mode: + * + * Set the PA high motion quality boost mode + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_HQMB_MODE, g_param_spec_enum ("pa-hqmb-mode", "Pre-analysis HQMB mode", "Set the PA high motion quality boost mode", diff --git a/subprojects/gst-plugins-bad/sys/amfcodec/gstamfh264enc.cpp b/subprojects/gst-plugins-bad/sys/amfcodec/gstamfh264enc.cpp index 31966f27b1..1fdf8a3bcd 100644 --- a/subprojects/gst-plugins-bad/sys/amfcodec/gstamfh264enc.cpp +++ b/subprojects/gst-plugins-bad/sys/amfcodec/gstamfh264enc.cpp @@ -482,32 +482,80 @@ gst_amf_h264_enc_class_init (GstAmfH264EncClass * klass, gpointer data) g_object_class_install_property (object_class, PROP_CABAC, g_param_spec_boolean ("cabac", "CABAC", "Enable CABAC entropy coding", TRUE, param_flags)); + if (cdata->dev_caps.pre_encode_supported) { + /** + * GstAmfH264Enc:pre-encode: + * + * Enable pre-encode assisted rate control + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PRE_ENCODE, g_param_spec_boolean ("pre-encode", "Pre-encode", "Enable pre-encode", DEFAULT_PRE_ENCODE, (GParamFlags) (param_flags | GST_PARAM_CONDITIONALLY_AVAILABLE))); } + if (dev_caps->bframes) { + /** + * GstAmfH264Enc:max-b-frames: + * + * Maximum number of consecutive B pictures + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_MAX_B_FRAMES, g_param_spec_uint ("max-b-frames", "Maximum number of B-frames", "Maximum number of consecutive B Pictures. " "Suggestion set to 3 if b-frames is not 0", 0, 3, DEFAULT_MAX_B_FRAMES, param_flags)); + + /** + * GstAmfH264Enc:b-frames: + * + * Number of consecutive B pictures in a GOP + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_B_FRAMES, g_param_spec_int ("b-frames", "B-Frames", "Number of consecutive B-frames in a GOP. " "If b-frames > max-b-frames, then b-frames set to max-b-frames " "(-1: USAGE default)", -1, 3, DEFAULT_B_FRAMES, param_flags)); + + /** + * GstAmfH264Enc:b-reference: + * + * Enable using B-pictures as references + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_B_REFERENCE, g_param_spec_boolean ("b-reference", "B-Frames as reference", "Enables or disables using B-pictures as references", DEFAULT_B_REFERENCE, param_flags)); + if (dev_caps->b_frames_delta_qp_supported) { + /** + * GstAmfH264Enc:b-frames-delta-qp: + * + * delta QP of non-reference B pictures with respect to I pictures + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_B_FRAMES_DELTA_QP, g_param_spec_int ("b-frames-delta-qp", "B-Frames delta QP", "Selects the delta QP of non-reference B pictures with respect to I pictures", -10, 10, DEFAULT_B_FRAMES_DELTA_QP, param_flags)); + + /** + * GstAmfH264Enc:ref-b-frames-delta-qp: + * + * delta QP of reference B pictures with respect to I pictures + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_REF_B_FRAMES_DELTA_QP, g_param_spec_int ("ref-b-frames-delta-qp", "Reference B-Frames delta QP", @@ -515,7 +563,15 @@ gst_amf_h264_enc_class_init (GstAmfH264EncClass * klass, gpointer data) -10, 10, DEFAULT_REF_B_FRAMES_DELTA_QP, param_flags)); } } + if (cdata->dev_caps.smart_access_supported) { + /** + * GstAmfH264Enc:smart-access-video: + * + * Enable AMF SmartAccess Video feature + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_SMART_ACCESS, g_param_spec_boolean ("smart-access-video", "Smart Access Video", "Enable AMF SmartAccess Video feature for optimal distribution" @@ -526,10 +582,25 @@ gst_amf_h264_enc_class_init (GstAmfH264EncClass * klass, gpointer data) } if (dev_caps->pre_analysis) { + /** + * GstAmfH264Enc:pre-analysis: + * + * Enable the pre-analysis module + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PRE_ANALYSIS, g_param_spec_boolean ("pre-analysis", "Pre Analysis", "Enable pre-analysis", DEFAULT_PRE_ANALYSIS, param_flags)); + if (cdata->dev_caps.mini_gop_supported) { + /** + * GstAmfH264Enc:adaptive-mini-gop: + * + * Enable Adaptive MiniGOP + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_ADAPT_MINI_GOP, g_param_spec_boolean ("adaptive-mini-gop", "Adaptive MiniGOP", "Enable Adaptive MiniGOP. Determines the number of B-frames to be " @@ -538,13 +609,28 @@ gst_amf_h264_enc_class_init (GstAmfH264EncClass * klass, gpointer data) (GParamFlags) (param_flags | GST_PARAM_CONDITIONALLY_AVAILABLE))); } if (pa_supported->activity_type) { + /** + * GstAmfH264Enc:pa-activity-type: + * + * Set the type of activity analysis for pre-analysis + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_ACTIVITY_TYPE, g_param_spec_enum ("pa-activity-type", "Pre-analysis activity type", "Set the type of activity analysis for pre-analysis", GST_TYPE_AMF_ENC_PA_ACTIVITY_TYPE, DEFAULT_PA_ACTIVITY_TYPE, pa_param_flags)); } + if (pa_supported->scene_change_detection) { + /** + * GstAmfH264Enc:pa-scene-change-detection: + * + * Enable scene change detection for pre-analysis + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_SCENE_CHANGE_DETECTION, g_param_spec_boolean ("pa-scene-change-detection", @@ -552,7 +638,15 @@ gst_amf_h264_enc_class_init (GstAmfH264EncClass * klass, gpointer data) "Enable scene change detection for pre-analysis", DEFAULT_PA_SCENE_CHANGE_DETECTION, pa_param_flags)); } + if (pa_supported->scene_change_detection_sensitivity) { + /** + * GstAmfH264Enc:pa-scene-change-detection-sensitivity: + * + * Pre-analysis scene change detection sensitivity + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_SCENE_CHANGE_DETECTION_SENSITIVITY, g_param_spec_enum ("pa-scene-change-detection-sensitivity", @@ -562,6 +656,13 @@ gst_amf_h264_enc_class_init (GstAmfH264EncClass * klass, gpointer data) DEFAULT_PA_SCENE_CHANGE_DETECTION_SENSITIVITY, pa_param_flags)); } if (pa_supported->static_scene_detection) { + /** + * GstAmfH264Enc:pa-static-scene-detection: + * + * Enable static scene detection for pre-analysis + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_STATIC_SCENE_DETECTION, g_param_spec_boolean ("pa-static-scene-detection", @@ -569,7 +670,15 @@ gst_amf_h264_enc_class_init (GstAmfH264EncClass * klass, gpointer data) "Enable static scene detection for pre-analysis", DEFAULT_PA_STATIC_SCENE_DETECTION, pa_param_flags)); } + if (pa_supported->static_scene_detection_sensitivity) { + /** + * GstAmfH264Enc:pa-static-scene-detection-sensitivity: + * + * Pre-analysis static scene detection sensitivity + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_STATIC_SCENE_DETECTION_SENSITIVITY, g_param_spec_enum ("pa-static-scene-detection-sensitivity", @@ -578,38 +687,86 @@ gst_amf_h264_enc_class_init (GstAmfH264EncClass * klass, gpointer data) GST_TYPE_AMF_ENC_PA_STATIC_SCENE_DETECTION_SENSITIVITY, DEFAULT_PA_STATIC_SCENE_DETECTION_SENSITIVITY, pa_param_flags)); } + if (pa_supported->initial_qp) { + /** + * GstAmfH264Enc:pa-initial-qp: + * + * Pre-analysis initial QP + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_INITIAL_QP, g_param_spec_uint ("pa-initial-qp", "Pre-analysis initial QP", "The QP value that is used immediately after a scene change", 0, 51, DEFAULT_PA_INITIAL_QP, pa_param_flags)); } + if (pa_supported->max_qp) { + /** + * GstAmfH264Enc:pa-max-qp: + * + * Pre-analysis max QP + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_MAX_QP, g_param_spec_uint ("pa-max-qp", "Pre-analysis max QP", "The QP threshold to allow a skip frame", 0, 51, DEFAULT_PA_MAX_QP, pa_param_flags)); } + if (pa_supported->caq_strength) { + /** + * GstAmfH264Enc:pa-caq-strength: + * + * Content Adaptive Quantization strength for pre-analysis + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_CAQ_STRENGTH, g_param_spec_enum ("pa-caq-strength", "Pre-analysis CAQ strength", "Content Adaptive Quantization strength for pre-analysis", GST_TYPE_AMF_ENC_PA_CAQ_STRENGTH, DEFAULT_PA_CAQ_STRENGTH, pa_param_flags)); } + if (pa_supported->frame_sad) { + /** + * GstAmfH264Enc:pa-frame-sad: + * + * Enable Frame SAD algorithm + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_FRAME_SAD, g_param_spec_boolean ("pa-frame-sad", "Pre-analysis SAD algorithm", "Enable Frame SAD algorithm", DEFAULT_PA_FRAME_SAD, pa_param_flags)); } + if (pa_supported->ltr) { + /** + * GstAmfH264Enc:pa-ltr: + * + * Enable long term reference frame management + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_LTR, g_param_spec_boolean ("pa-ltr", "Pre-analysis LTR", "Enable long term reference frame management", DEFAULT_PA_LTR, pa_param_flags)); } + if (pa_supported->lookahead_buffer_depth) { + /** + * GstAmfH264Enc:pa-lookahead-buffer-depth: + * + * Pre-analysis lookahead buffer depth + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_LOOKAHEAD_BUFFER_DEPTH, g_param_spec_uint ("pa-lookahead-buffer-depth", @@ -617,21 +774,45 @@ gst_amf_h264_enc_class_init (GstAmfH264EncClass * klass, gpointer data) "Set the PA lookahead buffer size", 0, 41, DEFAULT_PA_LOOKAHEAD_BUFFER_DEPTH, pa_param_flags)); } + if (pa_supported->paq_mode) { + /** + * GstAmfH264Enc:pa-paq-mode: + * + * Set the perceptual adaptive quantization mode + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_PAQ_MODE, g_param_spec_enum ("pa-paq-mode", "Pre-analysis PAQ mode", "Set the perceptual adaptive quantization mode", GST_TYPE_AMF_ENC_PA_PAQ_MODE, DEFAULT_PA_PAQ_MODE, pa_param_flags)); } + if (pa_supported->taq_mode) { + /** + * GstAmfH264Enc:pa-taq-mode: + * + * Set the temporal adaptive quantization mode + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_TAQ_MODE, g_param_spec_enum ("pa-taq-mode", "Pre-analysis TAQ mode", "Set the temporal adaptive quantization mode", GST_TYPE_AMF_ENC_PA_TAQ_MODE, DEFAULT_PA_TAQ_MODE, pa_param_flags)); } + if (pa_supported->hmqb_mode) { + /** + * GstAmfH264Enc:pa-hqmb-mode: + * + * Set the PA high motion quality boost mode + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_HQMB_MODE, g_param_spec_enum ("pa-hqmb-mode", "Pre-analysis HQMB mode", "Set the PA high motion quality boost mode", diff --git a/subprojects/gst-plugins-bad/sys/amfcodec/gstamfh265enc.cpp b/subprojects/gst-plugins-bad/sys/amfcodec/gstamfh265enc.cpp index 808cb77153..de4fda0c10 100644 --- a/subprojects/gst-plugins-bad/sys/amfcodec/gstamfh265enc.cpp +++ b/subprojects/gst-plugins-bad/sys/amfcodec/gstamfh265enc.cpp @@ -458,7 +458,15 @@ gst_amf_h265_enc_class_init (GstAmfH265EncClass * klass, gpointer data) g_object_class_install_property (object_class, PROP_AUD, g_param_spec_boolean ("aud", "AUD", "Use AU (Access Unit) delimiter", DEFAULT_AUD, param_flags)); + if (cdata->dev_caps.pre_encode_supported) { + /** + * GstAmfH265Enc:pre-encode: + * + * Enable pre-encode assisted rate control + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PRE_ENCODE, g_param_spec_boolean ("pre-encode", "Pre-encode", "Enable pre-encode", DEFAULT_PRE_ENCODE, @@ -466,6 +474,13 @@ gst_amf_h265_enc_class_init (GstAmfH265EncClass * klass, gpointer data) } if (cdata->dev_caps.smart_access_supported) { + /** + * GstAmfH265Enc:smart-access-video: + * + * Enable AMF SmartAccess Video feature + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_SMART_ACCESS, g_param_spec_boolean ("smart-access-video", "Smart Access Video", "Enable AMF SmartAccess Video feature for optimal distribution" @@ -476,17 +491,40 @@ gst_amf_h265_enc_class_init (GstAmfH265EncClass * klass, gpointer data) } if (dev_caps->pre_analysis) { + /** + * GstAmfH265Enc:pre-analysis: + * + * Enable the pre-analysis module + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PRE_ANALYSIS, g_param_spec_boolean ("pre-analysis", "Pre-analysis", "Enable pre-analysis", DEFAULT_PRE_ANALYSIS, param_flags)); + if (pa_supported->activity_type) { + /** + * GstAmfH265Enc:pa-activity-type: + * + * Set the type of activity analysis for pre-analysis + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_ACTIVITY_TYPE, g_param_spec_enum ("pa-activity-type", "Pre-analysis activity type", "Set the type of activity analysis for pre-analysis", GST_TYPE_AMF_ENC_PA_ACTIVITY_TYPE, DEFAULT_PA_ACTIVITY_TYPE, pa_param_flags)); } + if (pa_supported->scene_change_detection) { + /** + * GstAmfH265Enc:pa-scene-change-detection: + * + * Enable scene change detection for pre-analysis + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_SCENE_CHANGE_DETECTION, g_param_spec_boolean ("pa-scene-change-detection", @@ -494,7 +532,15 @@ gst_amf_h265_enc_class_init (GstAmfH265EncClass * klass, gpointer data) "Enable scene change detection for pre-analysis", DEFAULT_PA_SCENE_CHANGE_DETECTION, pa_param_flags)); } + if (pa_supported->scene_change_detection_sensitivity) { + /** + * GstAmfH265Enc:pa-scene-change-detection-sensitivity: + * + * Pre-analysis scene change detection sensitivity + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_SCENE_CHANGE_DETECTION_SENSITIVITY, g_param_spec_enum ("pa-scene-change-detection-sensitivity", @@ -503,7 +549,15 @@ gst_amf_h265_enc_class_init (GstAmfH265EncClass * klass, gpointer data) GST_TYPE_AMF_ENC_PA_SCENE_CHANGE_DETECTION_SENSITIVITY, DEFAULT_PA_SCENE_CHANGE_DETECTION_SENSITIVITY, pa_param_flags)); } + if (pa_supported->static_scene_detection) { + /** + * GstAmfH265Enc:pa-static-scene-detection: + * + * Enable static scene detection for pre-analysis + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_STATIC_SCENE_DETECTION, g_param_spec_boolean ("pa-static-scene-detection", @@ -511,7 +565,15 @@ gst_amf_h265_enc_class_init (GstAmfH265EncClass * klass, gpointer data) "Enable static scene detection for pre-analysis", DEFAULT_PA_STATIC_SCENE_DETECTION, pa_param_flags)); } + if (pa_supported->static_scene_detection_sensitivity) { + /** + * GstAmfH265Enc:pa-static-scene-detection-sensitivity: + * + * Pre-analysis static scene detection sensitivity + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_STATIC_SCENE_DETECTION_SENSITIVITY, g_param_spec_enum ("pa-static-scene-detection-sensitivity", @@ -520,38 +582,86 @@ gst_amf_h265_enc_class_init (GstAmfH265EncClass * klass, gpointer data) GST_TYPE_AMF_ENC_PA_STATIC_SCENE_DETECTION_SENSITIVITY, DEFAULT_PA_STATIC_SCENE_DETECTION_SENSITIVITY, pa_param_flags)); } + if (pa_supported->initial_qp) { + /** + * GstAmfH265Enc:pa-initial-qp: + * + * Pre-analysis initial QP + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_INITIAL_QP, g_param_spec_uint ("pa-initial-qp", "Pre-analysis initial QP", "The QP value that is used immediately after a scene change", 0, 51, DEFAULT_PA_INITIAL_QP, pa_param_flags)); } + if (pa_supported->max_qp) { + /** + * GstAmfH265Enc:pa-max-qp: + * + * Pre-analysis max QP + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_MAX_QP, g_param_spec_uint ("pa-max-qp", "Pre-analysis max QP", "The QP threshold to allow a skip frame", 0, 51, DEFAULT_PA_MAX_QP, pa_param_flags)); } + if (pa_supported->caq_strength) { + /** + * GstAmfH265Enc:pa-caq-strength: + * + * Content Adaptive Quantization strength for pre-analysis + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_CAQ_STRENGTH, g_param_spec_enum ("pa-caq-strength", "Pre-analysis CAQ strength", "Content Adaptive Quantization strength for pre-analysis", GST_TYPE_AMF_ENC_PA_CAQ_STRENGTH, DEFAULT_PA_CAQ_STRENGTH, pa_param_flags)); } + if (pa_supported->frame_sad) { + /** + * GstAmfH265Enc:pa-frame-sad: + * + * Enable Frame SAD algorithm + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_FRAME_SAD, g_param_spec_boolean ("pa-frame-sad", "Pre-analysis SAD algorithm", "Enable Frame SAD algorithm", DEFAULT_PA_FRAME_SAD, pa_param_flags)); } + if (pa_supported->ltr) { + /** + * GstAmfH265Enc:pa-ltr: + * + * Enable long term reference frame management + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_LTR, g_param_spec_boolean ("pa-ltr", "Pre-analysis LTR", "Enable long term reference frame management", DEFAULT_PA_LTR, pa_param_flags)); } + if (pa_supported->lookahead_buffer_depth) { + /** + * GstAmfH265Enc:pa-lookahead-buffer-depth: + * + * Pre-analysis lookahead buffer depth + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_LOOKAHEAD_BUFFER_DEPTH, g_param_spec_uint ("pa-lookahead-buffer-depth", @@ -559,21 +669,45 @@ gst_amf_h265_enc_class_init (GstAmfH265EncClass * klass, gpointer data) "Set the PA lookahead buffer size", 0, 41, DEFAULT_PA_LOOKAHEAD_BUFFER_DEPTH, pa_param_flags)); } + if (pa_supported->paq_mode) { + /** + * GstAmfH265Enc:pa-paq-mode: + * + * Set the perceptual adaptive quantization mode + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_PAQ_MODE, g_param_spec_enum ("pa-paq-mode", "Pre-analysis PAQ mode", "Set the perceptual adaptive quantization mode", GST_TYPE_AMF_ENC_PA_PAQ_MODE, DEFAULT_PA_PAQ_MODE, pa_param_flags)); } + if (pa_supported->taq_mode) { + /** + * GstAmfH265Enc:pa-taq-mode: + * + * Set the temporal adaptive quantization mode + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_TAQ_MODE, g_param_spec_enum ("pa-taq-mode", "Pre-analysis TAQ mode", "Set the temporal adaptive quantization mode", GST_TYPE_AMF_ENC_PA_TAQ_MODE, DEFAULT_PA_TAQ_MODE, pa_param_flags)); } + if (pa_supported->hmqb_mode) { + /** + * GstAmfH265Enc:pa-hqmb-mode: + * + * Set the PA high motion quality boost mode + * + * Since: 1.24 + */ g_object_class_install_property (object_class, PROP_PA_HQMB_MODE, g_param_spec_enum ("pa-hqmb-mode", "Pre-analysis HQMB mode", "Set the PA high motion quality boost mode",