[x264-devel] commit: Fix crash in interlaced with >8 refs (Jason Garrett-Glaser )
git version control
git at videolan.org
Sat Dec 5 10:52:23 CET 2009
x264 | branch: master | Jason Garrett-Glaser <darkshikari at gmail.com> | Wed Dec 2 19:55:45 2009 -0800| [225d1dcd4973cfb8e2be39dc40da26f869814a62] | committer: Jason Garrett-Glaser
Fix crash in interlaced with >8 refs
Crash introduced in weightp.
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=225d1dcd4973cfb8e2be39dc40da26f869814a62
---
common/common.h | 2 +-
encoder/encoder.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/common/common.h b/common/common.h
index eab28e1..0ba8fb9 100644
--- a/common/common.h
+++ b/common/common.h
@@ -256,7 +256,7 @@ typedef struct
} ref_pic_list_order[2][16];
/* P-frame weighting */
- x264_weight_t weight[16][3];
+ x264_weight_t weight[32][3];
int i_mmco_remove_from_end;
int i_mmco_command_count;
diff --git a/encoder/encoder.c b/encoder/encoder.c
index 6ecc9af..5177d35 100644
--- a/encoder/encoder.c
+++ b/encoder/encoder.c
@@ -1202,7 +1202,7 @@ static void x264_weighted_pred_init( x264_t *h )
// and duplicates of that frame.
h->fenc->i_lines_weighted = 0;
- for( i_ref = 0; i_ref < h->i_ref0; i_ref++ )
+ for( i_ref = 0; i_ref < (h->i_ref0 << h->sh.b_mbaff); i_ref++ )
for( i = 0; i < 3; i++ )
h->sh.weight[i_ref][i].weightfn = NULL;
More information about the x264-devel
mailing list