summaryrefslogtreecommitdiff
path: root/postproc/swscale_template.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2002-01-21 03:56:47 +0000
committerMichael Niedermayer <michaelni@gmx.at>2002-01-21 03:56:47 +0000
commitc7f822d95e8ca4bab3417ec04f77290c9fc83993 (patch)
treef5012a9118f645c9e74dbf3b6264b0e332c6be80 /postproc/swscale_template.c
parent635b3ec6ddd57316475a7377a85850c2bb2cf345 (diff)
general convolution filtering of the source picture
dynamic memory allocation for the buffers (needed for the filter stuff) Originally committed as revision 4291 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc
Diffstat (limited to 'postproc/swscale_template.c')
-rw-r--r--postproc/swscale_template.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/postproc/swscale_template.c b/postproc/swscale_template.c
index b70806b1a1..7894b5d290 100644
--- a/postproc/swscale_template.c
+++ b/postproc/swscale_template.c
@@ -1935,13 +1935,10 @@ static void RENAME(swScale)(SwsContext *c, uint8_t* src[], int srcStride[], int
const int lastLumSrcY= firstLumSrcY + vLumFilterSize -1; // Last line needed as input
const int lastChrSrcY= firstChrSrcY + vChrFilterSize -1; // Last line needed as input
- if(flags&SWS_FAST_BILINEAR)
- {
- //handle holes
- if(firstLumSrcY > lastInLumBuf) lastInLumBuf= firstLumSrcY-1;
- if(firstChrSrcY > lastInChrBuf) lastInChrBuf= firstChrSrcY-1;
- }
-
+ //handle holes (FAST_BILINEAR & weird filters)
+ if(firstLumSrcY > lastInLumBuf) lastInLumBuf= firstLumSrcY-1;
+ if(firstChrSrcY > lastInChrBuf) lastInChrBuf= firstChrSrcY-1;
+//printf("%d %d %d\n", firstChrSrcY, lastInChrBuf, vChrBufSize);
ASSERT(firstLumSrcY >= lastInLumBuf - vLumBufSize + 1)
ASSERT(firstChrSrcY >= lastInChrBuf - vChrBufSize + 1)
@@ -1953,6 +1950,7 @@ static void RENAME(swScale)(SwsContext *c, uint8_t* src[], int srcStride[], int
{
uint8_t *s= src[0]+(lastInLumBuf + 1 - srcSliceY)*srcStride[0];
lumBufIndex++;
+// printf("%d %d %d %d\n", lumBufIndex, vLumBufSize, lastInLumBuf, lastLumSrcY);
ASSERT(lumBufIndex < 2*vLumBufSize)
ASSERT(lastInLumBuf + 1 - srcSliceY < srcSliceH)
ASSERT(lastInLumBuf + 1 - srcSliceY >= 0)