skufog / libyuv

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

Multiply and Add images #175

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Effects needs optimized image multiply.

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

GoogleCodeExporter commented 9 years ago
r537 adds windows row function to multiply rows of images.

Original comment by fbarch...@google.com on 15 Jan 2013 at 4:45

GoogleCodeExporter commented 9 years ago
r541 ports to posix
LIBYUV_REPEAT=1000 out/Release/libyuv_unittest --gtest_filter=*Mult* | sed 
's/\(.*(\)\([0-9]*\)\( ms)\)/\2 - \1\2\3/g' | sort -rn | grep ms
3216 - [       OK ] libyuvTest.ARGBMultiply_Unaligned (3216 ms)
547 - [       OK ] libyuvTest.ARGBMultiply_Any (547 ms)
533 - [       OK ] libyuvTest.ARGBMultiply_Invert (533 ms)
529 - [       OK ] libyuvTest.ARGBMultiply_Opt (529 ms)
[----------] 4 tests from libyuvTest (4825 ms total)

Original comment by fbarch...@google.com on 17 Jan 2013 at 8:22

GoogleCodeExporter commented 9 years ago
r541 ports to posix.

Original comment by fbarch...@google.com on 17 Jan 2013 at 10:08

GoogleCodeExporter commented 9 years ago
r542 fixes a valgrind error in unittest and makes Multiply take 3 parameters.

Was 2 parameter version
4386 - [       OK ] libyuvTest.ARGBMultiply_Unaligned (4386 ms)
588 - [       OK ] libyuvTest.ARGBMultiply_Any (588 ms)
509 - [       OK ] libyuvTest.ARGBMultiply_Opt (509 ms)
506 - [       OK ] libyuvTest.ARGBMultiply_Invert (506 ms)
[==========] 4 tests from 1 test case ran. (5991 ms total)

Now 3 parameter version
4753 - [       OK ] libyuvTest.ARGBMultiply_Unaligned (4753 ms)
643 - [       OK ] libyuvTest.ARGBMultiply_Any (643 ms)
548 - [       OK ] libyuvTest.ARGBMultiply_Opt (548 ms)
535 - [       OK ] libyuvTest.ARGBMultiply_Invert (535 ms)
[==========] 4 tests from 1 test case ran. (6479 ms total)

3 parameters allows both sources to be untouched.
API matches alpha blend, so regular blend could be changed to an image 
multiplier.
Considering doing other math operations for images - add, sub, xor, with images 
or specified color.  These could be used to create meta effects.
Neon still not done (not able to test at the moment), so keeping bug open.

Original comment by fbarch...@google.com on 18 Jan 2013 at 2:24

GoogleCodeExporter commented 9 years ago
r544 implements ARGBAdd for images.

Original comment by fbarch...@google.com on 19 Jan 2013 at 12:37

GoogleCodeExporter commented 9 years ago
r545 optimizes for Neon.
Not well tested, but marking as fixed.

Original comment by fbarch...@google.com on 21 Jan 2013 at 8:45