<div dir="ltr">Yes that is true, thanks for your suggestions, I scan through few papers to find from where following constant values (to generate the weight table) are coming. <div><br></div><div>#define W(i) (i==0 ? FIX8(<b>1.0000</b>) :\</div>
<div>              i==1 ? FIX8(<b>0.8859</b>) :\</div><div>              i==2 ? FIX8(<b>1.6000</b>) :\</div><div>              i==3 ? FIX8(<b>0.9415</b>) :\</div><div>              i==4 ? FIX8(<b>1.2651</b>) :\</div><div>
              i==5 ? FIX8(<b>1.1910</b>) :0) </div><div><br></div><div>it seems these values depends on dct coefficients too, so we need new weight table for x265. I found these are generated through formula:-</div><div><br>
</div><div>Qstep ≈ Vi8 / (Si8 * 2^8 )  (for 8x8 block)</div><div><br></div><div>where rescaling matrix Vi8 is (32, 28, 51, 30, 40, 38) (qp = 4 from following table)</div><div><br></div><div><div>QP vm0 vm1 vm2 vm3 vm4 vm5</div>
<div>0     20    18    32    19    25   24</div><div>1     22    19   35    21    28    26</div><div>2     26    23   42    24    33    31</div><div>3     28    25   45    26    35    33</div><div>4    32     28   51    30    40    38</div>
<div>5    36     32  58     34    46    43</div><div><br></div><div><div>Si8 = 1/8 (0.125) (basically Si is also a matrix but it seems first element is chosen for transform normalization)</div></div><div><br></div><div>So, if we will apply the above formula then:-</div>
</div><div><br></div><div>W(0) = 32 / (0.125 * 256) = 1          ≈ 1.0000</div><div>W(1) = 28 / (0.125 * 256) = 0.875    ≈ 0.8859</div><div>W(2) = 51 / (0.125 * 256) = 1.59      ≈ 1.6000</div><div>W(3) = 30 / (0.125 * 256) = 0.9375   ≈ 0.9415</div>
<div>W(4) = 40 / (0.125 * 256) = 1.25      ≈ 1.265</div><div>W(5) = 38 / (0.125 * 256) = 1.1875   ≈ 1.1910</div><div><br></div><div>Does my analysis is in right direction? if it is why Vi8 is chosen corresponding to  qp = 4 why not any other qp ?</div>
<div><br></div><div>Finally weight table is arranged as</div><div><br></div><div><div>    W(0), W(3), W(4), W(3),  W(0), W(3), W(4), W(3),</div><div>    W(3), W(1), W(5), W(1),  W(3), W(1), W(5), W(1),</div><div>    W(4), W(5), W(2), W(5),  W(4), W(5), W(2), W(5),</div>
<div>    W(3), W(1), W(5), W(1),  W(3), W(1), W(5), W(1),</div><div><br></div><div>    W(0), W(3), W(4), W(3),  W(0), W(3), W(4), W(3),</div><div>    W(3), W(1), W(5), W(1),  W(3), W(1), W(5), W(1),</div><div>    W(4), W(5), W(2), W(5),  W(4), W(5), W(2), W(5),</div>
<div>    W(3), W(1), W(5), W(1),  W(3), W(1), W(5), W(1)</div></div><div><br></div><div>what is logic behind such arrangement ?</div><div><br></div><div><br></div><div>Regards,</div><div>Praveen Tiwari</div><div><br></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, May 10, 2014 at 8:12 AM, Jason Garrett-Glaser <span dir="ltr"><<a href="mailto:jason@x264.com" target="_blank">jason@x264.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">That isn't correct at all; the weights depend on the transforms, which<br>
depend on the video format. You can't just build a 16x16 out of 8x8s<br>
or 4x4s; you need to match the way the format works.<br>
<div class="HOEnZb"><div class="h5"><br>
Jason<br>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
</div></div></blockquote></div><br></div>