AnsweredAssumed Answered

i.MX6 Problem displaying deinterlaced video at 1080

Question asked by David Thompson on Nov 7, 2013
Latest reply on Nov 15, 2013 by Leonardo Sandoval Gonzalez
Branched to a new discussion

I'm having a problem where video that was originally interlaced is displayed with some weird artifacts/tearing at the bottom of the image. I'm not sure of the correct technical term. I'll include an image below. It looks like pieces of the picture from the middle of the screen are being weaved into the bottom few rows of the image. I've investigated it quite a bit, but I'm finally stuck. Let me just explain what all I've figured out, and if there is other information needed, just ask.

 

My original source is a 1080i h.264 video, that I am attempting to decode, deinterlace, and then display on my 1080p HDMI monitor. I am using gstreamer. Both of the imx sinks, mfw_v4lsink and mfw_isink display the problem identically. I have determined that this means the problem is in a piece that is common between the two of them, the IPU cropping/scaling. 1080p and 720p videos have no problems.

 

At first I thought the problem was caused by the fact that my 1080i video, technically, had a height of 1088. I believe this is related to h.264 needing multiples of 16. The vpudec plugin, seemed to correctly identify all of this though, and even passed on the information that the sink should crop the bottom 8 pixels. Maybe there was an error with that? Well, I ruled that out eventually. I tested a 480i video (480x480) scaled up to fill my 1080 screen, and got the same result. The input source doesn't seem to be a factor, its a matter of output resolution.

 

Through trial and error, I found that the error only happens if my output height is greater than 1024. Well, that seemed kind of arbitrary, so I did a search to find why 1024 was significant. It turns out that the IPU has to split anything bigger than 1024x1024 into smaller pieces. This is where I'm stuck. I looked through the IPU code that splits up the image, and everything looks ok to me. It seems to divide the 1920x1080 screen into 4 equal pieces, it looks like there is some overlap between them, all the math looks accurate. I don't know where to look next, anyone have any suggestions?

 

My GStreamer pipeline:
gst-launch filesrc location=/home/root/h264-1080i.ts ! tsdemux name=demux demux. ! queue max-size-buffers=0 max-size-time=0 ! vpudec ! mfw_v4lsink
I've tried several variations on that pipeline, different plugins, etc, all with the same results, so I think I can rule out a gstreamer issue.

 

Board: imx6qsabresd
OS: Yocto, dora branch
Kernel: linux-imx-3.0.35-4.1.0

 

 

This is a picture of the effect. Note the out of place data on the right side just underneath the ticker at the very bottom. Those things bounce back and forth between the left and right bottom side of the screen, and are not always one solid block. I can take more pictures if that would help.

deinterlace-bug.jpg

 

Thanks in advance for all of the help!
David

Outcomes