Yes, example 2. That example illustrates where a beneficiary received 12,000 in a year out of a total of 20,000 he had a right to receive. That fraction is multiplied by the amount of the decedent’s estate tax paid allocated to the amount the beneficiary inherited. The 4620 and the 20,000 figure was determined one time and remains fixed.
Applied to your situation, the amount you distribute in a year (RMD or otherwise) will probably vary, so your IRD deduction would vary from year to year until it was fully claimed. However, the QCD amount will not be included in your income, so the amount you received should be reduced by the QCD amount. Say you inherited 1,000,000 of (taxable) IRD, and this year you are withdrawing 100,000 including a 4400 QCD. You would then claim an IRD deduction of 95,600/1,000,000 times the estate tax that the decedent paid on your share of the amount you inherited.
Here is an article by Michael Kitces explaining the IRD deduction on an inherited IRA. https://www.kitces.com/blog/understanding-the-irc-section-691c-income-in-respect-of-a-decedent-ird-deduction-for-the-beneficiary-of-an-inherited-ira/
See example 3 in the above article. Also, note that the IRS has not issued specific guidance on the handling of gains, and that also applies to QCDs, where you are actually receiving income the decedent would have been taxed on, but you are allowed to use a QCD to escape that tax. So it makes sense not to claim the IRD deduction on the amount you withdraw this year that was distributed as a QCD.