Intel® Integrated Performance Primitives
Community support and discussions relating to developing high-performance vision, signal, security, and storage applications.

Intel ippi for 10 bit video processing

karthi127
Beginner
414 Views

How can i use intel ippi for processing a 10 bit video?

If the memory allocated is 16 bits and 10 bits is used with 6 null bits then i can use ipp16u datatype.

If it uses 10 bits only. Then how do i convert it to suitable format for processing using ippi.

 

Thank you

0 Kudos
1 Solution
Abhinav_S_Intel
Moderator
339 Views

Hi Karthik,

IPP does not have a direct API for 10bit conversion. Here are supported conversion types:

https://software.intel.com/content/www/us/en/develop/documentation/ipp-dev-reference/top/volume-2-im...

There is a great Stack Overflow question that is basically the same question as yours and there is also some good discussion in the post as well. Here is the link:

https://stackoverflow.com/questions/49186569/converting-an-image-with-n-bit-bit-depth-to-a-16-bit-bi...

Datatypes are based on the processor architecture. Usually they are a fraction or multiple of the word length.

Hence with modern CPUs and therefor in modern programming languages there is no 12bit datatype. You have 64, 32, 16, 8 of addressable memory.

But no one stops you from putting a smaller number of bits into a register.

So if you want to store 12bit you usually store them in the lower 12bits of a 16bit type.

Thats's why image processing algorithm usually support 8, 16,... bit. You can use any 16bit algorithm to work on 12bit intensity information as you would on 16bit.

In some cases you may scale the 12bit information to 16bit. But in most cases that is not necessary.

Scaling 12 to 16bit is simple math. 12bit_value / (2^12-1) = 16bit_value / (2^16-1). Of course you may also refer your 12bit value to the maximum value in the image instead of 2^12. Then you would always use the full 16bit.

-
Abhinav

View solution in original post

2 Replies
NoorjahanSk_Intel
Moderator
391 Views

Hi Karthik,

Thanks for reaching out to us.

We are looking into this issue internally. We will get back to you soon.


Thanks & Regards

Noorjahan


Abhinav_S_Intel
Moderator
340 Views

Hi Karthik,

IPP does not have a direct API for 10bit conversion. Here are supported conversion types:

https://software.intel.com/content/www/us/en/develop/documentation/ipp-dev-reference/top/volume-2-im...

There is a great Stack Overflow question that is basically the same question as yours and there is also some good discussion in the post as well. Here is the link:

https://stackoverflow.com/questions/49186569/converting-an-image-with-n-bit-bit-depth-to-a-16-bit-bi...

Datatypes are based on the processor architecture. Usually they are a fraction or multiple of the word length.

Hence with modern CPUs and therefor in modern programming languages there is no 12bit datatype. You have 64, 32, 16, 8 of addressable memory.

But no one stops you from putting a smaller number of bits into a register.

So if you want to store 12bit you usually store them in the lower 12bits of a 16bit type.

Thats's why image processing algorithm usually support 8, 16,... bit. You can use any 16bit algorithm to work on 12bit intensity information as you would on 16bit.

In some cases you may scale the 12bit information to 16bit. But in most cases that is not necessary.

Scaling 12 to 16bit is simple math. 12bit_value / (2^12-1) = 16bit_value / (2^16-1). Of course you may also refer your 12bit value to the maximum value in the image instead of 2^12. Then you would always use the full 16bit.

-
Abhinav

Reply