Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.

Jpeg quantization tables with Ijl/UIC

pandeleflorin
Principiante
656 Visualizações
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 Kudos
1 Solução
Vladimir_Dudnik
Funcionário
656 Visualizações

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

Ver solução na publicação original

2 Respostas
Vladimir_Dudnik
Funcionário
658 Visualizações

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
Principiante
656 Visualizações
Thank you Vladimir
for the well documented answer( as always)
Responder