aboutsummaryrefslogtreecommitdiff
path: root/libswscale/slice.c
diff options
context:
space:
mode:
authorPedro Arthur2015-08-17 17:07:53 -0300
committerMichael Niedermayer2015-08-18 01:33:32 +0200
commit737aa902f069ed218fd2d13c59015391facf73c8 (patch)
tree0fd8160cb7a10518debdcca8b4fb6060ea8b2748 /libswscale/slice.c
parente0a3173a94f2029de467f7a60f44e8caa7adb450 (diff)
swscale: process horizontal lines in batches
Process more lines in a single pass to improve performance Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libswscale/slice.c')
-rw-r--r--libswscale/slice.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libswscale/slice.c b/libswscale/slice.c
index 3a8001fdeb..242367dfd5 100644
--- a/libswscale/slice.c
+++ b/libswscale/slice.c
@@ -224,12 +224,12 @@ int ff_init_filters(SwsContext * c)
res = alloc_slice(&c->slice[0], c->srcFormat, c->srcH, c->chrSrcH, c->chrSrcHSubSample, c->chrSrcVSubSample, 0);
if (res < 0) goto cleanup;
for (i = 1; i < c->numSlice-1; ++i) {
- res = alloc_slice(&c->slice[i], c->srcFormat, c->vLumFilterSize, c->vChrFilterSize, c->chrSrcHSubSample, c->chrSrcVSubSample, 0);
+ res = alloc_slice(&c->slice[i], c->srcFormat, c->vLumFilterSize + MAX_LINES_AHEAD, c->vChrFilterSize + MAX_LINES_AHEAD, c->chrSrcHSubSample, c->chrSrcVSubSample, 0);
if (res < 0) goto cleanup;
res = alloc_lines(&c->slice[i], FFALIGN(c->srcW*2+78, 16), c->srcW);
if (res < 0) goto cleanup;
}
- res = alloc_slice(&c->slice[i], c->srcFormat, c->vLumFilterSize, c->vChrFilterSize, c->chrDstHSubSample, c->chrDstVSubSample, 1);
+ res = alloc_slice(&c->slice[i], c->srcFormat, c->vLumFilterSize + MAX_LINES_AHEAD, c->vChrFilterSize + MAX_LINES_AHEAD, c->chrDstHSubSample, c->chrDstVSubSample, 1);
if (res < 0) goto cleanup;
res = alloc_lines(&c->slice[i], dst_stride, c->dstW);
if (res < 0) goto cleanup;