[x265] Fwd: [PATCH] noise reduction feature, ported from x264

Praveen Tiwari praveen at multicorewareinc.com
Mon May 12 16:29:24 CEST 2014


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.

#define W(i) (i==0 ? FIX8(*1.0000*) :\
              i==1 ? FIX8(*0.8859*) :\
              i==2 ? FIX8(*1.6000*) :\
              i==3 ? FIX8(*0.9415*) :\
              i==4 ? FIX8(*1.2651*) :\
              i==5 ? FIX8(*1.1910*) :0)

it seems these values depends on dct coefficients too, so we need new
weight table for x265. I found these are generated through formula:-

Qstep ≈ Vi8 / (Si8 * 2^8 )  (for 8x8 block)

where rescaling matrix Vi8 is (32, 28, 51, 30, 40, 38) (qp = 4 from
following table)

QP vm0 vm1 vm2 vm3 vm4 vm5
0     20    18    32    19    25   24
1     22    19   35    21    28    26
2     26    23   42    24    33    31
3     28    25   45    26    35    33
4    32     28   51    30    40    38
5    36     32  58     34    46    43

Si8 = 1/8 (0.125) (basically Si is also a matrix but it seems first element
is chosen for transform normalization)

So, if we will apply the above formula then:-

W(0) = 32 / (0.125 * 256) = 1          ≈ 1.0000
W(1) = 28 / (0.125 * 256) = 0.875    ≈ 0.8859
W(2) = 51 / (0.125 * 256) = 1.59      ≈ 1.6000
W(3) = 30 / (0.125 * 256) = 0.9375   ≈ 0.9415
W(4) = 40 / (0.125 * 256) = 1.25      ≈ 1.265
W(5) = 38 / (0.125 * 256) = 1.1875   ≈ 1.1910

Does my analysis is in right direction? if it is why Vi8
is chosen corresponding to  qp = 4 why not any other qp ?

Finally weight table is arranged as

    W(0), W(3), W(4), W(3),  W(0), W(3), W(4), W(3),
    W(3), W(1), W(5), W(1),  W(3), W(1), W(5), W(1),
    W(4), W(5), W(2), W(5),  W(4), W(5), W(2), W(5),
    W(3), W(1), W(5), W(1),  W(3), W(1), W(5), W(1),

    W(0), W(3), W(4), W(3),  W(0), W(3), W(4), W(3),
    W(3), W(1), W(5), W(1),  W(3), W(1), W(5), W(1),
    W(4), W(5), W(2), W(5),  W(4), W(5), W(2), W(5),
    W(3), W(1), W(5), W(1),  W(3), W(1), W(5), W(1)

what is logic behind such arrangement ?


Regards,
Praveen Tiwari



On Sat, May 10, 2014 at 8:12 AM, Jason Garrett-Glaser <jason at x264.com>wrote:

> That isn't correct at all; the weights depend on the transforms, which
> depend on the video format. You can't just build a 16x16 out of 8x8s
> or 4x4s; you need to match the way the format works.
>
> Jason
> _______________________________________________
> x265-devel mailing list
> x265-devel at videolan.org
> https://mailman.videolan.org/listinfo/x265-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20140512/fd3824ad/attachment.html>


More information about the x265-devel mailing list