I need to implement a jpeg lossless compression to compress 16bit grayscale image data. I'm not so good at C/C++. After I looked into the UIC sample source code and the IPP documents, I still could not figure out how to use function ippiEncodeHuffmanRow_JPEG_16s1u_P4C1. If I'm not wrong, I need to call this function for each row of the input image? And how to use the last input parameter bFlushState? Currently I set it to 1 after all the rows has been huff encoded. Could anyone give me some advice? Thanks in advance.