Re: principle of compute_lines_gradual_score

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 
> Hi, I'm a beginner at SPICE project. Today, I was reading the code,
> the function which named `_get_bitmap_graduality_level` at line 5979
> in file server/red_worker.c (the version of spice is 0.12.7 and my OS
> is Fedora 23). It seems that get a score value from a image by the
> function and I also found the function `void
> FNAME(compute_lines_gradual_score)` at line 116 in file
> server/red_bitmap_utils.h. I really can't understand the what these
> two functions do, the logic, I mean.
> 
> So the question is that could you tell me the principle of the
> algorithm? thanks : )

Basically try to detect if a picture is a natural one or a result of
a draw.
Natural picture are better to be compressed with some algorithms (like
jpeg).
The idea is that you take some samples in the image and score based on
the variation (let's say for instance the color change less that 20%
from a pixel to the next you score 1 otherwise you score 0).

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]