主权项 |
1. A method of encoding a digital video with a video encoder, comprising:
loading a picture comprising a plurality of pixels; arranging said plurality of pixels into a plurality of intra prediction blocks and/or inter prediction blocks; dividing the pixels of each intra prediction block into a first group, a second group, a third group, and a fourth group based on phases of the pixels; for each intra prediction block, loading an initial list of intra prediction modes; at a first stage for each intra prediction block, calculating a first stage cost value for each of the intra prediction modes on said initial list for said first group, calculating a first stage threshold maximum cost, and generating a first stage mode list by copying each intra prediction mode on said initial mode list that has a first stage cost value that is less than said first stage threshold maximum cost; at a second stage for each intra prediction block, calculating a second stage cost value for each of the intra prediction modes on said first stage mode list for said second group, calculating a second stage threshold maximum cost, and generating a second stage mode list by copying each intra prediction mode on said first stage mode list that has a second stage cost value that is less than said second stage threshold maximum cost; at a third stage for each intra prediction block, calculating a third stage cost value for each of the intra prediction modes on said second stage mode list for said third group, calculating a third stage threshold maximum cost, and generating a third stage mode list by copying each intra prediction mode on said second stage mode list that has a third stage cost value that is less than said third stage threshold maximum cost; at a fourth stage for each intra prediction block, calculating a fourth stage cost value for each of the intra prediction modes on said third stage mode list for said fourth group; for each intra prediction block, selecting the intra prediction mode on said third stage mode list with the lowest fourth stage cost value as a tentative intra prediction mode for the intra prediction block; calculating a heterogeneity index for each group of contiguous intra prediction blocks in said picture, based on the tentative intra prediction mode selected for each intra prediction block after said fourth stage; and finalizing the tentative intra prediction mode for each intra prediction block within each group of contiguous intra prediction blocks that has a heterogeneity index above a predetermined threshold value. |