C2SoftAVCEnc: Enable CABAC for main profile encoding
Bug: 113677531
Test: Modified screenrecord application to force main profile and verified the
generated bitstream manually
Change-Id: Icab0c7fa1c60bb7ae8fbdef45a170cf2d3c6d541
diff --git a/media/codec2/components/avc/C2SoftAvcEnc.cpp b/media/codec2/components/avc/C2SoftAvcEnc.cpp
index ee5cf27..cf06623 100644
--- a/media/codec2/components/avc/C2SoftAvcEnc.cpp
+++ b/media/codec2/components/avc/C2SoftAvcEnc.cpp
@@ -768,7 +768,11 @@
s_profile_params_ip.e_sub_cmd = IVE_CMD_CTL_SET_PROFILE_PARAMS;
s_profile_params_ip.e_profile = mIntf->getProfile_l();
- s_profile_params_ip.u4_entropy_coding_mode = mEntropyMode;
+ if (s_profile_params_ip.e_profile == IV_PROFILE_BASE) {
+ s_profile_params_ip.u4_entropy_coding_mode = 0;
+ } else {
+ s_profile_params_ip.u4_entropy_coding_mode = 1;
+ }
s_profile_params_ip.u4_timestamp_high = -1;
s_profile_params_ip.u4_timestamp_low = -1;