C2SoftVp8: List profile0 as supported profile
VP8 encoder/decoder plugins didn't correctly advertise the
profile they supported as profile enum wasn't defined earlier
for vp8.
Though Codec2InfoBuilder sets a default profile for vp8 codecs in
Android S, this change is still needed when this is installed on
older devices as part of mainline update.
Bug: 194154048
On Android R
Test: Install S swcodec mainline module on R and test
run mts-user -m CtsMediaV2TestCases \
-t android.mediav2.cts.EncodeDecodeAccuracyTest
On Android S
Test: revert the change in Codec2InfoBuilder that sets default
vp8 profile and test the above MTS test
Test: atest CtsMediaV2TestCases
Test: atest VtsHalMediaC2V1_0TargetVideoDecTest
Test: atest VtsHalMediaC2V1_0TargetVideoEncTest
Change-Id: I7534e25bcb7ccd8834b9e72b431471c735f75c33
diff --git a/media/codec2/components/vpx/C2SoftVpxDec.cpp b/media/codec2/components/vpx/C2SoftVpxDec.cpp
index 2953d90..45e2ca8 100644
--- a/media/codec2/components/vpx/C2SoftVpxDec.cpp
+++ b/media/codec2/components/vpx/C2SoftVpxDec.cpp
@@ -149,8 +149,16 @@
#else
addParameter(
DefineParam(mProfileLevel, C2_PARAMKEY_PROFILE_LEVEL)
- .withConstValue(new C2StreamProfileLevelInfo::input(0u,
- C2Config::PROFILE_UNUSED, C2Config::LEVEL_UNUSED))
+ .withDefault(new C2StreamProfileLevelInfo::input(0u,
+ C2Config::PROFILE_VP8_0, C2Config::LEVEL_UNUSED))
+ .withFields({
+ C2F(mProfileLevel, profile).equalTo(
+ PROFILE_VP8_0
+ ),
+ C2F(mProfileLevel, level).equalTo(
+ LEVEL_UNUSED),
+ })
+ .withSetter(ProfileLevelSetter, mSize)
.build());
#endif