Go to the documentation of this file.
24 const uint8_t *
src,
int srcW,
int xInc)
27 unsigned int xpos = 0;
28 for (
i = 0;
i < dstWidth;
i++) {
29 register unsigned int xx = xpos >> 16;
30 register unsigned int xalpha = (xpos & 0xFFFF) >> 9;
34 for (
i=dstWidth-1; (
i*xInc)>>16 >=srcW-1;
i--)
39 int dstWidth,
const uint8_t *
src1,
40 const uint8_t *
src2,
int srcW,
int xInc)
43 unsigned int xpos = 0;
44 for (
i = 0;
i < dstWidth;
i++) {
45 register unsigned int xx = xpos >> 16;
46 register unsigned int xalpha = (xpos & 0xFFFF) >> 9;
47 dst1[
i] = (
src1[xx] * (xalpha ^ 127) +
src1[xx + 1] * xalpha);
48 dst2[
i] = (
src2[xx] * (xalpha ^ 127) +
src2[xx + 1] * xalpha);
51 for (
i=dstWidth-1; (
i*xInc)>>16 >=srcW-1;
i--) {
52 dst1[
i] =
src1[srcW-1]*128;
53 dst2[
i] =
src2[srcW-1]*128;
void ff_hcscale_fast_c(SwsInternal *c, int16_t *dst1, int16_t *dst2, int dstWidth, const uint8_t *src1, const uint8_t *src2, int srcW, int xInc)
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
#define i(width, name, range_min, range_max)
void ff_hyscale_fast_c(SwsInternal *c, int16_t *dst, int dstWidth, const uint8_t *src, int srcW, int xInc)