codec2: declare 10-bit support for all AV1 codecs
CDD mandates the 10-bit support for AV1.
Bug: 236098664
Test: atest android.mediav2.cts.CodecDecoderSurfaceTest
Change-Id: Id379588ffb77bdb647ca59097925097ff641c861
(cherry picked from commit cdbd5ec774ab684757c3f6257235505289a6f9fe)
Merged-In: Id379588ffb77bdb647ca59097925097ff641c861
diff --git a/media/codec2/sfplugin/Codec2InfoBuilder.cpp b/media/codec2/sfplugin/Codec2InfoBuilder.cpp
index 1c362ae..453a0d2 100644
--- a/media/codec2/sfplugin/Codec2InfoBuilder.cpp
+++ b/media/codec2/sfplugin/Codec2InfoBuilder.cpp
@@ -156,9 +156,10 @@
// dynamic metadata as that needs to be frame accurate.)
supportsHdr |= (mediaType == MIMETYPE_VIDEO_VP9);
- // HDR support implies 10-bit support.
+ // HDR support implies 10-bit support. AV1 codecs are also required to
+ // support 10-bit per CDD.
// TODO: directly check this from the component interface
- supports10Bit = (supportsHdr || supportsHdr10Plus);
+ supports10Bit = (supportsHdr || supportsHdr10Plus) || (mediaType == MIMETYPE_VIDEO_AV1);
// If the device doesn't support HDR display, then no codec on the device
// can advertise support for HDR profiles.