Showing results for 
Search instead for 
Did you mean: 

IPP Wavelet transform for odd-sized tiles

What happens when I apply an in-placewavelet transform (using e.g. function ippiWTFwd_B53_JPEG2K_16s_C1IR) when my tile is of an odd size, say 595x367? Will the lo_width be equal to (full_width + 1)/2, and the hi_width = (full_width - lo_width)? How are the wavelet coefficients stored in the in-place buffer? They seem to be losing the stride alignment, is that so?

Thank you!
0 Kudos
1 Reply
New Contributor I


please pay attention to our JPEG 2000 in UIC (unified image codecs) it useses better performance solution for wavelet transforms in JPEG 2000 (but on the high level it's C++).
Tile-based functions is for compatibility with previous IPP versions mostly.
For tile-based functions all the components (LL, HL, LH, HH) will be placed in the sampe tile (see Figure 15-3 in documentation). The line step (stride) will be the same as for original image. (Butremember address for HL, LH, HH can be aligned badly.)
But JPEG 2000 standard the sizes of components depends not only on image sizes, but on image start position (anchor of tile) in reference grid. Scaling of reference grid is defined as
(src + 1) >> 1 for L component and src >> 1 for H component. Size of components defined as difference betweenoriginand the bound.
So if origin is (0,0) for your size (I assumed 595 is width) the LL component will be 298(w)x184(h), LxHy will be 298x183 HxLy will be 297x184 and HxHy will be 297x183. All together will fit 595x367 rectangle.
For other details see text of standard and our implementation in header: \src\codec\image\jpeg2000\common\src\codestream\wavelet\wtmetric.h in UIC JPEG 2000 component.

Best Regards,