New issue
Advanced search Search tips

Issue 701227 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

Test camera HAL correctly supports orientation compatibility

Project Member Reported by wuchengli@chromium.org, Mar 14 2017

Issue description

Sheng-hao. Is there a way to add a testcase to ensure camera HAL correctly supports orientation compatibility?
 
Unless we mock the drivers that HAL gets input from, otherwise we don't know if HAL has crop-rotate-scale the frame. In current test framework built by Daniel, there's no way to verify it.
Can we mock sensor driver?

Comment 3 by hywu@google.com, Mar 14 2017

I think sensor output is directly linked with ISP by MIPI interface and we cannot get/mock the input frame even with sensor driver mocked.
A (not so perfect) way is to make two capture requests in sequence with highest ISO; one is crop-rotate-scale-ed while the other is normal. If nothing is moving very fast in the FOV, comparing the two received frames can be useful.

Owner: hywu@chromium.org
Assign to hywu@ for mocking drivers or using test patterns.

I'll send an email to ask the vendor about the sensor test pattern.
Owner: wuchengli@chromium.org

Comment 7 by hywu@chromium.org, Mar 23 2017

There is an optional control metadata ANDROID_SENSOR_TEST_PATTERN_MODE that enables the sensor to sends a test pattern instead of doing a real exposure from the camera. The color bars pattern as below can used to verify whether the frames are crop-rotate-scale-ed as expected. We will need the vendor to support this.
 W Y C G M R B K
 W Y C G M R B K
 W Y C G M R B K
 W Y C G M R B K
 W Y C G M R B K
 . . . . . . . .
 . . . . . . . .
 . . . . . . . .

 (B = Blue, K = Black)

https://developer.android.com/reference/android/hardware/camera2/CaptureRequest.html#SENSOR_TEST_PATTERN_MODE
Owner: shenghao@chromium.org
Let's start from testing USB camera HAL. The test and USB camera HAL can hardcode a test pattern. Please work with Henry which HALv3 metadata to request USB camera HAL to provide test pattern.

Comment 9 by hywu@chromium.org, Apr 18 2017

Owner: hywu@chromium.org
Labels: -videoshortlist camerashortlist

Comment 11 by hywu@chromium.org, Jun 19 2017

Status: Started (was: Assigned)
Project Member

Comment 12 by bugdroid1@chromium.org, Jul 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/1929aae2dc60b990135505c9c4af0dbc2478efa4

commit 1929aae2dc60b990135505c9c4af0dbc2478efa4
Author: Daniel Hung-yu Wu <hywu@chromium.org>
Date: Thu Jul 06 12:00:29 2017

camera3_test: add dependency on libyuv

