Gamaru / libyuv

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

Error: Unexpected C functions with LIBYUV_FLAGS=-1 #543

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
Set LIBYUV_FLAGS=-1 so unittests will not disable SIMD.
expect no C functions to be called.

When Complete list of C functions:
LIBYUV_FLAGS=-1 LIBYUV_WIDTH=640 LIBYUV_HEIGHT=360 perf record 
out/Release/libyuv_unittest --gtest_filter=*
perf report | grep _C

# HEADER_CPU_TOPOLOGY info available, use -I to display
     1.60%  libyuv_unittest  libyuv_unittest      [.] libyuv::ScaleAddCols1_C(int, int, int, int, unsigned short const*, unsigned char*)
     1.60%  libyuv_unittest  libyuv_unittest      [.] ScaleCols_C
     0.65%  libyuv_unittest  libyuv_unittest      [.] ARGBToUV411Row_C
     0.31%  libyuv_unittest  libyuv_unittest      [.] ScaleARGBRowDownEven_C
     0.13%  libyuv_unittest  libyuv_unittest      [.] libyuv::ScaleAddCols2_C(int, int, int, int, unsigned short const*, unsigned char*)
     0.09%  libyuv_unittest  libyuv_unittest      [.] ScaleColsUp2_C
     0.04%  libyuv_unittest  libyuv_unittest      [.] MirrorUVRow_C
     0.02%  libyuv_unittest  libyuv_unittest      [.] TransposeWx8_C
     0.01%  libyuv_unittest  libyuv_unittest      [.] TransposeWxH_C
     0.01%  libyuv_unittest  libyuv_unittest      [.] ScaleRowDown34_0_Box_C
     0.01%  libyuv_unittest  libyuv_unittest      [.] ScaleRowDown2Box_C
     0.00%  libyuv_unittest  libyuv_unittest      [.] ScaleRowDown34_1_Box_C
     0.00%  libyuv_unittest  libyuv_unittest      [.] TransposeUVWx8_C
     0.00%  libyuv_unittest  libyuv_unittest      [.] ScaleRowDown38_3_Box_C
     0.00%  libyuv_unittest  libyuv_unittest      [.] ScaleRowDown38_2_Box_C
     0.00%  libyuv_unittest  libyuv_unittest      [.] libyuv::LibYUVConvertTest_CropNV12_Test::TestBody()
     0.00%  libyuv_unittest  libyuv_unittest      [.] ScaleRowDown34_C
     0.00%  libyuv_unittest  libyuv_unittest      [.] ScaleRowDown38_C
     0.00%  libyuv_unittest  libyuv_unittest      [.] BlendPlaneRow_C
     0.00%  libyuv_unittest  libyuv_unittest      [.] ARGBToUVJ422Row_C

Note 1 perf is a sampling profiler, so a quicker test misses some.
Note 2 C is used for odd width handling in some code

Original issue reported on code.google.com by fbarch...@google.com on 8 Jan 2016 at 12:18

GoogleCodeExporter commented 8 years ago
MirrorUVRow_C
#ifdef HAS_MIRRORROW_UV_SSSE3
is wrong ifdef.

BlendPlaneRow_C
just old unittest.  remove.

ignore scale for now.  Investigate:
ARGBToUV411Row_C
TransposeWx8_C
TransposeWxH_C
TransposeUVWx8_C

Original comment by fbarch...@google.com on 12 Jan 2016 at 12:22

GoogleCodeExporter commented 8 years ago
The following revision refers to this bug:
  https://chromium.googlesource.com/libyuv/libyuv.git/+/23c6a83561d324fc1cec47f7ab14b583a812d236

commit 23c6a83561d324fc1cec47f7ab14b583a812d236
Author: Frank Barchard <fbarchard@google.com>
Date: Tue Jan 12 00:33:36 2016

Fix ifdef mismatch for mirroruv

Macro define and macro ifdef didnt match, leading to C code
being used.  Make macro match function name.

TBR=harryjin@google.com
BUG=libyuv:543

Review URL: https://codereview.chromium.org/1579023002 .

