What is clipping and how can the MMX architecture be used to facilitate clipping operations?

What will be an ideal response?


Clipping is used in graphics to hide some objects behind others. The fundamental operation in clipping is that a
value is constrained to a range. For example, if x is in the range 100 to 199, a value of x = 150 would not change.
A value of x = 34 would become 100 (the lowest legal value), and a value 345 would become 199 (the highest
legal value). You will notice that clipping is rather similar to saturating arithmetic.

We can see how clipping works by taking a simple example with 4?bit arithmetic. Suppose that saturating
arithmetic has the limits 0 and 15 (using unsigned 4?bit arithmetic). Now, suppose that the clipping range is 3 to
10. If we have an unknown value x, we add 5 to it to get x + 5. The value 5 is calculated by maximum saturation
level ? maximum clipping level (in this case 15 ? 10 = 5). Having done that, we subtract 5 from this value. If we
are within range, we will end up where we started from (x + 5) ? 5 = x. Now suppose x was 12, which is outside
its upper limit. Adding 5 gives 12 + 5 = 17 and that is reduced to 15 because of the saturating arithmetic. When
we subtract 5 from the clamped value of 15 the result is 10. We’ve clipped it.

Computer Science & Information Technology

You might also like to view...

It is possible to get the OS X to run on a PC

Indicate whether the statement is true or false

Computer Science & Information Technology

A DAT72 tape is also known by what term?

A. DDS-2 B. DDS-3 C. DDS-4 D. DDS-5

Computer Science & Information Technology

The communication activity is best handled for small projects using six distinct actions (inception, elicitation, elaboration, negotiation, specification, validation).

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

Describe the differences between cooperative multitasking and preemptive multitasking.

What will be an ideal response?

Computer Science & Information Technology