Skip to content

Commit

Permalink
media/gpu/v4l2_vda: Use correct format for checking in import buffer.
Browse files Browse the repository at this point in the history
The "output_format_fourcc_" may not be the final output format if an
image processor is needed to convert the format. (It is always
needed, the import mode is only supported with image processor)

Use "egl_image_format_fourcc_" instead, it will be the final output
format in both import/allocate mode.

Bug: b/72286007
Test: Play videos in ARC++.
Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I0473c84c6b4a13f96934dd0bf2208ba9f3aa916f
Reviewed-on: https://chromium-review.googlesource.com/879903
Commit-Queue: Owen Lin <[email protected]>
Reviewed-by: Kuang-che Wu <[email protected]>
Cr-Original-Commit-Position: refs/heads/master@{#531173}(cherry picked from commit 91175b1)
Reviewed-on: https://chromium-review.googlesource.com/882701
Reviewed-by: Owen Lin <[email protected]>
Cr-Commit-Position: refs/branch-heads/3325@{#53}
Cr-Branched-From: bc084a8-refs/heads/master@{#530369}
  • Loading branch information
Owen Lin authored and Owen Lin committed Jan 24, 2018
1 parent f3e1141 commit 20902ad
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion media/gpu/v4l2/v4l2_video_decode_accelerator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,11 @@ void V4L2VideoDecodeAccelerator::ImportBufferForPicture(
return;
}

// |output_format_fourcc_| is the output format of the decoder. It is not
// the final output format from the image processor (if exists).
// Use |egl_image_format_fourcc_|, it will be the final output format.
if (pixel_format !=
V4L2Device::V4L2PixFmtToVideoPixelFormat(output_format_fourcc_)) {
V4L2Device::V4L2PixFmtToVideoPixelFormat(egl_image_format_fourcc_)) {
VLOGF(1) << "Unsupported import format: " << pixel_format;
NOTIFY_ERROR(INVALID_ARGUMENT);
return;
Expand Down

0 comments on commit 20902ad

Please sign in to comment.