Re: server: Simplify the MJPEG encoder's maximum framerate estimation

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

 



On Thu, 3 Dec 2015, Frediano Ziglio wrote:
[...]
> I think the exact simplification is
> 
> if (!bytes_per_sec) {
>   return 0;
> }
> return frame_size ? bytes_per_sec / frame_size : MJPEG_MAX_FPS;
> 
> You already noted that you used rounding instead or truncation;
> depending on the usage can be correct or not.

The function seems to be meant to return the maximum safe framerate so 
always rounding down may indeed be better. I resent the patch and added 
a note in the commit log for the bytes_per_sec == frame_size == 0 case.


-- 
Francois Gouget <fgouget@xxxxxxxxxxxxxxx>

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://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]