• Andres Calderon Jaramillo's avatar
    media: handle RT_FORMAT_YUV420_10 in FillProfileInfo. · 3c62dab9
    Andres Calderon Jaramillo authored
    This CL fixes VaapiWrapper::FillProfileInfo_Locked() so that it doesn't
    return false when the profile is VAProfileVP9Profile2 and the driver
    does not advertise support for VA_RT_FORMAT_YUV420 (and instead only
    advertises support for VA_RT_FORMAT_YUV420_10 and
    VA_RT_FORMAT_YUV420_12).
    
    More context:
    
    The uprev to iHD 20.2.0 caused TGL to advertise only
    VA_RT_FORMAT_YUV420_10 and VA_RT_FORMAT_YUV420_12 for
    VAProfileVP9Profile2, probably because of [1]. This seems reasonable
    since VP9.2 is intended for high bit depth. Running vainfo -a shows the
    following for VP9.2:
    
    VAProfileVP9Profile2/VAEntrypointVLD
        VAConfigAttribRTFormat                 : VA_RT_FORMAT_YUV420_10
                                                 VA_RT_FORMAT_YUV420_12
                                                 VA_RT_FORMAT_YUV420_10BPP
        VAConfigAttribDecSliceMode             : VA_DEC_SLICE_MODE_NORMAL
                                                 VA_DEC_SLICE_MODE_BASE
        VAConfigAttribDecProcessing            : VA_DEC_PROCESSING
        VAConfigAttribMaxPictureWidth          : 16384
        VAConfigAttribMaxPictureHeight         : 16384
        VAConfigAttribProcessingRate           : VA_PROCESSING_RATE_DECODE
    
    The problem is that VaapiWrapper::FillProfileInfo_Locked() returns true
    only if one of {VA_RT_FORMAT_YUV420, VA_RT_FORMAT_YUV422,
    VA_RT_FORMAT_YUV444} is advertised. Therefore, for iHD 20.2.0, we would
    determine that VAProfileVP9Profile2 is unsupported and subsequently fall
    back to software.
    
    This CL ensures that we check for the presence of
    VA_RT_FORMAT_YUV420_10 (which is the non-deprecated version of
    VA_RT_FORMAT_YUV420_10BPP [2]).
    
    [1] https://github.com/intel/media-driver/commit/ca71e10f29ea3b232b883803b31724a8ee0d3e46
    [2] https://github.com/intel/libva/blob/2.8.0/va/va.h#L821
    
    Bug: b:161520834
    Test: crosvideo.appspot.com w/ VP9.2; checked chrome://media-internals
    Change-Id: Id00a0150272cc11640bd21183ee739b005f9d2cf
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2303682Reviewed-by: default avatarMiguel Casas <mcasas@chromium.org>
    Commit-Queue: Andres Calderon Jaramillo <andrescj@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#797779}
    3c62dab9
vaapi_wrapper.h 20.5 KB