• Home
  • History
  • Annotate
  • only in /frameworks/base/media/mca/filterfw/java/android/
History log of /frameworks/base/media/mca/filterfw/java/android/
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
c2a0b4482d7144e8382346ea4c22c7b89368fec0 02-Oct-2014 Neil Fuller <nfuller@google.com> resolved conflicts for merge of ee665151 to lmp-mr1-dev-plus-aosp

Change-Id: I2588c65b7a9fa43f968151a206924a804f0595a7
33253a4baa6279f81a73425b49dfb6abe5f5416e 01-Oct-2014 Neil Fuller <nfuller@google.com> Switch from FloatMath -> Math and Math.hypot where possible

The motivation is an API change: FloatMath is going to be
deprecated and/or removed. Performance is not the goal of
this change.

That said...

Math is faster than FloatMath with AOT compilation.

While making the change, occurances of:

{Float}Math.sqrt(x * x + y * y) and
{Float}Math.sqrt({Float}Math.pow(x, 2) + {Float}Math.pow(y, 2))

have been replaced with:

{(float)} Math.hypot(x, y)

Right now there is no runtime intrinsic for hypot so is not faster
in all cases for AOT compilation:

Math.sqrt(x * x + y * y) is faster than Math.hypot(x, y) with
AOT, but all other combinations of FloatMath, use of pow() etc.
are slower than hypot().

hypot() has the advantage of being self documenting and
could be optimized in future. None of the behavior differences
around NaN and rounding appear to be important for the cases
looked at: they all assume results and arguments are in range
and usually the results are cast to float.

Different implementations measured on hammerhead / L:

AOT compiled:

[FloatMath.hypot(x, y)]
benchmark=Hypot_FloatMathHypot} 633.85 ns; σ=0.32 ns @ 3 trials

[FloatMath.sqrt(x*x + y*y)]
benchmark=Hypot_FloatMathSqrtMult} 684.17 ns; σ=4.83 ns @ 3 trials

[FloatMath.sqrt(FloatMath.pow(x, 2) + FloatMath.pow(y, 2))]
benchmark=Hypot_FloatMathSqrtPow} 1270.65 ns; σ=12.20 ns @ 6 trials

[(float) Math.hypot(x, y)]
benchmark=Hypot_MathHypot} 96.80 ns; σ=0.05 ns @ 3 trials

[(float) Math.sqrt(x*x + y*y)]
benchmark=Hypot_MathSqrtMult} 23.97 ns; σ=0.01 ns @ 3 trials

[(float) Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2))]
benchmark=Hypot_MathSqrtPow} 156.19 ns; σ=0.12 ns @ 3 trials

Interpreter:

benchmark=Hypot_FloatMathHypot} 1180.54 ns; σ=5.13 ns @ 3 trials
benchmark=Hypot_FloatMathSqrtMult} 1121.05 ns; σ=3.80 ns @ 3 trials
benchmark=Hypot_FloatMathSqrtPow} 3327.14 ns; σ=7.33 ns @ 3 trials
benchmark=Hypot_MathHypot} 856.57 ns; σ=1.41 ns @ 3 trials
benchmark=Hypot_MathSqrtMult} 1028.92 ns; σ=9.11 ns @ 3 trials
benchmark=Hypot_MathSqrtPow} 2539.47 ns; σ=24.44 ns @ 3 trials

Bug: https://code.google.com/p/android/issues/detail?id=36199
Change-Id: I06c91f682095e627cb547d60d936ef87941be692
ilterfw/geometry/Point.java
6090995951c6e2e4dcf38102f01793f8a94166e1 19-Nov-2013 John Spurlock <jspurlock@google.com> Remove unused imports from frameworks/base.

