Skip to main content
. 2022 Jul 25;22(15):5523. doi: 10.3390/s22155523
Algorithm 2 The proposed MTS early termination method
Input: the prediction modes list L
Output: the minimum RD cost of second pass RDCostmin and the best results
  • 1:

    initialize the minimum RD cost of MTS RDCostminmts

  • 2:

    reorder MTS candidates according to the frequency of transform used in neighboring CUs

  • 3:

    calculate the RD cost of the current CU RDCostmin using DCT-II

  • 4:

    for each transform transj in MTS candidates do

  • 5:

        if all neighboring CUs choose DCT-II then

  • 6:

            break;

  • 7:

        end if

  • 8:

        for each predicition mode modei in list L do

  • 9:

            derive the RD cost RD(modei,transj);

  • 10:

            if RD(modei,transj) <RDCostminmts then

  • 11:

               update RDCostminmts by RD(modei,transj);

  • 12:

               load the prediction results of modei;

  • 13:

            else

  • 14:

               contine;

  • 15:

            end if

  • 16:

        end for

  • 17:

        if RDCostmin>RDCostminmts then

  • 18:

            update RDCostmin by RDCostminmts;

  • 19:

        else

  • 20:

            break;

  • 21:

        end if

  • 22:

    end for

  • 23:

    return RDCostmin