Improve scene detection and correct caf-mode

Change-Id: Iaacaf332e0dbc080a2d9606f98e85ddb715a55cb