From d692350fc30de96fc1498a4f3357a30477520eb4 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Wed, 24 Jul 2019 18:06:41 +0900 Subject: [PATCH] nvdec: Specify supported profiles of h264/h265 codec See more details about supported formats at nvidia codec sdk document "NVDEC_VideoDecoder_API_ProgGuide.pdf" Table 1. Hardware Video Decoder Capabilities. Fixes: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/926 --- sys/nvcodec/gstnvdec.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/nvcodec/gstnvdec.c b/sys/nvcodec/gstnvdec.c index c0ec8986d9..3ef52f7b1f 100644 --- a/sys/nvcodec/gstnvdec.c +++ b/sys/nvcodec/gstnvdec.c @@ -1203,9 +1203,13 @@ const GstNvCodecMap codec_map[] = { /* FIXME: need verification */ {cudaVideoCodec_VC1, "vc1"}, #endif + /* NOTE: common supported h264 profiles for all GPU architecture + * 4:2:0, baseline, main, and high profiles + */ {cudaVideoCodec_H264, "h264", "video/x-h264, stream-format = (string) byte-stream" - ", alignment = (string) au"}, + ", alignment = (string) au" + ", profile = (string) { constrained-baseline, baseline, main, high }"}, {cudaVideoCodec_JPEG, "jpeg", "image/jpeg"}, #if 0 /* FIXME: need verification */ @@ -1214,7 +1218,7 @@ const GstNvCodecMap codec_map[] = { #endif {cudaVideoCodec_HEVC, "h265", "video/x-h265, stream-format = (string) byte-stream" - ", alignment = (string) au"}, + ", alignment = (string) au, profile = (string) { main }"}, {cudaVideoCodec_VP8, "vp8", "video/x-vp8"}, {cudaVideoCodec_VP9, "vp9", "video/x-vp9"} };