2015-07-19, 04:15
(2015-07-18, 13:03)puithove Wrote:(2015-07-17, 23:16)wizziwig Wrote: I looked at your sample. It uses repeat-first-field flags on the picture headers in order to extend 24fps content to 29.97fps video as specified by the sequence header. Because the repetition pattern is not regular, you end up with stutter because frames are presented at a variable frame rate. Intel is not going to fix this for you because it's not a bug. Their Windows driver will do the same thing. I don't think the field repeat flags are even visible to the VPP/Deinterlacer. This needs to be handled in the player (Kodi in this case) by taking decoded frames and buffering some of the fields to repeat on the next frame. You're basically converting a partially soft-telecined video into a fully hard-telecined one (wiki). The final frames with repeated fields applied can then be sent to VPP.
I covered this topic before in an older thread.
Now that you mention it, I do remember seeing your post on this before. Would you mind outlining your findings on the bug report (and therefore also indicating that I'm not the only one having this issue)?
In my mind, it seems like it would still be something Intel would need to fix. I'm not going to pretend I really know a whole lot in this area, but wouldn't the field repeat be applied after the frames are decoded but before being sent to the deinterlacer? This would all be in the VAAPI chain it seems.
@fritsch - any thoughts here? Anything that could be done on the Kodi side?
I wish I could help out but I'm not a Linux/Kodi expert. I spend most of my time coding in Windows (DirectX and Cuda). The basic logic of what needs to happen is inside the "softpulldown" filter. Link
The simpler solution would be to copy the decoded frames from video memory back into system memory to run that filter on the CPU. I think that's what happens with yadif? I would not recommend that solution as it would be very slow. Ideally the field copying of that filter needs to happen on the GPU so frames stay in video memory. Can OpenGL access the decoded NV12 frames in order to copy some of the fields to a new frame?
If the VAAPI architecture does not allow any intermediate steps between decoding and VPP deinterlacing, then you're stuck and can't fix the bug. If someone who knows this code can explain more about how VAAPI works, maybe I can offer some suggestions.