Ideally the clipping done by write_frame() and the MCT stuff would be done at the final IDWT stage