aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Staessens <dstaessens@google.com>2021-03-30 12:03:48 +0900
committerChih-Yu Huang <akahuang@google.com>2021-05-12 11:36:56 +0900
commit183cceb1654e508304c0484f1d3fa181d2ad223a (patch)
treefc636a2cc4139026807916a98bbddc007fe79167
parenta87b1cda9d39b52ec90a969cecd8356e167b472c (diff)
downloadv4l2_codec2-183cceb1654e508304c0484f1d3fa181d2ad223a.tar.gz
v4l2_codec2: Remove image processor and JPEG support from V4L2 device.
This CL removes leftover code related to image processor support and JPEG encoding/decoding from the V4L2 device, as it's currently not used. Bug: 155138142 Test: arc.VideoEncodeAccel.h264_192p_i420_vm Change-Id: I34fe7819e78b93a9a9d33e4888e56aba5f9826cb
-rw-r--r--common/V4L2Device.cpp38
-rw-r--r--common/include/v4l2_codec2/common/V4L2Device.h15
2 files changed, 0 insertions, 53 deletions
diff --git a/common/V4L2Device.cpp b/common/V4L2Device.cpp
index c5a37ae..c179902 100644
--- a/common/V4L2Device.cpp
+++ b/common/V4L2Device.cpp
@@ -1311,29 +1311,6 @@ std::vector<uint32_t> V4L2Device::PreferredInputFormat(Type type) {
return {};
}
-std::vector<uint32_t> V4L2Device::GetSupportedImageProcessorPixelformats(
- v4l2_buf_type buf_type) {
- std::vector<uint32_t> supported_pixelformats;
-
- Type type = Type::kImageProcessor;
- const auto& devices = GetDevicesForType(type);
- for (const auto& device : devices) {
- if (!OpenDevicePath(device.first, type)) {
- VLOGF(1) << "Failed opening " << device.first;
- continue;
- }
-
- std::vector<uint32_t> pixelformats =
- EnumerateSupportedPixelformats(buf_type);
-
- supported_pixelformats.insert(supported_pixelformats.end(),
- pixelformats.begin(), pixelformats.end());
- CloseDevice();
- }
-
- return supported_pixelformats;
-}
-
VideoDecodeAccelerator::SupportedProfiles
V4L2Device::GetSupportedDecodeProfiles(const size_t num_formats,
const uint32_t pixelformats[]) {
@@ -1378,21 +1355,6 @@ V4L2Device::GetSupportedEncodeProfiles() {
return supported_profiles;
}
-bool V4L2Device::IsImageProcessingSupported() {
- const auto& devices = GetDevicesForType(Type::kImageProcessor);
- return !devices.empty();
-}
-
-bool V4L2Device::IsJpegDecodingSupported() {
- const auto& devices = GetDevicesForType(Type::kJpegDecoder);
- return !devices.empty();
-}
-
-bool V4L2Device::IsJpegEncodingSupported() {
- const auto& devices = GetDevicesForType(Type::kJpegEncoder);
- return !devices.empty();
-}
-
bool V4L2Device::OpenDevicePath(const std::string& path, Type /*type*/) {
DCHECK(!device_fd_.is_valid());
diff --git a/common/include/v4l2_codec2/common/V4L2Device.h b/common/include/v4l2_codec2/common/V4L2Device.h
index 59d5d24..a910778 100644
--- a/common/include/v4l2_codec2/common/V4L2Device.h
+++ b/common/include/v4l2_codec2/common/V4L2Device.h
@@ -440,9 +440,6 @@ class V4L2Device : public base::RefCountedThreadSafe<V4L2Device> {
enum class Type {
kDecoder,
kEncoder,
- kImageProcessor,
- kJpegDecoder,
- kJpegEncoder,
};
// Create and initialize an appropriate V4L2Device instance for the current
@@ -513,11 +510,6 @@ class V4L2Device : public base::RefCountedThreadSafe<V4L2Device> {
std::vector<uint32_t> EnumerateSupportedPixelformats(v4l2_buf_type buf_type);
- // Return V4L2 pixelformats supported by the available image processor
- // devices for |buf_type|.
- std::vector<uint32_t> GetSupportedImageProcessorPixelformats(
- v4l2_buf_type buf_type);
-
// Return supported profiles for decoder, including only profiles for given
// fourcc |pixelformats|.
VideoDecodeAccelerator::SupportedProfiles GetSupportedDecodeProfiles(
@@ -528,13 +520,6 @@ class V4L2Device : public base::RefCountedThreadSafe<V4L2Device> {
VideoEncodeAccelerator::SupportedProfiles
GetSupportedEncodeProfiles();
- // Return true if image processing is supported, false otherwise.
- bool IsImageProcessingSupported();
-
- // Return true if JPEG codec is supported, false otherwise.
- bool IsJpegDecodingSupported();
- bool IsJpegEncodingSupported();
-
// Start polling on this V4L2Device. |event_callback| will be posted to
// the caller's sequence if a buffer is ready to be dequeued and/or a V4L2
// event has been posted. |error_callback| will be posted to the client's