[x264-devel] x264 multithread predictors

Nadir Raimondo raimondo at ismb.it
Tue Jan 8 18:09:27 CET 2013


Dear all,

I'm trying to integrate into the x264 library a custom motion estimation 
algorithm for special sequences of images with low overlap.

I calculate new predictors using ancillary data provided by some sensors 
to increase encoding accuracy. Given the low initial overlap, motion 
vectors (and predictor) are very long (about 260 pixels, 1040 in qpel).

All works fine for P frames, with frames sequence IPPPPPPP the gain is 
about 1 dB. Now I'm trying to extend the algorithm for B frames (GOP 
IBPBPBPBP) but I have a problem in multithread scenario (with single 
thread all work correctly).
It seems that inside x264_me_search_ref function in me.c the MV 
predictors between B and P frames are limited by a mv_y_max_qpel value. 
As a consequence the output MV is not correct and macroblock is encoded 
as intra.

I thought x264 multithread encoding was performed on minigop so first 
thread 1 encode I, thread 2 encode P and than B, thread 3 encode next P 
and B and so on. Does this predictor limitation occur when the B frame 
encoding has already started while P frame encoding is still pending? or 
am I doing something wrong?

Thank you in advance for your help.



More information about the x264-devel mailing list