richard pushed to branch mullvad-browser-115.3.0esr-13.0-1 at The Tor Project / Applications / Mullvad Browser
Commits:
-
dd33df76
by Marco Bonardo at 2023-09-28T19:22:25+00:00
-
89afa055
by Ryan VanderMeulen at 2023-09-28T19:22:32+00:00
6 changed files:
- media/libvpx/libvpx/test/encode_api_test.cc
- media/libvpx/libvpx/vp8/encoder/onyx_if.c
- toolkit/components/reputationservice/ApplicationReputation.cpp
- toolkit/components/reputationservice/test/gtest/TestExecutableLists.cpp
- xpcom/io/nsLocalFileCommon.cpp
- xpcom/io/nsLocalFileCommon.h
Changes:
... | ... | @@ -307,7 +307,6 @@ TEST(EncodeAPI, SetRoi) { |
307 | 307 | |
308 | 308 | void InitCodec(const vpx_codec_iface_t &iface, int width, int height,
|
309 | 309 | vpx_codec_ctx_t *enc, vpx_codec_enc_cfg_t *cfg) {
|
310 | - ASSERT_EQ(vpx_codec_enc_config_default(&iface, cfg, 0), VPX_CODEC_OK);
|
|
311 | 310 | cfg->g_w = width;
|
312 | 311 | cfg->g_h = height;
|
313 | 312 | cfg->g_lag_in_frames = 0;
|
... | ... | @@ -345,6 +344,7 @@ TEST(EncodeAPI, ConfigChangeThreadCount) { |
345 | 344 | vpx_codec_ctx_t ctx = {};
|
346 | 345 | } enc;
|
347 | 346 | |
347 | + ASSERT_EQ(vpx_codec_enc_config_default(iface, &cfg, 0), VPX_CODEC_OK);
|
|
348 | 348 | EXPECT_NO_FATAL_FAILURE(
|
349 | 349 | InitCodec(*iface, kWidth, kHeight, &enc.ctx, &cfg));
|
350 | 350 | if (IsVP9(iface)) {
|
... | ... | @@ -363,6 +363,50 @@ TEST(EncodeAPI, ConfigChangeThreadCount) { |
363 | 363 | }
|
364 | 364 | }
|
365 | 365 | |
366 | +TEST(EncodeAPI, ConfigResizeChangeThreadCount) {
|
|
367 | + constexpr int kInitWidth = 1024;
|
|
368 | + constexpr int kInitHeight = 1024;
|
|
369 | + |
|
370 | + for (const auto *iface : kCodecIfaces) {
|
|
371 | + SCOPED_TRACE(vpx_codec_iface_name(iface));
|
|
372 | + for (int i = 0; i < (IsVP9(iface) ? 2 : 1); ++i) {
|
|
373 | + vpx_codec_enc_cfg_t cfg = {};
|
|
374 | + struct Encoder {
|
|
375 | + ~Encoder() { EXPECT_EQ(vpx_codec_destroy(&ctx), VPX_CODEC_OK); }
|
|
376 | + vpx_codec_ctx_t ctx = {};
|
|
377 | + } enc;
|
|
378 | + |
|
379 | + ASSERT_EQ(vpx_codec_enc_config_default(iface, &cfg, 0), VPX_CODEC_OK);
|
|
380 | + // Start in threaded mode to ensure resolution and thread related
|
|
381 | + // allocations are updated correctly across changes in resolution and
|
|
382 | + // thread counts. See https://crbug.com/1486441.
|
|
383 | + cfg.g_threads = 4;
|
|
384 | + EXPECT_NO_FATAL_FAILURE(
|
|
385 | + InitCodec(*iface, kInitWidth, kInitHeight, &enc.ctx, &cfg));
|
|
386 | + if (IsVP9(iface)) {
|
|
387 | + EXPECT_EQ(vpx_codec_control_(&enc.ctx, VP9E_SET_TILE_COLUMNS, 6),
|
|
388 | + VPX_CODEC_OK);
|
|
389 | + EXPECT_EQ(vpx_codec_control_(&enc.ctx, VP9E_SET_ROW_MT, i),
|
|
390 | + VPX_CODEC_OK);
|
|
391 | + }
|
|
392 | + |
|
393 | + cfg.g_w = 1000;
|
|
394 | + cfg.g_h = 608;
|
|
395 | + EXPECT_EQ(vpx_codec_enc_config_set(&enc.ctx, &cfg), VPX_CODEC_OK)
|
|
396 | + << vpx_codec_error_detail(&enc.ctx);
|
|
397 | + |
|
398 | + cfg.g_w = 16;
|
|
399 | + cfg.g_h = 720;
|
|
400 | + |
|
401 | + for (const auto threads : { 1, 4, 8, 6, 2, 1 }) {
|
|
402 | + cfg.g_threads = threads;
|
|
403 | + EXPECT_NO_FATAL_FAILURE(EncodeWithConfig(cfg, &enc.ctx))
|
|
404 | + << "iteration: " << i << " threads: " << threads;
|
|
405 | + }
|
|
406 | + }
|
|
407 | + }
|
|
408 | +}
|
|
409 | + |
|
366 | 410 | #if CONFIG_VP9_ENCODER
|
367 | 411 | class EncodeApiGetTplStatsTest
|
368 | 412 | : public ::libvpx_test::EncoderTest,
|
... | ... | @@ -1447,6 +1447,12 @@ void vp8_change_config(VP8_COMP *cpi, VP8_CONFIG *oxcf) { |
1447 | 1447 | last_h = cpi->oxcf.Height;
|
1448 | 1448 | prev_number_of_layers = cpi->oxcf.number_of_layers;
|
1449 | 1449 | |
1450 | + if (cpi->initial_width) {
|
|
1451 | + // TODO(https://crbug.com/1486441): Allow changing thread counts; the
|
|
1452 | + // allocation is done once in vp8_create_compressor().
|
|
1453 | + oxcf->multi_threaded = cpi->oxcf.multi_threaded;
|
|
1454 | + }
|
|
1455 | + |
|
1450 | 1456 | cpi->oxcf = *oxcf;
|
1451 | 1457 | |
1452 | 1458 | switch (cpi->oxcf.Mode) {
|
... | ... | @@ -181,6 +181,8 @@ const char* const ApplicationReputationService::kBinaryFileExtensions[] = { |
181 | 181 | ".applescript",
|
182 | 182 | //".application", exec // MS ClickOnce
|
183 | 183 | //".appref-ms", exec // MS ClickOnce
|
184 | + //".appx", exec
|
|
185 | + //".appxbundle", exec
|
|
184 | 186 | //".arc",
|
185 | 187 | //".arj",
|
186 | 188 | ".as", // Mac archive
|
... | ... | @@ -334,6 +336,8 @@ const char* const ApplicationReputationService::kBinaryFileExtensions[] = { |
334 | 336 | //".msh2xml", exec // Windows shell
|
335 | 337 | //".mshxml", exec // Windows
|
336 | 338 | //".msi", exec // Windows installer
|
339 | + //".msix", exec // Windows installer
|
|
340 | + //".msixbundle", exec // Windows installer
|
|
337 | 341 | //".msp", exec // Windows installer
|
338 | 342 | //".mst", exec // Windows installer
|
339 | 343 | ".ndif", // Mac disk image
|
... | ... | @@ -25,6 +25,8 @@ static const char* const kTestFileExtensions[] = { |
25 | 25 | ".applescript",
|
26 | 26 | ".application", // MS ClickOnce
|
27 | 27 | ".appref-ms", // MS ClickOnce
|
28 | + ".appx",
|
|
29 | + ".appxbundle",
|
|
28 | 30 | ".as", // Mac archive
|
29 | 31 | ".asp", // Windows Server script
|
30 | 32 | ".asx", // Windows Media Player
|
... | ... | @@ -155,6 +157,8 @@ static const char* const kTestFileExtensions[] = { |
155 | 157 | ".msh2xml", // Windows shell
|
156 | 158 | ".mshxml", // Windows
|
157 | 159 | ".msi", // Windows installer
|
160 | + ".msix", // Windows installer
|
|
161 | + ".msixbundle", // Windows installer
|
|
158 | 162 | ".msp", // Windows installer
|
159 | 163 | ".mst", // Windows installer
|
160 | 164 | ".ndif", // Mac disk image
|
... | ... | @@ -42,6 +42,8 @@ const char* const sExecutableExts[] = { |
42 | 42 | ".app", // executable application
|
43 | 43 | ".application", // from bug 348763
|
44 | 44 | ".appref-ms", // ClickOnce link
|
45 | + ".appx",
|
|
46 | + ".appxbundle",
|
|
45 | 47 | ".asp",
|
46 | 48 | ".atloc", // Appletalk Location
|
47 | 49 | ".bas",
|
... | ... | @@ -96,6 +98,8 @@ const char* const sExecutableExts[] = { |
96 | 98 | ".msh2xml", // Microsoft Shell
|
97 | 99 | ".mshxml", // Microsoft Shell
|
98 | 100 | ".msi",
|
101 | + ".msix",
|
|
102 | + ".msixbundle",
|
|
99 | 103 | ".msp",
|
100 | 104 | ".mst",
|
101 | 105 | ".ops", // Office Profile Settings
|
... | ... | @@ -8,9 +8,9 @@ |
8 | 8 | #define _NS_LOCAL_FILE_COMMON_H_
|
9 | 9 | |
10 | 10 | #ifdef MOZ_ESR
|
11 | -extern const char* const sExecutableExts[103];
|
|
11 | +extern const char* const sExecutableExts[107];
|
|
12 | 12 | #else
|
13 | -extern const char* const sExecutableExts[104];
|
|
13 | +extern const char* const sExecutableExts[108];
|
|
14 | 14 | #endif
|
15 | 15 | |
16 | 16 | #endif |