C2SoftGav1Dec: Disallow bitdepth > 10
This is a temporary change that will be over-written when
support for 12-bit is added.
Bug: 268505204
Test: AV1 and AVIF CTS tests pass
Merged-In: Ia2ac55bddabfa20046862e5cb1816449ae9429d9
Change-Id: Ia2ac55bddabfa20046862e5cb1816449ae9429d9
(cherry picked from commit f5ac54ffb824588e8109f3ced83a1800a9446a4f)
diff --git a/media/codec2/components/gav1/C2SoftGav1Dec.cpp b/media/codec2/components/gav1/C2SoftGav1Dec.cpp
index f056759..3e0dbaf 100644
--- a/media/codec2/components/gav1/C2SoftGav1Dec.cpp
+++ b/media/codec2/components/gav1/C2SoftGav1Dec.cpp
@@ -781,6 +781,14 @@
return false;
}
+ if (buffer->bitdepth > 10) {
+ ALOGE("bitdepth %d is not supported", buffer->bitdepth);
+ mSignalledError = true;
+ work->workletsProcessed = 1u;
+ work->result = C2_CORRUPTED;
+ return false;
+ }
+
const int width = buffer->displayed_width[0];
const int height = buffer->displayed_height[0];
if (width != mWidth || height != mHeight) {