Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
16 Views

Non-monotonous DecodeTimeStamp for h264 hardware accelerated encoder

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