Closed Bug 1470386 Opened 4 years ago Closed 4 years ago

Recycle TextureClient at IMFYCbCrImage


(Core :: Graphics: Layers, enhancement)

Not set



Tracking Status
firefox63 --- fixed


(Reporter: sotaro, Assigned: sotaro)




(1 file, 3 obsolete files)

It seems that we do not need to use IMFYCbCrImage. We could use D3D11YCbCrImage instead of IMFYCbCrImage.
attachment 8987007 [details] [diff] [review] just calls VideoData::CreateAndCopyData() with mKnowsCompositor. With it, VideoData::CreateAndCopyData() creates D3D11YCbCrImage if it is possible.
Blocks: 1468873
Attachment #8987007 - Flags: review?(nical.bugzilla)
Comment on attachment 8987007 [details] [diff] [review]
patch - Remove IMFYCbCrImage usage in WMFVideoMFTManager::CreateBasicVideoFrame()

Review of attachment 8987007 [details] [diff] [review]:

Sounds good to me in principle but I don't know that well the implications. Deferring the review to Matt.
Attachment #8987007 - Flags: review?(nical.bugzilla) → review?(matt.woodrow)
The difference between these two is that IMFYCbCrImage just takes a reference to the IMFMediaBuffer in the constructor, instead of making a copy/upload. The upload is done when we request the TextureData.

This moves the upload time from the decoder thread to the image bridge child thread, and (at least when I wrote it) gave us better throughput, since we can start decoding the next frame without waiting. It was noticeable when decoding 4k videos in software.

We only get to use that image type for one path though, since most decoders don't give us a refcounted handle to the image data.
Intent of this bug was to recycle ID3D11Texture2D during doing h.264 software decoding. I am going to try another way.
Attachment #8987007 - Flags: review?(matt.woodrow)
Summary: Remove IMFYCbCrImage usage in WMFVideoMFTManager::CreateBasicVideoFrame() → Recycle IMFYCbCrImage at IMFYCbCrImage
Summary: Recycle IMFYCbCrImage at IMFYCbCrImage → Recycle TextureClient at IMFYCbCrImage
Attachment #8987007 - Attachment is obsolete: true
Attachment #8987774 - Attachment is obsolete: true
With attachment 8988045 [details] [diff] [review], IMFYCbCrImage becomes to use D3D11YCbCrRecycleAllocator and DXGIYCbCrTextureAllocationHelper to allocate DXGIYCbCrTextureData.
Attachment #8988045 - Flags: review?(matt.woodrow)
Attachment #8988045 - Flags: review?(matt.woodrow) → review+
Pushed by
Recycle TextureClient at IMFYCbCrImage r=mattwoodrow
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla63
You need to log in before you can comment on or make changes to this bug.