diff options
author | Huan Song <huans@google.com> | 2021-07-21 16:51:44 -0700 |
---|---|---|
committer | Huan Song <huans@google.com> | 2021-07-23 11:23:13 -0700 |
commit | aec7eaaf4945a98dcd33834fdc44940094be8f93 (patch) | |
tree | 7a5d0606ff44543ea89165db416533a99ddb9546 | |
parent | 838bc1bf8899f6254e8ee1ef58a326c11ec338c1 (diff) | |
download | goldfish-opengl-aec7eaaf4945a98dcd33834fdc44940094be8f93.tar.gz |
Set YCbCr420_888 as default camera format
Bug: b/189957071
Test: run cts -m CtsCameraTestCases -t
android.hardware.camera2.cts.RobustnessTest#testAbandonRepeatingRequestSurface[1]
Change-Id: Ib1fb929fe2d37a5b187a294b853af18ca2b7eb60
-rw-r--r-- | system/hals/allocator3.cpp | 4 | ||||
-rw-r--r-- | system/hals/mapper3.cpp | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/system/hals/allocator3.cpp b/system/hals/allocator3.cpp index 5c103a53..d3cf5c1d 100644 --- a/system/hals/allocator3.cpp +++ b/system/hals/allocator3.cpp @@ -301,6 +301,10 @@ private: // Camera-to-encoder is NV21 *format = PixelFormat::YCRCB_420_SP; RETURN(Error3::NONE); + } else { + // b/189957071 + *format = PixelFormat::YCBCR_420_888; + RETURN(Error3::NONE); } } RETURN_ERROR(Error3::UNSUPPORTED); diff --git a/system/hals/mapper3.cpp b/system/hals/mapper3.cpp index 6903f9b9..e74e76cd 100644 --- a/system/hals/mapper3.cpp +++ b/system/hals/mapper3.cpp @@ -567,11 +567,7 @@ private: // **** impl **** case PixelFormat::IMPLEMENTATION_DEFINED: if (usage & BufferUsage::CAMERA_OUTPUT) { - if (usage & BufferUsage::GPU_TEXTURE) { - RETURN(true); - } else if (usage & BufferUsage::VIDEO_ENCODER) { - RETURN(true); - } + RETURN(true); } RETURN(false); |