Revision fcc402b1 libswscale/swscale_template.c

View differences:

libswscale/swscale_template.c
3039 3039
        if (firstLumSrcY > lastInLumBuf) lastInLumBuf= firstLumSrcY-1;
3040 3040
        if (firstChrSrcY > lastInChrBuf) lastInChrBuf= firstChrSrcY-1;
3041 3041
        //printf("%d %d %d\n", firstChrSrcY, lastInChrBuf, vChrBufSize);
3042
        ASSERT(firstLumSrcY >= lastInLumBuf - vLumBufSize + 1)
3043
        ASSERT(firstChrSrcY >= lastInChrBuf - vChrBufSize + 1)
3042
        assert(firstLumSrcY >= lastInLumBuf - vLumBufSize + 1);
3043
        assert(firstChrSrcY >= lastInChrBuf - vChrBufSize + 1);
3044 3044

  
3045 3045
        // Do we have enough lines in this slice to output the dstY line
3046 3046
        if (lastLumSrcY < srcSliceY + srcSliceH && lastChrSrcY < -((-srcSliceY - srcSliceH)>>c->chrSrcVSubSample))
......
3051 3051
                uint8_t *s= src[0]+(lastInLumBuf + 1 - srcSliceY)*srcStride[0];
3052 3052
                lumBufIndex++;
3053 3053
                //printf("%d %d %d %d\n", lumBufIndex, vLumBufSize, lastInLumBuf,  lastLumSrcY);
3054
                ASSERT(lumBufIndex < 2*vLumBufSize)
3055
                ASSERT(lastInLumBuf + 1 - srcSliceY < srcSliceH)
3056
                ASSERT(lastInLumBuf + 1 - srcSliceY >= 0)
3054
                assert(lumBufIndex < 2*vLumBufSize);
3055
                assert(lastInLumBuf + 1 - srcSliceY < srcSliceH);
3056
                assert(lastInLumBuf + 1 - srcSliceY >= 0);
3057 3057
                //printf("%d %d\n", lumBufIndex, vLumBufSize);
3058 3058
                RENAME(hyscale)(lumPixBuf[ lumBufIndex ], dstW, s, srcW, lumXInc,
3059 3059
                                flags, canMMX2BeUsed, hLumFilter, hLumFilterPos, hLumFilterSize,
......
3066 3066
                uint8_t *src1= src[1]+(lastInChrBuf + 1 - chrSrcSliceY)*srcStride[1];
3067 3067
                uint8_t *src2= src[2]+(lastInChrBuf + 1 - chrSrcSliceY)*srcStride[2];
3068 3068
                chrBufIndex++;
3069
                ASSERT(chrBufIndex < 2*vChrBufSize)
3070
                ASSERT(lastInChrBuf + 1 - chrSrcSliceY < (chrSrcSliceH))
3071
                ASSERT(lastInChrBuf + 1 - chrSrcSliceY >= 0)
3069
                assert(chrBufIndex < 2*vChrBufSize);
3070
                assert(lastInChrBuf + 1 - chrSrcSliceY < (chrSrcSliceH));
3071
                assert(lastInChrBuf + 1 - chrSrcSliceY >= 0);
3072 3072
                //FIXME replace parameters through context struct (some at least)
3073 3073

  
3074 3074
                if (!(isGray(srcFormat) || isGray(dstFormat)))
......
3094 3094
            {
3095 3095
                uint8_t *s= src[0]+(lastInLumBuf + 1 - srcSliceY)*srcStride[0];
3096 3096
                lumBufIndex++;
3097
                ASSERT(lumBufIndex < 2*vLumBufSize)
3098
                ASSERT(lastInLumBuf + 1 - srcSliceY < srcSliceH)
3099
                ASSERT(lastInLumBuf + 1 - srcSliceY >= 0)
3097
                assert(lumBufIndex < 2*vLumBufSize);
3098
                assert(lastInLumBuf + 1 - srcSliceY < srcSliceH);
3099
                assert(lastInLumBuf + 1 - srcSliceY >= 0);
3100 3100
                RENAME(hyscale)(lumPixBuf[ lumBufIndex ], dstW, s, srcW, lumXInc,
3101 3101
                                flags, canMMX2BeUsed, hLumFilter, hLumFilterPos, hLumFilterSize,
3102 3102
                                funnyYCode, c->srcFormat, formatConvBuffer,
......
3108 3108
                uint8_t *src1= src[1]+(lastInChrBuf + 1 - chrSrcSliceY)*srcStride[1];
3109 3109
                uint8_t *src2= src[2]+(lastInChrBuf + 1 - chrSrcSliceY)*srcStride[2];
3110 3110
                chrBufIndex++;
3111
                ASSERT(chrBufIndex < 2*vChrBufSize)
3112
                ASSERT(lastInChrBuf + 1 - chrSrcSliceY < chrSrcSliceH)
3113
                ASSERT(lastInChrBuf + 1 - chrSrcSliceY >= 0)
3111
                assert(chrBufIndex < 2*vChrBufSize);
3112
                assert(lastInChrBuf + 1 - chrSrcSliceY < chrSrcSliceH);
3113
                assert(lastInChrBuf + 1 - chrSrcSliceY >= 0);
3114 3114

  
3115 3115
                if (!(isGray(srcFormat) || isGray(dstFormat)))
3116 3116
                    RENAME(hcscale)(chrPixBuf[ chrBufIndex ], chrDstW, src1, src2, chrSrcW, chrXInc,
......
3199 3199
            }
3200 3200
            else
3201 3201
            {
3202
                ASSERT(lumSrcPtr + vLumFilterSize - 1 < lumPixBuf + vLumBufSize*2);
3203
                ASSERT(chrSrcPtr + vChrFilterSize - 1 < chrPixBuf + vChrBufSize*2);
3202
                assert(lumSrcPtr + vLumFilterSize - 1 < lumPixBuf + vLumBufSize*2);
3203
                assert(chrSrcPtr + vChrFilterSize - 1 < chrPixBuf + vChrBufSize*2);
3204 3204
                if (vLumFilterSize == 1 && vChrFilterSize == 2) //unscaled RGB
3205 3205
                {
3206 3206
                    int chrAlpha= vChrFilter[2*dstY+1];
......
3250 3250
            }
3251 3251
            else
3252 3252
            {
3253
                ASSERT(lumSrcPtr + vLumFilterSize - 1 < lumPixBuf + vLumBufSize*2);
3254
                ASSERT(chrSrcPtr + vChrFilterSize - 1 < chrPixBuf + vChrBufSize*2);
3253
                assert(lumSrcPtr + vLumFilterSize - 1 < lumPixBuf + vLumBufSize*2);
3254
                assert(chrSrcPtr + vChrFilterSize - 1 < chrPixBuf + vChrBufSize*2);
3255 3255
                yuv2packedXinC(c,
3256 3256
                    vLumFilter+dstY*vLumFilterSize, lumSrcPtr, vLumFilterSize,
3257 3257
                    vChrFilter+dstY*vChrFilterSize, chrSrcPtr, vChrFilterSize,

Also available in: Unified diff