mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-30 11:08:34 +00:00
nvh264enc: add constrained-baseline to the caps profiles
In practice, when baseline is requested from the encoder it produces constrained baseline, and it is already reflected in the profile-iop flags. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1213>
This commit is contained in:
parent
8b6c3e030b
commit
2f8030d98b
3 changed files with 7 additions and 3 deletions
|
@ -213843,7 +213843,7 @@
|
||||||
"presence": "always"
|
"presence": "always"
|
||||||
},
|
},
|
||||||
"src": {
|
"src": {
|
||||||
"caps": "video/x-h264:\n width: [ 145, 4096 ]\n height: [ 49, 4096 ]\n framerate: [ 0/1, 2147483647/1 ]\n stream-format: byte-stream\n alignment: au\n profile: { (string)main, (string)high, (string)high-4:4:4, (string)baseline }\n",
|
"caps": "video/x-h264:\n width: [ 145, 4096 ]\n height: [ 49, 4096 ]\n framerate: [ 0/1, 2147483647/1 ]\n stream-format: byte-stream\n alignment: au\n profile: { (string)main, (string)high, (string)high-4:4:4, (string)baseline, (string)constrained-baseline }\n",
|
||||||
"direction": "src",
|
"direction": "src",
|
||||||
"presence": "always"
|
"presence": "always"
|
||||||
}
|
}
|
||||||
|
|
|
@ -514,6 +514,9 @@ gst_nvenc_get_supported_codec_profiles (gpointer enc, GUID codec_id)
|
||||||
/* put baseline to last since it does not support bframe */
|
/* put baseline to last since it does not support bframe */
|
||||||
{"baseline", NV_ENC_H264_PROFILE_BASELINE_GUID, NV_ENC_CODEC_H264_GUID,
|
{"baseline", NV_ENC_H264_PROFILE_BASELINE_GUID, NV_ENC_CODEC_H264_GUID,
|
||||||
FALSE, FALSE, FALSE},
|
FALSE, FALSE, FALSE},
|
||||||
|
{"constrained-baseline", NV_ENC_H264_PROFILE_BASELINE_GUID,
|
||||||
|
NV_ENC_CODEC_H264_GUID,
|
||||||
|
FALSE, FALSE, FALSE},
|
||||||
/* hevc profiles */
|
/* hevc profiles */
|
||||||
{"main", NV_ENC_HEVC_PROFILE_MAIN_GUID, NV_ENC_CODEC_HEVC_GUID, FALSE,
|
{"main", NV_ENC_HEVC_PROFILE_MAIN_GUID, NV_ENC_CODEC_HEVC_GUID, FALSE,
|
||||||
FALSE, FALSE},
|
FALSE, FALSE},
|
||||||
|
|
|
@ -79,7 +79,7 @@ enum
|
||||||
"framerate = " GST_VIDEO_FPS_RANGE ", " \
|
"framerate = " GST_VIDEO_FPS_RANGE ", " \
|
||||||
"stream-format = (string) byte-stream, " \
|
"stream-format = (string) byte-stream, " \
|
||||||
"alignment = (string) au, " \
|
"alignment = (string) au, " \
|
||||||
"profile = (string) { main, high, high-4:4:4, baseline }"
|
"profile = (string) { main, high, high-4:4:4, baseline, constrained-baseline }"
|
||||||
|
|
||||||
static gboolean gst_nv_h264_enc_open (GstVideoEncoder * enc);
|
static gboolean gst_nv_h264_enc_open (GstVideoEncoder * enc);
|
||||||
static gboolean gst_nv_h264_enc_close (GstVideoEncoder * enc);
|
static gboolean gst_nv_h264_enc_close (GstVideoEncoder * enc);
|
||||||
|
@ -474,7 +474,8 @@ gst_nv_h264_enc_set_encoder_config (GstNvBaseEnc * nvenc,
|
||||||
|
|
||||||
profile = gst_structure_get_string (s, "profile");
|
profile = gst_structure_get_string (s, "profile");
|
||||||
if (profile) {
|
if (profile) {
|
||||||
if (!strcmp (profile, "baseline")) {
|
if (!strcmp (profile, "baseline")
|
||||||
|
|| !strcmp (profile, "constrained-baseline")) {
|
||||||
selected_profile = NV_ENC_H264_PROFILE_BASELINE_GUID;
|
selected_profile = NV_ENC_H264_PROFILE_BASELINE_GUID;
|
||||||
} else if (g_str_has_prefix (profile, "high-4:4:4")) {
|
} else if (g_str_has_prefix (profile, "high-4:4:4")) {
|
||||||
selected_profile = NV_ENC_H264_PROFILE_HIGH_444_GUID;
|
selected_profile = NV_ENC_H264_PROFILE_HIGH_444_GUID;
|
||||||
|
|
Loading…
Reference in a new issue