A-TDB: A Self Adaptive Block-Matching Algorithm for Varying Motion Contents