Bug 1037097: restrict image decode size in MediaFrame based on device memory size