summaryrefslogtreecommitdiff
path: root/sys/nvdec
diff options
context:
space:
mode:
authorMatthew Waters <matthew@centricular.com>2018-11-20 04:09:52 -0600
committerNicolas Dufresne <nicolas@ndufresne.ca>2018-12-12 21:21:57 +0000
commit0842187e6ee0b491439e443cff58300693a7e1ef (patch)
tree40fe582ecab75fb5f36f25161e1b371df39f0df0 /sys/nvdec
parent88586b4149038ddae066ff48394fb58c7365b995 (diff)
downloadgstreamer-plugins-bad-0842187e6ee0b491439e443cff58300693a7e1ef.tar.gz
nvdec: Rely on upstream's value for interlace-mode with hevc
The nvdec API doesn't seem to produce interlacing information with hevc streams so rely on upstreams value for interlace-mode
Diffstat (limited to 'sys/nvdec')
-rw-r--r--sys/nvdec/gstnvdec.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/nvdec/gstnvdec.c b/sys/nvdec/gstnvdec.c
index 2d7c66402..71396b69d 100644
--- a/sys/nvdec/gstnvdec.c
+++ b/sys/nvdec/gstnvdec.c
@@ -694,10 +694,17 @@ handle_pending_frames (GstNvDec * nvdec)
vinfo = &state->info;
vinfo->fps_n = fps_n;
vinfo->fps_d = fps_d;
- if (format->progressive_sequence)
+ if (format->progressive_sequence) {
vinfo->interlace_mode = GST_VIDEO_INTERLACE_MODE_PROGRESSIVE;
- else
+
+ /* nvdec doesn't seem to deal with interlacing with hevc so rely
+ * on upstream's value */
+ if (format->codec == cudaVideoCodec_HEVC) {
+ vinfo->interlace_mode = nvdec->input_state->info.interlace_mode;
+ }
+ } else {
vinfo->interlace_mode = GST_VIDEO_INTERLACE_MODE_MIXED;
+ }
GST_LOG_OBJECT (decoder,
"Reading colorimetry information full-range %d matrix %d transfer %d primaries %d",