diff options
Diffstat (limited to 'media-libs/libvpx/files/libvpx-1.13.0-VP8-disallow-thread-count-changes.patch')
-rw-r--r-- | media-libs/libvpx/files/libvpx-1.13.0-VP8-disallow-thread-count-changes.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/media-libs/libvpx/files/libvpx-1.13.0-VP8-disallow-thread-count-changes.patch b/media-libs/libvpx/files/libvpx-1.13.0-VP8-disallow-thread-count-changes.patch new file mode 100644 index 000000000000..bdaea724f817 --- /dev/null +++ b/media-libs/libvpx/files/libvpx-1.13.0-VP8-disallow-thread-count-changes.patch @@ -0,0 +1,53 @@ +https://bugs.gentoo.org/914875 + +From 4e4bbfbd414d738b7114194c5d06b45b415486b8 Mon Sep 17 00:00:00 2001 +From: James Zern <jzern@google.com> +Date: Mon, 25 Sep 2023 18:55:59 -0700 +Subject: [PATCH 2/2] 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 +(cherry picked from commit 3fbd1dca6a4d2dad332a2110d646e4ffef36d590) +(cherry picked from commit 7aaffe2df4c9426ab204a272ca5ca52286ca86d4) +--- + test/encode_api_test.cc | 4 ---- + vp8/encoder/onyx_if.c | 5 +++++ + 2 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/test/encode_api_test.cc b/test/encode_api_test.cc +index 02aedc057..e0e793b15 100644 +--- a/test/encode_api_test.cc ++++ b/test/encode_api_test.cc +@@ -366,10 +366,6 @@ TEST(EncodeAPI, ConfigResizeChangeThreadCount) { + + for (const auto *iface : kCodecIfaces) { + SCOPED_TRACE(vpx_codec_iface_name(iface)); +- if (!IsVP9(iface)) { +- GTEST_SKIP() << "TODO(https://crbug.com/1486441) remove this condition " +- "after VP8 is fixed."; +- } + for (int i = 0; i < (IsVP9(iface) ? 2 : 1); ++i) { + vpx_codec_enc_cfg_t cfg = {}; + struct Encoder { +diff --git a/vp8/encoder/onyx_if.c b/vp8/encoder/onyx_if.c +index 4bbeadef0..148a16cc4 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) { +-- +2.42.0 + |