FS-7515: update cv to use new alpha supported switch_image_t

This commit is contained in:
Anthony Minessale
2015-04-14 17:08:59 -05:00
committed by Michael Jerris
parent cc27c51eb7
commit c312b50da7
3 changed files with 271 additions and 342 deletions
+17
View File
@@ -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
*/