AshwanthSelvam / libyuv

Automatically exported from code.google.com/p/libyuv
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

RGB24ToI420 Neon code tinted Red #297

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
RGB24ToI420() or RAWToI420() is getting a color shift (appears as red tint). 
When using the SW version of RGB to YUV (RGB24ToYRow_C & RGB24ToUVRow_C) the 
color shift didn't occur.  Neon optimized code may have rounding errors which 
is throwing off the results compared to the SW implementation?  For the 
opposite conversion, I420 to RGB24, there is not notice a significant shift 
when using the neon optimized version.

Original issue reported on code.google.com by fbarch...@google.com on 23 Dec 2013 at 7:00

GoogleCodeExporter commented 9 years ago
The G coefficient is okay, but red and blue round the 0.5 down for both.
Changing / 4 to / 2 there is no rounding, but requires a shift.  For some 
instructions there is a half add, but there appears to be no vhpadd, so its an 
addition set of 3 instructions.

Original comment by fbarch...@google.com on 25 Dec 2013 at 9:03

GoogleCodeExporter commented 9 years ago
This is the proposed CL to improve UV accuracy
https://webrtc-codereview.appspot.com/6309004/

Original comment by fbarch...@google.com on 26 Dec 2013 at 6:51

GoogleCodeExporter commented 9 years ago
Fixed in r920.

Original comment by fbarch...@google.com on 26 Dec 2013 at 7:25