This avoids dering reading 4 bytes prior the buffer (1 byte can be used) Fixes Ticket2057
Showing the changes to libpostproc (2 of 2 files). Show all
Unified · Split
| @@ -871,7 +871,7 @@ static void reallocBuffers(PPContext *c, int width, int height, int stride, int · 870 unmodified lines | ||
| 871 | 871 | c->stride= stride; |
| 872 | 872 | c->qpStride= qpStride; |
| 873 | 873 | |
| 874 | − reallocAlign((void **)&c->tempDst, 8, stride*24); | |
| 874 | + reallocAlign((void **)&c->tempDst, 8, stride*24+32); | |
| 875 | 875 | reallocAlign((void **)&c->tempSrc, 8, stride*24); |
| 876 | 876 | reallocAlign((void **)&c->tempBlocks, 8, 2*16*8); |
| 877 | 877 | 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[ · 3259 unmodified lines | ||
| 3260 | 3260 | //FIXME remove |
| 3261 | 3261 | uint64_t * const yHistogram= c.yHistogram; |
| 3262 | 3262 | uint8_t * const tempSrc= srcStride > 0 ? c.tempSrc : c.tempSrc - 23*srcStride; |
| 3263 | − uint8_t * const tempDst= dstStride > 0 ? c.tempDst : c.tempDst - 23*dstStride; | |
| 3263 | + uint8_t * const tempDst= (dstStride > 0 ? c.tempDst : c.tempDst - 23*dstStride) + 32; | |
| 3264 | 3264 | //const int mbWidth= isColor ? (width+7)>>3 : (width+15)>>4; |
| 3265 | 3265 | |
| 3266 | 3266 | #if TEMPLATE_PP_MMX |