ganzhijie / libyuv

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

ScaleTo569x480_Bilinear fails on AVX2 code #376

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This test fails with AVX2 code enabled using the intelsde emulator.

Fail:
set LIBYUV_DISABLE_AVX2=

d:\src\libyuv\trunk>c:\intelsde\sde -ast -hsw -- 
out\release\libyuv_unittest.exe 
--gtest_filter=libyuvTest.ScaleTo569x480_Bilinear
Note: Google Test filter = libyuvTest.ScaleTo569x480_Bilinear
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from libyuvTest
[ RUN      ] libyuvTest.ScaleTo569x480_Bilinear
filter 2 -    32777 us C -    28695 us OPT

Pass:
set LIBYUV_DISABLE_AVX2=1
c:\intelsde\sde -ast -hsw -- out\release\libyuv_unittest.exe 
--gtest_filter=libyuvTest.ScaleTo569x480_Bilinear

Note: Google Test filter = libyuvTest.ScaleTo569x480_Bilinear
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from libyuvTest
[ RUN      ] libyuvTest.ScaleTo569x480_Bilinear
filter 2 -    31064 us C -    12313 us OPT
[       OK ] libyuvTest.ScaleTo569x480_Bilinear (167 ms)
[----------] 1 test from libyuvTest (192 ms total)

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

Pass:
d:\src\libyuv\trunk>c:\intelsde\sde -ast -snb -- 
out\release\libyuv_unittest.exe 
--gtest_filter=libyuvTest.ScaleTo569x480_Bilinear
Note: Google Test filter = libyuvTest.ScaleTo569x480_Bilinear
[==========] Running 1 test from 1 test case.
[----------] Global test environment set-up.
[----------] 1 test from libyuvTest
[ RUN      ] libyuvTest.ScaleTo569x480_Bilinear
filter 2 -    34276 us C -    12893 us OPT
[       OK ] libyuvTest.ScaleTo569x480_Bilinear (182 ms)
[----------] 1 test from libyuvTest (208 ms total)

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

Original issue reported on code.google.com by fbarch...@google.com on 21 Oct 2014 at 10:26

GoogleCodeExporter commented 9 years ago
r1134 disables the AVX2 and passes.

Original comment by fbarch...@google.com on 21 Oct 2014 at 11:10

GoogleCodeExporter commented 9 years ago
r1135 fixes 2 issues
The any function was masking with 32 instead of 31.
The vpavgb was using a memory reference requiring aligned pointers.
Changed to movdqu.

The known issue is fixed, but follow up to ensure no other math ops use memory 
directly.

Original comment by fbarch...@google.com on 22 Oct 2014 at 6:58

GoogleCodeExporter commented 9 years ago

Original comment by fbarch...@google.com on 1 Nov 2014 at 1:06