Foreign tax credit adjustment

If your only foreign income is cap gains and div., how does the credit adjustment work from a tax planning perspective.   Does it make sense to keep your dividends below the $20,000 threshold?  Can you be in a situation where you get more credit at $19,000 div than $21,000 div all else being equal?