Commit 0a07f2b3 authored by Mans Rullgard's avatar Mans Rullgard

dsputil: fix invalid array indexing

Indexing outside an array is invalid and causes errors with
gcc 4.8.
Signed-off-by: 's avatarMans Rullgard <mans@mansr.com>
parent 3510a133
......@@ -2680,7 +2680,7 @@ int ff_check_alignment(void){
av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx)
{
int i;
int i, j;
ff_check_alignment();
......@@ -3022,11 +3022,15 @@ av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx)
if (ARCH_SH4) ff_dsputil_init_sh4 (c, avctx);
if (ARCH_BFIN) ff_dsputil_init_bfin (c, avctx);
for(i=0; i<64; i++){
if(!c->put_2tap_qpel_pixels_tab[0][i])
c->put_2tap_qpel_pixels_tab[0][i]= c->put_h264_qpel_pixels_tab[0][i];
if(!c->avg_2tap_qpel_pixels_tab[0][i])
c->avg_2tap_qpel_pixels_tab[0][i]= c->avg_h264_qpel_pixels_tab[0][i];
for (i = 0; i < 4; i++) {
for (j = 0; j < 16; j++) {
if(!c->put_2tap_qpel_pixels_tab[i][j])
c->put_2tap_qpel_pixels_tab[i][j] =
c->put_h264_qpel_pixels_tab[i][j];
if(!c->avg_2tap_qpel_pixels_tab[i][j])
c->avg_2tap_qpel_pixels_tab[i][j] =
c->avg_h264_qpel_pixels_tab[i][j];
}
}
ff_init_scantable_permutation(c->idct_permutation,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment