530 Commits

Author SHA1 Message Date
Eino-Ville Talvala
3a94b2d22e am 028c2e4e: am 33689420: am eec25a4f: am 1017f986: Merge "Camera2: Add camera type to getNumberOfCameras." into mnc-dev
* commit '028c2e4e264d1d2235e4d0f95d178fdf77510e7e':
  Camera2: Add camera type to getNumberOfCameras.
2015-08-16 02:55:33 +00:00
Eino-Ville Talvala
5717612ba9 Camera2: Add camera type to getNumberOfCameras.
Do not list strange cameras in old API; ensure new API gets all
cameras.

Bug: 23194168
Change-Id: Ia1fdffac245525674c913fefb1ec06e9094fe8d3
2015-08-14 14:52:57 -07:00
Narayan Kamath
fc5e0ba625 am b9f170ff: am b4db7923: Merge "Delete some obsolete test code."
* commit 'b9f170ff99a3ad25623bf20c77eb4f6173577c98':
  Delete some obsolete test code.
2015-07-14 20:27:48 +00:00
Narayan Kamath
b9f170ff99 am b4db7923: Merge "Delete some obsolete test code."
* commit 'b4db7923818393c5c839dba0d43bec36da98759c':
  Delete some obsolete test code.
2015-07-14 11:05:07 +00:00
Narayan Kamath
85bdaae347 Delete some obsolete test code.
- Get rid of obsolete annotations in MediaInserterTest.

- Drop support for @BrokenTest and @SideEffect. Nobody uses
  SideEffect and none of the tests that use this test runner
  (vm-tests-tf, essentially) use @BrokenTest.

Change-Id: Id73c4d4eda8031689f9263c85b563c29e635d446
2015-07-09 18:23:53 +01:00
Hyungtae Tim Kim
333578bcd4 Add bucket that unknown state playback falls into
MediaPlayerStressTest some media files are missing on the results as they
were reported neither completed nor erroneous.
This case will fall into a new category named unknown playback state so that
we could track them in media dashboard.

Bug: 21755950
Change-Id: Iefcc3e375c63d952a7d9edb418208209d87b9e08
2015-06-11 08:33:04 -07:00
Zhijun He
b1300e39c7 Camera2: add high speed video APIs
Interface only.

Bug: 21442271
Change-Id: If81caa0f2dc9f7802af564abcd9541aff3e30901
2015-06-03 17:50:22 -07:00
Glenn Kasten
626f0dc73b Merge "Deprecations are warnings not errors" into mnc-dev 2015-05-28 22:51:17 +00:00
Glenn Kasten
85d99546a0 Deprecations are warnings not errors
Change-Id: Ib77f45fdc27ea53f1dd181f48c76810d03f8dcdb
2015-05-28 07:59:36 -07:00
Marco Nelissen
e796ff912e Handle unknown duration in playMediaSamples test
Bug: 21391417
Change-Id: I85d8f5921e8423da078acfe3aff34a6fcef69e78
2015-05-27 12:33:03 -07:00
Yohann Roussel
7bcaf9a997 [DO NOT MERGE] Allow compilation with Jack.
Adapt to Jack compilation specifics.

Fix bad import in VideoDumpActivity.
The extra semicolumn is ignored by javac because of
https://bugs.openjdk.java.net/browse/JDK-8027682 but is not
permitted by ecj or Jack.

This includes cherry-picks of the following changes:
248ef6f9c414db26fd1bc7ec3d4ee4f3b87d54cf
705555dc468e46560d02db102dfcedc1e5c70d9e
f50a51fb4c8d5ca973ce910a21bddf9f8466cb51
bf5ad8d9943c0e1b0b3f1b4524c277f369065d08

