Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] Implements DXVA2 AV1 HW video decoding 8-bit and 10-bit #23115

Merged
merged 1 commit into from Apr 9, 2023

Conversation

thexai
Copy link
Member

@thexai thexai commented Apr 8, 2023

Description

[Windows] Implements DXVA2 AV1 HW video decoding 8-bit and 10-bit

Motivation and context

AV1 support

How has this been tested?

Tested on Intel UHD Graphics 770 (i7-13700K) that only supports profile 0 (main) anyway this is sufficient for decode all 4K 8-bit and 10-bit videos.

What is the effect on users?

Added AV1 HW video decoding on Windows.

Screenshots (if appropriate):

screenshot00008

screenshot00009

GPU

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)

Checklist:

  • My code follows the Code Guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change
  • All new and existing tests passed

Copy link
Contributor

@lrusak lrusak left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a nice feature to have on windows 👍 I just left a few comments mostly about style.

DEFINE_GUID(DXVADDI_Intel_ModeH264_A, 0x604F8E64,0x4951,0x4c54,0x88,0xFE,0xAB,0xD2,0x5C,0x15,0xB3,0xD6);
DEFINE_GUID(DXVADDI_Intel_ModeH264_C, 0x604F8E66,0x4951,0x4c54,0x88,0xFE,0xAB,0xD2,0x5C,0x15,0xB3,0xD6);
DEFINE_GUID(DXVADDI_Intel_ModeH264_E, 0x604F8E68,0x4951,0x4c54,0x88,0xFE,0xAB,0xD2,0x5C,0x15,0xB3,0xD6);
DEFINE_GUID(DXVADDI_Intel_ModeVC1_E, 0xBCC5DB6D,0xA2B6,0x4AF0,0xAC,0xE4,0xAD,0xB1,0xF7,0x87,0xBC,0x89);
DEFINE_GUID(DXVA_ModeH264_VLD_NoFGT_Flash, 0x4245F676,0x2BBC,0x4166,0xa0,0xBB,0x54,0xE7,0xB8,0x49,0xC3,0x80);
DEFINE_GUID(DXVA_Intel_VC1_ClearVideo_2, 0xE07EC519,0xE651,0x4CD6,0xAC,0x84,0x13,0x70,0xCC,0xEE,0xC8,0x51);

#ifndef D3D11_DECODER_PROFILE_AV1_VLD_PROFILE0
DEFINE_GUID(D3D11_DECODER_PROFILE_AV1_VLD_PROFILE0, 0xb8be4ccb,0xcf53,0x46ba,0x8d,0x59,0xd6,0xb8,0xa6,0xda,0x5d,0x2a);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are these defines added in a specific version? What is the minimum windows version needed to support this?

Copy link
Member Author

@thexai thexai Apr 8, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not need to build Windows x64 using VS 2022 and latest Windows 11 SDK but is added mainly to able to build UWP as we are using Windows 10 SDK (10.0.18362.0) and not includes these GUIDS. Also allows users to continue build x64 with older Windows SDK's and Visual Studio 2019.

It can be removed in the future by increasing minimal Windows SDK version for UWP (although it was not trivial to do it with VS 2019, maybe now with VS 2022 is more easy).

Anyway Xbox Series X/S not supports HW AV1 decoding.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we gate based on SDK define instead of #if undef?

xbmc/cores/VideoPlayer/DVDCodecs/Video/DXVA.cpp Outdated Show resolved Hide resolved
Tested on Intel 13700K with AV1 8 and 10 bit videos profile0 (main)
@thexai thexai merged commit 3bdf92b into xbmc:master Apr 9, 2023
2 checks passed
@lrusak
Copy link
Contributor

lrusak commented Apr 9, 2023

Would be nice if in the future you allowed time for a re-review after making changes and for all comments to be marked resolved.

@rmkimathi
Copy link

@thexai Thanks a million for DXVA AV1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants