1. A method for encoding a frame in a sequence of frames, comprising: measuring statistics of the frame; based on the measured statistics, estimating a likelihood that coding of the frame will cause banding artifacts on decoding based on comparing an anti-banding noise threshold to a number of pixel blocks in the frame that have a noise level below a selected noise threshold; adding noise to the frame based on the estimating; calculating a dark-scene score for the frame based on the measured statistics; comparing the dark-scene score to a threshold; when the comparison indicates that the frame is dark, altering filtering parameters for the frame from a default level to reduce an amount of noise filtered from the frame; filtering the frame based on the altered filtering parameters; and encoding the filtered frame.