Closed Bug 1934009 Opened 1 year ago Closed 6 months ago

Implement Android encoder and decoder backends with NDK, via ffmpeg

Categories

(Core :: Audio/Video: Playback, task, P2)

task

Tracking

()

RESOLVED FIXED
143 Branch
Tracking Status
firefox143 --- fixed

People

(Reporter: padenot, Assigned: aosmond)

References

(Blocks 12 open bugs, Regressed 1 open bug)

Details

(Keywords: perf-alert, webcompat:platform-bug, Whiteboard: [fxdroid] [geckoview])

Attachments

(10 files, 22 obsolete files)

48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
48 bytes, text/x-phabricator-request
Details | Review
No description provided.
Blocks: 1934008
Blocks: 1526207
Type: defect → task
Blocks: hw-ffvpx
Assignee: nobody → aosmond
Status: NEW → ASSIGNED
Attachment #9460783 - Attachment description: WIP: Bug 1934009 - Add the MediaCodec NDK files to our ffmpeg copy. → Bug 1934009 - Add the MediaCodec NDK files to our ffmpeg copy.
Attachment #9460784 - Attachment description: WIP: Bug 1934009 - Log PDM order on initialization to better understand what is being picked at run time. → Bug 1934009 - Log PDM order on initialization to better understand what is being picked at run time.
Attachment #9460785 - Attachment description: WIP: Bug 1934009 - Initialize FFmpeg PDM in GPU process on Android, behind a pref. → Bug 1934009 - Initialize FFmpeg PDM in GPU process on Android, behind a pref.
Attachment #9460786 - Attachment description: WIP: Bug 1934009 - DO NOT LAND - Comment out remote android PDM to speed up iterating. → Bug 1934009 - DO NOT LAND - Comment out remote android PDM to speed up iterating.
Attachment #9460787 - Attachment description: WIP: Bug 1934009 - Allow running FFmpegDecoderModule in the GPU process on Android. → Bug 1934009 - Allow running FFmpegDecoderModule in the GPU process on Android.
Attachment #9460788 - Attachment description: WIP: Bug 1934009 - Expose one more MediaCodec NDK related function through FFmpegLibWrapper. → Bug 1934009 - Expose one more MediaCodec NDK related function through FFmpegLibWrapper.
Attachment #9460789 - Attachment description: WIP: Bug 1934009 - Teach FFmpegVideoDecoder to perform hardware decoding on Android. → Bug 1934009 - Teach FFmpegVideoDecoder to perform hardware decoding on Android.
Attachment #9460790 - Attachment description: WIP: Bug 1934009 - Add a log module for VideoFrameContainer. → Bug 1934009 - Add a log module for VideoFrameContainer.
Attachment #9460791 - Attachment description: WIP: Bug 1934009 - Add a log module for CompositableTransactionParent. → Bug 1934009 - Add a log module for CompositableTransactionParent.
Attachment #9460792 - Attachment description: WIP: Bug 1934009 - DO NOT LAND - flip some pref to ease testing Android MediaCodec NDK via ffmpeg → Bug 1934009 - DO NOT LAND - flip some pref to ease testing Android MediaCodec NDK via ffmpeg
Duplicate of this bug: 1771196
Blocks: 1955830
Whiteboard: [fxdroid] [geckoview]
Severity: -- → S3
Priority: -- → P2
Blocks: 1974849

Comment on attachment 9460784 [details]
Bug 1934009 - Log PDM order on initialization to better understand what is being picked at run time.

Revision D235023 was moved to bug 1977399. Setting attachment 9460784 [details] to obsolete.

