One pass algo to detect important frame