• Andres Calderon Jaramillo's avatar
    V4L2VEA: Reject flushes when using the image processor. · a50ed7d0
    Andres Calderon Jaramillo authored
    This CL makes the V4L2VideoEncodeAccelerator reject flush requests when
    using the image processor. This is because flush requests are only
    expected to come from Android clients and such clients don't need an
    image processor. Thus, instead of adding special code to handle flushes,
    we simply reject them.
    
    Test coverage is added to exercise the image processor path. This is
    done by introducing another parameter, 'scale', in the unit tests. If
    this parameter is true and the input mode is native (i.e., zero-copy
    path), we request that the VideoEncodeAccelerator scales the input
    frames to 75% prior to encoding which triggers the image processor.
    Unfortunately, platform_video_frame_utils.cc and video_frame_helpers.cc
    had to be fixed to correctly propagate a video frame's natural size
    which is necessary to convey the desired scaling.
    
    Note that it is not necessary to reject flushes in the
    VaapiVideoEncodeAccelerator because it does not yet use an
    ImageProcessor.
    
    Bug: 1090220
    Test: video.EncodeAccel.* on scarlet, veyron_tiger, eve, and kukui.
    Change-Id: I3b3fee03cb7d35c0bc027cf9686e4a0535457dea
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2226086
    Commit-Queue: Andres Calderon Jaramillo <andrescj@chromium.org>
    Reviewed-by: default avatarHirokazu Honda <hiroh@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#775820}
    a50ed7d0
platform_video_frame_utils.cc 8.52 KB