Closed Bug 1698699 Opened 2 years ago Closed 5 months ago

Update libyuv

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
104 Branch
Tracking Status
firefox104 --- fixed

People

(Reporter: jbauman, Assigned: ng)

References

(Blocks 2 open bugs, )

Details

Attachments

(8 files)

There are a number of new features that are necessary for Firefox, but the proximal one for this issue is support for converting full-range images in the BT.2020 and BT.709 color spaces as mentioned in https://bugzilla.mozilla.org/show_bug.cgi?id=1654461#c4.

The last update of libyuv in mozilla-cenral was in bug 1540760, nearly 2 years ago and the project has subsequently switched from gyp (which mozbuild supports) to gn (which mozbuild does not yet fully support).

BT.2020 and BT.709 color spaces

BT.2020-ncl and BT.709 YCbCr matrices

Hi, you might be interested to know that libyuv just added back a gyp build file.
Also note that libyuv recently added support for bilinear chroma upsampling which would help with bug 1657300

Oh, that is useful information! Thanks for the update, maryla.

Blocks: 1761519
Blocks: 1657300
See Also: 1657300
Blocks: 1773840
Assignee: nobody → na-g
Blocks: 1776141
Pushed by na-g@nostrum.com:
https://hg.mozilla.org/integration/autoland/rev/f0da7c35e088
P0 - remove use of deprecated libyuv int types;r=mjf
https://hg.mozilla.org/integration/autoland/rev/7016afe1f7f4
P1 - remove absorbed bug_1491848 cherry-picks;r=mjf
https://hg.mozilla.org/integration/autoland/rev/95c49f3cfc03
P2 - remove absorbed add_H444ToARGB.patch;r=mjf
https://hg.mozilla.org/integration/autoland/rev/0cc8a5a2d484
P3 - remove no longer used allow_disabling_asm_avx2.patch;r=mjf
https://hg.mozilla.org/integration/autoland/rev/edf2a2cb7803
P4 - update line numbers for fix_build_errors.patch;r=mjf
https://hg.mozilla.org/integration/autoland/rev/97f5dde2d55e
P5 - Update vendored libyuv;r=mjf
https://hg.mozilla.org/integration/autoland/rev/b2606be8a0cf
P6 - Move convert_from_argb.cc to non-unified build;r=mjf

It looks like there is a failure on Windows "hybrid build" does anyone know where I can find documentation on this build target?

https://treeherder.mozilla.org/logviewer?job_id=382687908&repo=autoland&lineNumber=37990

I doubt I will be able to correct this on the double. Sheriffs, please feel free to backout this bug, and I will investigate the failure, and reland later.

Backed out for causing bp-hybrid bustages on scale_yuv_argb.

Push with failures

Failure log

Backout link

[task 2022-06-27T22:17:27.051Z] 22:17:27     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/gfx/ycbcr'
[task 2022-06-27T22:17:27.054Z] 22:17:27     INFO -  /builds/worker/fetches/sccache/sccache /builds/worker/fetches/clang/bin/clang-cl -Xclang -std=c++17 -Foscale_yuv_argb.obj -c  -I/builds/worker/workspace/obj-build/dist/stl_wrappers -guard:cf -DNDEBUG=1 -DTRIMMED=1 -DWINAPI_NO_BUNDLED_LIBRARIES -DMOZ_HAS_MOZGLUE -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DSTATIC_EXPORTABLE_JS_API -I/builds/worker/checkouts/gecko/gfx/ycbcr -I/builds/worker/workspace/obj-build/gfx/ycbcr -I/builds/worker/checkouts/gecko/media/libyuv/libyuv/include -I/builds/worker/workspace/obj-build/dist/include -I/builds/worker/workspace/obj-build/dist/include/nspr -I/builds/worker/workspace/obj-build/dist/include/nss -MD -FI /builds/worker/workspace/obj-build/mozilla-config.h -DMOZILLA_CLIENT -Qunused-arguments -Qunused-arguments -W3 -Wbitfield-enum-conversion -Wdeprecated-this-capture -Wempty-body -Wformat-type-confusion -Wignored-qualifiers -Wpointer-arith -Wshadow-field-in-constructor-modified -Wsign-compare -Wtype-limits -Wno-error=tautological-type-limit-compare -Wunreachable-code -Wunreachable-code-return -Wunused-but-set-parameter -Wno-invalid-offsetof -Wclass-varargs -Wempty-init-stmt -Wfloat-overflow-conversion -Wfloat-zero-conversion -Wloop-analysis -Wno-range-loop-analysis -Wc++2a-compat -Wcomma -Wenum-compare-conditional -Wimplicit-fallthrough -Werror=non-literal-null-conversion -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wno-error=backend-plugin -Wno-error=free-nonheap-object -Wno-error=return-std-move -Wno-error=atomic-alignment -Wno-error=deprecated-copy -Wno-unknown-pragmas -Wno-ignored-pragmas -Wno-deprecated-declarations -Wno-microsoft-enum-value -Wno-microsoft-include -Wno-invalid-noreturn -Wno-inconsistent-missing-override -Wno-implicit-exception-spec-mismatch -Wno-microsoft-exception-spec -Wno-unused-local-typedef -Wno-ignored-attributes -Wno-used-but-marked-unused -Wno-gnu-zero-variadic-macro-arguments -Wno-psabi -Wthread-safety -fcrash-diagnostics-dir=/builds/worker/artifacts -TP -Zc:sizedDealloc- -D_HAS_EXCEPTIONS=0 -Gy -Zc:inline -Gw -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING -GR- -Z7 -Xclang -load -Xclang /builds/worker/workspace/obj-build/build/clang-plugin/libclang-plugin.so -Xclang -add-plugin -Xclang moz-check -O2 -Oy- -Werror -fno-strict-aliasing -Xclang -ffp-contract=off  -Xclang -MP -Xclang -dependency-file -Xclang .deps/scale_yuv_argb.obj.pp -Xclang -MT -Xclang scale_yuv_argb.obj   /builds/worker/checkouts/gecko/gfx/ycbcr/scale_yuv_argb.cpp
[task 2022-06-27T22:17:27.054Z] 22:17:27     INFO -  /builds/worker/checkouts/gecko/gfx/ycbcr/scale_yuv_argb.cpp(215,28): error: use of undeclared identifier 'kYuv2020Constants'
[task 2022-06-27T22:17:27.056Z] 22:17:27     INFO -        iter.yuvconstants = &kYuv2020Constants;
[task 2022-06-27T22:17:27.056Z] 22:17:27     INFO -                             ^
[task 2022-06-27T22:17:27.057Z] 22:17:27     INFO -  /builds/worker/checkouts/gecko/gfx/ycbcr/scale_yuv_argb.cpp(218,28): error: use of undeclared identifier 'kYuvH709Constants'
[task 2022-06-27T22:17:27.057Z] 22:17:27     INFO -        iter.yuvconstants = &kYuvH709Constants;
[task 2022-06-27T22:17:27.057Z] 22:17:27     INFO -                             ^
[task 2022-06-27T22:17:27.057Z] 22:17:27     INFO -  /builds/worker/checkouts/gecko/gfx/ycbcr/scale_yuv_argb.cpp(221,28): error: use of undeclared identifier 'kYuvI601Constants'
[task 2022-06-27T22:17:27.057Z] 22:17:27     INFO -        iter.yuvconstants = &kYuvI601Constants;
[task 2022-06-27T22:17:27.057Z] 22:17:27     INFO -                             ^
[task 2022-06-27T22:17:27.057Z] 22:17:27     INFO -  3 errors generated.
[task 2022-06-27T22:17:27.057Z] 22:17:27    ERROR -  gmake[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:669: scale_yuv_argb.obj] Error 1
[task 2022-06-27T22:17:27.057Z] 22:17:27     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/gfx/ycbcr'
[task 2022-06-27T22:17:27.057Z] 22:17:27     INFO -  gmake[4]: *** Waiting for unfinished jobs....
[task 2022-06-27T22:17:27.057Z] 22:17:27     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/gfx/vr'
[task 2022-06-27T22:17:27.057Z] 22:17:27     INFO -  gfx/vr/VRServiceHost.obj
[task 2022-06-27T22:17:27.057Z] 22:17:27     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/gfx/vr'
[task 2022-06-27T22:17:27.230Z] 22:17:27     INFO -  gmake[4]: Entering directory '/builds/worker/workspace/obj-build/gfx/skia'
Flags: needinfo?(na-g)

(In reply to Iulian Moraru from comment #13)

Backed out for causing bp-hybrid bustages on scale_yuv_argb.

Thank you for the back out.

Flags: needinfo?(na-g)

(In reply to Nico Grunbaum [:ng, @chew:mozilla.org] from comment #12)

It looks like there is a failure on Windows "hybrid build" does anyone know where I can find documentation on this build target?

https://firefox-source-docs.mozilla.org/build/buildsystem/unified-builds.html#building-outside-of-the-unified-environment

I think that you might simply be missing an include for libyuv/convert_argb.h in scale_yuv_argb.cpp
The color space constants used to be in libyuv/row.h but are now in libyuv/convert_argb.h

Here is the try build (before the patch was properly named for moz-phab submission) showing the hybrid build is fixed:
https://treeherder.mozilla.org/jobs?repo=try&revision=a94750d7b796c7163859da89e719971a21d9efb4&selectedTaskRun=Qp3gipquSMqANHavG31W3w.0

Pushed by na-g@nostrum.com:
https://hg.mozilla.org/integration/autoland/rev/548ed1a0458f
P0 - remove use of deprecated libyuv int types;r=mjf
https://hg.mozilla.org/integration/autoland/rev/b3fea319019b
P1 - remove absorbed bug_1491848 cherry-picks;r=mjf
https://hg.mozilla.org/integration/autoland/rev/e72535cc5e16
P2 - remove absorbed add_H444ToARGB.patch;r=mjf
https://hg.mozilla.org/integration/autoland/rev/160ac0812b55
P3 - remove no longer used allow_disabling_asm_avx2.patch;r=mjf
https://hg.mozilla.org/integration/autoland/rev/dbaf52949cea
P4 - update line numbers for fix_build_errors.patch;r=mjf
https://hg.mozilla.org/integration/autoland/rev/8ff9e5f444d6
P5 - Update vendored libyuv;r=mjf
https://hg.mozilla.org/integration/autoland/rev/ba6e49346e5c
P6 - Move convert_from_argb.cc to non-unified build;r=mjf
https://hg.mozilla.org/integration/autoland/rev/9aa0b72e2ab0
P7 - add missing include for hybrid builds. r=ng
See Also: → 1778533
You need to log in before you can comment on or make changes to this bug.