• Dean Liao's avatar
    media/gpu: Use StorageType instead of v4l2_memory to create image processor. · 9b79c9a2
    Dean Liao authored
    V4L2ImageProcessor::Create() has input_memory_type and output_memory_type
    parameters of type v4l2_memory. In order to have a generic ImageProcessor
    factory method, we use StorageType to replace v4l2_memory.
    
    Also, since V4L2ImageProcessor supports both allocate and import output mode,
    and for a storage type (e.g. STORAGE_OWNED_MEMORY), its v4l2_memory mapping
    is V4L2_MEMORY_MMAP for allocate mode and V4L2_MEMORY_USERPTR for import mode.
    We have to pass output_mode to v4l2 IP factory till all its users move to
    use import mode.
    
    BUG=b:73752373, chromium:907767
    TEST=TEST=Run VEA VDA unittest on devices (peach_pit and elm)
    VEA:
    video_encode_accelerator_unittest \
    --test_stream_data=bear-320x180.yuv:320:180:1:bear.mp4:100000:30 \
    --disable_flush --single-process-tests -v=0
    
    VDA:
    video_decode_accelerator_unittest \
    --test_stream_data=/usr/local/video/test-25fps.h264:320:240:250:258:\
    35:150:1 -v=0 --disable_flush --single-process-tests --ozone-platform=gbm
    
    Change-Id: I60f8eeea937dc6566cf844a8a74069711c29f5a0
    Reviewed-on: https://chromium-review.googlesource.com/c/1341739
    Commit-Queue: Shuo-Peng Liao <deanliao@google.com>
    Reviewed-by: default avatarHirokazu Honda <hiroh@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#610764}
    9b79c9a2
v4l2_image_processor.cc 32.2 KB