View Single Post
Old 31st December 2012, 23:07   #7  |  Link
IanB
Avisynth Developer
 
Join Date: Jan 2003
Location: Melbourne, Australia
Posts: 3,167
Opps, The bottom row and right column of the lookup table are not being initialised.
Code:
		for (int i=0; i< 255; i++) {
			lookup[i<<8] = i;
			for (int j=1; j<255; j++)
				lookup[(i<<8)+j] = uint8clamp((i * 255 + j / 2) / j);
		}
See attached :-
Attached Files
File Type: zip Unpremultiply.zip (33.2 KB, 399 views)

Last edited by IanB; 31st December 2012 at 23:54.
IanB is offline   Reply With Quote