shithub: libvpx

Download patch

ref: 872e34ae8dede44e4ca232a71b4cd54bb0aa5208
parent: 7b9984b38618d94e91f377634adf458b07a58f02
author: Marco Paniconi <[email protected]>
date: Wed Mar 28 06:28:14 EDT 2018

vp9-svc: Add check in datarate unittests for frame-dropping.

Add verfication for constrained svc framedrop mode: check that
if a given spatial is dropped, all uppper layers must be dropped.

Change-Id: I9b4821b23c95d1d9d0c031a41af19984647ec5dc

--- a/test/datarate_test.cc
+++ b/test/datarate_test.cc
@@ -1618,6 +1618,17 @@
       }
     }
     ASSERT_EQ(count, num_layers_encoded);
+    // In the constrained frame drop mode, if a given spatial is dropped all
+    // upper layers must be dropped too.
+    if (constrained_framedrop_) {
+      for (int sl = 0; sl < number_spatial_layers_; ++sl) {
+        if (!pkt->data.frame.spatial_layer_encoded[sl]) {
+          // Check that all upper layers are dropped.
+          for (int sl2 = sl + 1; sl2 < number_spatial_layers_; ++sl2)
+            ASSERT_EQ(pkt->data.frame.spatial_layer_encoded[sl2], 0);
+        }
+      }
+    }
     // Keep track of number of non-reference frames, needed for mismatch check.
     // Non-reference frames are top spatial and temporal layer frames,
     // for TL > 0.