Change-Id: Ifbe063e3822a7d63b1681921b9788cfca898ba64
2015-05-19 18:17:39 +02:00
Chong Zhang
9560ddb48a MediaCodec: rename usePersistentInputSurface to setInputSurface
bug: 21045402
Change-Id: I510a3a694367b8e5a21f4a4fa2a338031fed8991
2015-05-13 10:53:47 -07:00
Harish Mahendrakar
34265cd94f media: Added MPEG2 profile/levels and tests
Bug: 20852831
Change-Id: I172f2f08c30d12bf684f32a52db64823cc286d35
2015-05-05 11:05:22 -07:00
Chong Zhang
ac95f1ac77 MediaRecorderTest: test recording from persistent surface
Bug: 19127604
Bug: 19489395

Change-Id: I17984e0febaf0541a0ce650a07e0c485ffc41c08
2015-05-01 18:37:07 -07:00
Chien-Yu Chen
7a316f6b1b camera2: validate reprocess request's session
Add a session ID to CaptureResult to indicate the session where
the result comes from. When creating a reprocess capture request
with a capture result, the session ID will be carried over to
the reprocess capture request. Reprocess capture request's session
ID will be used to validate that it matches the session ID when
submitting the reprocess capture request to a session.

Bug: 20263212
Change-Id: I024c1a28ecf0a43909a0ed3814a11360c318417f
2015-04-23 15:21:07 -07:00
Eino-Ville Talvala
e9e5a162c0 Merge "Camera2: Add prepare method for output buffer pre-allocation" 2015-04-15 17:56:39 +00:00
Chong Zhang
b6e809bfab Merge "MediaRecorderTest: verify capture fps meta key is set" 2015-04-14 23:54:18 +00:00
Eino-Ville Talvala
ad916f7fd3 Camera2: Add prepare method for output buffer pre-allocation
Normally, buffers for camera output Surfaces are allocated as
needed. This minimizes memory overhead and time to first frame.

However, if allocation takes a long time, as it can do for full-resolution
output buffers, full frame rate may not be maintainable with the added
allocation overhead.

The prepare() method allows an application to indicate that buffers for
a given output Surface should be preallocated by the camera device.
Once the allocation is complete, the onSurfacePrepared callback is invoked.
The application may then use the prepared Surface without concerns about
allocation-caused delays.

Change-Id: I4f616dc87dd4346f408cf1ea37d48a642ceb57da
2015-04-14 16:36:50 -07:00
Chien-Yu Chen
5398a67680 camera2: add reprocess support
Add reprocess API and implementation to support creating reprocess
capture sessions, reprocess requests, and receiving reprocess capture
results.

Change-Id: I4c1c02f41d1712f65e729ea3ba09592a27ffe86d
2015-04-13 17:04:04 -07:00
Chong Zhang
699780f54b MediaRecorderTest: verify capture fps meta key is set
bug: 19460202
Change-Id: I6a98089e560d2bc655e66d5bbe5d93ffb59bbeea
2015-04-07 17:32:36 -07:00
Ruben Brunk
2c2546a296 camera2: Remove ProCamera.
Bug: 19186859
Change-Id: I4aaadb53db65b479f92cbb3c05329d1e40317900
2015-03-20 22:38:54 -07:00
Yin-Chia Yeh
bfbbee7566 Camera: update createStream API to add new rotation field
Change-Id: I0f4343a0bfa7bf09ba887c78a1da1c08daa35333
2015-03-16 13:48:15 -07:00
Eino-Ville Talvala
864005b026 Camera2: Remove unused parameters in ICameraDeviceUser#createStream
- width, height, format are unused

Change-Id: I26540aab1118108b0325df69cfa2dd23da41849b
2015-03-09 11:15:30 -07:00
Chien-Yu Chen
afa91399fd CameraManager: implement flashlight controls
Implement the flashlight controls and callbacks and update the
torch mode states.

Bug: 2682206
Change-Id: I59025f34f9ece75dd535166a25c428b8d68c6e4b
2015-03-03 13:55:07 -08:00
Yohann Roussel
705555dc46 Fix bad import in VideoDumpActivity
The extra semicolumn is ignored by javac because of
https://bugs.openjdk.java.net/browse/JDK-8027682 but is not
permitted by ecj or Jack.

