avcodec/motion_est_template: Fix undefined shifts in CHECK_MV()

Fixes:asan_heap-oob_4d5bb0_2295_cov_3374722539_hotel_california_ra5.1_640x480_30s.rmvb

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
