diff options
author | Yunqing Wang <yunqingwang@google.com> | 2013-07-25 19:17:46 -0700 |
---|---|---|
committer | Yunqing Wang <yunqingwang@google.com> | 2013-07-25 19:59:33 -0700 |
commit | 52256cdbcaf07e637c964f92671dfc82321f2125 (patch) | |
tree | fd770527e9d1dc1e5271cbf49e3d9d98d80be8e3 | |
parent | 67b07c520d253955d1b4ea2d0fca2a7d3b905bba (diff) | |
download | libvpx-52256cdbcaf07e637c964f92671dfc82321f2125.tar libvpx-52256cdbcaf07e637c964f92671dfc82321f2125.tar.gz libvpx-52256cdbcaf07e637c964f92671dfc82321f2125.tar.bz2 libvpx-52256cdbcaf07e637c964f92671dfc82321f2125.zip |
Modify static threshold calculation
Used 3 * standard_deviation in internal threshold calculation
instead of fit curve. This actually approached the algorithm
better.
For comparison, similar tests were done:
The overall psnr loss is less than before.
1. derf set:
when static-thresh = 1, psnr loss is 0.329%;
when static-thresh = 500, psnr loss is 0.970%;
2. stdhd set:
when static-thresh = 1, psnr loss is 0.922%;
when static-thresh = 500, psnr loss is 1.307%;
Similar speedup is achieved. For example,
clip bitrate static-thresh psnr time
akiyo(cif) 500 0 48.952 5.077s(50f)
akiyo 500 500 48.866 4.169s(50f)
parkjoy(1080p) 4000 0 30.388 78.20s(30f)
parkjoy 4000 500 30.367 70.85s(30f)
sunflower(1080p) 4000 0 44.402 74.55s(30f)
sunflower 4000 500 44.414 68.69s(30f)
Change-Id: Ic78833642ce1911dbbd1cb6c899a2d7e2dfcc1f3
-rw-r--r-- | vp9/encoder/vp9_rdopt.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/vp9/encoder/vp9_rdopt.c b/vp9/encoder/vp9_rdopt.c index 5383c7fba..619f3e44a 100644 --- a/vp9/encoder/vp9_rdopt.c +++ b/vp9/encoder/vp9_rdopt.c @@ -3048,14 +3048,10 @@ static int64_t handle_inter_mode(VP9_COMP *cpi, MACROBLOCK *x, // The encode_breakout input unsigned int encode_breakout = x->encode_breakout << 4; - // Adjust threshold according to dequant value. Making threshold more - // strict when dequant is high to avoid big PSNR loss. - if (xd->plane[0].dequant[1] < 32) - // Initial threshold value - thresh_ac = xd->plane[0].dequant[1] * xd->plane[0].dequant[1]; - else - thresh_ac = (xd->plane[0].dequant[1] << 6) - 1024; + // Calculate threshold according to dequant value. + thresh_ac = (xd->plane[0].dequant[1] * xd->plane[0].dequant[1]) / 9; + // Set a maximum for threshold to avoid big PSNR loss in low bitrate case. if (thresh_ac > 36000) thresh_ac = 36000; |