Quote:
Originally posted by BBugsBunny
So perhaps anyone else knows why VirtualDub uses 56,183,19 and if 77,151,28 would be more correct?
|
The actual 601 spec document says Y = 77/256 + 150/256 + 29/256.
You can also speed up the calculation by storing the pre calculated values in 3 256 dim arrays. Then you do something like
Code:
//** Init proc
for(i=0;i<256;i++) {
RedY[i] = i*77;
GreenY[i] = i*150;
BlueY[i] = i*29;
}
....
//** main proc
Y = (RedY[Red] + GreenY[Green] + BlueY[Blue])>>8
I don't recall if you did this. I slapped my head when I 1st saw this technique and said 'of course'. I posted because I didn't know this until recently.