23 #define _SVID_SOURCE // needed for MAP_ANONYMOUS
24 #define _DARWIN_C_SOURCE // needed for MAP_ANON
31 #if defined(MAP_ANON) && !defined(MAP_ANONYMOUS)
32 #define MAP_ANONYMOUS MAP_ANON
36 #define WIN32_LEAN_AND_MEAN
66 return FFMPEG_CONFIGURATION;
71 #define LICENSE_PREFIX "libswscale license: "
75 #define RET 0xC3 // near return opcode for x86
243 #if FF_API_SWS_FORMAT_NAME
250 return "Unknown format";
258 return ((d * dist + c) * dist + b) * dist +
a;
261 b + 2.0 * c + 3.0 * d,
263 -b - 3.0 * c - 6.0 * d,
270 pos = (128 << chr_subsample) - 128;
273 return pos >> chr_subsample;
290 {
SWS_POINT,
"nearest neighbor / point", -1 },
293 {
SWS_X,
"experimental", 8 },
297 int *outFilterSize,
int xInc,
int srcW,
298 int dstW,
int filterAlign,
int one,
301 double param[2],
int srcPos,
int dstPos)
308 int64_t *filter2 = NULL;
309 const int64_t fone = 1LL << (54 -
FFMIN(
av_log2(srcW/dstW), 8));
317 if (
FFABS(xInc - 0x10000) < 10 && srcPos == dstPos) {
321 dstW,
sizeof(*filter) * filterSize, fail);
323 for (i = 0; i < dstW; i++) {
324 filter[i * filterSize] = fone;
332 dstW,
sizeof(*filter) * filterSize, fail);
334 xDstInSrc = ((dstPos*(int64_t)xInc)>>8) - ((srcPos*0x8000LL)>>7);
335 for (i = 0; i < dstW; i++) {
336 int xx = (xDstInSrc - ((filterSize - 1) << 15) + (1 << 15)) >> 16;
338 (*filterPos)[i] = xx;
342 }
else if ((xInc <= (1 << 16) && (flags &
SWS_AREA)) ||
348 dstW,
sizeof(*filter) * filterSize, fail);
350 xDstInSrc = ((dstPos*(int64_t)xInc)>>8) - ((srcPos*0x8000LL)>>7);
351 for (i = 0; i < dstW; i++) {
352 int xx = (xDstInSrc - ((filterSize - 1) << 15) + (1 << 15)) >> 16;
355 (*filterPos)[i] = xx;
357 for (j = 0; j < filterSize; j++) {
358 int64_t
coeff= fone -
FFABS(((int64_t)xx<<16) - xDstInSrc)*(fone>>16);
361 filter[i * filterSize + j] =
coeff;
371 if (flags & scale_algorithms[i].flag && scale_algorithms[i].size_factor > 0) {
381 filterSize = 1 + sizeFactor;
383 filterSize = 1 + (sizeFactor * srcW + dstW - 1) / dstW;
385 filterSize =
FFMIN(filterSize, srcW - 2);
386 filterSize =
FFMAX(filterSize, 1);
389 dstW,
sizeof(*filter) * filterSize, fail);
391 xDstInSrc = ((dstPos*(int64_t)xInc)>>7) - ((srcPos*0x10000LL)>>7);
392 for (i = 0; i < dstW; i++) {
393 int xx = (xDstInSrc - ((int64_t)(filterSize - 2) << 16)) / (1 << 17);
395 (*filterPos)[i] = xx;
396 for (j = 0; j < filterSize; j++) {
397 int64_t d = (
FFABS(((int64_t)xx << 17) - xDstInSrc)) << 13;
403 floatd = d * (1.0 / (1 << 30));
409 if (d >= 1LL << 31) {
412 int64_t dd = (d * d) >> 30;
413 int64_t ddd = (dd * d) >> 30;
416 coeff = (12 * (1 << 24) - 9 * B - 6 * C) * ddd +
417 (-18 * (1 << 24) + 12 * B + 6 * C) * dd +
418 (6 * (1 << 24) - 2 * B) * (1 << 30);
420 coeff = (-B - 6 * C) * ddd +
421 (6 * B + 30 * C) * dd +
422 (-12 * B - 48 * C) * d +
423 (8 * B + 24 * C) * (1 << 30);
425 coeff /= (1LL<<54)/fone;
428 else if (flags &
SWS_X) {
429 double p = param ? param * 0.01 : 0.3;
430 coeff = d ? sin(d *
M_PI) / (d *
M_PI) : 1.0;
431 coeff *= pow(2.0, -p * d * d);
434 else if (flags & SWS_X) {
439 c = cos(floatd *
M_PI);
446 coeff = (c * 0.5 + 0.5) * fone;
448 int64_t d2 = d - (1 << 29);
449 if (d2 * xInc < -(1LL << (29 + 16)))
450 coeff = 1.0 * (1LL << (30 + 16));
451 else if (d2 * xInc < (1LL << (29 + 16)))
452 coeff = -d2 * xInc + (1LL << (29 + 16));
455 coeff *= fone >> (30 + 16);
458 coeff = (pow(2.0, -p * floatd * floatd)) * fone;
460 coeff = (d ? sin(floatd *
M_PI) / (floatd *
M_PI) : 1.0) * fone;
461 }
else if (flags & SWS_LANCZOS) {
463 coeff = (d ? sin(floatd *
M_PI) * sin(floatd * M_PI / p) /
464 (floatd * floatd * M_PI * M_PI / p) : 1.0) * fone;
468 coeff = (1 << 30) - d;
473 double p = -2.196152422706632;
479 filter[i * filterSize + j] =
coeff;
482 xDstInSrc += 2 * xInc;
490 filter2Size = filterSize;
492 filter2Size += srcFilter->
length - 1;
494 filter2Size += dstFilter->
length - 1;
498 for (i = 0; i < dstW; i++) {
502 for (k = 0; k < srcFilter->
length; k++) {
503 for (j = 0; j < filterSize; j++)
504 filter2[i * filter2Size + k + j] +=
505 srcFilter->
coeff[k] * filter[i * filterSize + j];
508 for (j = 0; j < filterSize; j++)
509 filter2[i * filter2Size + j] = filter[i * filterSize + j];
513 (*filterPos)[i] += (filterSize - 1) / 2 - (filter2Size - 1) / 2;
520 for (i = dstW - 1; i >= 0; i--) {
521 int min = filter2Size;
523 int64_t cutOff = 0.0;
526 for (j = 0; j < filter2Size; j++) {
528 cutOff +=
FFABS(filter2[i * filter2Size]);
535 if (i < dstW - 1 && (*filterPos)[i] >= (*filterPos)[i + 1])
539 for (k = 1; k < filter2Size; k++)
540 filter2[i * filter2Size + k - 1] = filter2[i * filter2Size + k];
541 filter2[i * filter2Size + k - 1] = 0;
547 for (j = filter2Size - 1; j > 0; j--) {
548 cutOff +=
FFABS(filter2[i * filter2Size + j]);
555 if (min > minFilterSize)
561 if (minFilterSize < 5)
567 if (minFilterSize < 3)
573 if (minFilterSize == 1 && filterAlign == 2)
578 filterSize = (minFilterSize + (filterAlign - 1)) & (~(filterAlign - 1));
585 av_log(NULL,
AV_LOG_ERROR,
"sws: filterSize %d is too large, try less extreme scaling or set --sws-max-filter-size and recompile\n",
586 FF_CEIL_RSHIFT((filterSize+1) * ((flags & SWS_ACCURATE_RND) ? APCK_SIZE : 16), 4));
589 *outFilterSize = filterSize;
593 "SwScaler: reducing / aligning filtersize %d -> %d\n",
594 filter2Size, filterSize);
596 for (i = 0; i < dstW; i++) {
599 for (j = 0; j < filterSize; j++) {
600 if (j >= filter2Size)
601 filter[i * filterSize + j] = 0;
603 filter[i * filterSize + j] = filter2[i * filter2Size + j];
605 filter[i * filterSize + j] = 0;
612 for (i = 0; i < dstW; i++) {
614 if ((*filterPos)[i] < 0) {
616 for (j = 1; j < filterSize; j++) {
617 int left =
FFMAX(j + (*filterPos)[i], 0);
618 filter[i * filterSize + left] += filter[i * filterSize + j];
619 filter[i * filterSize + j] = 0;
624 if ((*filterPos)[i] + filterSize > srcW) {
625 int shift = (*filterPos)[i] + filterSize - srcW;
627 for (j = filterSize - 2; j >= 0; j--) {
628 int right =
FFMIN(j + shift, filterSize - 1);
629 filter[i * filterSize + right] += filter[i * filterSize + j];
630 filter[i * filterSize + j] = 0;
632 (*filterPos)[i]= srcW - filterSize;
639 (dstW + 3), *outFilterSize *
sizeof(int16_t), fail);
642 for (i = 0; i < dstW; i++) {
647 for (j = 0; j < filterSize; j++) {
648 sum += filter[i * filterSize + j];
650 sum = (sum + one / 2) / one;
655 for (j = 0; j < *outFilterSize; j++) {
656 int64_t
v = filter[i * filterSize + j] + error;
658 (*outFilter)[i * (*outFilterSize) + j] = intV;
659 error = v - intV * sum;
663 (*filterPos)[dstW + 0] =
664 (*filterPos)[dstW + 1] =
665 (*filterPos)[dstW + 2] = (*filterPos)[dstW - 1];
667 for (i = 0; i < *outFilterSize; i++) {
668 int k = (dstW - 1) * (*outFilterSize) + i;
669 (*outFilter)[k + 1 * (*outFilterSize)] =
670 (*outFilter)[k + 2 * (*outFilterSize)] =
671 (*outFilter)[k + 3 * (*outFilterSize)] = (*outFilter)[k];
684 #if HAVE_MMXEXT_INLINE
685 static av_cold int init_hscaler_mmxext(
int dstW,
int xInc,
uint8_t *filterCode,
714 "movq (%%"REG_d
", %%"REG_a
"), %%mm3 \n\t"
715 "movd (%%"REG_c
", %%"REG_S
"), %%mm0 \n\t"
716 "movd 1(%%"REG_c
", %%"REG_S
"), %%mm1 \n\t"
717 "punpcklbw %%mm7, %%mm1 \n\t"
718 "punpcklbw %%mm7, %%mm0 \n\t"
719 "pshufw $0xFF, %%mm1, %%mm1 \n\t"
721 "pshufw $0xFF, %%mm0, %%mm0 \n\t"
723 "psubw %%mm1, %%mm0 \n\t"
724 "movl 8(%%"REG_b
", %%"REG_a
"), %%esi \n\t"
725 "pmullw %%mm3, %%mm0 \n\t"
726 "psllw $7, %%mm1 \n\t"
727 "paddw %%mm1, %%mm0 \n\t"
729 "movq %%mm0, (%%"REG_D
", %%"REG_a
") \n\t"
731 "add $8, %%"REG_a
" \n\t"
746 :
"=r" (fragmentA),
"=r" (imm8OfPShufW1A),
"=r" (imm8OfPShufW2A),
747 "=r" (fragmentLengthA)
754 "movq (%%"REG_d
", %%"REG_a
"), %%mm3 \n\t"
755 "movd (%%"REG_c
", %%"REG_S
"), %%mm0 \n\t"
756 "punpcklbw %%mm7, %%mm0 \n\t"
757 "pshufw $0xFF, %%mm0, %%mm1 \n\t"
759 "pshufw $0xFF, %%mm0, %%mm0 \n\t"
761 "psubw %%mm1, %%mm0 \n\t"
762 "movl 8(%%"REG_b
", %%"REG_a
"), %%esi \n\t"
763 "pmullw %%mm3, %%mm0 \n\t"
764 "psllw $7, %%mm1 \n\t"
765 "paddw %%mm1, %%mm0 \n\t"
767 "movq %%mm0, (%%"REG_D
", %%"REG_a
") \n\t"
769 "add $8, %%"REG_a
" \n\t"
784 :
"=r" (fragmentB),
"=r" (imm8OfPShufW1B),
"=r" (imm8OfPShufW2B),
785 "=r" (fragmentLengthB)
791 for (i = 0; i < dstW / numSplits; i++) {
796 int b = ((xpos + xInc) >> 16) - xx;
797 int c = ((xpos + xInc * 2) >> 16) - xx;
798 int d = ((xpos + xInc * 3) >> 16) - xx;
799 int inc = (d + 1 < 4);
800 uint8_t *fragment = inc ? fragmentB : fragmentA;
801 x86_reg imm8OfPShufW1 = inc ? imm8OfPShufW1B : imm8OfPShufW1A;
802 x86_reg imm8OfPShufW2 = inc ? imm8OfPShufW2B : imm8OfPShufW2A;
803 x86_reg fragmentLength = inc ? fragmentLengthB : fragmentLengthA;
804 int maxShift = 3 - (d + inc);
808 filter[i] = ((xpos & 0xFFFF) ^ 0xFFFF) >> 9;
809 filter[i + 1] = (((xpos + xInc) & 0xFFFF) ^ 0xFFFF) >> 9;
810 filter[i + 2] = (((xpos + xInc * 2) & 0xFFFF) ^ 0xFFFF) >> 9;
811 filter[i + 3] = (((xpos + xInc * 3) & 0xFFFF) ^ 0xFFFF) >> 9;
812 filterPos[i / 2] = xx;
814 memcpy(filterCode + fragmentPos, fragment, fragmentLength);
816 filterCode[fragmentPos + imm8OfPShufW1] = (a + inc) |
820 filterCode[fragmentPos + imm8OfPShufW2] = a | (b << 2) |
824 if (i + 4 - inc >= dstW)
826 else if ((filterPos[i / 2] & 3) <= maxShift)
827 shift = filterPos[i / 2] & 3;
829 if (shift && i >= shift) {
830 filterCode[fragmentPos + imm8OfPShufW1] += 0x55 *
shift;
831 filterCode[fragmentPos + imm8OfPShufW2] += 0x55 *
shift;
832 filterPos[i / 2] -=
shift;
836 fragmentPos += fragmentLength;
839 filterCode[fragmentPos] =
RET;
844 filterPos[((i / 2) + 1) & (~1)] = xpos >> 16;
846 return fragmentPos + 1;
852 int64_t
W,
V, Z, Cy, Cu, Cv;
853 int64_t vr = table[0];
854 int64_t ub = table[1];
855 int64_t ug = -table[2];
856 int64_t vg = -table[3];
861 static const int8_t map[] = {
886 -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 ,
887 -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 ,
888 -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 ,
889 -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 ,
890 -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 ,
891 -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 ,
892 -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 ,
893 -1 , -1 , -1 , -1 , -1 , -1 , -1 , -1 ,
930 c->input_rgb2yuv_table[
BY_IDX] = ((int)(0.114 * 219 / 255 * (1 << RGB2YUV_SHIFT) + 0.5));
931 c->input_rgb2yuv_table[
BV_IDX] = (-(int)(0.081 * 224 / 255 * (1 << RGB2YUV_SHIFT) + 0.5));
932 c->input_rgb2yuv_table[
BU_IDX] = ((int)(0.500 * 224 / 255 * (1 << RGB2YUV_SHIFT) + 0.5));
933 c->input_rgb2yuv_table[
GY_IDX] = ((int)(0.587 * 219 / 255 * (1 << RGB2YUV_SHIFT) + 0.5));
934 c->input_rgb2yuv_table[
GV_IDX] = (-(int)(0.419 * 224 / 255 * (1 << RGB2YUV_SHIFT) + 0.5));
935 c->input_rgb2yuv_table[
GU_IDX] = (-(int)(0.331 * 224 / 255 * (1 << RGB2YUV_SHIFT) + 0.5));
936 c->input_rgb2yuv_table[
RY_IDX] = ((int)(0.299 * 219 / 255 * (1 << RGB2YUV_SHIFT) + 0.5));
937 c->input_rgb2yuv_table[
RV_IDX] = ((int)(0.500 * 224 / 255 * (1 << RGB2YUV_SHIFT) + 0.5));
938 c->input_rgb2yuv_table[
RU_IDX] = (-(int)(0.169 * 224 / 255 * (1 << RGB2YUV_SHIFT) + 0.5));
941 AV_WL16(p + 16*4 + 2*i, map[i] >= 0 ? c->input_rgb2yuv_table[map[i]] : 0);
951 static const int16_t xyz2rgb_matrix[3][4] = {
952 {13270, -6295, -2041},
954 { 228, -835, 4329} };
955 static const int16_t rgb2xyz_matrix[3][4] = {
959 static int16_t xyzgamma_tab[4096], rgbgamma_tab[4096], xyzgammainv_tab[4096], rgbgammainv_tab[4096];
968 if (rgbgamma_tab[4095])
972 for (i = 0; i < 4096; i++) {
973 xyzgamma_tab[i] =
lrint(pow(i / 4095.0, xyzgamma) * 4095.0);
974 rgbgamma_tab[i] =
lrint(pow(i / 4095.0, rgbgamma) * 4095.0);
975 xyzgammainv_tab[i] =
lrint(pow(i / 4095.0, xyzgammainv) * 4095.0);
976 rgbgammainv_tab[i] =
lrint(pow(i / 4095.0, rgbgammainv) * 4095.0);
981 int srcRange,
const int table[4],
int dstRange,
982 int brightness,
int contrast,
int saturation)
1009 if (need_reinit && c->
srcBpc == 8)
1020 contrast, saturation);
1025 contrast, saturation);
1034 int *srcRange,
int **
table,
int *dstRange,
1035 int *brightness,
int *contrast,
int *saturation)
1126 int usesVFilter, usesHFilter;
1128 SwsFilter dummyFilter = { NULL, NULL, NULL, NULL };
1133 int dst_stride =
FFALIGN(dstW *
sizeof(int16_t) + 66, 16);
1146 unscaled = (srcW == dstW && srcH == dstH);
1152 av_log(c,
AV_LOG_WARNING,
"deprecated pixel format used, make sure you did set range correctly\n");
1193 if (dstW < srcW && dstH < srcH)
1195 else if (dstW > srcW && dstH > srcH)
1200 }
else if (i & (i - 1)) {
1202 "Exactly one scaler algorithm must be chosen, got %X\n", i);
1206 if (srcW < 1 || srcH < 1 || dstW < 1 || dstH < 1) {
1210 srcW, srcH, dstW, dstH);
1215 dstFilter = &dummyFilter;
1217 srcFilter = &dummyFilter;
1219 c->
lumXInc = (((int64_t)srcW << 16) + (dstW >> 1)) / dstW;
1220 c->
lumYInc = (((int64_t)srcH << 16) + (dstH >> 1)) / dstH;
1223 c->
vRounder = 4 * 0x0001000100010001ULL;
1225 usesVFilter = (srcFilter->
lumV && srcFilter->
lumV->
length > 1) ||
1229 usesHFilter = (srcFilter->
lumH && srcFilter->
lumH->
length > 1) ||
1249 av_log(c,
AV_LOG_DEBUG,
"Forcing full internal H chroma due to input having non subsampled chroma\n");
1266 if (!(flags & SWS_FULL_CHR_H_INT)) {
1269 "Desired dithering only supported in full chroma interpolation for destination format '%s'\n",
1275 if (flags & SWS_FULL_CHR_H_INT) {
1278 "Ordered dither is not supported in full chroma interpolation for destination format '%s'\n",
1285 if (!(flags & SWS_FULL_CHR_H_INT)) {
1287 "%s output is not supported with half chroma resolution, switching to full\n",
1296 if (flags & SWS_FULL_CHR_H_INT &&
1311 "full chroma interpolation for destination format '%s' not yet implemented\n",
1313 flags &= ~SWS_FULL_CHR_H_INT;
1316 if (
isAnyRGB(dstFormat) && !(flags & SWS_FULL_CHR_H_INT))
1367 "output width is not a multiple of 32 -> no MMXEXT scaler\n");
1384 if (flags & SWS_FAST_BILINEAR) {
1391 c->
lumXInc = ((int64_t)(srcW - 2) << 16) / (dstW - 2) - 20;
1396 #define USE_MMAP (HAVE_MMAP && HAVE_MPROTECT && defined MAP_ANONYMOUS)
1400 #if HAVE_MMXEXT_INLINE
1406 NULL, NULL, NULL, 4);
1410 PROT_READ | PROT_WRITE,
1411 MAP_PRIVATE | MAP_ANONYMOUS,
1414 PROT_READ | PROT_WRITE,
1415 MAP_PRIVATE | MAP_ANONYMOUS,
1417 #elif HAVE_VIRTUALALLOC
1421 PAGE_EXECUTE_READWRITE);
1425 PAGE_EXECUTE_READWRITE);
1431 #ifdef MAP_ANONYMOUS
1461 const int filterAlign =
X86_MMX(cpu_flags) ? 4 :
1466 srcW, dstW, filterAlign, 1 << 14,
1468 cpu_flags, srcFilter->
lumH, dstFilter->
lumH,
1476 (flags & SWS_BICUBLIN) ? (flags |
SWS_BILINEAR) : flags,
1477 cpu_flags, srcFilter->
chrH, dstFilter->
chrH,
1487 const int filterAlign =
X86_MMX(cpu_flags) ? 2 :
1491 c->
lumYInc, srcH, dstH, filterAlign, (1 << 12),
1493 cpu_flags, srcFilter->
lumV, dstFilter->
lumV,
1500 filterAlign, (1 << 12),
1501 (flags & SWS_BICUBLIN) ? (flags |
SWS_BILINEAR) : flags,
1502 cpu_flags, srcFilter->
chrV, dstFilter->
chrV,
1515 short *p = (
short *)&c->vYCoeffsBank[i];
1516 for (j = 0; j < 8; j++)
1522 short *p = (
short *)&c->vCCoeffsBank[i];
1523 for (j = 0; j < 8; j++)
1532 for (i = 0; i < dstH; i++) {
1533 int chrI = (int64_t)i * c->
chrDstH / dstH;
1548 for (i = 0; i < 4; i++)
1563 dst_stride + 16, fail);
1571 dst_stride * 2 + 32, fail);
1576 if (CONFIG_SWSCALE_ALPHA && c->
alpPixBuf)
1579 dst_stride + 16, fail);
1587 for(j=0; j<dst_stride/2+1; j++)
1590 for(j=0; j<dst_stride+1; j++)
1596 const char *scaler = NULL, *cpucaps;
1599 if (flags & scale_algorithms[i].flag) {
1605 scaler =
"ehh flags invalid?!";
1626 cpucaps =
"AltiVec";
1634 "lum srcW=%d srcH=%d dstW=%d dstH=%d xInc=%d yInc=%d\n",
1637 "chr srcW=%d srcH=%d dstW=%d dstH=%d xInc=%d yInc=%d\n",
1643 if (unscaled && !usesHFilter && !usesVFilter &&
1648 if (flags & SWS_PRINT_INFO)
1650 "using unscaled %s -> %s special converter\n",
1662 #if FF_API_SWS_GETCONTEXT
1666 SwsFilter *dstFilter,
const double *param)
1682 c->
param[0] = param[0];
1683 c->
param[1] = param[1];
1696 float lumaSharpen,
float chromaSharpen,
1697 float chromaHShift,
float chromaVShift,
1704 if (lumaGBlur != 0.0) {
1712 if (chromaGBlur != 0.0) {
1720 if (chromaSharpen != 0.0) {
1729 if (lumaSharpen != 0.0) {
1738 if (chromaHShift != 0.0)
1741 if (chromaVShift != 0.0)
1776 const int length = (int)(variance * quality + 0.5) | 1;
1778 double middle = (length - 1) * 0.5;
1781 if(variance < 0 || quality < 0)
1789 for (i = 0; i <
length; i++) {
1790 double dist = i - middle;
1791 vec->
coeff[i] = exp(-dist * dist / (2 * variance * variance)) /
1792 sqrt(2 * variance *
M_PI);
1808 for (i = 0; i <
length; i++)
1824 for (i = 0; i < a->
length; i++)
1834 for (i = 0; i < a->
length; i++)
1835 a->
coeff[i] *= scalar;
1852 for (i = 0; i < a->
length; i++) {
1853 for (j = 0; j < b->
length; j++) {
1870 for (i = 0; i < a->
length; i++)
1887 for (i = 0; i < a->
length; i++)
1905 for (i = 0; i < a->
length; i++) {
1906 vec->
coeff[i + (length - 1) / 2 -
1968 for (i = 0; i < a->
length; i++)
1969 if (a->
coeff[i] > max)
1972 for (i = 0; i < a->
length; i++)
1973 if (a->
coeff[i] < min)
1978 for (i = 0; i < a->
length; i++) {
1979 int x = (int)((a->
coeff[i] - min) * 60.0 / range + 0.5);
1980 av_log(log_ctx, log_level,
"%1.3f ", a->
coeff[i]);
1982 av_log(log_ctx, log_level,
" ");
1983 av_log(log_ctx, log_level,
"|\n");
2027 if (CONFIG_SWSCALE_ALPHA && c->
alpPixBuf) {
2033 for (i = 0; i < 4; i++)
2056 #elif HAVE_VIRTUALALLOC
2081 const double *
param)
2087 param = default_param;
2090 (context->
srcW != srcW ||
2091 context->
srcH != srcH ||
2093 context->
dstW != dstW ||
2094 context->
dstH != dstH ||
2096 context->
flags != flags ||
2097 context->
param[0] != param[0] ||
2098 context->
param[1] != param[1])) {
2113 context->
param[0] = param[0];
2114 context->
param[1] = param[1];