Attachment #9460784 - Attachment is obsolete: true
Attachment #9460783 - Attachment description: Bug 1934009 - Add the MediaCodec NDK files to our ffmpeg copy. → Bug 1934009 - Part 1. Add the MediaCodec NDK files to our ffmpeg copy.
Attachment #9477260 - Attachment description: WIP: Bug 1934009 - Add required files from ffmpeg to build on Android ARM. → Bug 1934009 - Part 2. Add the ARM specializations to our ffmpeg copy.
Attachment #9477261 - Attachment description: WIP: Bug 1934009 - Update ffmpeg config and build files to support Android arm and aarch64. → Bug 1934009 - Part 5. Update ffmpeg config and build files to support Android.
Attachment #9460788 - Attachment description: Bug 1934009 - Expose one more MediaCodec NDK related function through FFmpegLibWrapper. → Bug 1934009 - Part 6. Expose one more MediaCodec NDK related function through FFmpegLibWrapper.
Attachment #9460789 - Attachment description: Bug 1934009 - Teach FFmpegVideoDecoder to perform hardware decoding on Android. → Bug 1934009 - Part 8. Teach FFmpegVideoDecoder to perform hardware decoding on Android.
Attachment #9477263 - Attachment description: WIP: Bug 1934009 - Make rendering pipeline support presenting SurfaceTextureImage from FFmpegVideoDecoder. → Bug 1934009 - Part 9. Make rendering pipeline support presenting SurfaceTextureImage from FFmpegVideoDecoder.
Blocks: 1977468
Attachment #9500609 - Attachment description: Bug 1934009 - Part 3. Patch ffvpx to avoid importing unnecessary H264/HEVC dependencies. → Bug 1934009 - Part 2. Patch ffvpx to avoid importing unnecessary H264/HEVC dependencies.
Attachment #9500610 - Attachment description: Bug 1934009 - Part 4. Patch ffvpx to expose end-of-stream flag for MediaCodec decoders. → Bug 1934009 - Part 3. Patch ffvpx to expose end-of-stream flag for MediaCodec decoders.
Attachment #9477261 - Attachment description: Bug 1934009 - Part 5. Update ffmpeg config and build files to support Android. → Bug 1934009 - Part 4. Update ffmpeg config and build files to support Android.
Attachment #9460788 - Attachment description: Bug 1934009 - Part 6. Expose one more MediaCodec NDK related function through FFmpegLibWrapper. → Bug 1934009 - Part 5. Expose one more MediaCodec NDK related function through FFmpegLibWrapper.
Attachment #9500611 - Attachment description: Bug 1934009 - Part 7. Allow the RDD process on Android. → Bug 1934009 - Part 6. Allow the RDD process on Android.
Attachment #9460789 - Attachment description: Bug 1934009 - Part 8. Teach FFmpegVideoDecoder to perform hardware decoding on Android. → Bug 1934009 - Part 7. Teach FFmpegVideoDecoder to perform hardware decoding on Android.
Attachment #9477263 - Attachment description: Bug 1934009 - Part 9. Make rendering pipeline support presenting SurfaceTextureImage from FFmpegVideoDecoder. → Bug 1934009 - Part 8. Make rendering pipeline support presenting SurfaceTextureImage from FFmpegVideoDecoder.
Attachment #9500613 - Attachment description: Bug 1934009 - Part 10. Rework FFmpegDataDecoder draining to allow pausing/resuming. → Bug 1934009 - Part 9. Rework FFmpegDataDecoder draining to allow pausing/resuming.
Attachment #9500614 - Attachment description: Bug 1934009 - Part 11. Teach FFmpegAudioDecoder to perform hardware decoding on Android. → Bug 1934009 - Part 10. Teach FFmpegAudioDecoder to perform hardware decoding on Android.

Comment on attachment 9477260 [details]
Bug 1934009 - Part 2. Add the ARM specializations to our ffmpeg copy.

Revision D244497 was moved to bug 1977468. Setting attachment 9477260 [details] to obsolete.

