Media (Intel® oneAPI Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools from Intel. This includes Intel® oneAPI Video Processing Library and Intel® Media SDK.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!
2904 Discussions

Non-monotonous DecodeTimeStamp for h264 hardware accelerated encoder

Yabo_W_
Beginner
85 Views

Hi, all

I use qsv h264 encoder to encode frames, but sometimes MFXVideoCORE_SyncOperation() create non-monotonous bs.DecodeTimeStamp, which means current dts same as or less than last dts.

After a lot of tests, I found that if the frame rate which feed to MFXVideoENCODE_EncodeFrameAsync() is not strictly same as FrameRateExtN/FrameRateExtD can cause the problem.

Here is a code snippet can cause the problem every ten frames:

static int64_t frame_count = 0;
if (frame) {
    frame_count++;
    if (frame_count % 10 == 0) {
        return 0;
    }
}

// do h264 hardware accelerated encoding

 

0 Kudos
0 Replies
Reply