BUG= chromium:701227 
TEST='emerge-kevin arc-camera3-test'
     'arc_camera3_test
          --gtest_filter=Camera3FrameTest/Camera3PortraitRotationTest.GetFrame/*'
CQ-DEPEND=CL:536554

Change-Id: If293a5d52e42b452c9850f437e0c81bcc9a5ef1f
Reviewed-on: https://chromium-review.googlesource.com/536615
Commit-Ready: Hung-yu Wu <hywu@chromium.org>
Tested-by: Hung-yu Wu <hywu@chromium.org>
Reviewed-by: Heng-ruey Hsu <henryhsu@google.com>

[modify] https://crrev.com/1929aae2dc60b990135505c9c4af0dbc2478efa4/media-libs/arc-camera3-test/arc-camera3-test-9999.ebuild

Project Member

Comment 13 by bugdroid1@chromium.org, Jul 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/arc-camera/+/994c2c4bec6e90dc7744ed29049f4ad226b18e74

commit 994c2c4bec6e90dc7744ed29049f4ad226b18e74
Author: Daniel Hung-yu Wu <hywu@chromium.org>
Date: Thu Jul 06 12:00:28 2017

camera3_test: test portrait orientation compatibility

Validate portrait orientation compatibility utilizing the sensor color
bars fading to grey test pattern. The HAL is requested to output two
frames: one is the original pattern while the other is
crop-rotate-scaled for portrait orientation. The test validates the
second frame against the portrait pattern that it manually converts from
the first frame.

BUG= chromium:701227 
TEST='emerge-kevin arc-camera3-test'
     'arc_camera3_test
     --gtest_filter=Camera3FrameTest/Camera3PortraitRotationTest.GetFrame/*'
CQ-DEPEND=CL:536615

Change-Id: I12e0e7aaecaa7caf0f79936c86db4837919d07e4
Reviewed-on: https://chromium-review.googlesource.com/536554
Commit-Ready: Hung-yu Wu <hywu@chromium.org>
Tested-by: Hung-yu Wu <hywu@chromium.org>
Reviewed-by: Hung-yu Wu <hywu@chromium.org>

[modify] https://crrev.com/994c2c4bec6e90dc7744ed29049f4ad226b18e74/camera3_test/camera3_frame_fixture.h
[modify] https://crrev.com/994c2c4bec6e90dc7744ed29049f4ad226b18e74/camera3_test/camera3_device_fixture.h
[modify] https://crrev.com/994c2c4bec6e90dc7744ed29049f4ad226b18e74/camera3_test/camera3_test_gralloc.cc
[modify] https://crrev.com/994c2c4bec6e90dc7744ed29049f4ad226b18e74/camera3_test/camera3_still_capture_test.cc
[modify] https://crrev.com/994c2c4bec6e90dc7744ed29049f4ad226b18e74/camera3_test/camera3_test_gralloc.h
[modify] https://crrev.com/994c2c4bec6e90dc7744ed29049f4ad226b18e74/camera3_test/camera3_still_capture_fixture.h
[modify] https://crrev.com/994c2c4bec6e90dc7744ed29049f4ad226b18e74/camera3_test/camera3_module_fixture.h
[modify] https://crrev.com/994c2c4bec6e90dc7744ed29049f4ad226b18e74/camera3_test/module.mk
[modify] https://crrev.com/994c2c4bec6e90dc7744ed29049f4ad226b18e74/camera3_test/camera3_device_test.cc
[modify] https://crrev.com/994c2c4bec6e90dc7744ed29049f4ad226b18e74/camera3_test/camera3_frame_test.cc

Project Member

Comment 14 by bugdroid1@chromium.org, Jul 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/arc-camera/+/e0c7ef93df4bd1eaaa00189107005dabbcd8c687

commit e0c7ef93df4bd1eaaa00189107005dabbcd8c687
Author: Heng-Ruey Hsu <henryhsu@chromium.org>
Date: Fri Jul 07 11:10:00 2017

usb: Fix the stride of format conversion for multiple planes

Since we are using android_ycbcr structure, we should use the stride
in the structure instead of calculating it by ourselves.

BUG= chromium:701227 
TEST=NV21 and YV12 in CTS verifier work well

Change-Id: I715c63ba45e7d8bf277cd90ba6a5d3a3a871ca75
Reviewed-on: https://chromium-review.googlesource.com/563142
Commit-Ready: Heng-ruey Hsu <henryhsu@google.com>
Tested-by: Heng-ruey Hsu <henryhsu@google.com>
Reviewed-by: Ricky Liang <jcliang@chromium.org>

[modify] https://crrev.com/e0c7ef93df4bd1eaaa00189107005dabbcd8c687/hal/usb/frame_buffer.cc
[modify] https://crrev.com/e0c7ef93df4bd1eaaa00189107005dabbcd8c687/hal/usb/image_processor.cc
[modify] https://crrev.com/e0c7ef93df4bd1eaaa00189107005dabbcd8c687/hal/usb/frame_buffer.h

Project Member

Comment 15 by bugdroid1@chromium.org, Jul 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/platform/arc-camera/+/301b64a187333f7aee1061696b6d1cd71fc02f3d

commit 301b64a187333f7aee1061696b6d1cd71fc02f3d
Author: Heng-Ruey Hsu <henryhsu@chromium.org>
Date: Tue Jul 18 19:16:11 2017

usb: Add test pattern

When android.sensor.testPatternMode is set, preview should output
color bar. Currently we only support COLOR_BARS_FADE_TO_GRAY.

BUG= chromium:701227 
TEST=Preview show color bar image when metadata is set.
     Pass camera3_test portriat test cases

Change-Id: I10e243456f05d1230e2101803536865e23eb3a62
Reviewed-on: https://chromium-review.googlesource.com/560922
Commit-Ready: Heng-ruey Hsu <henryhsu@google.com>
Tested-by: Heng-ruey Hsu <henryhsu@google.com>
Reviewed-by: Hung-yu Wu <hywu@chromium.org>

[add] https://crrev.com/301b64a187333f7aee1061696b6d1cd71fc02f3d/hal/usb/test_pattern.cc
[modify] https://crrev.com/301b64a187333f7aee1061696b6d1cd71fc02f3d/hal/usb/metadata_handler.cc
[modify] https://crrev.com/301b64a187333f7aee1061696b6d1cd71fc02f3d/hal/usb/cached_frame.cc
[add] https://crrev.com/301b64a187333f7aee1061696b6d1cd71fc02f3d/hal/usb/test_pattern.h
[modify] https://crrev.com/301b64a187333f7aee1061696b6d1cd71fc02f3d/hal/usb/camera_client.cc
[modify] https://crrev.com/301b64a187333f7aee1061696b6d1cd71fc02f3d/hal/usb/camera_client.h
[modify] https://crrev.com/301b64a187333f7aee1061696b6d1cd71fc02f3d/hal/usb/cached_frame.h

Comment 16 by hywu@chromium.org, Aug 3 2017

Status: Fixed (was: Started)

Sign in to add a comment