C2SoftVpxEnc: Make VPX_VBR as default mode
Use VPX_VBR as default bitrate mode instead of VPX_CBR
VideoEncoderDecoderTest in CTS doesn't set bitrate mode and
VPX_CBR mode shows encoding artifacts when running that test
Test: cts-tradefed run cts -m CtsVideoTestCases -t \
android.video.cts.VideoEncoderDecoderTest#testAvcGoog0Qual0640x0360
Bug: 135891350
Change-Id: I488273113b4d5cf4ae2f4b8208fcebdd095aa6f5
diff --git a/media/codec2/components/vpx/C2SoftVpxEnc.cpp b/media/codec2/components/vpx/C2SoftVpxEnc.cpp
index 6509a88..6dab70b 100644
--- a/media/codec2/components/vpx/C2SoftVpxEnc.cpp
+++ b/media/codec2/components/vpx/C2SoftVpxEnc.cpp
@@ -127,14 +127,14 @@
}
switch (mBitrateMode->value) {
- case C2Config::BITRATE_VARIABLE:
- mBitrateControlMode = VPX_VBR;
- break;
case C2Config::BITRATE_CONST:
- default:
mBitrateControlMode = VPX_CBR;
break;
- break;
+ case C2Config::BITRATE_VARIABLE:
+ [[fallthrough]];
+ default:
+ mBitrateControlMode = VPX_VBR;
+ break;
}
setCodecSpecificInterface();