New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 819847 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: May 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Feature



Sign in to add a comment

JEA: construct IPC between ChromeOS and Chromium

Project Member Reported by shenghao@chromium.org, Mar 7 2018

Issue description

Constructs the IPC between ChromeOS and Chromium so that camera HAL in ChromeOS can utilize HW Jpeg Encode Accelerator (JEA).

This should be very similar to the IPC for JDA: https://chromium-review.googlesource.com/c/chromium/src/+/670541


 
Components: Internals>Media>Capture
Naive question: Why would a camera need to _encode_ YUV into JPEG? :-)

Component classification: What does this have to do with the OS>Kernel? 
Do you expect any Kernel work here? Sounds like Internals>Media>Capture 
or similar could be a better fit.
We use OS>Kernel>Camera for platform camera issues as well.

We need JEA for still capture on MIPI cameras, where the buffer provided by the camera HAL is of YUV format and needs to be encoded to JPEG.
Project Member

Comment 3 by bugdroid1@chromium.org, Mar 9 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/eead1e759579e612607122e50e9e5a09da71271c

commit eead1e759579e612607122e50e9e5a09da71271c
Author: Sheng-Hao Tsao <shenghao@google.com>
Date: Fri Mar 09 19:43:30 2018

Add Exif and IPC compatibility to JEA interface

This CL adds 2 things to JEA interface.

1. Exif. Currently HW JEA only encodes the image with APP0 JFIF segment.
After this CL, it accepts Exif buffer and would insert the APP1 segment
if Exif buffer is provided.

2. IPC compatibility.
IPC from ChromeOS side relies on the buffer ID to identify the encoded
results. The ID of VideoFrame is generated randomly at Chromium side
which ChromeOS doesn't know. The CL changes JEA interface to use output
buffer ID to identify each encode attemp.

BUG= 819847 
TEST=Verified that JEA can be used from ChromeOS side with Exif buffer.

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I87f13a435f9875999ca79dd5769fb925a9c59fb8
Reviewed-on: https://chromium-review.googlesource.com/954411
Commit-Queue: Sheng-hao Tsao <shenghao@google.com>
Reviewed-by: Ricky Liang <jcliang@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#542200}
[modify] https://crrev.com/eead1e759579e612607122e50e9e5a09da71271c/media/filters/jpeg_parser.h
[modify] https://crrev.com/eead1e759579e612607122e50e9e5a09da71271c/media/gpu/jpeg_encode_accelerator_unittest.cc
[modify] https://crrev.com/eead1e759579e612607122e50e9e5a09da71271c/media/gpu/vaapi/vaapi_jpeg_encode_accelerator.cc
[modify] https://crrev.com/eead1e759579e612607122e50e9e5a09da71271c/media/gpu/vaapi/vaapi_jpeg_encode_accelerator.h
[modify] https://crrev.com/eead1e759579e612607122e50e9e5a09da71271c/media/gpu/vaapi/vaapi_jpeg_encoder.cc
[modify] https://crrev.com/eead1e759579e612607122e50e9e5a09da71271c/media/gpu/vaapi/vaapi_jpeg_encoder.h
[modify] https://crrev.com/eead1e759579e612607122e50e9e5a09da71271c/media/video/jpeg_encode_accelerator.h

Project Member

Comment 4 by bugdroid1@chromium.org, Mar 20 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/941a9cd01fff5a2028adc50c50d707df9ff2f176

commit 941a9cd01fff5a2028adc50c50d707df9ff2f176
Author: Sheng-Hao Tsao <shenghao@google.com>
Date: Tue Mar 20 04:47:06 2018

IPC from ChromeOS to Chrome for using JEA

Jpeg Encode Accelerator (JEA) was implemented and ready to be used from
ChromeOS side. This CL adds IPC between ChromeOS and Chromium so that
camera HAL in ChromeOS can take advantage of JEA.

