| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| | |
Change-Id: I2588c65b7a9fa43f968151a206924a804f0595a7
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Rename listeners to callbacks. Listeners are single-method and are interfaces,
while callbacks are abstract may get more methods in the future.
- Use register/unregister for registering callbacks, not add/remove.
Bug: 17389922
Change-Id: Ic6b46ad79cb43a43a85e2a4b63f059d3af99798b
|
| |
| |
| |
| |
| |
| | |
Leave them in for now until bundled clients complete updating
Change-Id: Ibd0fc971258ce6b649000c48dd7a6716f1ab91d4
|
| |
| |
| |
| |
| |
| | |
It demonstrates basic use of the features of the new Camera2 API.
Change-Id: I593bc682e5c6203754e9a3ee9a78efbd1b208513
|
| |
| |
| |
| |
| |
| |
| | |
* Also adds capture sequence aborted callback
Bug: 12492876
Change-Id: I56ec8edbcda8b64c2262ff7472961ac78042c7f4
|
| |
| |
| |
| | |
Change-Id: I5a84e8e93ac99b5ed0212b37bf66efa5e53864be
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
android.media.MediaCodec
(createByCodecName|createDecoderByType|createEncoderByType)
now explicitly throws IOException.
Requires changes to existing code for declaration compatibility.
Bug: 11364276
Change-Id: I105ecb7c4bd49bf803111253cd23bab161c988f9
Signed-off-by: Andy Hung <hunga@google.com>
|
| |
| |
| |
| |
| |
| | |
This reverts commit 52d8aa79a31c5042d2b43d06f08fa28489b27d1b.
Change-Id: Ic706e0fb469931664499d00fa3a221726b258673
|
|/
|
|
|
|
|
|
|
|
|
|
| |
Change to add "throws IOException" to android.media.MediaCodec
(createByCodecName|createDecoderByType|createEncoderByType). The exception was
previously thrown through the native JNI, but not explicitly declared.
Requires changes to existing code for declaration compatibility.
Bug: 11364276
Change-Id: Ia0d3481397285cb1503bedde37d4651934b3a481
Signed-off-by: Andy Hung <hunga@google.com>
|
|
|
|
|
| |
Bug: 10818732
Change-Id: I536021b9663331532e2f4c21a4fc0f3de5da9aa9
|
|
|
|
| |
Change-Id: I6eb541c96ee50756c35e7785fdae63e8e45e2726
|
|
|
|
|
| |
Bug: 10818732
Change-Id: I6ac08ecab3a1e04116be2f7764d0d5d4f29c5cd9
|
|
Bug: 10818732
Change-Id: Idbc7e370d43a95e8f647541ab1e20071c212382d
|