Change-Id: Ia1f99bd2c1105b0b0f70aa614f1f4a67b2840906
ilterfw/FilterFunctionEnvironment.java
ilterfw/core/AsyncRunner.java
ilterfw/core/Filter.java
ilterfw/core/Frame.java
ilterfw/core/NativeFrame.java
ilterfw/core/OneShotScheduler.java
ilterfw/core/SerializedFrame.java
ilterfw/core/SimpleFrame.java
22edf6b2e4e75195b83ae1c4da61e3bf623802b0 01-May-2012 Ruei-sung Lin <rslin@google.com> Fix b/5821633: Could not activate GLEnvironment

Change-Id: I35a05eb24299b85a869b973599a091381369aac2
ilterfw/core/GLEnvironment.java
65953da4636fbf5f0a24b8f5f2b5fa7d76ff13d9 27-Mar-2012 Marius Renn <renn@google.com> Multi-Project Commit: Move of filterfw out of system/media (2 of 7)

This is part of the multi-project commit to move the filter-framework
from system/media/mca to frameworks/base/media/mca.

Note that the filter-framework will soon be replaced with a refactored
version currently under API review (also to go under frameworks/base).
This move is done now to unblock the PDK efforts.

Change-Id: I9f42be5a12a9e8157512be11f04e38e4548970be
ilterfw/FilterFunctionEnvironment.java
ilterfw/GraphEnvironment.java
ilterfw/MffEnvironment.java
ilterfw/core/AsyncRunner.java
ilterfw/core/CachedFrameManager.java
ilterfw/core/FieldPort.java
ilterfw/core/Filter.java
ilterfw/core/FilterContext.java
ilterfw/core/FilterFactory.java
ilterfw/core/FilterFunction.java
ilterfw/core/FilterGraph.java
ilterfw/core/FilterPort.java
ilterfw/core/FilterSurfaceView.java
ilterfw/core/FinalPort.java
ilterfw/core/Frame.java
ilterfw/core/FrameFormat.java
ilterfw/core/FrameManager.java
ilterfw/core/GLEnvironment.java
ilterfw/core/GLFrame.java
ilterfw/core/GenerateFieldPort.java
ilterfw/core/GenerateFinalPort.java
ilterfw/core/GenerateProgramPort.java
ilterfw/core/GenerateProgramPorts.java
ilterfw/core/GraphRunner.java
ilterfw/core/InputPort.java
ilterfw/core/KeyValueMap.java
ilterfw/core/MutableFrameFormat.java
ilterfw/core/NativeAllocatorTag.java
ilterfw/core/NativeBuffer.java
ilterfw/core/NativeFrame.java
ilterfw/core/NativeProgram.java
ilterfw/core/OneShotScheduler.java
ilterfw/core/OutputPort.java
ilterfw/core/Program.java
ilterfw/core/ProgramPort.java
ilterfw/core/ProgramVariable.java
ilterfw/core/ProtocolException.java
ilterfw/core/RandomScheduler.java
ilterfw/core/RoundRobinScheduler.java
ilterfw/core/Scheduler.java
ilterfw/core/SerializedFrame.java
ilterfw/core/ShaderProgram.java
ilterfw/core/SimpleFrame.java
ilterfw/core/SimpleFrameManager.java
ilterfw/core/SimpleScheduler.java
ilterfw/core/StopWatchMap.java
ilterfw/core/StreamPort.java
ilterfw/core/SyncRunner.java
ilterfw/core/VertexFrame.java
ilterfw/core/package-info.java
ilterfw/format/ImageFormat.java
ilterfw/format/ObjectFormat.java
ilterfw/format/PrimitiveFormat.java
ilterfw/format/package-info.java
ilterfw/geometry/Point.java
ilterfw/geometry/Quad.java
ilterfw/geometry/Rectangle.java
ilterfw/geometry/package-info.java
ilterfw/io/GraphIOException.java
ilterfw/io/GraphReader.java
ilterfw/io/PatternScanner.java
ilterfw/io/TextGraphReader.java
ilterfw/io/package-info.java