Attachment #9477260 - Attachment is obsolete: true
Attachment #9477262 - Attachment is obsolete: true
Attachment #9478082 - Attachment is obsolete: true
Attachment #9478083 - Attachment is obsolete: true
Attachment #9460792 - Attachment is obsolete: true
Attachment #9460786 - Attachment is obsolete: true
Attachment #9460791 - Attachment is obsolete: true
Attachment #9460790 - Attachment is obsolete: true
Attachment #9460787 - Attachment is obsolete: true
Attachment #9460785 - Attachment is obsolete: true
Attachment #9460788 - Attachment is obsolete: true
Attachment #9460783 - Attachment is obsolete: true
Attachment #9500611 - Attachment is obsolete: true
Attachment #9460789 - Attachment is obsolete: true
Attachment #9500609 - Attachment is obsolete: true
Attachment #9500610 - Attachment is obsolete: true
Attachment #9477261 - Attachment is obsolete: true
Attachment #9500759 - Attachment is obsolete: true
Attachment #9477263 - Attachment is obsolete: true
Attachment #9500613 - Attachment is obsolete: true
Attachment #9500614 - Attachment is obsolete: true
Blocks: 1709960
Blocks: 1915541
Blocks: 1977390
Depends on: 1709948
Blocks: 1709948
No longer depends on: 1709948
Blocks: 1980466
Blocks: 1961624
No longer blocks: 1980466
Pushed by aosmond@mozilla.com: https://github.com/mozilla-firefox/firefox/commit/e3c9a784011a https://hg.mozilla.org/integration/autoland/rev/73d48ef5571e Part 1. Add the MediaCodec NDK files to our ffmpeg copy. r=media-playback-reviewers,jolin https://github.com/mozilla-firefox/firefox/commit/aac5bad7a131 https://hg.mozilla.org/integration/autoland/rev/35f161e1fa7d Part 2. Patch ffvpx to avoid importing unnecessary H264/HEVC dependencies. r=media-playback-reviewers,jolin https://github.com/mozilla-firefox/firefox/commit/b7ff02f5b401 https://hg.mozilla.org/integration/autoland/rev/9efdb4e152ff Part 3. Patch ffvpx to expose end-of-stream flag for MediaCodec decoders. r=media-playback-reviewers,jolin https://github.com/mozilla-firefox/firefox/commit/9b9cf2c4be7e https://hg.mozilla.org/integration/autoland/rev/bd3ab9487871 Part 4. Update ffmpeg config and build files to support Android. r=media-playback-reviewers,jolin https://github.com/mozilla-firefox/firefox/commit/194a36f59d93 https://hg.mozilla.org/integration/autoland/rev/303d69a39570 Part 5. Expose one more MediaCodec NDK related function through FFmpegLibWrapper. r=media-playback-reviewers,jolin https://github.com/mozilla-firefox/firefox/commit/f6148c95eebc https://hg.mozilla.org/integration/autoland/rev/6a648f21ccd9 Part 6. Allow the RDD process on Android. r=geckoview-reviewers,jolin,nalexander https://github.com/mozilla-firefox/firefox/commit/ebe516ffc144 https://hg.mozilla.org/integration/autoland/rev/dd768909145d Part 7. Teach FFmpegVideoDecoder to perform hardware decoding on Android. r=media-playback-reviewers,jolin https://github.com/mozilla-firefox/firefox/commit/1484fb0a4b09 https://hg.mozilla.org/integration/autoland/rev/5d78c5be46be Part 8. Make rendering pipeline support presenting SurfaceTextureImage from FFmpegVideoDecoder. r=media-playback-reviewers,jolin https://github.com/mozilla-firefox/firefox/commit/7e9c2b3561df https://hg.mozilla.org/integration/autoland/rev/df27149c03e3 Part 9. Rework FFmpegDataDecoder draining to allow pausing/resuming. r=media-playback-reviewers,jolin https://github.com/mozilla-firefox/firefox/commit/7076e12d217d https://hg.mozilla.org/integration/autoland/rev/4cee7dd64eca Part 10. Teach FFmpegAudioDecoder to perform hardware decoding on Android. r=media-playback-reviewers,jolin https://github.com/mozilla-firefox/firefox/commit/73f2a7040deb https://hg.mozilla.org/integration/autoland/rev/13efd6515c88 apply code formatting via Lando

