-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
1 parent
e51dee4
commit 543f7c3
Showing
3 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
cherry-pick-3fbd1dca6a4d.patch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: James Zern <jzern@google.com> | ||
Date: Mon, 25 Sep 2023 18:55:59 -0700 | ||
Subject: VP8: disallow thread count changes | ||
|
||
Currently allocations are done at encoder creation time. Going from | ||
threaded to non-threaded would cause a crash. | ||
|
||
Bug: chromium:1486441 | ||
Change-Id: Ie301c2a70847dff2f0daae408fbef1e4d42e73d4 | ||
|
||
diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c | ||
index 4bbeadef013c8e0a1ae8d9241b90489e37ab36d7..148a16cc493d109fee859a9628f58e7361b02e0d 100644 | ||
--- a/vp8/encoder/onyx_if.c | ||
+++ b/vp8/encoder/onyx_if.c | ||
@@ -1443,6 +1443,11 @@ void vp8_change_config(VP8_COMP *cpi, VP8_CONFIG *oxcf) { | ||
last_h = cpi->oxcf.Height; | ||
prev_number_of_layers = cpi->oxcf.number_of_layers; | ||
|
||
+ if (cpi->initial_width) { | ||
+ // TODO(https://crbug.com/1486441): Allow changing thread counts; the | ||
+ // allocation is done once in vp8_create_compressor(). | ||
+ oxcf->multi_threaded = cpi->oxcf.multi_threaded; | ||
+ } | ||
cpi->oxcf = *oxcf; | ||
|
||
switch (cpi->oxcf.Mode) { |