Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 22cb9d0d authored by Harish Mahendrakar's avatar Harish Mahendrakar
Browse files

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
parent e887c777
Loading
Loading
Loading
Loading
+10 −2
Original line number Diff line number Diff line
@@ -149,8 +149,16 @@ public:
#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

+28 −14
Original line number Diff line number Diff line
@@ -324,7 +324,7 @@ class C2SoftVpxEnc::IntfImpl : public SimpleInterface<void>::BaseParams {
                .withConstValue(new C2StreamIntraRefreshTuning::output(
                             0u, C2Config::INTRA_REFRESH_DISABLED, 0.))
                .build());

#ifdef VP9
        addParameter(
                DefineParam(mProfileLevel, C2_PARAMKEY_PROFILE_LEVEL)
                .withDefault(new C2StreamProfileLevelInfo::output(
@@ -338,7 +338,21 @@ class C2SoftVpxEnc::IntfImpl : public SimpleInterface<void>::BaseParams {
                })
                .withSetter(ProfileLevelSetter)
                .build());

#else
        addParameter(
                DefineParam(mProfileLevel, C2_PARAMKEY_PROFILE_LEVEL)
                .withDefault(new C2StreamProfileLevelInfo::output(
                        0u, PROFILE_VP8_0, LEVEL_UNUSED))
                .withFields({
                    C2F(mProfileLevel, profile).equalTo(
                        PROFILE_VP8_0
                    ),
                    C2F(mProfileLevel, level).equalTo(
                        LEVEL_UNUSED),
                })
                .withSetter(ProfileLevelSetter)
                .build());
#endif
        addParameter(
                DefineParam(mRequestSync, C2_PARAMKEY_REQUEST_SYNC_FRAME)
                .withDefault(new C2StreamRequestSyncFrameTuning::output(0u, C2_FALSE))