improved rgb to yuv420 conversion