Opened 9 years ago

Closed 6 years ago

#12992 closed Bug Report - General (Fixed)

VDPAU HEVC / h265 decode support broken if deinterlacing is on

Reported by: Dave Chiluk <chiluk@…> Owned by: Mark Kendall
Priority: minor Milestone: 31.0
Component: MythTV - General Version: Master Head
Severity: low Keywords:
Cc: Ticket locked: no

Description

VDPAU HEVC / h265 decode support broken if deinterlacing is on.

Related forum thread https://forum.mythtv.org/viewtopic.php?f=3&t=1881&p=9435#p9435

It looks like the correct bits need to get set in the switch (video_codec_id) section of VideoOutputVDPAU::DrawSlice

Attachments (2)

logexcerpt.txt (3.8 KB ) - added by Dave Chiluk <chiluk@…> 9 years ago.
Log excerpt
20170803_dave_chiluk_disable_x265_deint.patch (1.1 KB ) - added by Peter Bennett 8 years ago.
Dave Chiluk's X265 VDPAU patch

Download all attachments as: .zip

Change History (26)

by Dave Chiluk <chiluk@…>, 9 years ago

Attachment: logexcerpt.txt added

Log excerpt

comment:1 by Stuart Auchterlonie, 9 years ago

Milestone: unknown29.0
Owner: set to JYA
Status: newassigned

comment:2 by Stuart Auchterlonie, 9 years ago

There's a patch on the forum thread which needs to be reviewed

comment:3 by chiluk <chiluk@…>, 9 years ago

I don't think the patch on the forum is acceptable, as it simply disables de-interlacing.

comment:4 by chiluk <chiluk@…>, 9 years ago

Ubuntu bug opened about this.

https://bugs.launchpad.net/ubuntu/+source/mythtv/+bug/1673481

After having reviewed this again, I really think this should integrated and then really fixed once a de-interlacing solution is found.

comment:5 by chiluk@…, 8 years ago

Hey jyavenard, have you made any progress on this? I've been a bit distracted the last few months, but I'm finally getting back around to this.

Interesting thing to note here is that this only affects machines that support HEVC offloading, which I think is only available in Pascal and newer cards.

comment:6 by JYA, 8 years ago

I didn't know I was supposed to look at this.

I have no particular urge to fix anything related to hevc. it's evil

comment:7 by Gary Buhrmaster <gary.buhrmaster@…>, 8 years ago

And to add to the mix, I have this vague recollection that nVidia has deprecated future VDPAU enhancements (although they continue to support the existing capabilities, and add partial tolerance for new hardware) in favor of their (new and improved) NVDEC API which is needed for some of the latest/greatest decoding capabilities on some of the latest/greatest GPUs, so likely the proper long term fix is a new video pipeline.

comment:8 by chiluk@…, 8 years ago

Well, in that case, I'm going to apply that forum patch to all xenial+ Ubuntu releases. If we come up with a better solution for mythtv, I'll gladly integrate that later down the road. I've been running with this patch for the last few months now, and I haven't seen anything untoward. I'd rather have it working, than failing, even if deinterlacing is forced off. After all most everything is progressive now-adays anyway.

comment:9 by Peter Bennett, 8 years ago

Where does one find x265 interlaced video? It seems to me that the world is moving away from interlaced video. I have never come across x264 interlaced video, let alone x265 interlaced video.

comment:10 by Peter Bennett, 8 years ago

Owner: changed from JYA to Peter Bennett

in reply to:  9 comment:11 by Gary Buhrmaster <gary.buhrmaster@…>, 8 years ago

Replying to pbennett:

Where does one find x265 interlaced video? It seems to me that the world is moving away from interlaced video. I have never come across x264 interlaced video, let alone x265 interlaced video.

Technically, both H.264 and H.265 support interlaced content. However, as you say, because most SoC vendors do not wish to integrate/license good de-interlacers (the silicon die space for the dedicated hardware and the IP tends to be expensive), they have pushed to see interlaced content disappear.

MythTV can either support the standards (however unlikely some parts of those standards are likely to be seen in the real world) or simply document that do not.

comment:12 by Peter Bennett, 8 years ago

Here is the patch from Dave Chiluk (modified for oour repository structure). I have superficially tested it on a low level VDPAU card that does not support H265 hardware decoding and there is no adverse effect with H264, H265 or MPEG2 content. If there are no objections, I will apply it.

by Peter Bennett, 8 years ago

Dave Chiluk's X265 VDPAU patch

comment:13 by Dave Chiluk <chiluk@…>, 8 years ago

In b63e92cc00f466391157cb45830f98d2e1a58dcd/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:14 by Dave Chiluk <chiluk@…>, 8 years ago

In 022d0989f1d015b252c89ce797185652834e61e7/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:15 by Peter Bennett, 8 years ago

Milestone: 29.029.1

comment:16 by Peter Bennett <pbennett@…>, 8 years ago

In c0a2558689915b0fe9aa3b2bf7d41e21d395e10e/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:17 by Peter Bennett <pbennett@…>, 8 years ago

In ad5f88b1174ea49a133d920cb454f4810b1c1ff8/mythtv:

Error: Processor CommitTicketReference failed
GIT backend not available

comment:18 by Peter Bennett, 8 years ago

This should allow H265 to play. If there is interlaced content, the user can either live with it or use the playback profile to set h265 decoding to software. Most systems will have enough power to decode in software. Render could still be done in hardware in that case.

comment:19 by Peter Bennett, 8 years ago

Priority: majorminor
Severity: mediumlow

comment:20 by Peter Bennett, 8 years ago

Owner: Peter Bennett removed
Status: assignednew

I am unassigning this ticket as I have no device capable of VDPAU H265, so I can do nothing further to fix it.

comment:21 by Stuart Auchterlonie, 8 years ago

Milestone: 29.10.28.2

Moving remaining open tickets to 0.28.2 milestone

comment:22 by Stuart Auchterlonie, 8 years ago

Milestone: 0.28.229.2

Moving remaining open tickets to 29.2 milestone

comment:23 by Mark Kendall, 6 years ago

Owner: set to Mark Kendall
Status: newaccepted

comment:24 by Mark Kendall, 6 years ago

Milestone: 29.231.0
Resolution: Fixed
Status: acceptedclosed

VDPAU has been mostly re-written in master.

Currently, interlaced HEVC material is a lottery - both with and without VDPAU.

FFmpeg generally returns a single field (as in a half height frame), more often than not the content is not flagged as interlaced, the current NVIDIA drivers will hang if you try to deinterlace any HEVC that is actually progressive (this is a regression - they did not do this previously) and a lot of the HEVC samples are actually HEVC MAIN 10 - which VDPAU cannot decode anyway.

But other than that, it's great:)

Some samples do actually deinterlace correctly - but they are always half height. None of these issues are in the MythTV code.

Note: See TracTickets for help on using tickets.