- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
We are resetting the encoder when the aspect ratio changes. We need the updated sps/pps before we call MFXVideoENCODE_Init, so MFXVideoENCODE_GetVideoParam isn't useful as it returns the current sps/pps and not the future one. We tried mfxExtCodingOptionSPSPPS with MFXVideoENCODE_Query but it fails with various errors, depending if we set mfxExtCodingOptionSPSPPS in the input and/or output mfxVideoParam. We could have a separate (joined) session just to get the sps/pps, but it seems heavyweight. How do you get sps/pps from mfxVideoParam without initializing anything?
Bruno
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is your pipeline encode only, or does it include decode?
If you've got a transcode pipeline, this thread may provide some insights: https://software.intel.com/en-us/forums/intel-media-sdk/topic/535185
It may be possible to handle aspect ratio changes without parsing future SPS/PPS if the change can be seen at decode. Does this apply in your case?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, our pipeline is encode only. The thread you link was about resizing frames to square pixels. We want to support 720x480 4:3 and 720x480 16:9. Both cases have non-square pixels.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Looking into options for you. It may take a few days to get back due to the holiday weekend.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In an encode-only pipeline as you've described the only way to retrieve SPS/PPS header info is to first initialize the encoder.
I'd like to understand a bit more about your use case. If it is possible to insert an IDR frame you can change aspect ratio at the same time, or you could restart the pipeline with a new aspect ratio by updating mfxVideoParam (as you would need to do to init with a new SPSPPS). Do you need to do something more than these approaches allow? BTW the extra session shouldn't have a big performance impact but it will use a bit of extra memory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
We need the future spspps to negotiate type change in our homegrown directshow filters. For now we hacked the negotiation, flush all samples, update mfxVideoParam and then reset the encoder. The aspect ratio changes a few frames before correct frame for avc. Maybe that is fixed inserting an IDR frame. Do you have doc/samples?
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page