diff options
author | U. Artie Eoff <ullysses.a.eoff@intel.com> | 2017-08-10 11:23:57 -0700 |
---|---|---|
committer | Xiang, Haihao <haihao.xiang@intel.com> | 2017-08-11 08:08:36 +0800 |
commit | f5e479ff422fcadd685de29b44f5f2c282cd7353 (patch) | |
tree | c00a9ac19faf8e26be6c8e695c1b054e30b43f54 /test | |
parent | 785c4f4f3fd4a5447b742584c81051e6353cf1a5 (diff) | |
download | libva-intel-driver-f5e479ff422fcadd685de29b44f5f2c282cd7353.tar.gz |
test: fix AVCEContextTest/RateControl regression
Update AVCEContextTest/RateControl expectations that changed
since PR #197
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/i965_avce_context_test.cpp | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/test/i965_avce_context_test.cpp b/test/i965_avce_context_test.cpp index 68335d45..494d51d5 100644 --- a/test/i965_avce_context_test.cpp +++ b/test/i965_avce_context_test.cpp @@ -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; |