If a plea agreement does not specify the impact on the calculation of credits, then the sentencing court has discretion as to decide whether an order striking enhancements may also be applied to maximize the calculation of presentence credits. A Penal Code section 12022.7 great bodily injury enhancement as to current charges, as well as a prior strike conviction, would have precluded the more favorable presentence credits calculation in effect after January 25, 2010. The prosecutor indicated that those were dismissed and the strike was stricken as part of the plea bargain. Application of the less favorable calculation for the class of prisoners with prior convictions for serious felonies is an increase in punishment over those prisoners who do not have qualifying prior convictions. The denial of the credits at issue in this case was a punishment due to Lara’s prior conviction. The issue was what effect to give the plea agreement, which specified that the prior conviction would be dismissed or “struck,” without reference to the credits determination. Some allegations may be stricken for some purposes and not for others, but the plea agreement in this case was ambiguous as to whether the intent was to strike only the additional term or whether it would be stricken for all purposes. The plea agreement could have also reserved to the trial court the discretion as to whether striking the enhancements should be applied to maximize presentence credits.