The invention discloses a lossless video
compression method and
system for a digital KVM switcher having
low delay and
low complexity. The lossless video
compression method comprises the following steps of: (1), writing frame-level coding information of a screen
video image in a code
stream; (2), sequentially inputting RGB data of pixels to be compressed in the screen
video image; (3), calculating the prediction mode of the current pixels according to the spatio-
temporal correlation; (4), calculating the coding mode of the current pixels according to the prediction mode of the current pixels; (5), writing a compression bit in the code
stream according to the coding mode of the current pixels; (6), repeating the steps (2)-(5), such that coding of all the pixels in the screen
video image of the current frame is completed; and (7), performing
byte alignment filling of the code
stream of the current frame, such that coding of the screen video image of the current frame is completed. The method disclosed by the invention is applied to compression of the screen video image of the digital KVM switcher; the compression
processing delay and the code
stream data volume of the screen video image can be effectively reduced under the limited calculation complexity; and simultaneously, lossless
video quality can be kept.