[Spice-devel] [PATCH 1/2] server: Don't send stream frames that are identical to the last one

Alexander Larsson alexl at redhat.com
Fri Aug 27 04:15:29 PDT 2010


On Fri, 2010-08-27 at 10:49 +0300, Yaniv Kaul wrote:
> On 2010-08-26 18:33, Yonit Halperin wrote:
> > On 08/25/2010 11:49 AM, alexl at redhat.com wrote:
> >> From: Alexander Larsson<alexl at redhat.com>
> >>
> >> This happens e.g. with the vlc player when paused, as it still draws
> >> a continuous stream of frames (bug #28817). It may also help slightly
> >> if a video contains identical frames in a row for other reasons.
> >>
> >> We detect frame equality using the adler32 checksum. There is a small
> >> chance of checksum collisions, but that will just cause one frame to
> >> be skipped, or if it is the last frame it will be fixed when the stream
> >> ends and we get the lossless data for the region.
> >> ---
> >
> > Ack, but I'm not sure we should add efficiency overhead for all 
> > streams (audio and video wise) if only VLC behaves in such manner.
> > Maybe we can add it only for low bandwidth,  and/or preform sampling 
> > of every X frames, and then if they are equal check if all the frames 
> > are equal.
> 
> I totally agree - right now, it's a corner case (and we should file a BZ 
> on VLC to fix their behaviour!)
> In addition, IIRC, adler32 is pretty weak for short messages (has a 
> greater chance of collisions), making it sub-optimal for the audio 
> stream (perhaps fine for the video stream).

adler32 is not used for the audio stream. We check for silence by seeing
if all samples are zero.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
       alexl at redhat.com            alexander.larsson at gmail.com 
He's an all-American sweet-toothed cop looking for a cure to the poison 
coursing through his veins. She's a chain-smoking gypsy college professor from 
aristocratic European stock. They fight crime! 



More information about the Spice-devel mailing list