Skip to content

Commit

Permalink
media/gpu/v4l2IP: Set output queue's storage type to the storage type…
Browse files Browse the repository at this point in the history
… of output VideoFrame

This fixes a bug of V4L2ImageProcessor on output queue's storage
type. The output queue's storage type is V4L2_MEMORY_DMABUF if
import mode. But it should follow the configured storage type of
output VideoFrame in import mode.

Bug: None
Test: ip_test --gtest_filter=NV12* on kukui
Change-Id: I7606c27170631f710764826c1d008e74ff934f71
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2096801
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#749533}
  • Loading branch information
Hirokazu Honda authored and Commit Bot committed Mar 12, 2020
1 parent 4877235 commit 47190b2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions media/gpu/v4l2/v4l2_image_processor_backend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,10 @@ V4L2ImageProcessorBackend::CreateWithOutputMode(
return nullptr;
}

const v4l2_memory output_memory_type = output_mode == OutputMode::ALLOCATE
? V4L2_MEMORY_MMAP
: V4L2_MEMORY_DMABUF;
const v4l2_memory output_memory_type =
output_mode == OutputMode::ALLOCATE
? V4L2_MEMORY_MMAP
: InputStorageTypeToV4L2Memory(output_storage_type);

if (!device->IsImageProcessingSupported()) {
VLOGF(1) << "V4L2ImageProcessorBackend not supported in this platform";
Expand Down

0 comments on commit 47190b2

Please sign in to comment.