fix ticket#886: improve LMCS encoder to handle image with uniform values (e.g., pure dark).
merged
mentioned in commit b829fd4f