Closed Bug 1759324 Opened 2 years ago Closed 2 years ago

Update libvpx to v1.11.0


(Core :: WebRTC, task, P2)




101 Branch
Tracking Status
firefox101 --- fixed


(Reporter: johann.koenig, Assigned: johann.koenig)




(3 files)

Steps to reproduce:

libvpx was last updated to v1.8.2 in bug #1525393

There have since been a few new releases:

2021-09-27 v1.11.0 "Smew Duck"
This maintenance release adds support for VBR mode in VP9 rate control
interface, new codec controls to get quantization parameters and loop filter
levels, and includes several improvements to NEON and numerous bug fixes.

  • Upgrading:
    New codec control is added to get quantization parameters and loop filter

    VBR mode is supported in VP9 rate control library.

  • Enhancement:
    Numerous improvements for Neon optimizations.
    Code clean-up and refactoring.
    Calculation of rd multiplier is changed with BDRATE gains.

  • Bug fixes:
    Fix to overflow on duration.
    Fix to several instances of -Wunused-but-set-variable.
    Fix to avoid chroma resampling for 420mpeg2 input.
    Fix to overflow in calc_iframe_target_size.
    Fix to disallow skipping transform and quantization.
    Fix some -Wsign-compare warnings in simple_encode.
    Fix input file path in simple_encode_test.
    Fix valid range for under/over_shoot pct.

2021-03-09 v1.10.0 "Ruddy Duck"
This maintenance release adds support for darwin20 and new codec controls, as
well as numerous bug fixes.

  • Upgrading:
    New codec control is added to disable loopfilter for VP9.

    New encoder control is added to disable feature to increase Q on overshoot
    detection for CBR.

    Configure support for darwin20 is added.

    New codec control is added for VP9 rate control. The control ID of this
    interface is VP9E_SET_EXTERNAL_RATE_CONTROL. To make VP9 use a customized
    external rate control model, users will have to implement each callback
    function in vpx_rc_funcs_t and register them using libvpx API
    vpx_codec_control_() with the control ID.

  • Enhancement:
    Use -std=gnu++11 instead of -std=c++11 for c++ files.

  • Bug fixes:
    Override assembler with --as option of configure for MSVS.
    Fix several compilation issues with gcc 4.8.5.
    Fix to resetting rate control for temporal layers.
    Fix to the rate control stats of SVC example encoder when number of spatial
    layers is 1.
    Fix to reusing motion vectors from the base spatial layer in SVC.
    2 pass related flags removed from SVC example encoder.

2020-07-29 v1.9.0 "Quacking Duck"
This release adds support for NV12, a separate library for rate control, as
well as incremental improvements.

  • Upgrading:
    NV12 support is added to this release.
    A new interface is added for VP9 rate control. The new library libvp9rc.a
    must be linked by applications.
    Googletest is updated to v1.10.0. is compiled into a new library libsimple_encode.a with

  • Enhancement:
    Various changes to improve VP9 SVC, rate control, quality and speed to real
    time encoding.

  • Bug fixes:
    Fix key frame update refresh simulcast flexible svc.
    Fix to disable_16x16part speed feature for real time encoding.
    Fix some signed integer overflows for VP9 rate control.
    Fix initialization of delta_q_uv.
    Fix condition in regulate_q for cyclic refresh.
    Various fixes to dynamic resizing for VP9 SVC.

Actual results:

