• Pin-chih Lin's avatar
    media: configure h264 encode level and check initial params validity · 2d854227
    Pin-chih Lin authored
    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: default avatarPawel Osciak <posciak@chromium.org>
    Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#589466}
    2d854227
v4l2_device.h 7.97 KB