libvpx not using multi-threaded decoding

RESOLVED FIXED in Firefox 43

Status

()

Core
Audio/Video: Playback
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: jya, Assigned: jya)

Tracking

Trunk
mozilla44
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(firefox42 affected, firefox43 fixed, firefox44 fixed)

Details

Attachments

(1 attachment)

(Assignee)

Description

3 years ago
The current VPXDecoder (and WebMReader) are using libvpx with the default decoding option which is to use a single thread for all operations.

We should use multi-thread operations if possible.

FFmpeg configure libvpx with min(16, num_processors) ; which chrome sets it to two.

We should also ensure that libvpx is built with multi-threading support.
(Assignee)

Updated

3 years ago
Blocks: 1210222
(Assignee)

Comment 1

3 years ago
Created attachment 8671711 [details] [diff] [review]
[vpx] P1. Configure libvpx to use two threads.

This is using the same logic as chromium.
Attachment #8671711 - Flags: review?(ajones)
Attachment #8671711 - Flags: review?(ajones) → review+
https://hg.mozilla.org/mozilla-central/rev/b29820b34e78
Status: NEW → RESOLVED
Last Resolved: 3 years ago
status-firefox44: affected → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
(Assignee)

Comment 4

3 years ago
Comment on attachment 8671711 [details] [diff] [review]
[vpx] P1. Configure libvpx to use two threads.

This is part of the 1193614 uplift.

Approval Request Comment
[Feature/regressing bug #]: 1193614
[User impact if declined]: Video playback will be slower, causing frames to be skipped.
[Describe test coverage new/current, TreeHerder]: current media tests
[Risks and why]: This low-risk patch helps to improve decoding speed by using more than one thread to decode. This is the same approach has done by popular media players and chrome.
[String/UUID change made/needed]: None
Attachment #8671711 - Flags: approval-mozilla-beta?
Attachment #8671711 - Flags: approval-mozilla-aurora?
status-firefox42: --- → affected
status-firefox43: --- → affected
Assignee: nobody → jyavenard
Comment on attachment 8671711 [details] [diff] [review]
[vpx] P1. Configure libvpx to use two threads.

We are very late in the cycle: we are going to build beta 9 tomorrow.
I think this can wait 43 and we will have more time to test the feature.
Attachment #8671711 - Flags: approval-mozilla-beta? → approval-mozilla-beta-
(Assignee)

Updated

3 years ago
Blocks: 1193614
(Assignee)

Updated

3 years ago
Depends on: 1217226
No longer depends on: 1217226
Comment on attachment 8671711 [details] [diff] [review]
[vpx] P1. Configure libvpx to use two threads.

May improve video decoding performance and has some test coverage; let's try it in aurora.
Attachment #8671711 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
jya, do we have a baseline to measure performance to see if this improves things?
Flags: needinfo?(jyavenard)
(Assignee)

Comment 8

3 years ago
(In reply to Liz Henry (:lizzard) (needinfo? me) from comment #7)
> jya, do we have a baseline to measure performance to see if this improves
> things?

Dan found that for a typical VP9 video it has effectively halved the decoding time (from 30+ms to 16ms)

We do not have otherwise a tool readily available to measure decoding speed. We have tools that can provide log, but that need a debug build.
Flags: needinfo?(jyavenard)
I'm ok just believing y'all's judgement, but was curious if you were going to come back and measure it after the uplift.  Carry on!
(Assignee)

Updated

2 years ago
Duplicate of this bug: 683825
You need to log in before you can comment on or make changes to this bug.