Skip to content

Commit

Permalink
media/gpu: Disable hardware encoder with gpu_driver_bug_list.json
Browse files Browse the repository at this point in the history
The hardware video encoder quality is not sufficient,
disable it until it is good.

BUG=b:175315142
BUG=1179557
TEST=Camera App does not use HW encoder

Change-Id: Id6e29e1cd4223230d5aed6856bb1c63e8c05265e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2702905
Commit-Queue: Fritz Koenig <frkoenig@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Reviewed-by: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#855152}
  • Loading branch information
Fritz Koenig authored and Chromium LUCI CQ committed Feb 18, 2021
1 parent f884d0f commit 8563bdf
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
13 changes: 13 additions & 0 deletions gpu/config/gpu_driver_bug_list.json
Original file line number Diff line number Diff line change
Expand Up @@ -3666,6 +3666,19 @@
"features": [
"exit_on_context_lost"
]
},
{
"id": 366,
"cr_bugs": [1179557],
"description": "The hardware video encoder on the SC7180 SoC has poor quality.",
"os": {
"type": "chromeos"
},
"gl_vendor": "freedreno",
"features": [
"disable_accelerated_h264_encode",
"disable_accelerated_vp8_encode"
]
}
]
}
1 change: 1 addition & 0 deletions gpu/config/gpu_workaround_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ decode_encode_srgb_for_generatemipmap
depth_stencil_renderbuffer_resize_emulation
disable_2d_canvas_auto_flush
disable_accelerated_av1_decode
disable_accelerated_h264_encode
disable_accelerated_vp8_decode
disable_accelerated_vp8_encode
disable_accelerated_vp9_decode
Expand Down
7 changes: 7 additions & 0 deletions media/gpu/gpu_video_encode_accelerator_factory.cc
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,13 @@ GpuVideoEncodeAcceleratorFactory::GetSupportedProfiles(
});
}

if (gpu_workarounds.disable_accelerated_h264_encode) {
base::EraseIf(profiles, [](const auto& vea_profile) {
return vea_profile.profile >= H264PROFILE_MIN &&
vea_profile.profile <= H264PROFILE_MAX;
});
}

return profiles;
}

Expand Down

0 comments on commit 8563bdf

Please sign in to comment.