History

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

Michael Niedermayer committed 13 years ago

Commit 9e04e111 parent f1185fb2 files · +2 −2Browse files

Showing the changes to libpostproc (2 of 2 files). Show all

Unified · Split

2 files
  1. libpostproc/postprocess.c +1 −1
  2. libpostproc/postprocess_template.c +1 −1
libpostproc/postprocess.c+1−1
@@ -871,7 +871,7 @@ static void reallocBuffers(PPContext *c, int width, int height, int stride, int · 870 unmodified lines
871871 c->stride= stride;
872872 c->qpStride= qpStride;
873873
874− reallocAlign((void **)&c->tempDst, 8, stride*24);
874+ reallocAlign((void **)&c->tempDst, 8, stride*24+32);
875875 reallocAlign((void **)&c->tempSrc, 8, stride*24);
876876 reallocAlign((void **)&c->tempBlocks, 8, 2*16*8);
877877 reallocAlign((void **)&c->yHistogram, 8, 256*sizeof(uint64_t));
libpostproc/postprocess_template.c+1−1
@@ -3260,7 +3260,7 @@ static void RENAME(postProcess)(const uint8_t src[], int srcStride, uint8_t dst[ · 3259 unmodified lines
32603260 //FIXME remove
32613261 uint64_t * const yHistogram= c.yHistogram;
32623262 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;
32643264 //const int mbWidth= isColor ? (width+7)>>3 : (width+15)>>4;
32653265
32663266 #if TEMPLATE_PP_MMX

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t