myrao / libyuv

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

YUV scaling high overhead #244

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Scaling test shows large difference between OPT and total time

LIBYUV_WIDTH=640 LIBYUV_HEIGHT=360 LIBYUV_REPEAT=4000 
out/Release/libyuv_unittest --gtest_filter=*ScaleFrom1366x768_Box

[ RUN      ] libyuvTest.ScaleFrom1366x768_Box
filter 2 -     2615 us C -     2225 us OPT
[       OK ] libyuvTest.ScaleFrom1366x768_Box (8929 ms)

Original issue reported on code.google.com by fbarch...@google.com on 6 Jun 2013 at 2:38

GoogleCodeExporter commented 9 years ago
This appears to be legitimate function overhead, not unittest.

Same number of pixels:
LIBYUV_WIDTH=1280 LIBYUV_HEIGHT=720 LIBYUV_REPEAT=1000 
out/Release/libyuv_unittest --gtest_filter=*ScaleFrom1366x768_Box

[ RUN      ] libyuvTest.ScaleFrom1366x768_Box
filter 2 -     3765 us C -     1869 us OPT,        1 ms test
[       OK ] libyuvTest.ScaleFrom1366x768_Box (1885 ms)
[----------] 1 test from libyuvTest (1886 ms total)

The ARGB scale function has less overhead.  Partially because its optimized for 
less overhead due to clipping requirement.  But also its the nature of YUV with 
3 planes.

Original comment by fbarch...@google.com on 7 Jun 2013 at 8:14

GoogleCodeExporter commented 9 years ago
The issue was simply the reporting of values
2225 us OPT is for VGA with 4000 iterations.
2225 us * 4000 = 8900 ms
which is in line with 8929 ms total.
r721 reduces overhead of the scale unittests with a Randomize that is 4x faster.

Original comment by fbarch...@google.com on 10 Jun 2013 at 5:18