Fix an OOM issue in mosaic blending.

Set two limits on when we will do mosaic blending.
1) mosaic_width * mosaic_height < (5 * frame_width) * (2 * frame_height)
2) mosaic_height < 2.5 *  frame_height

The latter limit rejects blending for the cases having too much movement
in the secondary direction.

Bug: 5554762
Change-Id: I05fb24bb1ff5446bea0cc1a1de8a02c37fb642d7
3 files changed