Refactor helper functions in search
Refactor helper functions in search

Combines functions lcu_set_intra_mode and lcu_set_inter_pu to a single
function. Removes some duplicated code.

ultravideo/kvazaar,ultravideo/kvazaar,ultravideo/kvazaar,ultravideo/kvazaar,ultravideo/kvazaar