Bug 66450 - JUNIPER UVD accelerated playback of MPEG 1/2 streams does not work
Summary: JUNIPER UVD accelerated playback of MPEG 1/2 streams does not work
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600 (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
: 66768 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-07-01 11:24 UTC by Eugene Shalygin
Modified: 2014-01-10 18:45 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Possible fix. (1.51 KB, patch)
2013-07-10 13:45 UTC, Christian König
Details | Splinter Review
Possible fix v2 (2.67 KB, patch)
2013-07-11 11:29 UTC, Christian König
Details | Splinter Review

Description Eugene Shalygin 2013-07-01 11:24:25 UTC
When playing MPEG 1 or 2 streams using mplayer (or mplayer2 or ffplay or mpv) there is no output, only black rectangle. 

$vdpauinfo declares MPEG support:

MPEG1                16  9216  2048  1152
MPEG2_SIMPLE         16  9216  2048  1152
MPEG2_MAIN           16  9216  2048  1152


Output from ffmpeg shows:
Unsupported PixelFormat xvmcidct (16)
Unsupported PixelFormat xvmcmc (15)

acceleration of h264 works fine, so I conclude that UVD is initialized succesfully

Radeon Mobility HD 5850

Kernel 3.10.0, libdrm and mesa are from git master (30.06.2013)

sample file: http://samples.mplayerhq.hu/MPEG2/vid_0x80.ts
Comment 1 Alex Deucher 2013-07-10 13:09:37 UTC
*** Bug 66768 has been marked as a duplicate of this bug. ***
Comment 2 Christian König 2013-07-10 13:37:55 UTC
The vdpauinfo output is wrong, JUNIPER has an uvd 2.3 block and that can't decode MPEG2 in vld mode.

Going to fix that in a minute.
Comment 3 Christian König 2013-07-10 13:45:52 UTC
Created attachment 82275 [details] [review]
Possible fix.
Comment 4 Johannes Hirte 2013-07-10 14:16:24 UTC
With this patch applied, mplayer2 crashes on mpeg2 file with:

Detected file format: MPEG-PS (MPEG-2 Program Stream) (libavformat)
[mpeg @ 0x7fa7bec14cc0]max_analyze_duration 5000000 reached at 5005000
[lavf] stream 0: video (mpeg2video), -vid 0
[lavf] stream 1: audio (ac3), -aid 0
[lavf] stream 2: audio (ac3), -aid 1
Load subtitles in .
Forced video codec: ffmpeg12vdpau
Selected video codec: MPEG-1/2 video (VDPAU acceleration) [libavcodec]
Selected audio codec: ATSC A/52A (AC-3) [libavcodec]
AUDIO: 48000 Hz, 2 ch, s16le, 448.0 kbit/29.17% (ratio: 56000->192000)
AO: [alsa] 48000Hz 2ch s16le (2 bytes per sample)
Starting playback...
Unsupported PixelFormat xvmcidct (16)
Unsupported PixelFormat xvmcmc (15)
VIDEO:  720x480  29.970 fps  7500.0 kbps (937.5 kB/s)                                                                                                                   
Aspect ratio is 1.78:1 - scaling to correct movie aspect.                                                                                                               
VO: [vdpau] 720x480 => 853x480 MPEG2 VDPAU acceleration                                                                                                                 
[vdpau] Compositing window manager detected. Assuming timing info is inaccurate.                                                                                        
                                                                                                                                                                        
                                                                                                                                                                        
MPlayer interrupted by signal 11 in module: check_framedrop
Comment 5 Johannes Hirte 2013-07-10 14:23:10 UTC
(In reply to comment #2)
> The vdpauinfo output is wrong, JUNIPER has an uvd 2.3 block and that can't
> decode MPEG2 in vld mode.

So the wikipedia article is wrong?

"The UVD 2 features full bitstream decoding of H.264/MPEG-4 AVC, VC-1, as well as MPEG2 video streams, and in addition it also supports dual video stream decoding and Picture-in-Picture mode. This makes UVD2 full BD-Live compliant."

http://en.wikipedia.org/wiki/Unified_Video_Decoder#UVD_2
Comment 6 Christian König 2013-07-10 14:41:01 UTC
(In reply to comment #5)
> (In reply to comment #2)
> > The vdpauinfo output is wrong, JUNIPER has an uvd 2.3 block and that can't
> > decode MPEG2 in vld mode.
> 
> So the wikipedia article is wrong?
> 
> "The UVD 2 features full bitstream decoding of H.264/MPEG-4 AVC, VC-1, as
> well as MPEG2 video streams, and in addition it also supports dual video
> stream decoding and Picture-in-Picture mode. This makes UVD2 full BD-Live
> compliant."
> 
> http://en.wikipedia.org/wiki/Unified_Video_Decoder#UVD_2

Yeah, that is complete nonsense. The MVC comment for UVD 3.0 is wrong also.
Comment 7 Christian König 2013-07-11 11:29:11 UTC
Created attachment 82331 [details] [review]
Possible fix v2

Update patch, should work better this time.

But please note that shader based decoding is far away from beeing perfect either.
Comment 8 Eugene Shalygin 2013-07-11 20:40:48 UTC
With this patch playback works. Thank you!
Comment 9 Alex Deucher 2014-01-10 18:45:24 UTC
*** Bug 73480 has been marked as a duplicate of this bug. ***


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.