I need to use compression to change bit depth of a video signal.

Our Focal Plane Array(FPA) is Vanadium Oxide(VOx) Resistive Microbolometers Uncooled Thermal Infrared Detector. The output of this image sensor is 14-bit, Wide Dynamic Range(WDR), raw, monochrome, 640 x 480 resolution. The pixels of this video signal will be processed by Image Signal Processor(ISP). ISP input is 12-bits. Therefore, I need to compress FPA output to 12 bits and then input into ISP.

How to perform global tone mapping using two methods, PWL and LUT (curve defined by lut) based mapping. I need to tone map 14 bit data to 12 bit. What does PWL stand for? Please provide sufficient information so I can achieve this. It's suppose to be similar to gamma compression. I can do gamma correction in matlab. Can this tone mapping also be done in matlab? If yes, please provide some examples.