[x264-devel] commit: Fix regression in r1066 (Jason Garrett-Glaser )
git version control
git at videolan.org
Thu Jan 8 21:10:06 CET 2009
x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Thu Jan 8 15:07:16 2009 -0500| [9d6cc8e28319b3935698d52a6711414435444029] | committer: Jason Garrett-Glaser
Fix regression in r1066
With some combinations of video width and other settings, the scratch buffer was slightly too small.
This caused heap corruption on some systems.
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=9d6cc8e28319b3935698d52a6711414435444029
---
common/macroblock.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/macroblock.c b/common/macroblock.c
index 9029a34..b9feb4a 100644
--- a/common/macroblock.c
+++ b/common/macroblock.c
@@ -839,11 +839,11 @@ int x264_macroblock_cache_init( x264_t *h )
h->mb.i_neighbour4[15] =
h->mb.i_neighbour8[3] = MB_LEFT|MB_TOP|MB_TOPLEFT;
- int buf_hpel = (h->param.i_width+40) * sizeof(int16_t);
+ int buf_hpel = (h->param.i_width+48) * sizeof(int16_t);
int buf_ssim = h->param.analyse.b_ssim * 8 * (h->param.i_width/4+3) * sizeof(int);
int me_range = X264_MIN(h->param.analyse.i_me_range, h->param.analyse.i_mv_range);
int buf_tesa = (h->param.analyse.i_me_method >= X264_ME_ESA) *
- ((me_range*2+18) * sizeof(int16_t) + (me_range+1) * (me_range+1) * 4 * sizeof(mvsad_t));
+ ((me_range*2+18) * sizeof(int16_t) + (me_range+4) * (me_range+1) * 4 * sizeof(mvsad_t));
CHECKED_MALLOC( h->scratch_buffer, X264_MAX3( buf_hpel, buf_ssim, buf_tesa ) );
return 0;
More information about the x264-devel
mailing list