hardware/intel/common/vaapi
リビジョン | f5e479ff422fcadd685de29b44f5f2c282cd7353 (tree) |
---|---|
日時 | 2017-08-11 09:08:36 |
作者 | U. Artie Eoff <ullysses.a.eoff@inte...> |
コミッター | Xiang, Haihao |
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>
@@ -92,9 +92,23 @@ TEST_P(AVCEContextTest, RateControl) | ||
92 | 92 | VA_RC_VBR_CONSTRAINED, VA_RC_MB, |
93 | 93 | }; |
94 | 94 | |
95 | + struct i965_driver_data *i965(*this); | |
96 | + ASSERT_PTR(i965); | |
97 | + const unsigned supportedBRC = (entrypoint == VAEntrypointEncSlice) ? | |
98 | + i965->codec_info->h264_brc_mode : i965->codec_info->lp_h264_brc_mode; | |
99 | + | |
95 | 100 | for (auto rc : rateControls) { |
96 | 101 | ConfigAttribs attribs(1, {type:VAConfigAttribRateControl, value:rc}); |
97 | - config = createConfig(profile, entrypoint, attribs); | |
102 | + | |
103 | + const VAStatus expect = | |
104 | + ((rc & supportedBRC) || | |
105 | + profile == VAProfileH264MultiviewHigh || | |
106 | + profile == VAProfileH264StereoHigh) ? | |
107 | + VA_STATUS_SUCCESS : VA_STATUS_ERROR_INVALID_CONFIG; | |
108 | + | |
109 | + config = createConfig(profile, entrypoint, attribs, expect); | |
110 | + if (expect != VA_STATUS_SUCCESS) continue; | |
111 | + | |
98 | 112 | context = createContext(config, 1, 1); |
99 | 113 | if (HasFailure()) continue; |
100 | 114 |