110,11 → 110,11 |
var['b'] = nplanes > 2 ? inp[2] : 0; |
var['a'] = nplanes > 3 ? inp[3] : 0; |
|
#ifdef YUV_FILTER_FACTORY |
#ifdef YUV_FILTER_FACTORY |
if(varused['i']) var['i'] = (( 76L*var['r'])+(150L*var['g'])+( 29L*var['b']))/256; // range: [0..254] |
if(varused['u']) var['u'] = ((-19L*var['r'])+(-37L*var['g'])+( 56L*var['b']))/256; // range: [-55..55] |
if(varused['v']) var['v'] = (( 78L*var['r'])+(-65L*var['g'])+(-13L*var['b']))/256; // range: [-77..77] |
#else |
#else |
// These formulas are more accurate, e.g. pure white has now i=255 instead of 254 |
|
// For Y, the definition is Y := 0.299R + 0.587G + 0.114B |
129,7 → 129,7 |
// Filter Factory divided it by 2, resulting in a range of [-78..78]. |
// Due to compatibility reasons, we adopt that behavior. |
if(varused['v']) var['v'] = (( 614777L*var['r'])+(-514799L*var['g'])+(- 99978L*var['b']))/2000000; // range: [-78..78] |
#endif |
#endif |
|
} |
if(varused['d']) var['d'] = ff_c2d_negated(var['X']/2 - var['x'], var['Y']/2 - var['y']); |
336,16 → 336,16 |
else |
pb->progressProc((int)y - filterRect.top,filterRect.bottom - filterRect.top); |
} |
} |
#ifdef MAC_ENV |
else{ |
}else{ |
#ifdef MAC_ENV |
/* to stop delays during typing of expressions, |
immediately abort preview calculation if a key or mouse has been pressed. */ |
EventRecord event; |
if(EventAvail(mDownMask|keyDownMask|autoKeyMask,&event)) |
if(EventAvail(mDownMask|keyDownMask|autoKeyMask,&event)) { |
return userCanceledErr; |
} |
#endif |
} |
#endif |
} |
|
// Note for state_changing_funcs_used: We will not evaluate the gap between bottom border |