A method for chroma key masking is provided. The method includes adjusting
a first parameter representing a size of a first ellipsoid in a color
space, adjusting a second parameter representing a size of a second
ellipsoid in the color space, and generating a mask value for a given
pixel color based on the location of the given pixel color in the color
space, relative to the first and second ellipsoids. The first ellipsoid
is centered about a prescribed chroma key color and the second ellipsoid
is also centered about the prescribed chroma key color. The second
ellipsoid surrounds the first ellipsoid in the color space.