- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The Planar (P)and channel (C) descriptors inippiYCbCr422ToYCbCr411_8u_C2P3R means covert 2 channeldata to 3 planar data, which
Y planar , which is a matrix withm_size.widthx m_size.height
Cb planar, which is a matrix with m_size.width/4 x m_size.height
Cr planar, which is a matrix with m_size.width/4 x m_size.height.
If consider tomalloc continousmemory , then 1 planar (widthxheight) image = 1 channel (widthxheigh) image. So if you use ippiMalloc, you can use
m_numChannels = 3;
IppiSize chromaSize = { m_size.width, m_size.height };
m_channels[0] = ippiMalloc_8u_C1( m_size.width, m_size.height, &(m_stepBytes[0]) ); m_channels[1] = ippiMalloc_8u_C1( m_size.width/4, m_size.height, &(m_stepBytes]));
m_channels[2] = ippiMalloc_8u_C1( m_size.width/4, m_size.height, &(m_stepBytes[2]) );
Best Regards,
Ying
A similiar example are under ippiMallocin ipp Reference manual.
The function ippiMalloc is declared in the ippi.h file. This function allocates a memory block aligned to a 32-byte boundary for elements of different data types. Every line of the image is aligned in accordance with the pStepBytes parameter, which is calculated by the ippiMalloc function and returned for further use.
The function ippiMalloc allocates one continuous memory block, whereas functions that operate on planar images require an array of separate pointers (IppType* plane[3]) to each plane as input. The ippiMalloc function should be called three times in this case. The code ExampleSetting Values to Pointers to Image Planes demonstrates how to construct such an array and set correct values to the pointers to use the allocated memory block with the Intel IPP functions operating on planar images. Note that pStepBytes should be specified for each plane. The example is given for 8u data type.
Setting Values to Pointers to Image Planes
int stepBytes[3];
Ipp8u* plane[3];
plane[0] = ippiMalloc_8u_C1(widthPixels, heightPixels,
&(stepBytes [0]));
plane[1] = ippiMalloc_8u_C1(widthPixels/2, heightPixels/2,
&(stepBytes [1]));
plane[2] = ippiMalloc_8u_C1(widthPixels/2, heightPixels/2,
&(stepBytes [2]));
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
The Planar (P)and channel (C) descriptors inippiYCbCr422ToYCbCr411_8u_C2P3R means covert 2 channeldata to 3 planar data, which
Y planar , which is a matrix withm_size.widthx m_size.height
Cb planar, which is a matrix with m_size.width/4 x m_size.height
Cr planar, which is a matrix with m_size.width/4 x m_size.height.
If consider tomalloc continousmemory , then 1 planar (widthxheight) image = 1 channel (widthxheigh) image. So if you use ippiMalloc, you can use
m_numChannels = 3;
IppiSize chromaSize = { m_size.width, m_size.height };
m_channels[0] = ippiMalloc_8u_C1( m_size.width, m_size.height, &(m_stepBytes[0]) ); m_channels[1] = ippiMalloc_8u_C1( m_size.width/4, m_size.height, &(m_stepBytes]));
m_channels[2] = ippiMalloc_8u_C1( m_size.width/4, m_size.height, &(m_stepBytes[2]) );
Best Regards,
Ying
A similiar example are under ippiMallocin ipp Reference manual.
The function ippiMalloc is declared in the ippi.h file. This function allocates a memory block aligned to a 32-byte boundary for elements of different data types. Every line of the image is aligned in accordance with the pStepBytes parameter, which is calculated by the ippiMalloc function and returned for further use.
The function ippiMalloc allocates one continuous memory block, whereas functions that operate on planar images require an array of separate pointers (IppType* plane[3]) to each plane as input. The ippiMalloc function should be called three times in this case. The code ExampleSetting Values to Pointers to Image Planes demonstrates how to construct such an array and set correct values to the pointers to use the allocated memory block with the Intel IPP functions operating on planar images. Note that pStepBytes should be specified for each plane. The example is given for 8u data type.
Setting Values to Pointers to Image Planes
int stepBytes[3];
Ipp8u* plane[3];
plane[0] = ippiMalloc_8u_C1(widthPixels, heightPixels,
&(stepBytes [0]));
plane[1] = ippiMalloc_8u_C1(widthPixels/2, heightPixels/2,
&(stepBytes [1]));
plane[2] = ippiMalloc_8u_C1(widthPixels/2, heightPixels/2,
&(stepBytes [2]));
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

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