mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-05-17 15:08:09 +08:00
swscale: process horizontal lines in batches
Process more lines in a single pass to improve performance Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:

committed by
Michael Niedermayer

parent
e0a3173a94
commit
737aa902f0
@ -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;
|
||||
|
Reference in New Issue
Block a user