encode: use QUALITY_SHIFT