[modify] 
http://crrev.com/23c6a83561d324fc1cec47f7ab14b583a812d236/include/libyuv/row.h
[modify] 
http://crrev.com/23c6a83561d324fc1cec47f7ab14b583a812d236/source/rotate.cc
[modify] 
http://crrev.com/23c6a83561d324fc1cec47f7ab14b583a812d236/source/row_gcc.cc
[modify] 
http://crrev.com/23c6a83561d324fc1cec47f7ab14b583a812d236/source/row_win.cc
[modify] 
http://crrev.com/23c6a83561d324fc1cec47f7ab14b583a812d236/unit_test/planar_test.
cc

Original comment by bugdroid1@chromium.org on 12 Jan 2016 at 12:34

GoogleCodeExporter commented 8 years ago
LIBYUV_FLAGS=-1 LIBYUV_WIDTH=1280 LIBYUV_HEIGHT=720 LIBYUV_REPEAT=1000 perf 
record out/Release/libyuv_unittest --gtest_filter=*
perf report >out.txt
grep _C out.txt

libyuv::ScaleAddCols1_C(int, int, int, int, unsigned short const*, unsigned 
char*)
ScaleCols_C
ARGBToUV411Row_C
ScaleARGBRowDownEven_C
libyuv::ScaleAddCols2_C(int, int, int, int, unsigned short const*, unsigned 
har*)
ScaleColsUp2_C
MirrorUVRow_C
TransposeWx8_C
TransposeWxH_C
ScaleRowDown34_0_Box_C
ScaleRowDown2Box_C
ScaleRowDown34_1_Box_C
ScaleRowDown38_3_Box_C
TransposeUVWx8_C
ScaleRowDown38_2_Box_C
ScaleRowDown34_C
ScaleRowDown38_C
ARGBToUVJ422Row_C
FixedDiv_C

Original comment by fbarch...@google.com on 12 Jan 2016 at 1:00

GoogleCodeExporter commented 8 years ago
The following revision refers to this bug:
  https://chromium.googlesource.com/libyuv/libyuv.git/+/8030a711aa6bdbbdea072c03f241d9951fa1d568

commit 8030a711aa6bdbbdea072c03f241d9951fa1d568
Author: Frank Barchard <fbarchard@google.com>
Date: Tue Jan 12 01:30:27 2016

Rename rotate tests to include _Opt and disable _Odd tests

TBR=harryjin@google.com
BUG=libyuv:543

Review URL: https://codereview.chromium.org/1577723003 .

[modify] 
http://crrev.com/8030a711aa6bdbbdea072c03f241d9951fa1d568/README.chromium
[modify] 
http://crrev.com/8030a711aa6bdbbdea072c03f241d9951fa1d568/include/libyuv/version
.h
[modify] 
http://crrev.com/8030a711aa6bdbbdea072c03f241d9951fa1d568/unit_test/rotate_argb_
test.cc
[modify] 
http://crrev.com/8030a711aa6bdbbdea072c03f241d9951fa1d568/unit_test/rotate_test.
cc

Original comment by bugdroid1@chromium.org on 12 Jan 2016 at 1:30

GoogleCodeExporter commented 8 years ago
LibYUVColorTest fail
LibYUVConvertTest fail
LibYUVScaleTest fail
LibYUVRotateTest pass
LibYUVPlanarTest fail
LibYUVBaseTest pass

LIBYUV_FLAGS=-1 LIBYUV_WIDTH=1280 LIBYUV_HEIGHT=720 LIBYUV_REPEAT=1000 perf 
record out/Release/libyuv_unittest --gtest_filter=*ColorTest*
ARGBToUVJ422Row_C

LIBYUV_FLAGS=-1 LIBYUV_WIDTH=1280 LIBYUV_HEIGHT=720 LIBYUV_REPEAT=1000 perf 
record out/Release/libyuv_unittest --gtest_filter=*PlanarTest*
perf report >out.txt
grep _C out.txt
# HEADER_CPU_TOPOLOGY info available, use -I to display
     0.02%  libyuv_unittest  libyuv_unittest      [.] ScaleRowDown2Box_C

LIBYUV_FLAGS=-1 LIBYUV_WIDTH=1280 LIBYUV_HEIGHT=720 LIBYUV_REPEAT=1000 perf 
record out/Release/libyuv_unittest --gtest_filter=*ConvertTest*
perf report >out.txt
grep _C out.txt

ARGBToUV411Row_C
ScaleRowDown2Box_C

