Manually feed x264 to my motion data?

I am trying to encode a stream using x264 (by submitting individual images), but the unusual thing is that I already have motion information for my frames. I know for sure which areas were changed in each frame, and I know where the movement occurred in the frame.

Is there a way to pass x264 my own motion information? I would like to give him motion vectors for given areas in the frame and somehow say that certain areas in the frame are guaranteed to have no movement in them.

I think that this can significantly improve the coding performance (because I allow the codec to completely skip the motion estimation phase), and should also improve the quality somewhat in cases where the encoder motion estimation aldego might have missed the motion that actually happened.

Do I need to modify the encoder for this, or is it supported in the existing API?

+4
source share
1 answer

Short answer: No, you cannot submit motion estimation data to x264.

Long answer: IIRC, x264 whether it works when loaded into a raw frame without additional data. To run the motion estimation data, you must modify the x264 source code to complete this.

You may find what you need in common\mvpred.c or encoder\me.c I'm not sure how many of the x264 developers actually visit the stack overflow (I know that one of their leading developers has an account here), but you can try talking to them through your regular channels on your IRC channel or on doom9 forums.

I would like to give you more information, but, unfortunately, I am not very well versed in the code base. Developers are always ready and can help anyone who wants to work on x264, though.

+3
source

All Articles