Actually use the hdr mapper for AV1 in GetHdrProfileLevelMapper
It's defined but not returned by GetHdrProfileLevelMapper, so
soft AV1 doesn't report HDR support.
bug: 138314480
test:
atest android.media.cts.DecoderTest#testAV1HdrStaticMetadata
atest android.media.cts.MediaMetadataRetrieverTest#testThumbnailAV1Hdr
Test should pass, AND test shouldn't be skipped.
For MediaMetadataRetrieverTest#testThumbnailAV1Hdr, enable output
file dump and there should be output file dumped.
Change-Id: I8c571729bb68d091208d5348734efd29887b5f72
diff --git a/media/codec2/sfplugin/Codec2InfoBuilder.cpp b/media/codec2/sfplugin/Codec2InfoBuilder.cpp
index 6b75eba..745d701 100644
--- a/media/codec2/sfplugin/Codec2InfoBuilder.cpp
+++ b/media/codec2/sfplugin/Codec2InfoBuilder.cpp
@@ -117,8 +117,9 @@
}
}
- // For VP9, the static info is always propagated by framework.
+ // For VP9/AV1, the static info is always propagated by framework.
supportsHdr |= (mediaType == MIMETYPE_VIDEO_VP9);
+ supportsHdr |= (mediaType == MIMETYPE_VIDEO_AV1);
for (C2Value::Primitive profile : profileQuery[0].values.values) {
pl.profile = (C2Config::profile_t)profile.ref<uint32_t>();