mpv-player / mpv

🎥 Command line video player
https://mpv.io
Other
28.5k stars 2.92k forks source link

Normal that MPV can't use HW decoding for H264 Hi10 on RDNA2? #11440

Closed HubKing closed 1 year ago

HubKing commented 1 year ago

It seems that MPV is falling back to software decoding for Hi10 1080p h.264 on my computer that has an RDNA2 GPU. I wonder if MPV falls back to software decoding because my GPU does not support the format, or if some sort of driver/library is missing.

I tried to open the "Hi10" sample on https://kodi.wiki/view/Samples . The MPV log file is videolog.txt

vainfo output includes

VAProfileH264ConstrainedBaseline/VAEntrypointVLD
    VAConfigAttribRTFormat                 : VA_RT_FORMAT_YUV420
                                             VA_RT_FORMAT_YUV422

VAProfileH264ConstrainedBaseline/VAEntrypointEncSlice
    VAConfigAttribRTFormat                 : VA_RT_FORMAT_YUV420
    VAConfigAttribRateControl              : VA_RC_CBR
                                             VA_RC_VBR
                                             VA_RC_CQP
    VAConfigAttribEncPackedHeaders         : VA_ENC_PACKED_HEADER_NONE
    VAConfigAttribEncMaxRefFrames          : l0=1
                                             l1=0
    VAConfigAttribEncMaxSlices             : 128
    VAConfigAttribEncSliceStructure        : VA_ENC_SLICE_STRUCTURE_POWER_OF_TWO_ROWS
                                             VA_ENC_SLICE_STRUCTURE_EQUAL_ROWS
    VAConfigAttribEncQualityRange          : number of supported quality levels is 32
    VAConfigAttribEncRateControlExt        : max_num_temporal_layers_minus1=3 temporal_layer_bitrate_control_flag=1
    VAConfigAttribMaxFrameSize             : max_frame_size=1
                                             multiple_pass=0

VAProfileH264Main/VAEntrypointVLD
    VAConfigAttribRTFormat                 : VA_RT_FORMAT_YUV420
                                             VA_RT_FORMAT_YUV422

VAProfileH264Main/VAEntrypointEncSlice
    VAConfigAttribRTFormat                 : VA_RT_FORMAT_YUV420
    VAConfigAttribRateControl              : VA_RC_CBR
                                             VA_RC_VBR
                                             VA_RC_CQP
    VAConfigAttribEncPackedHeaders         : VA_ENC_PACKED_HEADER_NONE
    VAConfigAttribEncMaxRefFrames          : l0=1
                                             l1=0
    VAConfigAttribEncMaxSlices             : 128
    VAConfigAttribEncSliceStructure        : VA_ENC_SLICE_STRUCTURE_POWER_OF_TWO_ROWS
                                             VA_ENC_SLICE_STRUCTURE_EQUAL_ROWS
    VAConfigAttribEncQualityRange          : number of supported quality levels is 32
    VAConfigAttribEncRateControlExt        : max_num_temporal_layers_minus1=3 temporal_layer_bitrate_control_flag=1
    VAConfigAttribMaxFrameSize             : max_frame_size=1
                                             multiple_pass=0

VAProfileH264High/VAEntrypointVLD
    VAConfigAttribRTFormat                 : VA_RT_FORMAT_YUV420
                                             VA_RT_FORMAT_YUV422

VAProfileH264High/VAEntrypointEncSlice
    VAConfigAttribRTFormat                 : VA_RT_FORMAT_YUV420
    VAConfigAttribRateControl              : VA_RC_CBR
                                             VA_RC_VBR
                                             VA_RC_CQP
    VAConfigAttribEncPackedHeaders         : VA_ENC_PACKED_HEADER_NONE
    VAConfigAttribEncMaxRefFrames          : l0=1
                                             l1=0
    VAConfigAttribEncMaxSlices             : 128
    VAConfigAttribEncSliceStructure        : VA_ENC_SLICE_STRUCTURE_POWER_OF_TWO_ROWS
                                             VA_ENC_SLICE_STRUCTURE_EQUAL_ROWS
    VAConfigAttribEncQualityRange          : number of supported quality levels is 32
    VAConfigAttribEncRateControlExt        : max_num_temporal_layers_minus1=3 temporal_layer_bitrate_control_flag=1
    VAConfigAttribMaxFrameSize             : max_frame_size=1
                                             multiple_pass=0
hooke007 commented 1 year ago

AMD never supported hardware-decoding of 10bit-avc.

HubKing commented 1 year ago

AMD never supported hardware-decoding of 10bit-avc.

Since I don't know much about formats, I thought VAProfileH264High was H264 H10. Is there any web page that lists a complete list of supported video formats for popular GPU families? I searched the web and found this page and according to the table, not just AMD but no GPU supports 10-bit H.264, is that right? There seems to be a lot of X's ... I didn't know that there are so many formats that GPU's don't support.

hooke007 commented 1 year ago

High-profile is another thing. https://en.wikipedia.org/wiki/Advanced_Video_Coding#Profiles

not just AMD but no GPU supports 10-bit H.264, is that right?

Apple silicon and Rockchip.

philipl commented 1 year ago

The only mainstream hardware with Hi10p support is Apple SoCs. as the format was never used for any commercial distribution, there was never a motivation for it. Apple did it as a hedge against HEVC failing in the market.

HubKing commented 1 year ago

Since the answer to my original question is "YES", I will close it. Thanks.