function [LSB,location_map] = Water_Ex_Preprocess(half_sum,embeded_h)
new_DEh = 2*embeded_h;
new_1DEh = new_DEh + 1;
new_Ch = 2*floor(embeded_h/2);
if (half_sum <= 255) & (half_sum >= 128)  
    if (abs(new_DEh) <= 2*(255-half_sum)) & (abs(new_1DEh) <= 2*(255-half_sum))
        LSB = (embeded_h - new_Ch);
        location_map = 1;
    else
        LSB = -1;
        location_map = 0;
    end
elseif (half_sum <= 127) & (half_sum >= 0)  
    if (abs(new_DEh) <= (2*half_sum+1)) & (abs(new_1DEh) <= (2*half_sum+1))
        LSB = (embeded_h - new_Ch);
        location_map = 1;
     else
         LSB = -1;
         location_map = 0;
    end
end


