[x264-devel] Thresholds about slicetype_decide

kenter kenter83 at gmail.com
Wed May 19 07:05:56 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?



2010/5/19, Jason Garrett-Glaser <darkshikari at gmail.com>:
> 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
> _______________________________________________
> x264-devel mailing list
> x264-devel at videolan.org
> http://mailman.videolan.org/listinfo/x264-devel
>


More information about the x264-devel mailing list