Change-Id: I6a30107e7b4fd5d7ef3dff3380d6829d2a15af3f
2015-01-13 10:24:48 +01:00
Andreas Gampe
307218c7f2 resolved conflicts for merge of 09910723 to lmp-mr1-dev-plus-aosp
Change-Id: I4b47723a9314bf9bef08e68ce269038d0d50c5d9
2014-11-21 09:57:52 -08:00
Andreas Gampe
a4a13480dd Frameworks/base: Wall Werror in media/tests
Turn on -Wall -Werror in media/tests. Fix warnings.

Change-Id: I7177e795d4896f62dfa0b0a5990386e564763384
2014-11-10 18:44:43 -08:00
Leon Scroggins III
b3d2a85b64 am 694fd58d: am fed9888e: Merge "Remove outdated tests for custom decoder." into lmp-mr1-dev
* commit '694fd58dd93b6360ec2204dab731d3c68847478b':
  Remove outdated tests for custom decoder.
2014-10-22 22:39:30 +00:00
Leon Scroggins III
8e8a0d6eaf Remove outdated tests for custom decoder.
These tests don't appear to be meaningful. We are comparing an
unused decoder against one that is used.

Keeping this test building (the primary changes to this directory
in a while) is not believed to be worth the effort.

BUG:17419670
Change-Id: Ia0862f2a1de1fb9d744382bb949f6c1638a1a12a
2014-10-22 18:17:14 +00:00
Neil Fuller
c2a0b4482d resolved conflicts for merge of ee665151 to lmp-mr1-dev-plus-aosp
Change-Id: I2588c65b7a9fa43f968151a206924a804f0595a7
2014-10-02 14:32:37 +01:00
Neil Fuller
f7cf5d43aa resolved conflicts for merge of ee665151 to lmp-dev-plus-aosp
Change-Id: I97671e62de26919e391dbb2686511584c59ab990
2014-10-02 11:48:08 +01:00
Neil Fuller
33253a4baa 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
2014-10-01 14:04:15 +01:00
Shaohan Zou
d097e7ef74 Add Media Player Streaming Tests
Change-Id: I4bb78b0487d158f4ea57349b591f66eda6b325d2
2014-08-27 17:36:51 -07:00
Eino-Ville Talvala
acc0095bc8 Camera2: Correct error handling
- Report capture failures from service to application
- Only go to error state for device-level errors
- Adjust binder interface method names to match the service side names
- Reduce failed session creation logging
- Don't fire CaptureSession.onActive for CameraDevice.onBusy
- Check with session to determine capture failure reason

Bug: 17160301
Bug: 15524101
Bug: 14448494
Bug: 11272459

Change-Id: I9dd606004fd7845910dc865738fbe17f1640f07d
2014-08-27 11:08:18 -07:00
Yin-Chia Yeh
12da140082 Camera2: add highSpeedVideoConfig wrapper and APIs
- Add wrapper class for highSpeedVideoConfiguration.
- Add APIs to query high speed video recording configurations in
  StreamConfigurationMap
- Fix ColorSpaceTransform unit test in CameraMetadataTest
- Fix a bug in HashCodeHelper

Change-Id: I192e57f6ab5dfbba6d958571352f067a9eaec7b2
2014-07-18 16:00:53 -07:00
Naveen Kumar Ponnusamy
ee64575cf7 Added a test for HEVC playback memory usage
Bug: 14571712
Change-Id: If5c4053dea23142b73aed77498c93e149b7ef9b2
2014-07-12 22:13:32 +00:00
Lajos Molnar
b1a236b85f add utility methods to util.Range, Rational and Size
Bug: 12065651
Bug: 11990470
Change-Id: I0d0929ea0289ac5de5c17cca90f25abc4e9dfd7a
2014-07-12 14:12:27 -07:00
Mike Reed
42a1d08df7 SkBitmap::Config is deprecated, use SkColorType
Change-Id: Ida181d2aac760072cf2d01409edac37699dea216
2014-07-07 18:11:24 -04:00
Ying Wang
7c0e6219c3 Fix build.
Change-Id: I2b161a4020862d83347d5a8989467c612fff08db
2014-06-20 17:30:45 -07:00
Mike Reed
402c8f5a07 Merge "stop using (deprecated) SkBitmap::Config" 2014-06-20 00:30:35 +00:00
Mike Reed
b933055cf3 stop using (deprecated) SkBitmap::Config
Change-Id: Ic75b5fc6996578e9d95bd3a220439ec1541d7c3b
2014-06-20 10:28:37 -04:00
Eric Laurent
1cff3844da update SCO audio test app
Added test for startBluetoothScoVirtualCall()

