<br><br><div class="gmail_quote">On Fri, Jul 9, 2010 at 7:13 PM, Jason Garrett-Glaser <span dir="ltr"><<a href="mailto:darkshikari@gmail.com">darkshikari@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div><div></div><div class="h5">On Wed, Jul 7, 2010 at 8:27 AM, Pascal Massimino<br>
<<a href="mailto:pascal.massimino@gmail.com">pascal.massimino@gmail.com</a>> wrote:<br>
><br>
><br>
> On Sun, Jul 4, 2010 at 6:41 PM, <<a href="mailto:git@videolan.org">git@videolan.org</a>> wrote:<br>
>><br>
>> x264 | branch: master | Jason Garrett-Glaser <<a href="mailto:darkshikari@gmail.com">darkshikari@gmail.com</a>> | Wed<br>
>> Jun 30 13:06:22 2010 -0700| [f378994ab3c816aaab2b795143e31919fdee1f2d] |<br>
>> committer: Jason Garrett-Glaser<br>
>><br>
>> Don't check i16x16 planar mode unless previous modes were useful<br>
>> Saves ~160 clocks per MB at subme=1, ~270 per MB at subme>1 (measured on<br>
>> Core i7).<br>
>> Negligle effect on compression.<br>
>><br>
>> Also make a few more arrays static.<br>
>><br>
>> ><br>
>> > <a href="http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=f378994ab3c816aaab2b795143e31919fdee1f2d" target="_blank">http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=f378994ab3c816aaab2b795143e31919fdee1f2d</a><br>
>> ---<br>
>><br>
>> encoder/analyse.c | 29 +++++++++++++++++++----------<br>
>> encoder/set.c | 3 ++-<br>
>> 2 files changed, 21 insertions(+), 11 deletions(-)<br>
>><br>
>> diff --git a/encoder/analyse.c b/encoder/analyse.c<br>
>> index 696c78f..cdbdd1e 100644<br>
>> --- a/encoder/analyse.c<br>
>> +++ b/encoder/analyse.c<br>
>> @@ -646,16 +646,27 @@ static void x264_mb_analyse_intra( x264_t *h,<br>
>> x264_mb_analysis_t *a, int i_satd_<br>
>> /* 16x16 prediction selection */<br>
>> const int8_t *predict_mode = predict_16x16_mode_available(<br>
>> h->mb.i_neighbour_intra );<br>
>><br>
>> + /* Not heavily tuned */<br>
>> + static const uint8_t i16x16_thresh_lut[11] = { 2, 2, 2, 3, 3, 4, 4,<br>
>> 4, 4, 4, 4 };<br>
>> + int i16x16_thresh = a->b_fast_intra ?<br>
>> (i16x16_thresh_lut[h->mb.i_subpel_refine]*i_satd_inter)>>1 : COST_MAX;<br>
>> +<br>
>> if( !h->mb.b_lossless && predict_mode[3] >= 0 )<br>
>> {<br>
>> h->pixf.intra_mbcmp_x3_16x16( p_src, p_dst, a->i_satd_i16x16_dir<br>
>> );<br>
>> - h->predict_16x16[I_PRED_16x16_P]( p_dst );<br>
>> - a->i_satd_i16x16_dir[I_PRED_16x16_P] =<br>
>> - h->pixf.mbcmp[PIXEL_16x16]( p_dst, FDEC_STRIDE, p_src,<br>
>> FENC_STRIDE );<br>
>> - for( int i = 0; i < 4; i++ )<br>
>> + a->i_satd_i16x16_dir[0] += lambda * bs_size_ue(0);<br>
>> + a->i_satd_i16x16_dir[1] += lambda * bs_size_ue(1);<br>
>> + a->i_satd_i16x16_dir[2] += lambda * bs_size_ue(2);<br>
>> + COPY2_IF_LT( a->i_satd_i16x16, a->i_satd_i16x16_dir[0],<br>
>> a->i_predict16x16, 0 );<br>
>> + COPY2_IF_LT( a->i_satd_i16x16, a->i_satd_i16x16_dir[1],<br>
>> a->i_predict16x16, 1 );<br>
>> + COPY2_IF_LT( a->i_satd_i16x16, a->i_satd_i16x16_dir[2],<br>
>> a->i_predict16x16, 2 );<br>
>> +<br>
>> + /* Plane is expensive, so don't check it unless one of the<br>
>> previous modes was useful. */<br>
>> + if( a->i_satd_i16x16 <= i16x16_thresh )<br>
>> {<br>
>> - int cost = a->i_satd_i16x16_dir[i] += lambda * bs_size_ue(i);<br>
>> - COPY2_IF_LT( a->i_satd_i16x16, cost, a->i_predict16x16, i );<br>
>> + h->predict_16x16[I_PRED_16x16_P]( p_dst );<br>
>> + a->i_satd_i16x16_dir[I_PRED_16x16_P] =<br>
>> h->pixf.mbcmp[PIXEL_16x16]( p_dst, FDEC_STRIDE, p_src, FENC_STRIDE );<br>
>> + a->i_satd_i16x16_dir[I_PRED_16x16_P] += lambda *<br>
>> bs_size_ue(3);<br>
>> + COPY2_IF_LT( a->i_satd_i16x16,<br>
>> a->i_satd_i16x16_dir[I_PRED_16x16_P], a->i_predict16x16, 3 );<br>
>> }<br>
>> }<br>
>> else<br>
>> @@ -681,9 +692,7 @@ static void x264_mb_analyse_intra( x264_t *h,<br>
>> x264_mb_analysis_t *a, int i_satd_<br>
>> /* cavlc mb type prefix */<br>
>> a->i_satd_i16x16 += lambda * i_mb_b_cost_table[I_16x16];<br>
>><br>
>> - /* Not heavily tuned */<br>
>> - const uint8_t i16x16_thresh[11] = { 2, 2, 2, 3, 3, 4, 4, 4, 4, 4, 4<br>
>> };<br>
>> - if( a->b_fast_intra && a->i_satd_i16x16 ><br>
>> (i16x16_thresh[h->mb.i_subpel_refine]*i_satd_inter)>>1 )<br>
>> + if( a->i_satd_i16x16 > i16x16_thresh )<br>
><br>
> what the...?? </div></div></blockquote><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><div class="h5">
<br>
</div></div>What the what?<br></blockquote><div><br></div><div>sorry, my bad. Just ignore...</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
Dark Shikari<br>
<div><div></div><div class="h5">_______________________________________________<br>
x264-devel mailing list<br>
<a href="mailto:x264-devel@videolan.org">x264-devel@videolan.org</a><br>
<a href="http://mailman.videolan.org/listinfo/x264-devel" target="_blank">http://mailman.videolan.org/listinfo/x264-devel</a><br>
</div></div></blockquote></div><br>