<FONT face="Times New Roman">
<DIV>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. </DIV>
<DIV>I modulate the parameters based on your suggestions:</DIV>
<DIV>1. Set QP=24 in x264_lowres_context_init()</DIV>
<DIV>2. Change the data array type of *i_intra_cost from uint16_t to uint32_t in x264_frame_t (It seems the <FONT face="Times New Roman">lowres_cost and lowres_type are not exist in my version</FONT>)</DIV>
<DIV> </DIV>
<DIV>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?</DIV></FONT>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman"></FONT> </P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman"></FONT> </P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman">On Tue, May 18, 2010 at 12:24 AM, kenter <</FONT><A href="mailto:kenter83@gmail.com"><FONT face="Times New Roman">kenter83@gmail.com</FONT></A><FONT face="Times New Roman">> wrote:</FONT></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman">> Hi,</FONT></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman">> I'm research on slicetype decide algorithm of x264, It seems that</FONT></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman">> x264 will perform a low-resolution version of ME and Intra-Pred for </FONT></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman">> each "MB" (Actually 8x8 for low-res version), and then sum up cost of </FONT></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman">> each "MB" to get the cost for current slice.</FONT></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman">> I feel it may NOT precision as I expect, so, I modify the </FONT></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman">> algorithm by ME&Intra-pred on origin image instead of the </FONT></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman">> low-resolution one. Steps are list below:</FONT></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman">> 1. Calculate half-pel values for origin image</FONT></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman">> 2. Analyse each MB and sum-up cost(16x16ME instead of 8x8; Intra </FONT></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman">> analyse also modified as Intra16x16 prediction)</FONT></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman">> 3. slicetype_decision & cost comparison between references</FONT></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman">><?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p></FONT></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman">> I anticipate the PSNR may be more or less improved, however, the </FONT></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman">> result shows the PSNR DROPs about 0.8dB(from 34.84 drops to 34.06dB)!</FONT></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman">> I guess it may caused by the thresholds of slicetype_decide and rate </FONT></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman">> control algorithm, but there are too many thresholds to modulate, is </FONT></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman">> there anybody can help me on this issue?</FONT></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman"> </FONT></o:p></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman">Did you make sure to adjust the lambda in lookahead?<SPAN style="mso-spacerun: yes"> </SPAN>It's currently 4 times smaller than normal (X264_LOOKAHEAD_QP = 12) to account for 4x smaller block size than normal.<SPAN style="mso-spacerun: yes"> </SPAN>You want to set it to 24.</FONT></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman"> </FONT></o:p></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman">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.</FONT></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman"> </FONT></o:p></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman">Finally, you will need to modify macroblock tree to use values appropriate to 16x16 blocks instead of 8x8.</FONT></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><o:p><FONT face="Times New Roman"> </FONT></o:p></P>
<P class=MsoPlainText style="MARGIN: 0in 0in 0pt"><FONT face="Times New Roman">Dark Shikari</FONT></P>