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.

Decoding Interlaced H264 Video

Beese__Erin
Beginner
874 Views

I'm currently decoding interlaced H264 video and I'm finding that each field is producing one frame. The frames are full resolution but data is missing from the even/odd lines (depending on whether it's MFX_PICTYPE_TOPFIELD or MFX_PICTYPE_BOTTOMFIELD).

Am I responsible for combining these frames together before calling any deinterlacing post processing functions? All other decoders I've tried produce and output frame that already has the fields combined.

 

 

0 Kudos
4 Replies
Mark_L_Intel1
Moderator
874 Views

Hi Erin,

Sorry for the late response, did you solve this issue yet?

Basically, you don't have to do the extra work to combine the output fields, the decoder will be aware if the input stream is interlaced or not and output a combined frame. Decoder will have all fields combined, deinterlace with output one or both field depending on output frame rate, for example, if your input frame rate is 30, you must set the output frame rate to 60 to be able to get the combined output of both fields.

You can try our sample code(sample_multi_transcode) to see how it works with the following command line assume your input frame rate is 30:

./sample_multi_transcode -i::h264 input.264 -hw -o::raw output.yuv  -deinterlace::ADI -f 60 -override_decoder_framerate 30

Let me know if this helps.

Mark

0 Kudos
Beese__Erin
Beginner
874 Views

Thanks for the reply. I ended up getting around this issue by combining the output fields myself as the decoder was not doing it for me. You seem to indicate however, that the decoder should be doing this automatically.

0 Kudos
Beese__Erin
Beginner
874 Views

For anyone who is curious. I was passing the decoder one field at a time but I was marking the data as a complete frame (DataFlag =MFX_BITSTREAM_COMPLETE_FRAME). The decoder works as expected if I do not incorrectly mark it as a complete frame.

0 Kudos
Mark_L_Intel1
Moderator
874 Views

Hi Erin,

Did you try your content with the sample_multi_transcode I suggested?

Yes, the decoder should handle it automatically, the point was to force the frame rate to double the input frame rate.

Mark

0 Kudos
Reply