[FFmpeg-devel] Concerning RV40 chroma MC functions

Kostya kostya.shishkov
Tue Nov 25 12:07:02 CET 2008


As you may know, RV40 chroma MC functions look a lot like H.264, they use
the same formula
dst[i] = (A*src[i] + B*src[i+1] + C*src[i+stride] + D*src[i+stride+1] + bias)>>6

the problem is that while A,B,C and D are calculated in the same manner,
bias value is constant for H.264 and varies for RV40:

(H and V are 1/4pel fractions)

H,V ->  A  B  C  D bias
0,0 -> 64  0  0  0  0 (any value <=32 should fit, I suppose)
1,0 -> 48 16  0  0 16
2,0 -> 32 32  0  0 32
3,0 -> 16 48  0  0 16
0,1 -> 48  0 16  0 32
0,2 -> 32  0 32  0  0 (any value <= 16 should fit, I think)
0,3 -> 16  0 48  0 32
1,1 -> 36 12 12  4 28
2,1 -> 24 24  8  8 32
3,1 -> 12 36  4 12 28
1,2 -> 24  8 24  8 32
2,2 -> 16 16 16 16 16
3,2 ->  8 24  8 24 32
1,3 -> 12  4 36 12 28
2,3 ->  8  8 24 24 32
3,3 ->  4 12 12 36 28

Now the questions:
* how can one calculate that bias value?
* what is the best way to incorporate those functions into lavc?
* should RV40 designers burn in hell?




More information about the ffmpeg-devel mailing list