mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-06 20:31:50 +00:00
FS-7515: update cv to use new alpha supported switch_image_t
This commit is contained in:
committed by
Michael Jerris
parent
cc27c51eb7
commit
c312b50da7
@@ -46,6 +46,23 @@ SWITCH_BEGIN_EXTERN_C
|
||||
#define SWITCH_URL_UNSAFE "\r\n #%&+:;<=>?@[\\]^`{|}\""
|
||||
|
||||
|
||||
static inline uint32_t switch_round_to_step(uint32_t num, uint32_t step)
|
||||
{
|
||||
uint32_t r;
|
||||
uint32_t x;
|
||||
|
||||
if (!num) return 0;
|
||||
|
||||
r = (num % step);
|
||||
x = num - r;
|
||||
|
||||
if (r > step / 2) {
|
||||
x += step;
|
||||
}
|
||||
|
||||
return x;
|
||||
}
|
||||
|
||||
/* https://code.google.com/p/stringencoders/wiki/PerformanceAscii
|
||||
http://www.azillionmonkeys.com/qed/asmexample.html
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user