- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi,
according to the Ippi Manual the ippiDCTQuantFwd8x8LS_JPEG function makes a data conversion from the unsigned Ipp8u range [0..255] to the signed Ipp16s range [-128..127].
I use this function and my output data has values above 127. How is that possible? Could my raw quantization table be the reason?
regards,
Hajo
according to the Ippi Manual the ippiDCTQuantFwd8x8LS_JPEG function makes a data conversion from the unsigned Ipp8u range [0..255] to the signed Ipp16s range [-128..127].
I use this function and my output data has values above 127. How is that possible? Could my raw quantization table be the reason?
regards,
Hajo
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
yes, this functio do level shift for input data, DCT and quantization. You need to apply "formatted" quantization table to this function, not just "raw" quantization tables from bitstream. Please take a look on JPEGView sample to see how you can use this function.
Regards,
Vladimir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We created the quantization table in a very similar way it is done in the JPEGview sample:
-- code ---------------------------------------------
// Initialize quantization table:
Ipp8u quantTableRaw[64] =
{
10, 10, 10, 10, 10, 10, 10, 10,
...
10, 10, 10, 10, 10, 10, 10, 10
}; // a very simple quantTable:
Ipp16u quantFwdTable[64] = {NULL};
ippStat = ippiQuantFwdRawTableInit_JPEG_8u(quantTableRaw, quality);
ippStat = ippiQuantFwdTableInit_JPEG_8u16u(quantTableRaw, quantFwdTable);
-- end of code -------------------------------------
The "quantFwdTable" contains values between (around) -600 and (around) 700 - using a quality of 100.
Could our quantization table be the reason for this?
best regards
Hajo Hoffmann
-- code ---------------------------------------------
// Initialize quantization table:
Ipp8u quantTableRaw[64] =
{
10, 10, 10, 10, 10, 10, 10, 10,
...
10, 10, 10, 10, 10, 10, 10, 10
}; // a very simple quantTable:
Ipp16u quantFwdTable[64] = {NULL};
ippStat = ippiQuantFwdRawTableInit_JPEG_8u(quantTableRaw, quality);
ippStat = ippiQuantFwdTableInit_JPEG_8u16u(quantTableRaw, quantFwdTable);
-- end of code -------------------------------------
The "quantFwdTable" contains values between (around) -600 and (around) 700 - using a quality of 100.
Could our quantization table be the reason for this?
best regards
Hajo Hoffmann
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
that's ok, we changed division operation to multiplication for performance reasons. Please see function description in IPP manual.
Description
The function
ippiQuantFwdTableInit_JPEG is declared in the ippj.h file. This functionprepares quantization table in a format that is suitable for fast encoding. Initial raw quantization
tables have zigzag order by definition. This function performs reordering transformation that
converts the zigzag sequence of table elements to conventional order (left-to-right, top-to-bottom). To avoid division during quantization, the function
ippiQuantFwdTableInit_JPEG scales the array by 15 bits. The pointer pQuantRawTable points to the array of 64 elements as is required by [ISO10918], Annex B.2.4.1, Quantization Table Specification Syntax. The pointer pQuantFwdTable points to an array containing 64 values of Ipp16u type.Regards,
Vladimir

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page