You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
libva/libva-utils/gmmlib/media-driver/VPL runtime version you are using? NV
Are you willing to contribute it?(Yes/No) No
Feature Information
Describe the feature and expected behavior
Compared with NVDEC API, MSDK needs to parse bitstream and determine whether it needs to attach SPS, PPS and other data.
This is a little cumbersome for developers, and it is difficult to get started.
The video bitstream pData is fed into parser using NVDECODE API cuvidParseVideoData() directly.
Application must register a function to handle any sequence
change. Parser triggers pfnSequenceCallback callback for initial sequence header or when it encounters a video format change.
Parser triggers pfnDecodePicture callback when bitstream data for one frame is
ready. In case of field pictures, there may be two decode calls per one display call since two fields make up one frame.
Parser triggers pfnDisplayPicture callback when a frame in display order is ready.
switch (mFrameType) {
case MFX_FRAME_AVC:
ret = PrepareAVCFrame(data, size, pts);
break;
case MFX_FRAME_HEVC:
ret = PrepareHEVCFrame(data, size, pts);
break;
default:
MC_LOG("Unsupported codec!");
ret = false;
break;
}
return ret;
}
Compared with NVDEC API, MSDK needs to parse bitstream and determine whether it needs to attach SPS, PPS and other data.
This is a little cumbersome for developers, and it is difficult to get started.
**Additional context**
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered:
System information
Feature Information
Describe the feature and expected behavior
Compared with NVDEC API, MSDK needs to parse bitstream and determine whether it needs to attach SPS, PPS and other data.
This is a little cumbersome for developers, and it is difficult to get started.
Customer usage and impact for this feature
int NvDecoder::Decode(const uint8_t *pData, int nSize, int nFlags, int64_t nTimestamp)
{
m_nDecodedFrame = 0;
m_nDecodedFrameReturned = 0;
CUVIDSOURCEDATAPACKET packet = { 0 };
packet.payload = pData;
packet.payload_size = nSize;
packet.flags = nFlags | CUVID_PKT_TIMESTAMP;
packet.timestamp = nTimestamp;
if (!pData || nSize == 0) {
packet.flags |= CUVID_PKT_ENDOFSTREAM;
}
NVDEC_API_CALL(cuvidParseVideoData(m_hParser, &packet));
}
The video bitstream
pData
is fed into parser using NVDECODE API cuvidParseVideoData() directly.Application must register a function to handle any sequence
change. Parser triggers
pfnSequenceCallback
callback for initial sequence header or when it encounters a video format change.Parser triggers
pfnDecodePicture
callback when bitstream data for one frame isready. In case of field pictures, there may be two decode calls per one display call since two fields make up one frame.
Parser triggers
pfnDisplayPicture
callback when a frame in display order is ready.bool MFXFrameConstructor::PrepareFrame(const uint8_t* data, uint32_t size, uint64_t pts) {
bool ret = true;
MFX_ZERO_MEMORY(mBitstream);
switch (mFrameType) {
case MFX_FRAME_AVC:
ret = PrepareAVCFrame(data, size, pts);
break;
case MFX_FRAME_HEVC:
ret = PrepareHEVCFrame(data, size, pts);
break;
default:
MC_LOG("Unsupported codec!");
ret = false;
break;
}
return ret;
}
The text was updated successfully, but these errors were encountered: