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: | 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)
Change History (26)
by , 9 years ago
| Attachment: | logexcerpt.txt added |
|---|
comment:1 by , 9 years ago
| Milestone: | unknown → 29.0 |
|---|---|
| Owner: | set to |
| Status: | new → assigned |
comment:3 by , 9 years ago
I don't think the patch on the forum is acceptable, as it simply disables de-interlacing.
comment:4 by , 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 , 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 , 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 , 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 , 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.
follow-up: 11 comment:9 by , 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 , 8 years ago
| Owner: | changed from to |
|---|
comment:11 by , 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 , 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 , 8 years ago
| Attachment: | 20170803_dave_chiluk_disable_x265_deint.patch added |
|---|
Dave Chiluk's X265 VDPAU patch
comment:15 by , 8 years ago
| Milestone: | 29.0 → 29.1 |
|---|
comment:18 by , 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 , 8 years ago
| Priority: | major → minor |
|---|---|
| Severity: | medium → low |
comment:20 by , 8 years ago
| Owner: | removed |
|---|---|
| Status: | assigned → new |
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 , 8 years ago
| Milestone: | 29.1 → 0.28.2 |
|---|
Moving remaining open tickets to 0.28.2 milestone
comment:22 by , 8 years ago
| Milestone: | 0.28.2 → 29.2 |
|---|
Moving remaining open tickets to 29.2 milestone
comment:23 by , 6 years ago
| Owner: | set to |
|---|---|
| Status: | new → accepted |
comment:24 by , 6 years ago
| Milestone: | 29.2 → 31.0 |
|---|---|
| Resolution: | → Fixed |
| Status: | accepted → closed |
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.

Log excerpt