Modify
Warning Please read the Ticket HowTo before creating or commenting on a ticket. Failure to do so may cause your ticket to be rejected or result in a slower response.

Opened 4 years ago

Closed 10 months 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 4 years ago.
Version.txt (420 bytes) - added by SHinck@… 10 months ago.
0001-fix_dxva2_segfaulting.commit (2.2 KB) - added by SHinck@… 10 months ago.
Fix for crash on exit
0001-DXVA2_stabilization.commit (2.5 KB) - added by SHinck@… 10 months ago.
Fix for picture corruption

Download all attachments as: .zip

Change History (20)

comment:1 Changed 4 years ago by markk

  • Component changed from MythTV - User Interface Library to MythTV - Video Playback
  • Owner changed from stuartm to markk
  • Status changed from new to accepted

Changed 4 years ago by markk

comment:2 Changed 4 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 4 years ago by markk

  • Milestone changed from unknown to 0.24

comment:4 Changed 4 years ago by markk

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

comment:5 Changed 4 years ago by markk

  • Milestone changed from 0.24 to 0.25

comment:6 Changed 4 years ago by stuartm

  • Milestone 0.25 deleted

Milestone 0.25 deleted

comment:7 Changed 3 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 3 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 3 years ago by markk

  • Ticket locked unset

comment:10 Changed 3 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 3 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 3 years ago by markk

  • Type changed from enhancement to Developer Task

comment:13 Changed 2 years ago by markk

  • Owner markk deleted
  • Status changed from accepted to assigned

comment:14 Changed 2 years ago by danielk

  • Resolution set to Won't Fix
  • Status changed from assigned to closed

Without someone to work on this...

comment:15 Changed 10 months ago by SHinck@…

  • Resolution Won't Fix deleted
  • Status changed from closed to new

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 10 months ago by SHinck@…

Changed 10 months ago by SHinck@…

Fix for crash on exit

Changed 10 months ago by SHinck@…

Fix for picture corruption

comment:16 Changed 10 months ago by wagnerrp

  • Resolution set to Won't Fix
  • Status changed from new to closed

New patches moved to #11652

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'new'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.