2753536587 / libyuv

Automatically exported from code.google.com/p/libyuv
0 stars 0 forks source link

RGB565ToARGB conversion inconsistent #40

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
In r245 a new unittest is indicating a difference between C and SSE2 code.

c:\src\libyuv\trunk>build\release\libyuv_unittest.exe  
--gtest_catch_exceptions=0 --gtest_filter=*565*
Note: Google Test filter = *565*
[==========] Running 3 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 3 tests from libyuvTest
[ RUN      ] libyuvTest.I420ToRGB565_CvsOPT
[       OK ] libyuvTest.I420ToRGB565_CvsOPT (25724 ms)
[ RUN      ] libyuvTest.ARGBToRGB565_CvsOPT
[       OK ] libyuvTest.ARGBToRGB565_CvsOPT (2491 ms)
[ RUN      ] libyuvTest.RGB565ToARGB_CvsOPT
[       OK ] libyuvTest.RGB565ToARGB_CvsOPT (4363 ms)
[----------] 3 tests from libyuvTest (32585 ms total)

[----------] Global test environment tear-down
[==========] 3 tests from 1 test case ran. (32589 ms total)
[  PASSED  ] 3 tests.

c:\src\libyuv\trunk>set LIBYUV_DISABLE_ASM=

c:\src\libyuv\trunk>build\release\libyuv_unittest.exe  
--gtest_catch_exceptions=0 --gtest_filter=*565*
Note: Google Test filter = *565*
[==========] Running 3 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 3 tests from libyuvTest
[ RUN      ] libyuvTest.I420ToRGB565_CvsOPT
[       OK ] libyuvTest.I420ToRGB565_CvsOPT (1639 ms)
[ RUN      ] libyuvTest.ARGBToRGB565_CvsOPT
[       OK ] libyuvTest.ARGBToRGB565_CvsOPT (795 ms)
[ RUN      ] libyuvTest.RGB565ToARGB_CvsOPT
.\unit_test\planar_test.cc(181): error: Value of: 0
Expected: err
Which is: 230561
[  FAILED  ] libyuvTest.RGB565ToARGB_CvsOPT (559 ms)
[----------] 3 tests from libyuvTest (3003 ms total)

[----------] Global test environment tear-down
[==========] 3 tests from 1 test case ran. (3007 ms total)
[  PASSED  ] 2 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] libyuvTest.RGB565ToARGB_CvsOPT

Original issue reported on code.google.com by fbarch...@google.com on 2 Jun 2012 at 12:30

GoogleCodeExporter commented 9 years ago
low bits of green are wrong.  The multiplier for G should be 0x2080 not 0x2008, 
which 0x0104 to repeat 6 bits then times 32 to shift left 5, since G is 5 bits 
from msb.

Original comment by fbarch...@google.com on 2 Jun 2012 at 9:07

GoogleCodeExporter commented 9 years ago
fixed in r276
[ RUN      ] libyuvTest.RGB565ToARGB_CvsOPT
[       OK ] libyuvTest.RGB565ToARGB_CvsOPT (567 ms)
[ RUN      ] libyuvTest.ARGB1555ToARGB_CvsOPT
[       OK ] libyuvTest.ARGB1555ToARGB_CvsOPT (654 ms)
[ RUN      ] libyuvTest.ARGB4444ToARGB_CvsOPT
[       OK ] libyuvTest.ARGB4444ToARGB_CvsOPT (473 ms)

Original comment by fbarch...@google.com on 4 Jun 2012 at 9:50