extract_h

Extracts the 16 MSBs of a 32-bit integer or fractional value. Returns a 16-bit value. Does not perform saturation. When an accumulator is the destination, zeroes out the LSP portion. Corresponds to truncation when applied to fractional values.

Prototype
  Word16 extract_h(Word32 lsrc)
Example
long l = 0x87654321;

short result;



result = extract_h(l);

// Expected value of result: 0x8765