Commit d0018b72 authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Commit Bot

media/gpu/chromeos/ip: remove storage type check in Process()

Before passing frames to convert to the backend, the image processor
checks that the storage type of the frame is the same as the storage
type the backend has been configured for. This check is however very
strict, and does not take into account the fact that for some backends,
different storage types might be equivalent. For instance on the V4L2
backend, GMB and DMABUF frames are processed the same way, and are
entirely interchangeable.

The VideoDecoderPipeline class always create the image processor for use
with GMB, but when using the VideoDecoder from ARC, frames are backed by
DMABUF. We have no easy way to differentiate these use-cases, and ARC
decoding using the VD will thus fail if an image processor is involved.

The backend will reject invalid frames when it tries to process it
anyway ; so remove that check and let the backend decide whether it can
work with a given frame or not.

Bug: b:171683262
Test: ./video_decode_accelerator_tests passes on Kukui.
Test: ./video_decode_accelerator_tests --use_vd passes on Kukui.
Test: ./video_decode_accelerator_tests --use_vd_vda passes on Kukui.

Change-Id: I99154597c77c7df99c5cfc6cb104da6b95b66c82
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2503913
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: default avatarFritz Koenig <frkoenig@chromium.org>
Reviewed-by: default avatarChih-Yu Huang <akahuang@chromium.org>
Cr-Commit-Position: refs/heads/master@{#822025}
parent 0e83b4fb
......@@ -21,12 +21,6 @@ namespace media {
namespace {
std::ostream& operator<<(std::ostream& ostream,
const VideoFrame::StorageType& storage_type) {
ostream << VideoFrame::StorageTypeToString(storage_type);
return ostream;
}
// Verify if the format of |frame| matches |config|.
bool CheckVideoFrameFormat(const ImageProcessor::PortConfig& config,
const VideoFrame& frame) {
......@@ -45,12 +39,6 @@ bool CheckVideoFrameFormat(const ImageProcessor::PortConfig& config,
return false;
}
if (frame.storage_type() != config.storage_type()) {
VLOGF(1) << "Invalid frame.storage_type=" << frame.storage_type()
<< ", input_storage_type=" << config.storage_type();
return false;
}
return true;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment