hardware/intel/intel-driver
修訂 | e751897e64d1d37d6c592b71a8cc7ea8bc8a0b7f (tree) |
---|---|
時間 | 2015-08-25 14:35:16 |
作者 | Zhao Yakui <yakui.zhao@inte...> |
Commiter | Zhao, Yakui |
Remove the redundant check in vaBeginPicture call
The corresponding check is already executed when calling vaCreateConfig.
So the redundant check is removed.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Xiang Haihao <haihao.xiang@intel.com>
@@ -2302,7 +2302,7 @@ i965_BeginPicture(VADriverContextP ctx, | ||
2302 | 2302 | struct object_context *obj_context = CONTEXT(context); |
2303 | 2303 | struct object_surface *obj_surface = SURFACE(render_target); |
2304 | 2304 | struct object_config *obj_config; |
2305 | - VAStatus vaStatus; | |
2305 | + VAStatus vaStatus = VA_STATUS_SUCCESS; | |
2306 | 2306 | int i; |
2307 | 2307 | |
2308 | 2308 | ASSERT_RET(obj_context, VA_STATUS_ERROR_INVALID_CONTEXT); |
@@ -2313,55 +2313,6 @@ i965_BeginPicture(VADriverContextP ctx, | ||
2313 | 2313 | if (is_surface_busy(i965, obj_surface)) |
2314 | 2314 | return VA_STATUS_ERROR_SURFACE_BUSY; |
2315 | 2315 | |
2316 | - switch (obj_config->profile) { | |
2317 | - case VAProfileMPEG2Simple: | |
2318 | - case VAProfileMPEG2Main: | |
2319 | - vaStatus = VA_STATUS_SUCCESS; | |
2320 | - break; | |
2321 | - | |
2322 | - case VAProfileH264ConstrainedBaseline: | |
2323 | - case VAProfileH264Main: | |
2324 | - case VAProfileH264High: | |
2325 | - vaStatus = VA_STATUS_SUCCESS; | |
2326 | - break; | |
2327 | - | |
2328 | - case VAProfileH264MultiviewHigh: | |
2329 | - case VAProfileH264StereoHigh: | |
2330 | - if (HAS_H264_MVC_DECODING_PROFILE(i965, obj_config->profile) || | |
2331 | - HAS_H264_MVC_ENCODING(i965)) { | |
2332 | - vaStatus = VA_STATUS_SUCCESS; | |
2333 | - } else { | |
2334 | - ASSERT_RET(0, VA_STATUS_ERROR_UNSUPPORTED_PROFILE); | |
2335 | - } | |
2336 | - break; | |
2337 | - | |
2338 | - case VAProfileVC1Simple: | |
2339 | - case VAProfileVC1Main: | |
2340 | - case VAProfileVC1Advanced: | |
2341 | - vaStatus = VA_STATUS_SUCCESS; | |
2342 | - break; | |
2343 | - | |
2344 | - case VAProfileJPEGBaseline: | |
2345 | - vaStatus = VA_STATUS_SUCCESS; | |
2346 | - break; | |
2347 | - | |
2348 | - case VAProfileNone: | |
2349 | - vaStatus = VA_STATUS_SUCCESS; | |
2350 | - break; | |
2351 | - | |
2352 | - case VAProfileVP8Version0_3: | |
2353 | - vaStatus = VA_STATUS_SUCCESS; | |
2354 | - break; | |
2355 | - | |
2356 | - case VAProfileHEVCMain: | |
2357 | - vaStatus = VA_STATUS_SUCCESS; | |
2358 | - break; | |
2359 | - | |
2360 | - default: | |
2361 | - ASSERT_RET(0, VA_STATUS_ERROR_UNSUPPORTED_PROFILE); | |
2362 | - break; | |
2363 | - } | |
2364 | - | |
2365 | 2316 | if (obj_context->codec_type == CODEC_PROC) { |
2366 | 2317 | obj_context->codec_state.proc.current_render_target = render_target; |
2367 | 2318 | } else if (obj_context->codec_type == CODEC_ENC) { |