• Hirokazu Honda's avatar
    V4L2SVD: Allocate video frame with frame size adjusted by a video driver · 685bf015
    Hirokazu Honda authored
    The alignment to width and height is changed by codec. The v4l2 driver returns
    a width and height with taking into that account. On the other hand, gbm doesn't
    know about codec in the allocation. This causes gbm allocates a smaller or
    larger buffer than a video driver expects. A small buffer is defintely problem.
    A larger buffer is problem if a v4l2 pixel format is single planar. If there is
    an extra data between planes unexpected by a driver, the driver reads the next
    plane from the wrong position because we cannot specify offset for each plane
    with a single planar pixel format. This CL resolves this issue by asking minigbm
    to allocate a buffer with width and size already adjusted by a video driver.
    
    Bug: 979115
    Test: video_decode_accelerator_tests on kevin
    Change-Id: Ibe865530547055256015f9e734e31cd5ed6fbd0f
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1730910
    Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
    Reviewed-by: default avatarChih-Yu Huang <akahuang@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#683899}
    685bf015
v4l2_slice_video_decoder.h 11.1 KB