(In reply to Pulsebot from comment #36)

Pushed by aosmond@mozilla.com:
https://github.com/mozilla-firefox/firefox/commit/e3c9a784011a
https://hg.mozilla.org/integration/autoland/rev/73d48ef5571e
Part 1. Add the MediaCodec NDK files to our ffmpeg copy.
r=media-playback-reviewers,jolin
https://github.com/mozilla-firefox/firefox/commit/aac5bad7a131
https://hg.mozilla.org/integration/autoland/rev/35f161e1fa7d
Part 2. Patch ffvpx to avoid importing unnecessary H264/HEVC dependencies.
r=media-playback-reviewers,jolin
https://github.com/mozilla-firefox/firefox/commit/b7ff02f5b401
https://hg.mozilla.org/integration/autoland/rev/9efdb4e152ff
Part 3. Patch ffvpx to expose end-of-stream flag for MediaCodec decoders.
r=media-playback-reviewers,jolin
https://github.com/mozilla-firefox/firefox/commit/9b9cf2c4be7e
https://hg.mozilla.org/integration/autoland/rev/bd3ab9487871
Part 4. Update ffmpeg config and build files to support Android.
r=media-playback-reviewers,jolin
https://github.com/mozilla-firefox/firefox/commit/194a36f59d93
https://hg.mozilla.org/integration/autoland/rev/303d69a39570
Part 5. Expose one more MediaCodec NDK related function through
FFmpegLibWrapper. r=media-playback-reviewers,jolin
https://github.com/mozilla-firefox/firefox/commit/f6148c95eebc
https://hg.mozilla.org/integration/autoland/rev/6a648f21ccd9
Part 6. Allow the RDD process on Android.
r=geckoview-reviewers,jolin,nalexander
https://github.com/mozilla-firefox/firefox/commit/ebe516ffc144
https://hg.mozilla.org/integration/autoland/rev/dd768909145d
Part 7. Teach FFmpegVideoDecoder to perform hardware decoding on Android.
r=media-playback-reviewers,jolin
https://github.com/mozilla-firefox/firefox/commit/1484fb0a4b09
https://hg.mozilla.org/integration/autoland/rev/5d78c5be46be
Part 8. Make rendering pipeline support presenting SurfaceTextureImage from
FFmpegVideoDecoder. r=media-playback-reviewers,jolin
https://github.com/mozilla-firefox/firefox/commit/7e9c2b3561df
https://hg.mozilla.org/integration/autoland/rev/df27149c03e3
Part 9. Rework FFmpegDataDecoder draining to allow pausing/resuming.
r=media-playback-reviewers,jolin
https://github.com/mozilla-firefox/firefox/commit/7076e12d217d
https://hg.mozilla.org/integration/autoland/rev/4cee7dd64eca
Part 10. Teach FFmpegAudioDecoder to perform hardware decoding on Android.
r=media-playback-reviewers,jolin
https://github.com/mozilla-firefox/firefox/commit/73f2a7040deb
https://hg.mozilla.org/integration/autoland/rev/13efd6515c88
apply code formatting via Lando

Perfherder has detected a browsertime performance change from push 13efd6515c880c58fa37e2ceecce3ef8724fe95a.

If you have any questions, please reach out to a performance sheriff. Alternatively, you can find help on Slack by joining #perf-help, and on Matrix you can find help by joining #perftest.

Improvements:

Ratio Test Platform Options Absolute values (old vs new) Performance Profiles
4% vpl-av1 secondFrame android-hw-a55-14-0-aarch64-shippable warm webrender 213.62 -> 204.30 Before/After

Details of the alert can be found in the alert summary, including links to graphs and comparisons for each of the affected tests.

If you need the profiling jobs you can trigger them yourself from treeherder job view or ask a performance sheriff to do that for you.

You can run all of these tests on try with ./mach try perf --alert 46163

The following documentation link provides more information about this command.

Keywords: perf-alert
QA Whiteboard: [qa-triage-done-c144/b143]
Regressions: 1987000
Blocks: 1649110
Blocks: 1996503
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: