AV1 Encoder: Fix 10bit encoding
This CL adds proper handling of 10bit input data. For now the only
10-bit input supported is P010.
Fixes: 256115786,255277757,253491266,249143037
Bug: 252836071
Test: atest CodecEncoderSurfaceTest
Change-Id: Id74efbc47bd0cc81895ce6d40a939efc19ec9794
diff --git a/media/codec2/sfplugin/utils/Codec2BufferUtils.h b/media/codec2/sfplugin/utils/Codec2BufferUtils.h
index 9fa642d..6b0ba7f 100644
--- a/media/codec2/sfplugin/utils/Codec2BufferUtils.h
+++ b/media/codec2/sfplugin/utils/Codec2BufferUtils.h
@@ -93,11 +93,21 @@
bool IsYUV420(const C2GraphicView &view);
/**
+ * Returns true iff a view has a YUV 420 10-10-10 layout.
+ */
+bool IsYUV420_10bit(const C2GraphicView &view);
+
+/**
* Returns true iff a view has a NV12 layout.
*/
bool IsNV12(const C2GraphicView &view);
/**
+ * Returns true iff a view has a P010 layout.
+ */
+bool IsP010(const C2GraphicView &view);
+
+/**
* Returns true iff a view has a NV21 layout.
*/
bool IsNV21(const C2GraphicView &view);