Closed Bug 1333341 Opened 9 years ago Closed 9 years ago

VideoTrackEncoder is subject to an accumulating rounding error

Categories

(Core :: Audio/Video: Recording, defect, P1)

53 Branch
defect

Tracking

()

RESOLVED FIXED
mozilla54
Tracking Status
firefox52 --- unaffected
firefox53 --- fixed
firefox54 --- fixed

People

(Reporter: pehrsons, Assigned: pehrsons)

References

Details

Attachments

(3 files, 1 obsolete file)

Bug 1330918 made VideoTrackEncoder base the encoded frames on the incoming frames' timestamps rather than their duration in track rate units. This was done by converting timestamp diffs to duration in track rate units, alas introducing a rounding error. These were then passed to existing code for encoding - which would base the start of frame N on the duration of frame N-1, alas the rounding error is accumulating. I have a gtest to test this, and a fix in the works.
Rank: 17
Priority: -- → P1
Hmm, I did remove all reviewers before publishing, but apparently that didn't work. For now I just want to run this on try.
Attachment #8829822 - Flags: review?(rjesup)
Attachment #8829823 - Flags: review?(jyavenard)
Attachment #8829824 - Flags: review?(rjesup)
Attachment #8829823 - Attachment is obsolete: true
Comment on attachment 8829822 [details] Bug 1333341 - Fix accumulating rounding error in VideoTrackEncoder. https://reviewboard.mozilla.org/r/106814/#review107868
Attachment #8829822 - Flags: review?(rjesup) → review+
Comment on attachment 8829824 [details] Bug 1333341 - Fix accumulating rounding error in VP8TrackEncoder. https://reviewboard.mozilla.org/r/106818/#review107872 ::: dom/media/encoder/VP8TrackEncoder.cpp:573 (Diff revision 2) > - GetEncodedPartitions(aData); > + rv = GetEncodedPartitions(aData); > + NS_ENSURE_SUCCESS(rv, NS_ERROR_FAILURE); still no fan of NS_ENSURE_SUCCESS()... hidden returns are not good. But not a big deal given other uses. If this is the first use here, maybe avoid it.
Attachment #8829824 - Flags: review?(rjesup) → review+
Attachment #8829821 - Flags: review?(rjesup) → review+
Comment on attachment 8829824 [details] Bug 1333341 - Fix accumulating rounding error in VP8TrackEncoder. https://reviewboard.mozilla.org/r/106818/#review107872 > still no fan of NS_ENSURE_SUCCESS()... hidden returns are not good. But not a big deal given other uses. If this is the first use here, maybe avoid it. Second use :/ First one is original.
Pushed by pehrsons@gmail.com: https://hg.mozilla.org/integration/autoland/rev/33824207f7a3 Add gtest for per-frame rounding error. r=jesup https://hg.mozilla.org/integration/autoland/rev/25a00c4aa2a6 Fix accumulating rounding error in VideoTrackEncoder. r=jesup https://hg.mozilla.org/integration/autoland/rev/28765570b293 Fix accumulating rounding error in VP8TrackEncoder. r=jesup
Comment on attachment 8829822 [details] Bug 1333341 - Fix accumulating rounding error in VideoTrackEncoder. Approval Request Comment [Feature/Bug causing the regression]: Bug 1330918 [User impact if declined]: A recorded video track might be too short, getting out of sync with the audio track, if available. [Is this code covered by automated tests?]: Yes [Has the fix been verified in Nightly?]: Yes [Needs manual test from QE? If yes, steps to reproduce]: No [List of other uplifts needed for the feature/fix]: None [Is the change risky?]: Low risk [Why is the change risky/not risky?]: Changes are not trivial, but test coverage is good. [String changes made/needed]: None This uplift request applies to all patches on this bug.
Attachment #8829822 - Flags: approval-mozilla-aurora?
Comment on attachment 8829822 [details] Bug 1333341 - Fix accumulating rounding error in VideoTrackEncoder. Regression with 53, let's uplift this for aurora
Attachment #8829822 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Regressions: 1560215
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: