Opened 14 years ago

Closed 11 years ago

#8620 closed Developer Task (Won't Fix)

Add DXVA2 support

Reported by: markk Owned by:
Priority: minor Milestone: 0.25
Component: MythTV - Video Playback Version: Master Head
Severity: medium Keywords: dxva
Cc: Ticket locked: no

Description

This is a tracking ticket for adding DXVA2 support for hardware accelerated video decoding on windows vista and windows 7.

Attachments (4)

dxva2_v1.diff (49.3 KB) - added by markk 14 years ago.
Version.txt (420 bytes) - added by SHinck@… 11 years ago.
0001-fix_dxva2_segfaulting.commit (2.2 KB) - added by SHinck@… 11 years ago.
Fix for crash on exit
0001-DXVA2_stabilization.commit (2.5 KB) - added by SHinck@… 11 years ago.
Fix for picture corruption

Download all attachments as: .zip

Change History (20)

comment:1 Changed 14 years ago by markk

Component: MythTV - User Interface LibraryMythTV - Video Playback
Owner: changed from stuartm to markk
Status: newaccepted

Changed 14 years ago by markk

Attachment: dxva2_v1.diff added

comment:2 Changed 14 years ago by anonymous

Initial patch (v1) adds support for h264 decoding with dxva2. This is far from complete and still a little crashworthy (especially when exiting playback) but 1080i H264 utilises around 3% cpu using both NVidia and ATI cards. For some reason, playback issues with the ATI card aren't present when using dxva2.

To fully enable, you'll need to download the dxva2 header from vlc and install it in a suitable location before configuring. The hack in allcodecs.c may still be needed to ensure dxva2 decoding is fully enabled (alternatively I just didn't re-run configure at some point).

http://download.videolan.org/pub/videolan/contrib/dxva2api.h

I'll produce a second version after the next ffmpeg sync - upstream ffmpeg has a few fixes/changes and addds mpeg2 support.

comment:3 Changed 14 years ago by markk

Milestone: unknown0.24

comment:4 Changed 14 years ago by markk

(In [26100]) Add some initial DXVA2 codec and pixel format handling. Refs #8620

comment:5 Changed 14 years ago by markk

Milestone: 0.240.25

comment:6 Changed 13 years ago by stuartm

Milestone: 0.25

Milestone 0.25 deleted

comment:7 Changed 13 years ago by brianafischer@…

I have been following this thread eagerly now for about 7 months. However, it seems development on this ticket has halted. I would be very interested in providing debugging information to assist in this feature. Are there any major issues for why there hasn't been much activity with DXVA2 in MythFrontend?

comment:8 Changed 13 years ago by robertm

Ticket locked: set

Please take queries like this to the developer list, and please re-read the ticket howto.

comment:9 Changed 13 years ago by markk

Ticket locked: unset

comment:10 Changed 13 years ago by markk

8de92f1523ca92d413af - Added support for rendering from hardware decoded surfaces.

cc25f23b54bb2cc1316f - Added configure support for DXVA2

2e2a90074aacf2bd70e9 - Added DXVA2 DeviceManager? support.

cb5840352afbbcda4207 - Added DXVA2 defines to libmythui.pro

e26b681ee03f6f282f99 - Added the new DXVA2Decoder class.

69fefe53e960f3fd8d0f - Added DXVA2 hardware accelerated support.

comment:11 Changed 13 years ago by markk

As noted in 69fefe53e960f3fd8d0f, if you are going to test DXVA2 support, please use a debug build and report backtraces if needed. (and please don't fill this ticket with trivial me too's etc - I will just lock it again)

So far, I've tested the latest version on 2 Vista installations:-

  • MacBookPro?. MPEG2, H.264 and VC1 all work but significant corruption when playback starts and following a skip etc. Generally DXVA2 seems stable.
  • Core2Duo with EAH4550 ATI card and latest Catalyst drivers. H.264 and VC1 seem to play back flawlessly with low single digit CPU usage but crash on video exit. MPEG2 crashes (not falling back properly to software decode).

comment:12 Changed 13 years ago by markk

Type: enhancementDeveloper Task

comment:13 Changed 12 years ago by markk

Owner: markk deleted
Status: acceptedassigned

comment:14 Changed 12 years ago by danielk

Resolution: Won't Fix
Status: assignedclosed

Without someone to work on this...

comment:15 Changed 11 years ago by SHinck@…

Resolution: Won't Fix
Status: closednew

I've found the reason for the crashes on video exit and fixed it: That's because IDirectXVideoDecoderService_CreateSurface creates surface_count + 1 surfaces (1 frontbuffer + surface_count backbuffers) but IDirectXVideoDecoderService_CreateDecoder is created with surface_count buffers.

I also fixed the significant corruption when playback starts and following a skip: That's because of begin_frame in dxva2.c decoder fails. This patch fixes this.

I've attached the two patches for fixes/0.26

Changed 11 years ago by SHinck@…

Attachment: Version.txt added

Changed 11 years ago by SHinck@…

Fix for crash on exit

Changed 11 years ago by SHinck@…

Fix for picture corruption

comment:16 Changed 11 years ago by Raymond Wagner

Resolution: Won't Fix
Status: newclosed

New patches moved to #11652

Note: See TracTickets for help on using tickets.