KerwinMa / libyuv

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

V210 unittest flakey #75

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Likely due to 22.5 bpp being rounded up to 24 in unittest.

out/Release/libyuv_unittest --gtest_filter=*
...
[ RUN      ] libyuvTest.I420ToUYVY_OptVsC
[       OK ] libyuvTest.I420ToUYVY_OptVsC (192 ms)
[ RUN      ] libyuvTest.I420ToV210_OptVsC
unit_test/planar_test.cc:95: Failure
Expected: (max_diff) <= (2), actual: 255 vs 2
[  FAILED  ] libyuvTest.I420ToV210_OptVsC (1835 ms)
[ RUN      ] libyuvTest.I420ToI400_OptVsC

[----------] Global test environment tear-down
[==========] 152 tests from 1 test case ran. (678985 ms total)
[  PASSED  ] 151 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] libyuvTest.I420ToV210_OptVsC

 1 FAILED TEST

out/Release/libyuv_unittest --gtest_filter=V210*
Note: Google Test filter = *V210*
[==========] Running 2 tests from 1 test case.
[----------] Global test environment set-up.
[----------] 2 tests from libyuvTest
[ RUN      ] libyuvTest.I420ToV210_OptVsC
[       OK ] libyuvTest.I420ToV210_OptVsC (1775 ms)
[ RUN      ] libyuvTest.V210ToI420_OptVsC
[       OK ] libyuvTest.V210ToI420_OptVsC (1286 ms)
[----------] 2 tests from libyuvTest (3061 ms total)

Original issue reported on code.google.com by fbarch...@google.com on 29 Aug 2012 at 6:52

GoogleCodeExporter commented 9 years ago
r332 fixes this by allocating 45 / 16 bytes per pixel.
Caveat - This isn't quite correct, since V210 comes in 64 byte groups that 
contain 24 pixels, but the unittest does 720p and computes the correct size, so 
the entire buffer will be initialized.

Original comment by fbarch...@google.com on 30 Aug 2012 at 12:03

GoogleCodeExporter commented 9 years ago
Re-opened.  Its 16 bytes per 6 pixels.  Which is 2.6666 bpp.  For 1280 width 
this is not an even byte.

Original comment by fbarch...@chromium.org on 30 Aug 2012 at 10:34

GoogleCodeExporter commented 9 years ago
r336 fixes unittest.
Uses 16 bytes per 6 pixels but rounds up to next byte.  e.g.
1280 * 16 / 6 = 3413.33 -> 3414 bytes per row.

Original comment by fbarch...@chromium.org on 30 Aug 2012 at 9:29