An adaptive algorithm for low-power streaming multimedia processing