]> granicus.if.org Git - libvpx/commitdiff
Change to prediction decay calculation.
authorpaulwilkins <paulwilkins@google.com>
Wed, 15 Feb 2017 16:41:38 +0000 (16:41 +0000)
committerpaulwilkins <paulwilkins@google.com>
Fri, 17 Feb 2017 09:29:24 +0000 (09:29 +0000)
This change subtracts out low complexity intra regions that are also low
error in the inter domain, in the calculation of the frame prediction decay.
The rationale here his that low complexity regions (such as sky) do not imply
high prediction decay in the same way as high error intra or neutral blocks.

The effect of this is small in most clips but in a few clips it can be > 10%.
(E.g. In to tree)

Change-Id: If67ac23d17fca14285cad2defa464c61c9ea861c

vp9/encoder/vp9_firstpass.c

index f95081c98b6dd941111cbf998cbc6ccea19be970..3f722090fde4777d9dfa48706398ac8cd64872c9 100644 (file)
@@ -1275,7 +1275,11 @@ void vp9_first_pass_encode_tile_mb_row(VP9_COMP *cpi, ThreadData *td,
         int scaled_low_intra_thresh = scale_sse_threshold(cm, LOW_I_THRESH);
         if (this_intra_error < scaled_low_intra_thresh) {
           fp_acc_data->frame_noise_energy += fp_estimate_block_noise(x, bsize);
-          fp_acc_data->intra_count_low += 1.0;
+          if (motion_error < scaled_low_intra_thresh) {
+            fp_acc_data->intra_count_low += 1.0;
+          } else {
+            fp_acc_data->intra_count_high += 1.0;
+          }
         } else {
           fp_acc_data->frame_noise_energy += (int64_t)SECTION_NOISE_DEF;
           fp_acc_data->intra_count_high += 1.0;
@@ -1731,7 +1735,8 @@ static double get_sr_decay_rate(const VP9_COMP *cpi,
   if (((frame->coded_error / num_mbs) > LOW_CODED_ERR_PER_MB) &&
       ((frame->intra_error / DOUBLE_DIVIDE_CHECK(frame->coded_error)) <
        (double)NCOUNT_FRAME_II_THRESH)) {
-    modified_pct_inter = frame->pcnt_inter - frame->pcnt_neutral;
+    modified_pct_inter =
+        frame->pcnt_inter + frame->pcnt_intra_low - frame->pcnt_neutral;
   }
   modified_pcnt_intra = 100 * (1.0 - modified_pct_inter);