LIBYUV_FLAGS=-1 LIBYUV_WIDTH=1280 LIBYUV_HEIGHT=720 LIBYUV_REPEAT=1000 perf 
record out/Release/libyuv_unittest --gtest_filter=*ScaleTest*
libyuv::ScaleAddCols1_C(int, int, int, int, unsigned short const*, unsigned 
char*)
ScaleCols_C
libyuv::ScaleAddCols2_C(int, int, int, int, unsigned short const*, unsigned 
char*)
ScaleColsUp2_C
ScaleRowDown34_0_Box_C
ScaleRowDown34_1_Box_C
ScaleRowDown38_3_Box_C
ScaleRowDown38_C
ScaleRowDown38_2_Box_C
ScaleRowDown34_C

Original comment by fbarch...@google.com on 12 Jan 2016 at 2:16

GoogleCodeExporter commented 8 years ago
The following revision refers to this bug:
  https://chromium.googlesource.com/libyuv/libyuv.git/+/54bbea17013fa703ad3d645ffdabb7fffeef2615

commit 54bbea17013fa703ad3d645ffdabb7fffeef2615
Author: Frank Barchard <fbarchard@google.com>
Date: Tue Jan 12 02:23:04 2016

Disable I420Blend_Any test that uses C

Also renames Inverted to Invert in test name for consistency.

TBR=harryjin@google.com
BUG=libyuv:543

Review URL: https://codereview.chromium.org/1577973004 .

[modify] 
http://crrev.com/54bbea17013fa703ad3d645ffdabb7fffeef2615/include/libyuv/row.h
[modify] 
http://crrev.com/54bbea17013fa703ad3d645ffdabb7fffeef2615/unit_test/planar_test.
cc
[modify] 
http://crrev.com/54bbea17013fa703ad3d645ffdabb7fffeef2615/unit_test/rotate_test.
cc

Original comment by bugdroid1@chromium.org on 12 Jan 2016 at 2:23

GoogleCodeExporter commented 8 years ago
LibYUVColorTest pass
LibYUVConvertTest fail 
LibYUVScaleTest fail
LibYUVRotateTest pass
LibYUVPlanarTest pass
LibYUVBaseTest pass

LIBYUV_FLAGS=-1 LIBYUV_WIDTH=1280 LIBYUV_HEIGHT=720 LIBYUV_REPEAT=1000 perf 
record out/Release/libyuv_unittest --gtest_filter=*ConvertTest*
perf report >out.txt
grep _C out.txt

ARGBToUV411Row_C
ScaleRowDown2Box_C

Original comment by fbarch...@google.com on 13 Jan 2016 at 2:47

GoogleCodeExporter commented 8 years ago
The following revision refers to this bug:
  https://chromium.googlesource.com/libyuv/libyuv.git/+/085bfc1d0493bdc9d4bcb13d9f28f6ed8f4e7ba1

commit 085bfc1d0493bdc9d4bcb13d9f28f6ed8f4e7ba1
Author: Frank Barchard <fbarchard@google.com>
Date: Wed Jan 20 00:43:51 2016

Rename test from CropNV12 to NV12Crop

When scanning profiles for unexpected _C functions
this test function contained the substring.
Changing the name will simplify the search.

TBR=harryjin@google.com
BUG=libyuv:543

Review URL: https://codereview.chromium.org/1602363002 .

[modify] 
http://crrev.com/085bfc1d0493bdc9d4bcb13d9f28f6ed8f4e7ba1/unit_test/convert_test
.cc

Original comment by bugdroid1@chromium.org on 20 Jan 2016 at 12:44

GoogleCodeExporter commented 8 years ago
# HEADER_CPU_TOPOLOGY info available, use -I to display
     1.80%  libyuv_unittest  libyuv_unittest      [.] ARGBToUV411Row_C                                                                                                                                                                                                                                              
     0.01%  libyuv_unittest  libyuv_unittest      [.] ScaleRowDown2Box_C                                                                    

Original comment by fbarch...@google.com on 26 Jan 2016 at 1:00

GoogleCodeExporter commented 8 years ago
LIBYUV_FLAGS=-1 LIBYUV_WIDTH=640 LIBYUV_HEIGHT=360 perf record 
out/Release/libyuv_unittest --gtest_filter=*
perf report | grep Row_C

Samples in kernel modules can't be resolved as well.

     0.03%  libyuv_unittest  libyuv_unittest      [.] ARGBToUV411Row_C                                                                           

Original comment by fbarch...@google.com on 18 Feb 2016 at 2:13