[LINUX] HD Video Corruption with pre-11.0 PVR (ffmpeg?) and VDPAU

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Prof Yaffle Offline
Donor
Posts: 481
Joined: Mar 2011
Reputation: 3
Location: UK - in the middlish (mostly).
Post: #121
@rmtucker - check your PMs for a sample. It's the iPlayer plugin that shows them up most readily, but this clip should do it as well. Please report back, along with system details so we can see if that's helpful.

@FernetMenta - likewise, I've PMed you a link, let me know if that's the same file (I forget!) and whether or not it works. If you need another sample, I'll cut something down to a bite-sized chunk and get it to you as well.
(This post was last modified: 2011-10-01 00:11 by Prof Yaffle.)
find quote
FernetMenta Online
Team-XBMC Member
Posts: 1,614
Joined: Jul 2010
Reputation: 34
Location: Munich
Post: #122
@Prof Yaffle
Do you remember what vdpau reported on width/height using the Dharma version of xbmc? Was it 724 or 720?
find quote
Prof Yaffle Offline
Donor
Posts: 481
Joined: Mar 2011
Reputation: 3
Location: UK - in the middlish (mostly).
Post: #123
@FernetMenta - needed a quick rebuild this morning, but you've clearly spotted something...

Reinstall from PPA today:

XBMC 10.1 Git:Unknown (Compiled Mar 9 2011)

Code:
D(Video:h264, yuv420p, 1280x724 [PAR 180:180 DAR 320:181] P(vq:99%, dc:ff-h264_vdpau-vdpau, Mb/s:2.35, drop:33, pc:1)

and another (SD) sample file that gives the same grief reports:

Code:
D(Video:h264, yuv420p, 640x372 [PAR 90:90 DAR 160:93] ...

Obviously, vq and Mb/s wash up and down while playing, as you'd expect.

Now, the same files on my (last compiled) git version:

XBMC PRE-11.0 Git:Unknown (Compiled Aug 30 2011)

Code:
D(Video:h264 (High), yuv420p, 1280x[b]720[/b] [PAR 180:180 DAR 16:9] P(fr:25.000, vq:99%, dc:ff-h264_vdpau-vdpau, Mb/s:3.66, drop:22, pc:1)

and the SD sample file:

Code:
D(Video:h264 (Main), yuv420p, 640x[b]360[/b] [PAR 90:90 DAR 16:9] ...

Soooo.... the newer versions seem to identify the H.264 profile (only relevant if this triggers some assumptions/defaults in the code?) and incorrectly identify the file dimensions (and thus also the display aspect ratio - calculated, I presume?). I don't see any other differences.

I'll try to compile your new code version shortly, that'll take a few hours to build, though, I suspect.
find quote
FernetMenta Online
Team-XBMC Member
Posts: 1,614
Joined: Jul 2010
Reputation: 34
Location: Munich
Post: #124
Interesting information. Wait with that new version, doesn't work. I will try to log out some parameters inside ffmpeg.
find quote
Prof Yaffle Offline
Donor
Posts: 481
Joined: Mar 2011
Reputation: 3
Location: UK - in the middlish (mostly).
Post: #125
Okay - I've just cloned your repo so I should be able to pick up any deltas if you want to give it a go later before I dash off again on Monday morning.
find quote
FernetMenta Online
Team-XBMC Member
Posts: 1,614
Joined: Jul 2010
Reputation: 34
Location: Munich
Post: #126
Ok, I think I have spotted the change in ffmpeg which casues the corruption:
http://git.videolan.org/?p=ffmpeg.git;a=...a65cbb6f08

Cropping was limited to a lower value prior to this change, this is why height was 724 (736-4*3). I can't see anything wrong with this patch.
find quote
Prof Yaffle Offline
Donor
Posts: 481
Joined: Mar 2011
Reputation: 3
Location: UK - in the middlish (mostly).
Post: #127
So what's the next move... do we try to reverse that patch to see if that's what caused it (e.g. patch the internal ffmpeg just to have a look)? Or, if this code looks sensible, isn't it down to something XBMC is doing as it calls the ffmpeg routines?

Here's a question: the information I posted above comes from the XBMC display as the file is playing. Does XBMC ask ffmpeg for that information... or does it derive it for itself and tell ffmpeg as it starts? In other words, did this patch to ffmpeg merely show up a fault in the way in which XBMC asks ffmpeg to play the file (if that is indeed how it works)?
find quote
FernetMenta Online
Team-XBMC Member
Posts: 1,614
Joined: Jul 2010
Reputation: 34
Location: Munich
Post: #128
Seems like we have been digging into something which turns out to be bigger project. VDPAU is a pure slice decoder and afaik does not support frame cropping since it does not know the parameters. Cropping bottom lines seems to work by change for non ION systems. But what if a h.264 stream has e.g. crop_right parameter set. I guess this would fail on all systems.
The soluton has to be that vdpau has to alloate a video surafe without taking into account the cropping parameters. Then crop the frame in render stage.
find quote
Prof Yaffle Offline
Donor
Posts: 481
Joined: Mar 2011
Reputation: 3
Location: UK - in the middlish (mostly).
Post: #129
Hear that sound? It was my understanding of how video images are decoded and rendered falling over and giving up...!

What I don't understand, though, is how earlier mplayer and XBMC code worked okay - and VLC still does (apparently, I haven't built it myself). If the problem is with the underlying VDPAU libraries, shouldn't they all fail, always? Or do you suspect that it's the way in which the applications are passing over an uncropped stream for rendering, whereas they perhaps used to decode and crop themselves before asking ffmpeg/VDPAU to handle the frame rendering?

It just sounds like VDPAU-on-ION is broken, which may not affect all of the people all of the time, but it's waiting to bit people nevertheless... but maybe I've misunderstood.
find quote
rmtucker Offline
Junior Member
Posts: 16
Joined: Dec 2009
Reputation: 0
Post: #130
Prof

Just for your reference.
The sample you Pm'd to me also caused the green wash problem on both my systems.

Just a short desc of my system 1

Athlon x2 5200+
asus m3n78 motherboard
Built in nvidia 8200 Gpu
Running the latest openelec from usb

System 2
Athlon x2 240e
Gigabyte gf8200e motherboard
Built in nvidia 8200 gpu
Running latest openelec again.

Hopefully this will at least let you know that it is not just you and yours.Smile
find quote
Post Reply