• Hirokazu Honda's avatar
    media: VdaVideoDecoder: Reinitialize if profile changes and VDA is VaapiVDA · 6579c2b9
    Hirokazu Honda authored
    VaapiVideoDecodeAccelerator doesn't propagate profile change in a video stream
    to driver. Rockchip and Intel driver apparently handles the profile change
    inside of the drivers, while AMD driver doesn't. This casues video corruption
    in some sites on AMD device. This is the workaround for the issue.
    MojoVideoDecoderService calls Initialize() if profile change is detected, but
    VdaVideoDecoder doesn't support reinitialization as a VideoDecodeAccelerator
    doesn't.
    This change enables VdaVideoDecoder to re-initialize by destroying currently
    using VideoDecodeAccelerator and creating a new one. This reinitialization is
    triggered only if profile changes for performance and VideoDecodeAccelerator
    is VaapiVideoDecodeAccelerator for safety.
    
    Bug: 929565
    Test: no video corruption on some issued sites on grunt and eve
    Change-Id: Ic6f75809fce6db08965cf0554e7d989d635d3f54
    Reviewed-on: https://chromium-review.googlesource.com/c/1482357
    Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
    Reviewed-by: default avatarDan Sanders <sandersd@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#634957}
    6579c2b9
vda_video_decoder_unittest.cc 16.1 KB