OSDN Git Service

test: fix AVCEContextTest/RateControl regression nougat-x86 android-x86-7.1-r1 android-x86-7.1-r2 android-x86-7.1-r3 android-x86-7.1-r4 android-x86-7.1-r5
authorU. Artie Eoff <ullysses.a.eoff@intel.com>
Thu, 10 Aug 2017 18:23:57 +0000 (11:23 -0700)
committerXiang, Haihao <haihao.xiang@intel.com>
Fri, 11 Aug 2017 00:08:36 +0000 (08:08 +0800)
Update AVCEContextTest/RateControl expectations that changed
since PR #197

Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
test/i965_avce_context_test.cpp

index 68335d4..494d51d 100644 (file)
@@ -92,9 +92,23 @@ TEST_P(AVCEContextTest, RateControl)
         VA_RC_VBR_CONSTRAINED, VA_RC_MB,
     };
 
+    struct i965_driver_data *i965(*this);
+    ASSERT_PTR(i965);
+    const unsigned supportedBRC = (entrypoint == VAEntrypointEncSlice) ?
+        i965->codec_info->h264_brc_mode : i965->codec_info->lp_h264_brc_mode;
+
     for (auto rc : rateControls) {
         ConfigAttribs attribs(1, {type:VAConfigAttribRateControl, value:rc});
-        config = createConfig(profile, entrypoint, attribs);
+
+        const VAStatus expect =
+            ((rc & supportedBRC) ||
+                profile == VAProfileH264MultiviewHigh ||
+                profile == VAProfileH264StereoHigh) ?
+            VA_STATUS_SUCCESS : VA_STATUS_ERROR_INVALID_CONFIG;
+
+        config = createConfig(profile, entrypoint, attribs, expect);
+        if (expect != VA_STATUS_SUCCESS) continue;
+
         context = createContext(config, 1, 1);
         if (HasFailure()) continue;