Loading...
You are not logged-in Login/Register





  • Posts   Search Threads
  • egg126June 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.

    pvonkaenelJune 25, 2009 9:50 AM PDT
    Rate
     
    Re: The Equation of YUV to RGB

    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


    egg126June 25, 2009 7:37 PM PDT
    Rate
     
    Re: The Equation of YUV to RGB

    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...

    egg126June 28, 2009 9:35 PM PDT
    Rate
     
    Re: The Equation of YUV to RGB

    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)July 6, 2009 7:39 AM PDT
    Rate
     
    Re: The Equation of YUV to RGB

    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



Forum jump:  

Intel Software Network Forums Statistics

16,369 users have contributed to 46,341 threads and 163,954 posts to date.

In the past 24 hours, we have 18 new thread(s) 102 new posts(s), and 67 new user(s).

In the past 3 days, the most popular thread for everyone has been Formula for the intersection of straight lines The most posts were made to Take a look at John Burkhard&# The post with the most views is \"-check none\" generates error

Please welcome our newest member bikerepair8


For more complete information about compiler optimizations, see our Optimization Notice.