- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
We would like to be able to generate an image buffer whose pixel values are the maximum of two other buffers (or perhaps the current and one other buffer).
In other words, for every pixel, i, m[ i ] = max( a[ i ], b[ i ] ) or m[ i ] = max ( m[ i ], a[ i ] ).
Any suggestions for how to do this? I didn't see a function to do exactly this. Perhaps we need to make several calls, but wanted to see if others had some suggestions.
Thank you
Lien copié
5 Réponses
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Hi Paul,
Please see my "feature request" at
Areyou ready to submit another "feature request" on premier site to see it done?
Thanks,
Andrew
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Hi, it seems in case of Ipp8u data type we can do it in two simple operations:
Input: A, B
Output: C
C = A B;
C = C + B;
Due to saturation used in ippi functions there will be correct result
C = MAX(A,B);
Or if go more deeply simple for loop with only several intrinsics inside:
movdqa regA, A
movqda regB, B
pmaxub regA, regB
movdqa C, regA
Regards,
Vladimir
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Can you explain (or point to somewhere this is explained) how saturation works? I'm trying to understand how C = A-B, C= C+B will work. For example, for pixel i, if A[ i ] = 5 and B[ i ] = 10, then C[ i ] will equal what? -5?, 0? Does saturation work by truncating negative values to 0 and values larger than 255 (assuming 8-bits) to 255?
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Yes, for your example:
A = 5
B = 10
C = A B = 5 10 = -5 = > (saturate to 8u means range 0 <= X <= 255 => 0;
C = C + B = 10;
It is true for all functions with _Sfs suffix and unsigned data type.
Regards,
Vladimir
- Marquer comme nouveau
- Marquer
- S'abonner
- Sourdine
- S'abonner au fil RSS
- Surligner
- Imprimer
- Signaler un contenu inapproprié
Will this work the same with
ippiSub_
32sc_C1RSfsand
ippiAdd_32sc_C1RSfs ?
Thanks
Martin

Répondre
Options du sujet
- S'abonner au fil RSS
- Marquer le sujet comme nouveau
- Marquer le sujet comme lu
- Placer ce Sujet en tête de liste pour l'utilisateur actuel
- Marquer
- S'abonner
- Page imprimable