• Shuo-Peng Liao's avatar
    media/gpu: Add ImageProcessor support in VideoDecoderPipeline. · e6bf70c2
    Shuo-Peng Liao authored
    VDPipeline senses its VideoDecoder cannot produce compositor renderable
    output format by asking VD to call its PickDecoderOutputFormat().
    When it is called, VDPipeline instantiates an ImageProcessor to see if
    it can convert any VD's supported output format to a renderable format.
    
    VDPipeline defines a PickFormatCB for VD to ask VDPipeline which output
    format shall be used. The callback is assigned to VDPipeline supported
    VD via its constructor. Currently V4L2SliceVideoDecoder is modified.
    
    For ImageProcessorFactory, it adds a CreateWithInputCandidates() factory
    method that instantiate an ImageProcessor to see if it can convert
    any of VD's supported output formats to a valid renderable format.
    The knowledge of which format is renderable is provided by
    VDPipeline::PickRenderableFormat(), which is currently implemented by
    hardcoding known renderable formats.
    
    Bug: 1004727
    Test: pass vda_tests --use_vd --gtest_filter=-*Reset* on Kukui,
          remaining failure might cause by crbug.com/1023703
    Test: pass VD test on Kevin and Eve, which uses V4L2SVD and VaapiVD
    
    Change-Id: I2aaf6a6fad347fe1b43a30e56a8f1a9ced84f1d2
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1911068Reviewed-by: default avatarHirokazu Honda <hiroh@chromium.org>
    Reviewed-by: default avatarAlexandre Courbot <acourbot@chromium.org>
    Commit-Queue: Chih-Yu Huang <akahuang@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#721802}
    e6bf70c2
v4l2_slice_video_decoder.h 6.39 KB