Forum Jump

Select Group :
Select Forum :
Sorted By :
Sort Order :
From The :
 
Thread Tools  Search this thread 
egg126
Total Points:
147
Status Points:
97
Green Belt
June 24, 2009 8:26 PM PDT
The Equation of YUV to RGB
Hi, all

What's the Equation of IPP to implement the YUV to RGB

ippiYUV420ToRGB_8u_P3C3(const Ipp8u* const pSrc[3], Ipp8u* pDst, IppiSize imgSize);

There are difference of my result with IPP. So I want to know what's the equation of IPP to implementation...

Thanks for your reply.
pvonkaenel
Total Points:
3,495
Status Points:
2,995
Brown Belt
June 25, 2009 9:50 AM PDT
Rate
 
#1
Quoting - egg126
Hi, all

What's the Equation of IPP to implement the YUV to RGB

ippiYUV420ToRGB_8u_P3C3(const Ipp8u* const pSrc[3], Ipp8u* pDst, IppiSize imgSize);

There are difference of my result with IPP. So I want to know what's the equation of IPP to implementation...

Thanks for your reply.

I don't know how the internals are implemented, but if you're getting different results then you might not be using the correct conversion routine.  Are you sure you have a YUV source and not a YCbCr source?  If you're working with video then it's probably YCbCr.

Peter


egg126
Total Points:
147
Status Points:
97
Green Belt
June 25, 2009 7:37 PM PDT
Rate
 
#2 Reply to #1
Quoting - pvonkaenel

I don't know how the internals are implemented, but if you're getting different results then you might not be using the correct conversion routine.  Are you sure you have a YUV source and not a YCbCr source?  If you're working with video then it's probably YCbCr.

Peter

Yes, that's YUV Source, and the I find in ippiman, the Equation is:
R' = Y' + 1.140*V'
G' = Y' - 0.394*U' - 0.581*V'
B' = Y' + 2.032*U'

But my result is different, so I want to know How IPP implement this Equation in Integer Operation.

Also, I find the YCbCr to RGB is available. That's ippiYCbCrToRGB_8u_C3R
And the Equation is:

R' = 1.164*(Y' - 16) + 1.596*(Cr' - 128)
G' = 1.164*(Y' - 16) - 0.813*(Cr' - 128) - 0.392*(Cb' - 128)
B' = 1.164*(Y' - 16) + 2.017*(Cb' - 128)

And, at present, I want to know How to implement them(YUV2RGB, YCbCr2RGB) in Integer Operation.

Thanks very much...

egg126
Total Points:
147
Status Points:
97
Green Belt
June 28, 2009 9:35 PM PDT
Rate
 
#3
Is there anybody know how to optimization this equation in Integer Operation.

R' = Y' + 1.140*V'
G' = Y' - 0.394*U' - 0.581*V'
B' = Y' + 2.032*U'

and

R' = 1.164*(Y' - 16) + 1.596*(Cr' - 128)
G' = 1.164*(Y' - 16) - 0.813*(Cr' - 128) - 0.392*(Cb' - 128)
B' = 1.164*(Y' - 16) + 2.017*(Cb' - 128)


And I use floating point operation, but the result is different with IPP, the gap is just 1, therefore, I think this is round error, however, I don't know, How IPP round this equation?

Thanks very much.


Vladimir Dudnik (Intel)
Total Points:
26,150
Status Points:
26,150
Black Belt
July 6, 2009 7:39 AM PDT
Rate
 
#4 Reply to #3
IPP use SSE optimized fixed point calculations in YUVToRGB conversion for 8-bit input and output data. This is much faster comparing with SSE floating point calculations (which will require integer to float and back conversion) but introduce rounding error.

Regards,
  Vladimir





Intel Software Network Forums Statistics

8285 users have contributed to 31229 threads and 99107 posts to date.
In the past 24 hours, we have 7 new thread(s) 35 new posts(s), and 47 new user(s).

In the past 3 days, the most popular thread for everyone has been comparison cilk++, openmp, pthreads first results The most posts were made to comparison cilk++, openmp, pthreads first results The post with the most views is Very amusing...  Escalated as

Please welcome our newest member tvinni