• Alexandre Courbot's avatar
    media/gpu/v4l2: Always adjust EGL size to actual coded width · e1837388
    Alexandre Courbot authored
    On some devices (e.g. Cheza), the actual coded width of a buffer
    may differ from the macroblock-aligned width the driver works on. This
    can lead to the following DCHECK to be raised:
    
        FATAL:v4l2_video_decode_accelerator.cc(671)] Check failed: egl_image_size_.width() == adjusted_coded_width (320 vs. 384)
    
    Interestingly we already had code that fixed this by setting the EGL
    width to the actual buffer's width, but this code was only used in case
    an image processor was present. This CL generalizes the code to all
    cases.
    
    Bug: b:143049464
    Test: video_decode_accelerator_tests passing on Cheza and Hana.
    
    Change-Id: I7c65ca469f637bd360259fb6b3d94a6eba8a73e8
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1871529
    Auto-Submit: Alexandre Courbot <acourbot@chromium.org>
    Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
    Reviewed-by: default avatarHirokazu Honda <hiroh@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#708070}
    e1837388
v4l2_video_decode_accelerator.cc 96.7 KB