Media (Intel® Video Processing Library, Intel Media SDK)
Access community support with transcoding, decoding, and encoding in applications using media tools like Intel® oneAPI Video Processing Library and Intel® Media SDK
Announcements
The Intel Media SDK project is no longer active. For continued support and access to new features, Intel Media SDK users are encouraged to read the transition guide on upgrading from Intel® Media SDK to Intel® Video Processing Library (VPL), and to move to VPL as soon as possible.
For more information, see the VPL website.
3058 Discussions

Update the bit rate caused encoded bitstream lost while asyncdepth is 2

bai_g_
Beginner
384 Views

Hi, Experts

I found an issue, but I am not sure it is Media SDK issue or my application issue:

If I set encoder async depth to 2, and then let the encoder work, it works well. Assumption, the encoder output one NAL with frame number N, I update the bit rate of encoder by SDK API reset,  and then put one new frame to encoder encode function, the encode function will return NEED_MORE_DATA warning. Then I put the second new frame to encoder, it output one new nal. But this nal frame number is N+2, the N+1 nal is lost?

Where is N+1 NAL? When I update the bitrate with API reset, will the encoder discard the N+1 frame? Is there any other API to update the bitrate without   discard the frame?

Thanks

Bai 

0 Kudos
1 Reply
Mark_L_Intel1
Moderator
384 Views

Hi Bai,

Maybe you have done it correct but I didn't see in your description:

When we do the encoding loop, we need to make sure the encoded frame in the buffer was flushed before we complete the loop, this is why you can see in our tutorial or sample code, there are 2 EncodeFrameAsync calls, the second one has a NULL input, this means to flush in case there is a frame in the output buffer.

Did you have this call before the reset?

Mark

0 Kudos
Reply