Skip to content
Snippets Groups Projects
Commit 9e04e11e authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

libpostproc: alloc a few bytes more in the temporary buffer


This avoids dering reading 4 bytes prior the buffer (1 byte can
be used)

Fixes Ticket2057

Signed-off-by: default avatarMichael Niedermayer <michaelni@gmx.at>
parent f1185fbb
No related branches found
No related tags found
No related merge requests found
...@@ -871,7 +871,7 @@ static void reallocBuffers(PPContext *c, int width, int height, int stride, int ...@@ -871,7 +871,7 @@ static void reallocBuffers(PPContext *c, int width, int height, int stride, int
c->stride= stride; c->stride= stride;
c->qpStride= qpStride; c->qpStride= qpStride;
reallocAlign((void **)&c->tempDst, 8, stride*24); reallocAlign((void **)&c->tempDst, 8, stride*24+32);
reallocAlign((void **)&c->tempSrc, 8, stride*24); reallocAlign((void **)&c->tempSrc, 8, stride*24);
reallocAlign((void **)&c->tempBlocks, 8, 2*16*8); reallocAlign((void **)&c->tempBlocks, 8, 2*16*8);
reallocAlign((void **)&c->yHistogram, 8, 256*sizeof(uint64_t)); reallocAlign((void **)&c->yHistogram, 8, 256*sizeof(uint64_t));
......
...@@ -3260,7 +3260,7 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[ ...@@ -3260,7 +3260,7 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[
//FIXME remove //FIXME remove
uint64_t * const yHistogram= c.yHistogram; uint64_t * const yHistogram= c.yHistogram;
uint8_t * const tempSrc= srcStride > 0 ? c.tempSrc : c.tempSrc - 23*srcStride; uint8_t * const tempSrc= srcStride > 0 ? c.tempSrc : c.tempSrc - 23*srcStride;
uint8_t * const tempDst= dstStride > 0 ? c.tempDst : c.tempDst - 23*dstStride; uint8_t * const tempDst= (dstStride > 0 ? c.tempDst : c.tempDst - 23*dstStride) + 32;
//const int mbWidth= isColor ? (width+7)>>3 : (width+15)>>4; //const int mbWidth= isColor ? (width+7)>>3 : (width+15)>>4;
#if TEMPLATE_PP_MMX #if TEMPLATE_PP_MMX
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment