Closed Bug 1846318 Opened 10 months ago Closed 8 months ago

Update dav1d to new version e58afe4dd9057591882a01c31382c203e8a61c92 from 2023-07-25 16:10:07

Categories

(Core :: Audio/Video: Playback, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
120 Branch
Tracking Status
firefox118 --- wontfix
firefox119 --- wontfix
firefox120 --- fixed

People

(Reporter: update-bot, Assigned: karlt)

Details

(Whiteboard: [3pl-filed][task_id: CA32B3bfT2KZJbLDV9fT3g])

Attachments

(2 files, 1 obsolete file)

This update covers 14 commits. Here are the overall diff statistics, and then the commit information.


media/libdav1d/asm/moz.build | 1 +
media/libdav1d/moz.build | 1 +
media/libdav1d/moz.yaml | 4 +-
media/libdav1d/vcs_version.h | 2 +-
third_party/dav1d/include/common/bitdepth.h | 2 +-
third_party/dav1d/src/arm/32/filmgrain.S | 16 +-
third_party/dav1d/src/arm/32/filmgrain16.S | 16 +-
third_party/dav1d/src/arm/32/ipred.S | 43 +-
third_party/dav1d/src/arm/32/ipred16.S | 40 +-
third_party/dav1d/src/arm/64/filmgrain.S | 16 +-
third_party/dav1d/src/arm/64/filmgrain16.S | 16 +-
third_party/dav1d/src/arm/64/ipred.S | 61 ++-
third_party/dav1d/src/arm/64/ipred16.S | 44 +-
third_party/dav1d/src/arm/filmgrain.h | 8 +-
third_party/dav1d/src/dav1d.rc.in | 2 +-
third_party/dav1d/src/decode.c | 232 +-------
third_party/dav1d/src/fg_apply_tmpl.c | 12 +-
third_party/dav1d/src/filmgrain.h | 2 +-
third_party/dav1d/src/filmgrain_tmpl.c | 20 +-
third_party/dav1d/src/internal.h | 28 +-
third_party/dav1d/src/ipred.h | 2 +-
third_party/dav1d/src/ipred_tmpl.c | 11 +-
third_party/dav1d/src/lib.c | 6 +-
third_party/dav1d/src/meson.build | 2 +
third_party/dav1d/src/pal.c | 77 +++
third_party/dav1d/src/pal.h | 43 +
third_party/dav1d/src/recon.h | 21 +
third_party/dav1d/src/recon_tmpl.c | 233 ++++++++-
third_party/dav1d/src/thread_task.c | 2 +-
third_party/dav1d/src/wedge.c | 257 ++++------
third_party/dav1d/src/wedge.h | 67 ++-
third_party/dav1d/src/x86/ipred16_avx2.asm | 109 ++--
third_party/dav1d/src/x86/ipred16_avx512.asm | 82 ++-
third_party/dav1d/src/x86/ipred16_sse.asm | 135 +++--
third_party/dav1d/src/x86/ipred_avx2.asm | 78 +-
third_party/dav1d/src/x86/ipred_avx512.asm | 76 +-
third_party/dav1d/src/x86/ipred_sse.asm | 110 ++--
third_party/dav1d/src/x86/pal.asm | 641 +++++++++++++++++++++++++++
third_party/dav1d/src/x86/pal.h | 50 ++
third_party/dav1d/tests/checkasm/checkasm.c | 9 +-
third_party/dav1d/tests/checkasm/checkasm.h | 1 +
third_party/dav1d/tests/checkasm/ipred.c | 10 +-
third_party/dav1d/tests/checkasm/pal.c | 71 ++
third_party/dav1d/tests/meson.build | 1 +
44 files changed, 1913 insertions(+), 747 deletions(-)


e58afe4dd9057591882a01c31382c203e8a61c92 by Niklas Haas

https://code.videolan.org/videolan/dav1d/commit/e58afe4dd9057591882a01c31382c203e8a61c92
Authored: 2023-07-25 15:28:10 +0200
Committed: 2023-07-25 16:10:07 +0200

Don't hard-code FGS block size

Avoiding this hard-coded round-and-shift allows FGS to continue working
when modifying FG_BLOCK_SIZE (for whatever reason), and is better style
(no magic constants).

Files Modified:

  • src/fg_apply_tmpl.c
  • src/thread_task.c

202f68e4d0a3fb678ffb840de872e5f6fbc70f3e by Niklas Haas

https://code.videolan.org/videolan/dav1d/commit/202f68e4d0a3fb678ffb840de872e5f6fbc70f3e
Authored: 2023-07-25 16:08:51 +0200
Committed: 2023-07-25 16:08:51 +0200

Rename BLOCK_SIZE to FG_BLOCK_SIZE

Makes this (globally available) constant more descriptive.

Files Modified:

  • src/arm/32/filmgrain.S
  • src/arm/32/filmgrain16.S
  • src/arm/64/filmgrain.S
  • src/arm/64/filmgrain16.S
  • src/arm/filmgrain.h
  • src/fg_apply_tmpl.c
  • src/filmgrain.h
  • src/filmgrain_tmpl.c

43a11ccb2006d3bff688221d31756b03b43c117c by Henrik Gramner

https://code.videolan.org/videolan/dav1d/commit/43a11ccb2006d3bff688221d31756b03b43c117c
Authored: 2023-07-18 14:21:57 +0200
Committed: 2023-07-18 14:21:57 +0200

Account for chroma subsampling when allocating cbi buffers

Reduces memory usage (by 3 kB per sb128 for 4:2:0) when decoding
streams with subsampled chroma when frame threading is enabled.

This also simplifies the logic for calculating cbi indices.
Both entropy decoding and reconstruction access the elements in
the same order, so calculating block x/y positions is redundant
and we can instead just store values sequentially and increase
the pointer by one every time it's accessed.

Files Modified:

  • src/decode.c
  • src/internal.h
  • src/lib.c
  • src/recon_tmpl.c

9278a14cf406f8edb5052c42b83750112bf5b515 by Matthias Dressel

https://code.videolan.org/videolan/dav1d/commit/9278a14cf406f8edb5052c42b83750112bf5b515
Authored: 2023-07-12 19:38:06 +0200
Committed: 2023-07-12 19:38:06 +0200

checkasm: Always bench C-only functions as well

Integrates --bench-c into --bench to simplify benchmarks.

Files Modified:

  • tests/checkasm/checkasm.c

a7e12b628472516718d37108fde7d438b14a0372 by Martin Storsjö

https://code.videolan.org/videolan/dav1d/commit/a7e12b628472516718d37108fde7d438b14a0372
Authored: 2023-07-08 00:03:15 +0300
Committed: 2023-07-08 00:24:57 +0300

windows: Clarify unicode characters in RC files

Windows RC files can have strings expressed either as narrow
chars expressed in a specific codepage, or as wide unicode strings.
Regardless of which way they are expressed, they are converted into
unicode strings in the compiled resource files.

When using narrow strings, even if using escaped chars like \251,
those chars are interpreted according to a specific codepage. The
codepage can be specified with arguments to the RC/windres tool
(or with a pragma, but not all tools support the pragmas),
but when no codepage is specified, the exact interpretation varies.

llvm-rc uses a hard stance of defaulting to only accepting ANSI
chars unless something else has been specified (and pragmas aren't
supported). llvm-windres defaults to CP 850 though, for compatibility
with what most people probably intend to.

However, GNU windres and MS rc.exe actually default to what the
system's current default codepage is. That means that if the resource
file is built on a machine with e.g. Japanese as the default locale,
the file gets built differently, with a different Unicode character
than what was intended.

By converting the strings to wide strings, it is unambiguous that
\251 refers to the Unicode code point u00A9 (octal 0251), i.e.
copyright sign.

This fixes building the RC files with llvm-rc. With GNU windres,
llvm-windres and rc.exe, the files still generate the bitwise exact
same output as before.

Files Modified:

  • src/dav1d.rc.in
  • tools/dav1d.rc.in

fc40a0db517ce806253740fed22dc5de51d0c4c6 by Matthias Dressel

https://code.videolan.org/videolan/dav1d/commit/fc40a0db517ce806253740fed22dc5de51d0c4c6
Authored: 2023-07-06 00:59:17 +0200
Committed: 2023-07-07 21:21:51 +0200

checkasm: document '-t' in --help text

Files Modified:

  • tests/checkasm/checkasm.c

9eace34cbadef14980af15c4d43b012a29c2ae56 by Henrik Gramner

https://code.videolan.org/videolan/dav1d/commit/9eace34cbadef14980af15c4d43b012a29c2ae56
Authored: 2023-07-07 01:56:10 +0200
Committed: 2023-07-07 01:56:10 +0200

x86: Fix misaligned loads in high bit-depth pal_pred SSSE3 asm

Regression introduced in 72e9c7c.

Files Modified:

  • src/x86/ipred16_sse.asm

8dbf789ebe1640dbc3bb5d49345efd9b0f9236d6 by Henrik Gramner

https://code.videolan.org/videolan/dav1d/commit/8dbf789ebe1640dbc3bb5d49345efd9b0f9236d6
Authored: 2023-07-06 14:44:12 +0200
Committed: 2023-07-06 23:12:43 +0200

x86: Add pal_idx_finish asm

Files Added:

  • src/x86/pal.asm
  • src/x86/pal.h

Files Modified:

  • src/meson.build
  • src/pal.c

852cc3409f61ffba9fc3134bdc0fe94ebc98dc4f by Henrik Gramner

https://code.videolan.org/videolan/dav1d/commit/852cc3409f61ffba9fc3134bdc0fe94ebc98dc4f
Authored: 2023-07-06 14:42:27 +0200
Committed: 2023-07-06 23:12:43 +0200

Move palette packing/edge-extension into a DSP function

Files Added:

  • src/pal.c
  • src/pal.h
  • tests/checkasm/pal.c

Files Modified:

  • src/decode.c
  • src/internal.h
  • src/lib.c
  • src/meson.build
  • tests/checkasm/checkasm.c
  • tests/checkasm/checkasm.h
  • tests/meson.build

bc76a220154a6bea4dfbe493d182101b4793ac84 by Martin Storsjö

https://code.videolan.org/videolan/dav1d/commit/bc76a220154a6bea4dfbe493d182101b4793ac84
Authored: 2023-07-06 23:37:08 +0300
Committed: 2023-07-06 23:12:02 +0200

arm: ipred: Update pal_pred to work with packed indices

Files Modified:

  • src/arm/32/ipred.S
  • src/arm/32/ipred16.S
  • src/arm/64/ipred.S
  • src/arm/64/ipred16.S
  • src/arm/ipred.h

72e9c7c095b6c41a6d794b6a10d797e94d009537 by Henrik Gramner

https://code.videolan.org/videolan/dav1d/commit/72e9c7c095b6c41a6d794b6a10d797e94d009537
Authored: 2023-07-06 14:42:22 +0200
Committed: 2023-07-06 23:10:22 +0200

Pack palette indices

Pack two indices into each byte instead of storing them separately.

Reduces memory usage by up to 16 kB per sb128 in streams that uses
screen content tools when frame-threading is enabled, at the cost
of some additional computational overhead for packing/unpacking.

Files Modified:

  • src/arm/ipred.h
  • src/decode.c
  • src/internal.h
  • src/ipred_tmpl.c
  • src/recon_tmpl.c
  • src/x86/ipred16_avx2.asm
  • src/x86/ipred16_avx512.asm
  • src/x86/ipred16_sse.asm
  • src/x86/ipred_avx2.asm
  • src/x86/ipred_avx512.asm
  • src/x86/ipred_sse.asm
  • tests/checkasm/ipred.c

233a424c38eb9cd335821fc497e8178fa50d9cbd by Henrik Gramner

https://code.videolan.org/videolan/dav1d/commit/233a424c38eb9cd335821fc497e8178fa50d9cbd
Authored: 2023-07-06 14:42:19 +0200
Committed: 2023-07-06 23:10:22 +0200

Use pixel instead of uint16_t for palette buffers

Reduces memory usage by 6 kB per sb128 in 8bpc streams that
uses screen content tools when frame-threading is enabled.

Files Modified:

  • include/common/bitdepth.h
  • src/arm/32/ipred.S
  • src/arm/32/ipred16.S
  • src/arm/64/ipred.S
  • src/arm/64/ipred16.S
  • src/decode.c
  • src/internal.h
  • src/ipred.h
  • src/ipred_tmpl.c
  • src/recon.h
  • src/recon_tmpl.c
  • src/x86/ipred_avx2.asm
  • src/x86/ipred_avx512.asm
  • src/x86/ipred_sse.asm
  • tests/checkasm/ipred.c

d437510e9d4061a32845ece547b28cadd716900d by Henrik Gramner

https://code.videolan.org/videolan/dav1d/commit/d437510e9d4061a32845ece547b28cadd716900d
Authored: 2023-07-06 14:42:17 +0200
Committed: 2023-07-06 14:42:17 +0200

Remove redundant 4:4:4 wedge sign tables

Only one of the sign or no-sign 4:4:4 tables are ever used for
any given wedge index, so there's no point in having both.

Reduces the table size by around 50 kB.

Files Modified:

  • src/wedge.c
  • src/wedge.h

90a45d89de3a42058943efbab5fd9d35ae933dc7 by Henrik Gramner

https://code.videolan.org/videolan/dav1d/commit/90a45d89de3a42058943efbab5fd9d35ae933dc7
Authored: 2023-07-06 14:42:14 +0200
Committed: 2023-07-06 14:42:14 +0200

Optimize the size of interintra/wedge index tables

Replace pointers with 16-bit relative offsets and remove entries
for unused block sizes (only 8x8..32x32 are relevant).

Reduces the table size by around 17 kB.

Files Modified:

  • src/lib.c
  • src/recon_tmpl.c
  • src/wedge.c
  • src/wedge.h

./mach vendor media/libdav1d/moz.yaml reported an error editing moz.build files:

Latest commit is e58afe4dd9057591882a01c31382c203e8a61c92 from 2023-07-25T16:10:07.000+02:00
Fetching code archive from https://code.videolan.org/videolan/dav1d/-/archive/e58afe4dd9057591882a01c31382c203e8a61c92.tar.gz
Retaining wanted in-tree files.
Cleaning third_party/dav1d to import changes.
Unpacking upstream files for third_party/dav1d.
Retaining wanted files from upstream changes.
Removing excluded files from upstream changes.
Removing: [/tmp/tmpbgkaao1h/.gitignore, /tmp/tmpbgkaao1h/.gitlab-ci.yml, 5 items in /tmp/tmpbgkaao1h/doc: Doxyfile.in.in, PATENTS, dav1d_logo.png, dav1d_logo.svg and meson.build, 7 items in /tmp/tmpbgkaao1h/examples: dav1dplay.c, dp_fifo.c, dp_fifo.h, dp_renderer.h, dp_renderer_placebo.c, dp_renderer_sdl.c and meson.build, 9 items in /tmp/tmpbgkaao1h/package/crossfiles: aarch64-android.meson, arm-android.meson, i686-linux32.meson, i686-w64-mingw32.meson, wasm32.meson, wasm64.meson, x86-android.meson, x86_64-android.meson and x86_64-w64-mingw32.meson, /tmp/tmpbgkaao1h/package/snap/snapcraft.yaml, /tmp/tmpbgkaao1h/tools/compat/getopt.c, 6 items in /tmp/tmpbgkaao1h/tools: dav1d.c, dav1d.manifest, dav1d.rc.in, dav1d_cli_parse.c, dav1d_cli_parse.h and meson.build, 7 items in /tmp/tmpbgkaao1h/tools/input: annexb.c, demuxer.h, input.c, input.h, ivf.c, parse.h and section5.c, 8 items in /tmp/tmpbgkaao1h/tools/output: md5.c, muxer.h, null.c, output.c, output.h, xxhash.c, y4m2.c and yuv.c]
Copying to third_party/dav1d.
Checking for update actions
action: copy-file src: /builds/worker/checkouts/gecko/third_party/dav1d/include/vcs_version.h.in dst: /builds/worker/checkouts/gecko/media/libdav1d/vcs_version.h
action: replace-in-file file: /builds/worker/checkouts/gecko/media/libdav1d/vcs_version.h
action: run-script command: /builds/worker/checkouts/gecko/media/libdav1d/update-version.sh working dir: /builds/worker/checkouts/gecko/third_party/dav1d args: ['/builds/worker/checkouts/gecko/media/libdav1d/version.h']
/builds/worker/checkouts/gecko/media/libdav1d/update-version.sh /builds/worker/checkouts/gecko/media/libdav1d/version.h
Registering changes with version control.
Checking for a spurious update.
Version 'e58afe4dd9057591882a01c31382c203e8a61c92' has changed 40 files.
Updating moz.yaml.
Found release: 616bfd1506a8a75c6a358e578cbec9ca11931502 (2023-07-01T11:36:39.000+03:00).

Found revision: 616bfd1506a8a75c6a358e578cbec9ca11931502

Updating moz.build files
Found 3 files added and 0 files removed.
Could not add third_party/dav1d/tests/checkasm/pal.c to the appropriate moz.build file
This is a deficiency in ./mach vendor . Please review the affected files before committing.

We're going to continue processing the update; but we may fail because we couldn't handle these files. If we do succeed, you may want to add these files to the 'exclude' key in the moz.yaml file, so they are excluded from the source tree and ignored in the future.

It looks like we experienced one or more build failures when trying to apply this
update. You will need to apply this update manually; you can replicate the patch
locally with ./mach vendor media/libdav1d/moz.yaml. I'm going to abandon the Phabricator patch and
let you submit a new one.

If the build failure wasn't caused by a library change, and was instead caused by
something structural in the build system please let my maintainers know in
Slack:#secinf.

I do my best to automatically add new files to the build, but some moz.build files
are complicated and you may need to fix them manually.

Flags: needinfo?(cchang)
Attachment #9346517 - Attachment is obsolete: true

Update Bot added pal.asm to the 'x86_64' block but it is needed also on 'x86'. Trying that.

Assignee: nobody → karlt
Status: NEW → ASSIGNED
Flags: needinfo?(cchang)

These are not used and produce Update Bot warnings such as
https://bugzilla.mozilla.org/show_bug.cgi?id=1846318#c1

Pushed by ktomlinson@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/1b4306ca83ab
exclude tests/checkasm from dav1d vendor r=chunmin
https://hg.mozilla.org/integration/autoland/rev/e000527736de
update dav1d to e58afe4dd9057591882a01c31382c203e8a61c92 r=chunmin
Status: ASSIGNED → RESOLVED
Closed: 8 months ago
Resolution: --- → FIXED
Target Milestone: --- → 120 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: