myrao / libyuv

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

height = 1 causes some unittests and/or functions to fail #202

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
set LIBYUV_HEIGHT=1
out\release\libyuv_unittest --gtest_filter=*

Some tests will fail.
e.g.
[ RUN      ] libyuvTest.BayerBGGRToI420_Opt
d:\src\libyuv2\trunk\unit_test\convert_test.cc(706): error: Expected: 
(max_diff) <= (4), actual: 54 vs 4

Some are due to odd height.
Most are likely due to subsampling.
These pass
out\release\libyuv_unittest --gtest_filter=*R*R*

Original issue reported on code.google.com by fbarch...@chromium.org on 13 Mar 2013 at 9:09

GoogleCodeExporter commented 9 years ago
width of 1 has an issue in the unittests that use width - 1 to test odd width.
The tests should clamp width and height to a minimum of 1 to avoid 0 or 
negatives.

Original comment by fbarch...@google.com on 27 Mar 2013 at 4:29

GoogleCodeExporter commented 9 years ago
r705 fixes rotate unittests.

Original comment by fbarch...@google.com on 28 May 2013 at 10:45

GoogleCodeExporter commented 9 years ago
Width = 1 fails are down to:
[  PASSED  ] 639 tests.
[  FAILED  ] 17 tests, listed below:
[  FAILED  ] libyuvTest.Psnr
[  FAILED  ] libyuvTest.I420ToBayerBGGR_Any
[  FAILED  ] libyuvTest.I420ToBayerBGGR_Unaligned
[  FAILED  ] libyuvTest.I420ToBayerBGGR_Invert
[  FAILED  ] libyuvTest.I420ToBayerBGGR_Opt
[  FAILED  ] libyuvTest.I420ToBayerRGGB_Any
[  FAILED  ] libyuvTest.I420ToBayerRGGB_Unaligned
[  FAILED  ] libyuvTest.I420ToBayerRGGB_Invert
[  FAILED  ] libyuvTest.I420ToBayerRGGB_Opt
[  FAILED  ] libyuvTest.I420ToBayerGBRG_Any
[  FAILED  ] libyuvTest.I420ToBayerGBRG_Unaligned
[  FAILED  ] libyuvTest.I420ToBayerGBRG_Invert
[  FAILED  ] libyuvTest.I420ToBayerGBRG_Opt
[  FAILED  ] libyuvTest.I420ToBayerGRBG_Any
[  FAILED  ] libyuvTest.I420ToBayerGRBG_Unaligned
[  FAILED  ] libyuvTest.I420ToBayerGRBG_Invert
[  FAILED  ] libyuvTest.I420ToBayerGRBG_Opt

Original comment by fbarch...@google.com on 30 May 2013 at 7:39

GoogleCodeExporter commented 9 years ago
This test fails with 10000x10000
[ RUN      ] libyuvTest.I420ToARGB1555_Any

Original comment by fbarch...@google.com on 30 May 2013 at 10:42

GoogleCodeExporter commented 9 years ago
Blur fails with height of 1

set LIBYUV_HEIGHT=1
out\debug\libyuv_unittest.exe --gtest_catch_exceptions=0 --gtest_filter=*Blur*

If width or height is less than radius, test crashes.

Original comment by fbarch...@google.com on 24 Sep 2013 at 5:53

GoogleCodeExporter commented 9 years ago
r810 blur passes

[  PASSED  ] 720 tests.
[  FAILED  ] 20 tests, listed below:
[  FAILED  ] libyuvTest.Psnr
[  FAILED  ] libyuvTest.I420ToBayerBGGR_Any
[  FAILED  ] libyuvTest.I420ToBayerBGGR_Unaligned
[  FAILED  ] libyuvTest.I420ToBayerBGGR_Invert
[  FAILED  ] libyuvTest.I420ToBayerBGGR_Opt
[  FAILED  ] libyuvTest.I420ToBayerRGGB_Any
[  FAILED  ] libyuvTest.I420ToBayerRGGB_Unaligned
[  FAILED  ] libyuvTest.I420ToBayerRGGB_Invert
[  FAILED  ] libyuvTest.I420ToBayerRGGB_Opt
[  FAILED  ] libyuvTest.I420ToBayerGBRG_Any
[  FAILED  ] libyuvTest.I420ToBayerGBRG_Unaligned
[  FAILED  ] libyuvTest.I420ToBayerGBRG_Invert
[  FAILED  ] libyuvTest.I420ToBayerGBRG_Opt
[  FAILED  ] libyuvTest.I420ToBayerGRBG_Any
[  FAILED  ] libyuvTest.I420ToBayerGRBG_Unaligned
[  FAILED  ] libyuvTest.I420ToBayerGRBG_Invert
[  FAILED  ] libyuvTest.I420ToBayerGRBG_Opt
[  FAILED  ] libyuvTest.ScaleFrom1280x720_Box
[  FAILED  ] libyuvTest.ScaleFrom1280x800_Box
[  FAILED  ] libyuvTest.ScaleFrom1920x1080_Box

20 FAILED TESTS

Original comment by fbarch...@google.com on 13 Oct 2013 at 3:01

GoogleCodeExporter commented 9 years ago
Psnr is just the nature of a difference - adjust in unittest

I420ToBayerBGGR and BayerToI420 currently have subsample alignment constraints 
with both X and Y odd sizes.  As Bayer is not a common format, adjust unittest 
to align width and height for bayer with TODO to investigate later.

ScaleFrom1280x720_Box is a bug in the C code with uint16 overflow.

Original comment by fbarch...@google.com on 14 Oct 2013 at 3:06

GoogleCodeExporter commented 9 years ago
Fixed in r801

Original comment by fbarch...@google.com on 14 Oct 2013 at 7:44