简体   繁体   English

用于12位灰度JPEG压缩的霍夫曼表

[英]Huffman Tables for 12-bit grayscale JPEG compression

I want to compress 12-bit grayscale images. 我想压缩12位灰度图像。 I already developed an 8-bit grayscale compressor using the example Huffman Tabels (for Luminance) from the ITU T.81 in C++. 我已经使用ITU T.81的C ++例子霍夫曼表格(用于亮度)开发了一个8位灰度压缩器。

Are there any example Huffman Tables for 12-bit grayscale images? 是否有用于12位灰度图像的霍夫曼表示例? (Converting from 12-bit to 8-bit before compression is not an option) (不能选择在压缩之前从12位转换为8位)

Clearly there is no such animal in the standard. 显然,标准中没有这种动物。 The code here is 8-bit only 此处的代码仅为8位

http://www.colosseumbuilders.com/sourcecode/imagelib403.zip http://www.colosseumbuilders.com/sourcecode/imagelib403.zip

but it shows how to calculate optimal huffman tables using pointers to functions. 但是它展示了如何使用函数指针来计算最佳霍夫曼表。 You could try something like that in your encoder. 您可以在编码器中尝试类似的方法。 If you did not want to make two passes over the quantized DCT values, you could stick do this as a temporary measure, run a number of sample images, and create your own huffman table for reuse. 如果您不想对量化的DCT值进行两次遍历,则可以将其作为一种临时措施,运行大量示例图像,并创建自己的霍夫曼表以进行重用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM