Clamp number of downscales in QualityScaler.
Clamp number of downscales in QualityScaler.

Fixes bug where QualityScaler would be stuck "way below" QVGA (due to
downscale_shift_) even though it would never scale below QVGA. Also
fixes issue where samples would be cleared when either staying at max
resolution or going below QVGA even though no action happened.

BUG=
R=glaznev@webrtc.org

Review URL: https://codereview.webrtc.org/1971693003 .

Cr-Original-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#12691}
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: 919288f6ba4ac2112c616c877273e84374904da9

Alkalyne/webrtctrunk,jchavanton/webrtc,Alkalyne/webrtctrunk,jchavanton/webrtc,jchavanton/webrtc,Alkalyne/webrtctrunk,Alkalyne/webrtctrunk,jchavanton/webrtc,jchavanton/webrtc,jchavanton/webrtc,Alkalyne/webrtctrunk,Alkalyne/webrtctrunk,Alkalyne/webrtctrunk,jchavanton/webrtc,Alkalyne/webrtctrunk