Skip to content

Commit 543f7c3

Browse files
chore: cherry-pick 3fbd1dca6a4d from libvpx (#40025)
* chore: cherry-pick 3fbd1dca6a4d from libvpx * build: update patches config * chore: update patches * chore: update patches --------- Co-authored-by: PatchUp <73610968+patchup[bot]@users.noreply.github.com>
1 parent e51dee4 commit 543f7c3

3 files changed

Lines changed: 31 additions & 1 deletion

File tree

‎patches/config.json‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,7 @@
2929

3030
"src/electron/patches/skia": "src/third_party/skia",
3131

32-
"src/electron/patches/libwebp": "src/third_party/libwebp/src"
32+
"src/electron/patches/libwebp": "src/third_party/libwebp/src",
33+
34+
"src/electron/patches/libvpx": "src/third_party/libvpx/source/libvpx"
3335
}

‎patches/libvpx/.patches‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cherry-pick-3fbd1dca6a4d.patch
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: James Zern <jzern@google.com>
3+
Date: Mon, 25 Sep 2023 18:55:59 -0700
4+
Subject: VP8: disallow thread count changes
5+
6+
Currently allocations are done at encoder creation time. Going from
7+
threaded to non-threaded would cause a crash.
8+
9+
Bug: chromium:1486441
10+
Change-Id: Ie301c2a70847dff2f0daae408fbef1e4d42e73d4
11+
12+
diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c
13+
index 4bbeadef013c8e0a1ae8d9241b90489e37ab36d7..148a16cc493d109fee859a9628f58e7361b02e0d 100644
14+
--- a/vp8/encoder/onyx_if.c
15+
+++ b/vp8/encoder/onyx_if.c
16+
@@ -1443,6 +1443,11 @@ void vp8_change_config(VP8_COMP *cpi, VP8_CONFIG *oxcf) {
17+
last_h = cpi->oxcf.Height;
18+
prev_number_of_layers = cpi->oxcf.number_of_layers;
19+
20+
+ if (cpi->initial_width) {
21+
+ // TODO(https://crbug.com/1486441): Allow changing thread counts; the
22+
+ // allocation is done once in vp8_create_compressor().
23+
+ oxcf->multi_threaded = cpi->oxcf.multi_threaded;
24+
+ }
25+
cpi->oxcf = *oxcf;
26+
27+
switch (cpi->oxcf.Mode) {

0 commit comments

Comments
 (0)