[Spice-devel] What algorithm does SPICE server use in video stream detection?

Christophe Fergeau cfergeau at redhat.com
Tue Jan 15 13:54:36 UTC 2019


Hey,

On Thu, Jan 10, 2019 at 03:03:05PM +0800, 陈炤 wrote:
> Hi,
> 
> 
> 
> I read the spice server code, and find that the video stream detection
> code is in server/spice-bitmap-utils.c. func
> bitmap_get_graduality_level will calculate a score, and the GRADUALITY
> is set based on the score.
> 
> So what's the meaning of this score, and what algorithm does it use to
> calculate this score?

Long time since I looked at that code, but iirc it tries to detect if
the region looks like text or an image, and if it's changing a lot. If
it's an image which is changing a lot, then it's recognized as a video
stream.

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20190115/6cf48071/attachment-0001.sig>


More information about the Spice-devel mailing list