[x264-devel] Thresholds about slicetype_decide

BINGDIAN 30670619 at qq.com
Wed May 19 04:59:47 CEST 2010


Thanks for Jason, I'm sorry that I forget to mention my modifications are based on x264-snapshot-20090302-2245 for historical reasons, the mb-tree and lookahead feature are not available. 
 I modulate the parameters based on your suggestions:
 1. Set QP=24 in x264_lowres_context_init()
 2. Change the data array type of *i_intra_cost from uint16_t to uint32_t in x264_frame_t (It seems the lowres_cost and lowres_type are not exist in my version)
  
 However, the result shows the PSNR also drops 0.5dB compares to that of 8x8 slicetype_decide(from 34.84 to 34.35dB), can you point me other values that I need to modify?
 
 
 
 
 
On Tue, May 18, 2010 at 12:24 AM, kenter <kenter83 at gmail.com> wrote:
 
> Hi,
 
>     I'm research on slicetype decide algorithm of x264, It seems that
 
> x264 will perform a low-resolution version of ME and Intra-Pred for 
 
> each "MB" (Actually 8x8 for low-res version), and then sum up cost of 
 
> each "MB" to get the cost for current slice.
 
>     I feel it may NOT precision as I expect, so, I modify the 
 
> algorithm by ME&Intra-pred on origin image instead of the 
 
> low-resolution one. Steps are list below:
 
>     1. Calculate half-pel values for origin image
 
>     2. Analyse each MB and sum-up cost(16x16ME instead of 8x8; Intra 
 
> analyse also modified as Intra16x16 prediction)
 
>     3. slicetype_decision & cost comparison between references
 
> 
 
>     I anticipate the PSNR may be more or less improved, however, the 
 
> result shows the PSNR DROPs about 0.8dB(from 34.84 drops to 34.06dB)!
 
> I guess it may caused by the thresholds of slicetype_decide and rate 
 
> control algorithm, but there are too many thresholds to modulate, is 
 
> there anybody can help me on this issue?
 
 
 
Did you make sure to adjust the lambda in lookahead?  It's currently 4 times smaller than normal (X264_LOOKAHEAD_QP = 12) to account for 4x smaller block size than normal.  You want to set it to 24.
 
 
 
Furthermore, some of the data arrays in lookahead may not be able to fit the data values you want to store for a 16x16 block size; note the uint16_t used to hold both lowres_cost and lowres_type, for example.
 
 
 
Finally, you will need to modify macroblock tree to use values appropriate to 16x16 blocks instead of 8x8.
 
 
 
Dark Shikari
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20100519/c7028009/attachment.htm>


More information about the x264-devel mailing list