Closed Bug 1841193 Opened 3 years ago Closed 3 years ago

Save unnecessary copies in VideoDecoder

Categories

(Core :: Audio/Video: Web Codecs, enhancement)

enhancement

Tracking

()

RESOLVED FIXED
117 Branch
Tracking Status
firefox117 --- fixed

People

(Reporter: chunmin, Assigned: chunmin)

References

(Blocks 1 open bug)

Details

Attachments

(3 files)

D182476 in bug 1831451 will add a VideoDecoderConfigInternal class to hold data from VideoDecoderConfig. However, with the changes, description data from VideoDecoderConfig will be copied twice in VideoDecoder::Configure and VideoDecoder::IsConfigSupported (See https://phabricator.services.mozilla.com/D182476?id=737377#inline-1011335).

We should make it copy once

Summary: Save unnecessary copy in VideoDecoder → Save unnecessary copies in VideoDecoder

Depends on D182533

Assignee: nobody → cchang
Attachment #9341853 - Attachment description: Bug 1841193 - Save unnecessary in VideoDecoder::Configure → Bug 1841193 - Save unnecessary in Configure

This patch reworks CanDecode(). By making it accept not only
VideoDecoderConfigInternal but also VideoDecoderConfig as its argument,
the description data copied by converting VideoDecoderConfig to
VideoDecoderConfigInternal when checking the decodable information for
the given VideoDecoderConfig can be saved.

Depends on D182534

Attachment #9341853 - Attachment description: Bug 1841193 - Save unnecessary in Configure → Bug 1841193 - Save unnecessary copy in Configure
Attachment #9341968 - Attachment description: Bug 1841193 - Save unnecessary in IsConfigSupported → Bug 1841193 - Save unnecessary copy in IsConfigSupported
Pushed by cchang@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/af5948aa8a7f Remove unused variable r=padenot https://hg.mozilla.org/integration/autoland/rev/da31720ea44f Save unnecessary copy in Configure r=padenot https://hg.mozilla.org/integration/autoland/rev/b5482dea9fce Save unnecessary copy in IsConfigSupported r=padenot
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: