Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Beese__Erin
Beginner
90 Views

Decoding Interlaced H264 Video

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
90 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

Beese__Erin
Beginner
90 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.

Beese__Erin
Beginner
90 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.

Mark_L_Intel1
Moderator
90 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