BUG= 819847 
TEST=Together with
https://chromium-review.googlesource.com/c/chromium/src/+/917932,
verified that encoding a YUV image successfully with HW JEA on Chromium
side.

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: I639cdf1c5947c33b0d0f9a5b1b00bd685bb596d8
Reviewed-on: https://chromium-review.googlesource.com/917932
Commit-Queue: Sheng-hao Tsao <shenghao@google.com>
Reviewed-by: Daniel Cheng <dcheng@chromium.org>
Reviewed-by: Emircan Uysaler <emircan@chromium.org>
Reviewed-by: Ricky Liang <jcliang@chromium.org>
Reviewed-by: kylechar <kylechar@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Christian Fremerey <chfremer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#544282}
[modify] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/components/viz/host/server_gpu_memory_buffer_manager_unittest.cc
[modify] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/components/viz/service/gl/gpu_service_impl.cc
[modify] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/components/viz/service/gl/gpu_service_impl.h
[modify] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/content/browser/renderer_host/media/media_stream_manager.cc
[modify] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/media/capture/video/android/video_capture_device_factory_android.cc
[modify] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/media/capture/video/chromeos/camera_hal_dispatcher_impl.cc
[modify] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/media/capture/video/chromeos/camera_hal_dispatcher_impl.h
[modify] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/media/capture/video/chromeos/mojo/arc_camera3_service.mojom
[modify] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/media/capture/video/chromeos/video_capture_device_factory_chromeos.cc
[modify] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/media/capture/video/chromeos/video_capture_device_factory_chromeos.h
[modify] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/media/capture/video/linux/video_capture_device_factory_linux.cc
[modify] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/media/capture/video/mac/video_capture_device_factory_mac.mm
[modify] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/media/capture/video/video_capture_device_factory.cc
[modify] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/media/capture/video/video_capture_device_factory.h
[modify] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/media/capture/video/video_capture_device_unittest.cc
[modify] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/media/capture/video/win/video_capture_device_factory_win.cc
[modify] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/media/gpu/BUILD.gn
[add] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/media/gpu/gpu_jpeg_encode_accelerator_factory.cc
[add] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/media/gpu/gpu_jpeg_encode_accelerator_factory.h
[modify] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/media/mojo/interfaces/BUILD.gn
[add] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/media/mojo/interfaces/jpeg_encode_accelerator.mojom
[add] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/media/mojo/interfaces/jpeg_encode_accelerator.typemap
[add] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/media/mojo/interfaces/jpeg_encode_accelerator_typemap_traits.cc
[add] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/media/mojo/interfaces/jpeg_encode_accelerator_typemap_traits.h
[modify] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/media/mojo/interfaces/typemaps.gni
[modify] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/media/mojo/services/BUILD.gn
[add] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/media/mojo/services/mojo_jpeg_encode_accelerator_service.cc
[add] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/media/mojo/services/mojo_jpeg_encode_accelerator_service.h
[modify] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/media/video/BUILD.gn
[add] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/media/video/jpeg_encode_accelerator.cc
[modify] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/media/video/jpeg_encode_accelerator.h
[modify] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/services/video_capture/device_factory_provider_impl.cc
[modify] https://crrev.com/941a9cd01fff5a2028adc50c50d707df9ff2f176/services/viz/privileged/interfaces/gl/gpu_service.mojom

Project Member

Comment 5 by bugdroid1@chromium.org, Apr 10 2018

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

commit 8dd6e321c24df42159fd55d71cd69c7484a0f09c
Author: Sheng-Hao Tsao <shenghao@google.com>
Date: Tue Apr 10 23:29:22 2018

Add IPC to Chromium side to use HW JEA

This CL adds mojo interface and a library to construct IPC to the
Chroimium side for utilizing HW JEA there.

BUG= 819847 
TEST=Tested on eve that jpeg_encode_accelerator_test passes

Change-Id: Icf4f25995c9776919f08ebf461dd4be7e2c29991
Reviewed-on: https://chromium-review.googlesource.com/983003
Commit-Ready: Sheng-hao Tsao <shenghao@google.com>
Tested-by: Sheng-hao Tsao <shenghao@google.com>
Reviewed-by: Ricky Liang <jcliang@chromium.org>
Reviewed-by: Sheng-hao Tsao <shenghao@google.com>

[add] https://crrev.com/8dd6e321c24df42159fd55d71cd69c7484a0f09c/mojo/jea/jpeg_encode_accelerator.mojom
[add] https://crrev.com/8dd6e321c24df42159fd55d71cd69c7484a0f09c/common/jpeg/jpeg_encode_accelerator_impl.cc
[modify] https://crrev.com/8dd6e321c24df42159fd55d71cd69c7484a0f09c/mojo/module.mk
[add] https://crrev.com/8dd6e321c24df42159fd55d71cd69c7484a0f09c/include/cros-camera/jpeg_encode_accelerator.h
[modify] https://crrev.com/8dd6e321c24df42159fd55d71cd69c7484a0f09c/Makefile
[modify] https://crrev.com/8dd6e321c24df42159fd55d71cd69c7484a0f09c/common/jpeg/module.mk
[add] https://crrev.com/8dd6e321c24df42159fd55d71cd69c7484a0f09c/common/jpeg/jpeg_encode_accelerator_test.cc
[modify] https://crrev.com/8dd6e321c24df42159fd55d71cd69c7484a0f09c/common/camera_mojo_channel_manager_impl.cc
[add] https://crrev.com/8dd6e321c24df42159fd55d71cd69c7484a0f09c/common/jpeg/jpeg_encode_accelerator_impl.h
[add] https://crrev.com/8dd6e321c24df42159fd55d71cd69c7484a0f09c/common/jpeg/libjea.pc.template
[modify] https://crrev.com/8dd6e321c24df42159fd55d71cd69c7484a0f09c/include/cros-camera/camera_mojo_channel_manager.h
[add] https://crrev.com/8dd6e321c24df42159fd55d71cd69c7484a0f09c/mojo/jea/module.mk
[modify] https://crrev.com/8dd6e321c24df42159fd55d71cd69c7484a0f09c/mojo/cros_camera_service.mojom
[modify] https://crrev.com/8dd6e321c24df42159fd55d71cd69c7484a0f09c/common/camera_mojo_channel_manager_impl.h

