New issue
Advanced search Search tips

Issue 863327 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Sep 19
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Feature



Sign in to add a comment

VideoEncodeAccelerator: allow to configure level for H.264/AVC encoding

Project Member Reported by johnylin@chromium.org, Jul 13

Issue description

Currently in both V4L2VEA and VAVEA, AVC level of encoded output is always a fixed number which is not configurable.

In Android-P media CTS android.media.cts.MediaRecorderTest#testProfileAvcBaselineLevel1, it requires encoder to configure with profile=Baseline and level=1.0, and it would check if level is 1.0 from SPS of encoded output stream.

To fulfill this, we need to make level configurable for encoder to do AVC encoding with demanded level.
 
Project Member

Comment 1 by bugdroid1@chromium.org, Sep 7

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

commit 2d8542270aca3296d2308b0fd8133938a12d768e
Author: Pin-chih Lin <johnylin@chromium.org>
Date: Fri Sep 07 08:44:10 2018

media: configure h264 encode level and check initial params validity

Initial config has both profile and H264 level now, we then apply the
configuration by passing to H264 encoder class for VAVEA, and setting up
v4l2 controls for V4L2VEA, rather than using fixed profile and level in
the past.

According to H264 spec, there are limitations for
framerate/bitrate/framesize combinations as the requested level, and we
may want to fail initization for excessive configuration. For VAVEA, we
add the check on H264Encoder::Initialize(). For V4L2VEA, we will let
driver judge the legality on configuration.

In video_encode_accelerator_unittest, a new property requested_h264_level
is added to test_stream to specify requested level, and ForceH264Level
test for checking output level meets expectation.

BUG= 863327 
BUG= 865302 
TEST=build, deploy Chrome, and run video_encoder_accelerator_unittest on Eve
TEST=build, deploy Chrome, and run video_encoder_accelerator_unittest on Elm

Cq-Include-Trybots: luci.chromium.try:android_optional_gpu_tests_rel;luci.chromium.try:linux_optional_gpu_tests_rel;luci.chromium.try:mac_optional_gpu_tests_rel;luci.chromium.try:win_optional_gpu_tests_rel
Change-Id: I003a4f5c1c8ef149ace3dd2ad18aebd84f60dd0c
Reviewed-on: https://chromium-review.googlesource.com/1209883
Commit-Queue: Pin-chih Lin <johnylin@chromium.org>
Reviewed-by: Pawel Osciak <posciak@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#589466}
[modify] https://crrev.com/2d8542270aca3296d2308b0fd8133938a12d768e/media/gpu/h264_decoder.cc
[modify] https://crrev.com/2d8542270aca3296d2308b0fd8133938a12d768e/media/gpu/v4l2/v4l2_device.cc
[modify] https://crrev.com/2d8542270aca3296d2308b0fd8133938a12d768e/media/gpu/v4l2/v4l2_device.h
[modify] https://crrev.com/2d8542270aca3296d2308b0fd8133938a12d768e/media/gpu/v4l2/v4l2_video_encode_accelerator.cc
[modify] https://crrev.com/2d8542270aca3296d2308b0fd8133938a12d768e/media/gpu/v4l2/v4l2_video_encode_accelerator.h
[modify] https://crrev.com/2d8542270aca3296d2308b0fd8133938a12d768e/media/gpu/vaapi/accelerated_video_encoder.h
[modify] https://crrev.com/2d8542270aca3296d2308b0fd8133938a12d768e/media/gpu/vaapi/h264_encoder.cc
[modify] https://crrev.com/2d8542270aca3296d2308b0fd8133938a12d768e/media/gpu/vaapi/h264_encoder.h
[modify] https://crrev.com/2d8542270aca3296d2308b0fd8133938a12d768e/media/gpu/vaapi/vaapi_video_encode_accelerator.cc
[modify] https://crrev.com/2d8542270aca3296d2308b0fd8133938a12d768e/media/gpu/vaapi/vp8_encoder.cc
[modify] https://crrev.com/2d8542270aca3296d2308b0fd8133938a12d768e/media/gpu/vaapi/vp8_encoder.h
[modify] https://crrev.com/2d8542270aca3296d2308b0fd8133938a12d768e/media/video/BUILD.gn
[add] https://crrev.com/2d8542270aca3296d2308b0fd8133938a12d768e/media/video/h264_level_limits.cc
[add] https://crrev.com/2d8542270aca3296d2308b0fd8133938a12d768e/media/video/h264_level_limits.h
[modify] https://crrev.com/2d8542270aca3296d2308b0fd8133938a12d768e/media/video/h264_parser.cc
[modify] https://crrev.com/2d8542270aca3296d2308b0fd8133938a12d768e/media/video/h264_parser.h
[modify] https://crrev.com/2d8542270aca3296d2308b0fd8133938a12d768e/media/video/video_encode_accelerator.cc
[modify] https://crrev.com/2d8542270aca3296d2308b0fd8133938a12d768e/media/video/video_encode_accelerator.h

Status: Fixed (was: Started)

Sign in to add a comment