Code:
I was trying to remember what's the purpose of using SATD in mvtools
there are several approaches available to calculate the difference between 2 macroblocks.
1. SAD, sum of the absolute difference between each pair of samples
2. dct=1, transform both current block and the reference block to frequency domain, and calculate the sum of the absolute difference between each pair of transformed samples
3. SATD, get the difference block between 2 macroblocks, and transform that difference block to frequency domain and calculate the sum of the absolute value of each sample in that transformed difference block
basically, dct=5(SATD) is the compromise between dct=0(SAD) and dct=1(frequency domain SAD)