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.

H.264 stream decoding issue

guerzoni__filippo
309 Views

Hi,

I modified the sample_multi transcode example to decode H.264 image sequences (streams) to raw NV12.

Streams are sent via RTP-UDP to the decoder which reconstructs bitstreams heades and FU NALS and dumps incoming data to file.

I noticed that after a while (400 frames) the decoding always stops working with va_res=VA_STATUS_ERROR_DECODING_ERROR(0x17) that gets remapped to mfx_res=MFX_ERR_UNKNOWN(-1):

va_res = m_libva->vaSyncSurface(m_dpy, *(vaapi_mid->m_surface));                     (LockFrame() - vaapi_allocator.cpp) 
    ...
    sts = Surface2BS(&VppExtSurface, &m_BSPool.back()->Bitstream,m_mfxVppParams.vpp.Out.FourCC);     (Transcode() - pipeline-transcode.cpp)
        ...
        while (MFX_ERR_NONE == pContext->transcodingSts)                    (ThranscodeRoutine() - pipeline-transcode.cpp)

and the subsequent call to vaQuerySurfaceError returns:
{status = -670922364, start_mb = 32767, end_mb = 0, decode_error_type = VADecodeSliceMissing, num_mb = 0}

I'm confident about the received compressed data because calling unmodified sample_multi_transcode on the dumped file does not returns any errors.

What sounds strange to me is start_mb = 32767, end_mb = 0 on the vaQuerySurfaceError returned value. It seems like an overflow on macroblocks.

I would like to solve the issue but even a workaround to recover the decoder without loosing data would be fine.

I'm on a Ubuntu 16.4 machine running Intel® Media Server Studio – Community Edition    Version 2017 (2017_R2).

Thanks in advance

 

 

 

 

 

0 Kudos
1 Solution
guerzoni__filippo
309 Views

Solved, the issue is related to application specific code.

The buffer I'm sending to decoder sometimes gets corrupted and decoder complains about that.

View solution in original post

0 Kudos
1 Reply
guerzoni__filippo
310 Views

Solved, the issue is related to application specific code.

The buffer I'm sending to decoder sometimes gets corrupted and decoder complains about that.

0 Kudos
Reply