Change-Id: I1b47b60a8c5fb0158d4e224252a9d511c612ca2f
2014-06-20 17:49:06 +00:00
Zhijun He
4c91380114 Camera: Implement HAL1 and higher HAL API coexistence
A higher hal version device like HAL3.2 can be opened as HAL1.0 device
if HAL supports it. This only applies to camera API1.

Change-Id: I4ae9f59f4317158cc1bd7ed7726e4032cdd1fa07
2014-06-19 15:46:02 -07:00
Igor Murashkin
4961bc88d7 camera2: Map camera characteristics in the managed layer
Change-Id: Ic86c8df3d703e7cf89caa856387e2c0a1b977401
2014-06-17 22:55:16 +00:00
Ji-Hwan Lee
162d6999e3 jpeg_bench: Fix checkbuild
Change-Id: I73d82ffc022be4fc78ff0d8b62ab541dd896df24
2014-06-13 20:16:15 +09:00
Igor Murashkin
007bfb14d2 util: Make Rational a Number/Comparable; add Range#inRange
* Also changes Rational to reduce the numerator/denominator by
its greatest common divisor at construction time (e.g. (2/4 -> 1/2)).

Bug: 15432042
Change-Id: Ib827abccf44a040667e5931cf9442afc86b57e2d
2014-06-06 16:38:09 -07:00
Igor Murashkin
5743868e15 camera2: Change android.lens.focusRange to Pair<Float,Float>
Since the focus range is defined in diopters (1/distance), it just so
happens that in a range [near, far] near >= far which is against the
android.util.Range contract.

Change it to pair instead.

Also adds a marshaler for Pairs since they didn't have one before
(and aren't parcelable).

Bug: 15335269
Change-Id: If2f3259aeec072438a1c18c1b9728a4c81e92a40
2014-05-30 11:28:49 -07:00
Yin-Chia Yeh
8298472764 Camera2: Test null TonemapCurve behavior
Add a test to verify we return null TonemapCurve when at least one
channel of tonemap curve is absent.

Bug: 14628001
Change-Id: I3e89dbcf00e5f21b01fc78fe43fe5c4200690357
2014-05-28 15:39:50 -07:00
Yin-Chia Yeh
8490ace76f Camera2: switch API interface to java classses
android.sensor.info.physicalSize: float[] -> SizeF
android.statistics.hotPixelMap: int[] -> Point[]
android.tonemap.curve[Red|Green|Blue]: float[] -> TonemapCurve

Bug: 14628001
Change-Id: I1e085f5e640a059852fcb504b6dd5f884039e653
2014-05-28 01:36:54 -07:00
Igor Murashkin
78712a8bd7 camera2: Add new metadata keys, change types for existing range keys
Also adds the following keys:
* android.control.maxRegionsAe
* android.control.maxRegionsAwb
* android.control.maxRegionsAf
* android.request.maxNumOutputRaw
* android.request.maxNumOutputProc
* android.request.maxNumOutputProcStalling

Changes the following keys' type
generations:
* android.control.aeTargetFpsRange
* (Range<Integer>)
* android.control.aeAvailableTargetFpsRanges
* (Range<Integer>[])
* android.control.aeCompensationRange
* (Range<Integer>)
* android.lens.focusRange
* (Range<Float>)

Bug: 14628001
Change-Id: I141847dffc4b0d89cea37c19a54d6d5faf24a9bb
2014-05-28 01:36:53 -07:00