Revision 2e3e8031 libswscale/swscale.c

View differences:

libswscale/swscale.c
2673 2673

  
2674 2674
    /* precalculate horizontal scaler filter coefficients */
2675 2675
    {
2676
        const int filterAlign=
2677
            (flags & SWS_CPU_CAPS_MMX) ? 4 :
2678
            (flags & SWS_CPU_CAPS_ALTIVEC) ? 8 :
2679
            1;
2680

  
2681
        if (initFilter(&c->hLumFilter, &c->hLumFilterPos, &c->hLumFilterSize, c->lumXInc,
2682
                       srcW      ,       dstW, filterAlign, 1<<14,
2683
                       (flags&SWS_BICUBLIN) ? (flags|SWS_BICUBIC)  : flags,
2684
                       srcFilter->lumH, dstFilter->lumH, c->param) < 0)
2685
            goto fail;
2686
        if (initFilter(&c->hChrFilter, &c->hChrFilterPos, &c->hChrFilterSize, c->chrXInc,
2687
                       c->chrSrcW, c->chrDstW, filterAlign, 1<<14,
2688
                       (flags&SWS_BICUBLIN) ? (flags|SWS_BILINEAR) : flags,
2689
                       srcFilter->chrH, dstFilter->chrH, c->param) < 0)
2690
            goto fail;
2691

  
2692 2676
#if defined(COMPILE_MMX2)
2693 2677
// can't downscale !!!
2694 2678
        if (c->canMMX2BeUsed && (flags & SWS_FAST_BILINEAR)) {
......
2718 2702
            mprotect(c->lumMmx2FilterCode, c->lumMmx2FilterCodeSize, PROT_EXEC | PROT_READ);
2719 2703
            mprotect(c->chrMmx2FilterCode, c->chrMmx2FilterCodeSize, PROT_EXEC | PROT_READ);
2720 2704
#endif
2721
        }
2705
        } else
2722 2706
#endif /* defined(COMPILE_MMX2) */
2707
        {
2708
            const int filterAlign=
2709
                (flags & SWS_CPU_CAPS_MMX) ? 4 :
2710
                (flags & SWS_CPU_CAPS_ALTIVEC) ? 8 :
2711
                1;
2712

  
2713
            if (initFilter(&c->hLumFilter, &c->hLumFilterPos, &c->hLumFilterSize, c->lumXInc,
2714
                           srcW      ,       dstW, filterAlign, 1<<14,
2715
                           (flags&SWS_BICUBLIN) ? (flags|SWS_BICUBIC)  : flags,
2716
                           srcFilter->lumH, dstFilter->lumH, c->param) < 0)
2717
                goto fail;
2718
            if (initFilter(&c->hChrFilter, &c->hChrFilterPos, &c->hChrFilterSize, c->chrXInc,
2719
                           c->chrSrcW, c->chrDstW, filterAlign, 1<<14,
2720
                           (flags&SWS_BICUBLIN) ? (flags|SWS_BILINEAR) : flags,
2721
                           srcFilter->chrH, dstFilter->chrH, c->param) < 0)
2722
                goto fail;
2723
        }
2723 2724
    } // initialize horizontal stuff
2724 2725

  
2725 2726

  

Also available in: Unified diff