]> granicus.if.org Git - libvpx/commit
Add encoding option --static-thresh
authorYunqing Wang <yunqingwang@google.com>
Thu, 11 Jul 2013 18:15:00 +0000 (11:15 -0700)
committerYunqing Wang <yunqingwang@google.com>
Thu, 25 Jul 2013 21:28:05 +0000 (14:28 -0700)
commitd36852b702e6726db57cabe19e47d9aaa18c3ecb
treee10123790fd13f0aa67b4e99c10af29f58977e33
parentafe43d40896b82083c6273a97ac9919d9e061eda
Add encoding option --static-thresh

This option exists in VP8, and it was rewritten in VP9 to support
skipping on different partition levels. After prediction is done,
we can check if the residuals in the partition block will be all
quantized to 0. If this is true, the skip flag is set, and only
prediction data are needed in reconstruction. Based on DCT's energy
conservation property, the skipping check can be estimated in
spatial domain.

The prediction error is calculated and compared to a threshold.
The threshold is determined by the dequant values, and also
adjusted by partition sizes. To be precise, the DC and AC parts
for Y, U, and V planes are checked to decide skipping or not.

Test showed that
1. derf set:
when static-thresh = 1, psnr loss is 0.666%;
when static-thresh = 500, psnr loss is 1.162%;
2. stdhd set:
when static-thresh = 1, psnr loss is 1.249%;
when static-thresh = 500, psnr loss is 1.668%;

For different clips, encoding speedup range is between several
percentage and 20+% when static-thresh <= 500. For example,
clip            bitrate  static-thresh psnr    time
akiyo(cif)       500        0          48.923  5.635s(50f)
akiyo            500        500        48.863  4.402s(50f)

parkjoy(1080p)   4000       0          30.380  77.54s(30f)
parkjoy          4000       500        30.384  69.59s(30f)

sunflower(1080p) 4000       0          44.461  85.2s(30f)
sunflower        4000       500        44.418  78.1s(30f)

Higher static-thresh values give larger speedup with larger
quality loss.

Change-Id: I857031ceb466ff314ab580ac5ec5d18542203c53
vp9/encoder/vp9_encodeframe.c
vp9/encoder/vp9_rdopt.c