Skip to content

Commit

Permalink
Expand operating rate workaround to T612 chipset
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 592916187
  • Loading branch information
andrewlewis authored and copybara-github committed Dec 21, 2023
1 parent 5211ff0 commit 1845a4a
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -527,11 +527,13 @@ private static void adjustMediaFormatForEncoderPerformanceSettings(MediaFormat m
}

private static boolean deviceNeedsLowerOperatingRateAvoidingOverflowWorkaround() {
// On this chipset, setting an operating rate close to Integer.MAX_VALUE will cause the encoder
// to throw at configuration time. Setting the operating rate to 1000 avoids being close to an
// integer overflow limit while being higher than a maximum feasible operating rate. See
// [internal b/311206113].
return Util.SDK_INT >= 31 && Util.SDK_INT <= 34 && Build.SOC_MODEL.equals("SM8550");
// On these chipsets, setting an operating rate close to Integer.MAX_VALUE will cause the
// encoder to throw at configuration time. Setting the operating rate to 1000 avoids being close
// to an integer overflow limit while being higher than a maximum feasible operating rate. See
// [internal b/311206113, b/317297946].
return Util.SDK_INT >= 31
&& Util.SDK_INT <= 34
&& (Build.SOC_MODEL.equals("SM8550") || Build.SOC_MODEL.equals("T612"));
}

/**
Expand Down

0 comments on commit 1845a4a

Please sign in to comment.