An accelerated JPEG image codec