Alleviating blocking artifacts via curve-fitting