Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6793 ディスカッション

Jpeg quantization tables with Ijl/UIC

pandeleflorin
ビギナー
656件の閲覧回数
Does anyone know eactly how to reuse the quantization table of a jpeg after processing (and reencoding)the image in it?
For example decode->Rotate->encode.
I know that IJL can set the Quantization table but what about Geting it?
How about UIC?
I know about jpegtran too - its toooo slooooow. Unless someone can help me intelify it:)
I am restricted to IPP 6.0 and limited knoledge of the Jpeg encoding/decoding
Thank you
0 件の賞賛
1 解決策
Vladimir_Dudnik
従業員
656件の閲覧回数

Hello,

Starting from IPP 6.1 UIC JPEG encoder and decoder have got an API to use external quantization and huffman tables. Please checkuic_jpeg_dec.h and uic_jpeg_enc.h files

ExcStatus InitHuffmanTable(Ipp8u bits[16], Ipp8u vals[256], int tbl_id, HTBL_CLASS tbl_class);
ExcStatus InitQuantTable(Ipp8u qnt[64], int tbl_id);
ExcStatus InitQuantTable(Ipp16u qnt[64], int tbl_id);

ExcStatus AttachHuffmanTable(int tbl_id, HTBL_CLASS tbl_class, int comp_no);
ExcStatus AttachQuantTable(int tbl_id, int comp_no);

here, by InitQuantTable call you prepare quantization table with particlar id (luminance anr chrominance table) and then you may attach certain quantization table to particular color component with AttachQuantTable call.

We still do not have an API toexpose quantization or huffman tables to the user, although they are read and kept internally.

We will consider that as a feature request for future versions of UIC JPEG implementation.

Regards,
Vladimir

元の投稿で解決策を見る

2 返答(返信)
Vladimir_Dudnik
従業員
657件の閲覧回数

Hello,

Starting from IPP 6.1 UIC JPEG encoder and decoder have got an API to use external quantization and huffman tables. Please checkuic_jpeg_dec.h and uic_jpeg_enc.h files

ExcStatus InitHuffmanTable(Ipp8u bits[16], Ipp8u vals[256], int tbl_id, HTBL_CLASS tbl_class);
ExcStatus InitQuantTable(Ipp8u qnt[64], int tbl_id);
ExcStatus InitQuantTable(Ipp16u qnt[64], int tbl_id);

ExcStatus AttachHuffmanTable(int tbl_id, HTBL_CLASS tbl_class, int comp_no);
ExcStatus AttachQuantTable(int tbl_id, int comp_no);

here, by InitQuantTable call you prepare quantization table with particlar id (luminance anr chrominance table) and then you may attach certain quantization table to particular color component with AttachQuantTable call.

We still do not have an API toexpose quantization or huffman tables to the user, although they are read and kept internally.

We will consider that as a feature request for future versions of UIC JPEG implementation.

Regards,
Vladimir

pandeleflorin
ビギナー
656件の閲覧回数
Thank you Vladimir
for the well documented answer( as always)
返信