• Hirokazu Honda's avatar
    media/gpu: Reorder V4L2 and VAAPI hw dec/enc initialization order · 4318ab50
    Hirokazu Honda authored
    V4L2(S)VDA, V4L2SVD and V4L2VEA are available if chrome is built
    with USE_V4L2_CODEC. VAAPIVD, VAAPIVDA and VAAPIVEA are available
    if chrome is built with USE_VAAPI. If they are available, chrome
    always attempts to initialize and use them for video decoding and
    encoding.
    
    V4L2 API's hw codecs are not available in x86 boards in general.
    VA API's hw codecs are not available in arm boards in general.
    In other hands, V4L2 API and VA-API hw codecs' initialization are
    redundant on x86 and arm boards, respectively. The one exception
    is a x86 board that equips kepler, on which v4l2 hw codecs is
    available.
    
    Because of the above, the current status of those flags are
    USE_VAAPI=false, USE_V4L2_CODEC=true on CrOS ARM boards, and
    USE_VAAPI=true, USE_V4L2_CODEC=true on CrOS x86 boards. The
    current initialization step is V4L2 instances first and VAAPI
    ones second. In summary, the initialization flow is as follows;
    [ARM]
    V4L2 (success or failure)
    [x86(Intel and AMD)]
    V4L2 (failure all the time) -> VAAPI (success or failure)
    [x86+kepler]
    V4L2 (success for codecs supported by kepler) -> VAAPI (success or failure)
    
    This CL swaps the V4L2 and VAAPI initialization order. The
    initialization flow is changed as follows;
    [ARM]
    V4L2 (success or failure)
    [x86(Intel and AMD)]
    VAAPI (success), or
    VAAPI (failure) -> V4L2 (failure all the time)
    [x86+kepler]
    VAAPI (success), or
    VAAPI (failure) -> V4L2 (success for codecs supported by kepler), or
    VAAPI (success) -> V4L2 (failure)
    
    The redundant V4L2 instance initialization on x86 boards is omitted.
    
    Note that we will not build v4l2 code for x86 devices without kepler.
    See crrev.com/c/1948018 and crrev.com/c/1948378.
    
    Bug: 1030376
    Test: VDA tests and VEA tests on atlas and kevin
    Change-Id: I7313a27ec4ccb1f1640023bf41c285c01e8e905b
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1947872
    Auto-Submit: Hirokazu Honda <hiroh@chromium.org>
    Reviewed-by: default avatarChih-Yu Huang <akahuang@chromium.org>
    Reviewed-by: default avatarMiguel Casas <mcasas@chromium.org>
    Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#721827}
    4318ab50
chromeos_video_decoder_factory.cc 2.58 KB