<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, Sep 20, 2013 at 8:55 PM, chen <span dir="ltr"><<a href="mailto:chenm003@163.com" target="_blank">chenm003@163.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="line-height:1.7;font-size:14px;font-family:arial"><div>At <a href="tel:2013-09-21%C2%A002" value="+12013092102" target="_blank">2013-09-21 02</a>:35:59,"Jason Garrett-Glaser" <<a href="mailto:jason@x264.com" target="_blank">jason@x264.com</a>> wrote:<div class="im">
<br>><br>>> To implement this change , we need to modify HM code.<br>>> [MC] we can define the table in asm file, but we have to modify HM. of<br>>> course, it is easy things<br>><br>>You don't have to, of course (you know the code better than I and<br>
>whether or not it's a good idea to change it).<br></div></div>
<div>If we don't modify code, we can't know which coef group they want,</div>
<div>HEVC have 4 group to qpel, it is different to h264</div><div class="im">
<div> </div>
<div>>>> +<br>>>> +    mov         tmp,        offset2<br>>>> +    movd        sumOffset,  tmp<br>>>> +    pshufd      sumOffset,  sumOffset,  0<br>>><br>>> You can movd directly from memory; going through a register is much<br>
>> slower, especially on AMD machines.<br>>> [MC] are you means, we put constant into memory and load it once?<br>><br>>movd sumOffset, offset2<br></div>
</div><div>I look the document before, I think there haven't instruction support</div>
<div>' movd reg, constant ' on Intel CPU</div><div class="im">
<div> </div>
<div>>> [MC] no way, x264 macro have a bug here, you can remove reduce x2 and check<br>>> the output, the xmm0 seems Intel limit<br>><br>>That makes sense, I don't think the x264 macro was ever designed to<br>
>support non-AVX pblendvb.  I don't recommend non-AVX pblendvb anyways<br>>as it's a lot slower because of the extra register dependency (it's<br>>like 3 uops or something).<br></div>
</div><div>replace by 'pand + pandn + por' is 3 uops but less dependency,</div>
<div>in Agner's documents, he said pblendvb is 2-uops, 2-latency and 1-through</div>
<div>on my Sandy, so I select it.</div>
<div> </div>
<div>Of course, this is a bad branch, the code for testbench only.</div>
<div>in really world, the minimum block is 4x8, the width is 4, movd is enough.</div></div></blockquote></div><div class="gmail_extra"><br></div>This sounds like a testbench bug then.  Let's not keep dead code in the primitive just because the testbench covers unrealistic block sizes.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">Cheers<br clear="all"><div><br></div>-- <br>Steve Borho
</div></div>