$ cd media/libvpx
$ ./ --commit v1.11.0
patching file libvpx/vp8/encoder/block.h
patching file libvpx/vp8/vp8_cx_iface.c
Hunk #1 succeeded at 921 (offset 66 lines).
patching file libvpx/vp9/vp9_cx_iface.c
Hunk #1 succeeded at 1353 with fuzz 1 (offset 224 lines).
patching file libvpx/vpx_dsp/
patching file libvpx/vpx_ports/
Hunk #1 succeeded at 23 (offset 2 lines).
$ ./generate_sources_mozbuild.shCreate temporary directory.
Generate config files.
#define HAVE_UNISTD_H 1
#define HAVE_UNISTD_H 1
#define HAVE_UNISTD_H 1
#define HAVE_UNISTD_H 1
#define HAVE_UNISTD_H 0
#define HAVE_UNISTD_H 0
#define HAVE_UNISTD_H 1
#define HAVE_UNISTD_H 1
#define HAVE_UNISTD_H 0
#define HAVE_UNISTD_H 1
Remove temporary directory.
Create temporary directory.
Generate config/linux/x64/_rtcd.h files.
Generate config/linux/ia32/
_rtcd.h files.
Generate config/mac/x64/_rtcd.h files.
Generate config/mac/ia32/
_rtcd.h files.
Generate config/win/x64/_rtcd.h files.
Generate config/win/ia32/
_rtcd.h files.
Generate config/linux/arm/_rtcd.h files.
Generate config/linux/arm64/
_rtcd.h files.
Generate config/win/aarch64/_rtcd.h files.
Generate config/generic/
_rtcd.h files.
Prepare Makefile.
Generate X86_64 source list.
Generate IA32 source list.
Generate ARM source list.
Generate ARM64 source list.
Generate generic source list.
Remove temporary directory.

Expected results:

0:20.92 Your build was successful!

Assignee: nobody → johann.koenig
Attachment #9267540 - Attachment description: WIP: Bug 1759324 - update libvpx to v1.11.0 → Bug 1759324 - update libvpx to v1.11.0
Ever confirmed: true

Adjust for minor offsets since v1.8.2

Depends on D140925

Attachment #9267542 - Attachment description: WIP: Bug 1759324 - update libvpx patches → Bug 1759324 - update libvpx patches

I'm not sure how to remove the "Changes Planned" tags from the patches. They are complete as far as I can tell.

Flags: needinfo?(dminor)
Flags: needinfo?(bvandyk)

Just want to mention that we usually use ffvpx or HW platform decoder (Windows, MacOS) for decoding vp8 and vp9. libvpx is only a back up option for us, and almost no chance to use it AFAIK. (maybe for WebRTC encoding, but I am not sure)

(In reply to johann.koenig from comment #3)

I'm not sure how to remove the "Changes Planned" tags from the patches. They are complete as far as I can tell.

I think you can change this through the Add Action menu in Phabricator. If you submitted this through MozPhab, there's also a --no-wip flag I believe.

Flags: needinfo?(dminor)

I believe WebRTC uses it for both encoding and decoding.

Thanks for pointing out the --no-wip flag. I could not find any "Add Action" menu on the site.

I check our codebase again. For encoding, we use platform encoder on Windows, MacOS and Android [1]. So it seems to me that only on Linux we would use libvpx. For decoding, we would also try to get the platform decoder first [2]. However, currently decoding for vpx is controlled by this pref [3] which is only enabled on Nightly. So on Beta and Release, we do use libvpx for vpx decoding for WebRTC.

Creating platform encoder in WebRTC

Platform encoder



Component: Audio/Video → WebRTC

I believe our MediaRecorder also uses a TrackEncoder the uses libvpx. That's a platform agnostic use case we should also keep an eye on for bustages as part of updates. Holding NI while I clear my plate to get time to look at this in more detail.

Is it correct to interpret the patches as?

  1. Pull new version of libvpx ontop of old version with not further changes.
  2. Make further changes in the form of updating Mozilla specific patches.

Step 1 included running the script to update the configuration files as well. There were no manual changes to files under media/livpx/livpx

I did specify python3 at the top of because it defaulted to python2 on my system.

This was changed in

libvpx became more restrictive about these values here:

Reset these to the original values which are the same ones used in WebRTC

Severity: -- → N/A
Type: enhancement → task
Priority: -- → P2
Pushed by
fix vp8 under/overshoot percentages r=bryce

Try run prior to landing:

(the patches there are a little haxxed to get the to apply locally, but are the same code as the ones in phabricator.)

Keywords: leave-open
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 101 Branch
You need to log in before you can comment on or make changes to this bug.