Fix several issues in optical flow
This CL fixes the following issues in optical flow refinement. It also includes cleanups and refactoring of code to improve readability.
- In REFINE_ALL mode (--enable-opfl-refine=2), GLOBAL_GLOBALMV mode search was turned off by mistake.
- In REFINE_ALL mode (--enable-opfl-refine=2), interpolation filter type is implicitly derived when optical flow is used, but the condition for signaling interpolation filter type and optical flow are not always aligned (issue #274 (closed)).
- When reading the frame level opfl_refine_type, throw an error if the read flag is invalid (issue #257 (closed))
- Revert part of the OPFL baseline change, and fix an int16 MV overflow (issue #225 (closed))
- Fix integer MV overflow (issue #272 (closed))
Rare and minor stats changes from change 4 and 5.
Edited by Lester Lu