microsoft / microsoft/Windows-classic-samples
Use of attribute MF_SA_REQUIRED_SAMPLE_COUNT_PROGRESSIVE
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 5.7k
- Forks
- 3.3k
- PR merge metrics
- No merged PRs in 30d
Description
Windows SDK file \um\mftransform.h defines both
MF_SA_REQUIRED_SAMPLE_COUNT // {18802c61-324b-4952-abd0-176ff5c696ff}
MF_SA_REQUIRED_SAMPLE_COUNT_PROGRESSIVE // {b172d58e-fa77-4e48-8d2a-1df2d850eac2}
Shouldn't the following code in StreamSink.cpp reflect these?
// Update the required sample count based on the media type (progressive vs. interlaced)
if (m_unInterlaceMode == MFVideoInterlace_Progressive)
{
// XVP will hold on to 1 sample but that's the same sample we will internally hold on to
hr = SetUINT32(MF_SA_REQUIRED_SAMPLE_COUNT, SAMPLE_QUEUE_HIWATER_THRESHOLD);
}
else
{
// Assume we will need a maximum of 3 backward reference frames for deinterlacing
// However, one of the frames is "shared" with SVR
hr = SetUINT32(MF_SA_REQUIRED_SAMPLE_COUNT, SAMPLE_QUEUE_HIWATER_THRESHOLD + MAX_PAST_FRAMES - 1);
}
Instead of this, it seems like this code should do either one of the following:
- use the differentiated attribute keys I mentioned above to differentiate these cases, -or-
- set the value determined at this juncture into both of those attribute keys.
I'm not sure which of these options is best, since documentation on those attributes is quite thin.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in Samples/DX11VideoRenderer/cpp/StreamSink.cpp at the linked sample-count update and compare the Windows SDK definitions of MF_SA_REQUIRED_SAMPLE_COUNT and MF_SA_REQUIRED_SAMPLE_COUNT_PROGRESSIVE. Determine which attribute handling matches progressive and interlaced media, then verify that the selected keys receive the intended values and document the result in the code or issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- audio-video-rtc, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100