Project Member

Comment 6 by bugdroid1@chromium.org, Apr 18 2018

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

commit 7e6f441ebe9411e9689b80cb56326ba2cf7c5c96
Author: Sheng-Hao Tsao <shenghao@google.com>
Date: Wed Apr 18 09:07:56 2018

Add ebuilds for JEA library

BUG= chromium:819847 
TEST=libjea and libjea_test can be deployed to eve successfully

Change-Id: I1dfc2df8dac77dc518919290e08e6c6d5a13f680
Reviewed-on: https://chromium-review.googlesource.com/983056
Commit-Ready: Sheng-hao Tsao <shenghao@google.com>
Tested-by: Sheng-hao Tsao <shenghao@google.com>
Reviewed-by: Sheng-hao Tsao <shenghao@google.com>

[add] https://crrev.com/7e6f441ebe9411e9689b80cb56326ba2cf7c5c96/media-libs/cros-camera-libjea_test/cros-camera-libjea_test-9999.ebuild
[add] https://crrev.com/7e6f441ebe9411e9689b80cb56326ba2cf7c5c96/media-libs/cros-camera-libjea/cros-camera-libjea-9999.ebuild

Project Member

Comment 7 by bugdroid1@chromium.org, Apr 26 2018

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

commit 6dd9481310a6c93be20c4ef28bf0676ce77588dd
Author: Sheng-Hao Tsao <shenghao@google.com>
Date: Thu Apr 26 06:00:12 2018

usb: Hook up JEA in usb HAL

Usb HAL used to encode JPEG image by SW. This CL makes it utilize
the HW JEA on chromium side.

BUG= 819847 
CQ-DEPEND=CL:983057
TEST=Tested on eve that still capture in ARC++ camera app uses JEA
and encodes successfully.

Change-Id: If28c87a6289f7ebfd9b6a8746ea6a85e687b3be4
Reviewed-on: https://chromium-review.googlesource.com/983004
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Sheng-hao Tsao <shenghao@google.com>
Reviewed-by: Ricky Liang <jcliang@chromium.org>
Reviewed-by: Sheng-hao Tsao <shenghao@google.com>

[modify] https://crrev.com/6dd9481310a6c93be20c4ef28bf0676ce77588dd/hal/usb/image_processor.h
[modify] https://crrev.com/6dd9481310a6c93be20c4ef28bf0676ce77588dd/hal/usb/libcamera_hal.gyp
[modify] https://crrev.com/6dd9481310a6c93be20c4ef28bf0676ce77588dd/hal/usb/frame_buffer.cc
[modify] https://crrev.com/6dd9481310a6c93be20c4ef28bf0676ce77588dd/hal/usb/image_processor.cc
[modify] https://crrev.com/6dd9481310a6c93be20c4ef28bf0676ce77588dd/hal/usb/cached_frame.cc
[modify] https://crrev.com/6dd9481310a6c93be20c4ef28bf0676ce77588dd/hal/usb/cached_frame.h
[modify] https://crrev.com/6dd9481310a6c93be20c4ef28bf0676ce77588dd/hal/usb/frame_buffer.h

Project Member

Comment 8 by bugdroid1@chromium.org, Apr 26 2018

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

commit f3f7a392b01fcb48aa84f4ff0460674011213cff
Author: Sheng-Hao Tsao <shenghao@google.com>
Date: Thu Apr 26 06:00:13 2018

Add ebuild for hooking up JEA in hal usb

BUG= chromium:819847 
CQ-DEPEND=CL:983004
TEST=cros-camera-hal-usb can be deployed to eve successfully.

Change-Id: I689773014d812250df40b4027fb51c98d858dd35
Reviewed-on: https://chromium-review.googlesource.com/983057
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Sheng-hao Tsao <shenghao@google.com>
Reviewed-by: Ricky Liang <jcliang@chromium.org>
Reviewed-by: Sheng-hao Tsao <shenghao@google.com>

[modify] https://crrev.com/f3f7a392b01fcb48aa84f4ff0460674011213cff/media-libs/cros-camera-hal-usb/cros-camera-hal-usb-9999.ebuild

Status: Fixed (was: Started)

Sign in to add a comment