Dynamic format change about MF_MT_INTERLACE_MODE of media type?? RRS feed

  • Question

  • There are some question about this

    1. Does all MFVideoInterlaceMode such as MFVideoInterlace_Progressive can represent by MFVideoInterlace_MixedInterlaceOrProgressive with related interlace flags on sample such as  MFSampleExtension_Interlaced, MFSampleExtension_BottomFieldFirst, etc.

    2. If my original output MF_MT_INTERLACE_MODE = MFVideoInterlace_FieldInterleavedUpperFirst. When I do deinterlacing under my module, should I trigger format change for the MFT to change media type to MFVideoInterlace_Progessive?? Or I can only set MFSampleExtension_Intrlaced to FALSE even though it conflicts with msdn http://msdn.microsoft.com/en-us/library/windows/desktop/aa367729(v=vs.85).aspx#interlace_flags

    3. Is that I can only check MF_MT_INTERLACE_MODE MFVideoInterlace_Progressive , MFVideoInterlace_FieldInterleavedUpperFirst and MFVideoInterlace_FieldInterleavedLowerFirst of media type and ignore the optional interlace flag on samples to verify the stream is interlaced or not. As for the MFVideoInterlace_FieldSingleUpper , MFVideoInterlace_FieldSingleLowe and MFVideoInterlace_MixedInterlaceOrProgressive, I only check the required interlace flag on sample.

    4. From msdn http://msdn.microsoft.com/en-us/library/windows/desktop/aa367729(v=vs.85).aspx#interlace_flags, it says that "each of these attributes can have three values: either TRUE,FALSE, or not set". What's the value of not set??  return error MF_E_ATTRIBUTENOTFOUND??


    Thursday, April 5, 2012 3:20 AM


  • (1) If you might have switching interlace modes in a stream, or a mix of progressive and interlaced frames, the output media type of your component should be MFVideoInterlace_MixedInterlaceOrProgressive.  Then you set the MFSampleExtension_* attributes on each sample to specify the interlace mode for that frame.

    (2) As noted above, if your stream might contain a mix of interlaced and progressive frames, set MFVideoInterlace_MixedInterlaceOrProgressive on the media type.  Change the MFSampleExtension_Interlaced attribute on each sample to specify whether or not that sample is interlaced.

    (3) If the media type of the stream is MFVideoInterlace_Progressive, MFVideoInterlace_FieldInterleavedUpperFirst, or MFVideoInterlace_FieldInterleavedLowerFirst, then you do not need to check or set sample extension attributes on the samples.  In that case, the whole stream is supposed to have the same interlacing

    (4) 'Not set' means do not set the attribute on the attribute store.  This will result in MF_E_ATTRIBUTENOTFOUND if someone tries to retrieve the attribute from the attribute store.

    • Marked as answer by Kenny Lin Friday, October 26, 2012 1:58 AM
    Thursday, April 26, 2012 11:26 PM