Make the rate distortion structure fed into the search function independent. Change-Id: Id3997fea87e8aa6d0b42e64b11aa79a8c3e15af7