optimized bit encoding; added YUV444 encoding mode