diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2015-03-23 00:02:51 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-03-23 00:15:58 +0100 |
commit | 93f4538363069b721c24417f3d38575274394845 (patch) | |
tree | 822b54387013d48daf15c41d52582d5d7853dcbf | |
parent | 7517e932ffacdc99d34239f86314b376ffb63726 (diff) | |
download | ffmpeg-93f4538363069b721c24417f3d38575274394845.tar.gz |
postproc/postprocess_template: split loop in 2 (block groups of 4, blocks)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libpostproc/postprocess_template.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libpostproc/postprocess_template.c b/libpostproc/postprocess_template.c index 6722f96c1a..9049c814b3 100644 --- a/libpostproc/postprocess_template.c +++ b/libpostproc/postprocess_template.c @@ -3476,7 +3476,10 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[ // From this point on it is guaranteed that we can read and write 16 lines downward // finish 1 block before the next otherwise we might have a problem // with the L1 Cache of the P4 ... or only a few blocks at a time or something - for(x=0; x<width; x+=BLOCK_SIZE){ + for(x=0; x<width; ){ + int startx = x; + int endx = FFMIN(width, x+32); + for(; x < endx; x+=BLOCK_SIZE){ const int stride= dstStride; #if TEMPLATE_PP_MMX uint8_t *tmpXchg; @@ -3650,6 +3653,7 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[ tempBlock1= tempBlock2; tempBlock2 = tmpXchg; #endif + } } if(mode & DERING){ |