different fix, s->mbintra_table used only if h263_pred set. - patch by Michael Niedermayer <michaelni@gmx.at>
Originally committed as revision 257 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
01dbbd0a9a
commit
5b3438c630
@ -180,13 +180,13 @@ int MPV_common_init(MpegEncContext *s)
|
|||||||
s->coded_block = av_mallocz(y_size);
|
s->coded_block = av_mallocz(y_size);
|
||||||
if (!s->coded_block)
|
if (!s->coded_block)
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
|
||||||
|
|
||||||
/* which mb is a intra block */
|
/* which mb is a intra block */
|
||||||
s->mbintra_table = av_mallocz(s->mb_width * s->mb_height);
|
s->mbintra_table = av_mallocz(s->mb_width * s->mb_height);
|
||||||
if (!s->mbintra_table)
|
if (!s->mbintra_table)
|
||||||
goto fail;
|
goto fail;
|
||||||
memset(s->mbintra_table, 1, s->mb_width * s->mb_height);
|
memset(s->mbintra_table, 1, s->mb_width * s->mb_height);
|
||||||
|
}
|
||||||
/* default structure is frame */
|
/* default structure is frame */
|
||||||
s->picture_structure = PICT_FRAME;
|
s->picture_structure = PICT_FRAME;
|
||||||
|
|
||||||
@ -209,7 +209,7 @@ int MPV_common_init(MpegEncContext *s)
|
|||||||
if (s->coded_block)
|
if (s->coded_block)
|
||||||
free(s->coded_block);
|
free(s->coded_block);
|
||||||
if (s->mbintra_table)
|
if (s->mbintra_table)
|
||||||
{ free(s->mbintra_table);s->mbintra_table=NULL; }
|
free(s->mbintra_table);
|
||||||
if (s->mbskip_table)
|
if (s->mbskip_table)
|
||||||
free(s->mbskip_table);
|
free(s->mbskip_table);
|
||||||
for(i=0;i<3;i++) {
|
for(i=0;i<3;i++) {
|
||||||
@ -234,7 +234,7 @@ void MPV_common_end(MpegEncContext *s)
|
|||||||
free(s->dc_val[0]);
|
free(s->dc_val[0]);
|
||||||
free(s->ac_val[0]);
|
free(s->ac_val[0]);
|
||||||
free(s->coded_block);
|
free(s->coded_block);
|
||||||
{ free(s->mbintra_table);s->mbintra_table=NULL; }
|
free(s->mbintra_table);
|
||||||
}
|
}
|
||||||
if (s->mbskip_table)
|
if (s->mbskip_table)
|
||||||
free(s->mbskip_table);
|
free(s->mbskip_table);
|
||||||
@ -748,7 +748,7 @@ void MPV_decode_mb(MpegEncContext *s, DCTELEM block[6][64])
|
|||||||
s->last_dc[2] = 128 << s->intra_dc_precision;
|
s->last_dc[2] = 128 << s->intra_dc_precision;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else if (s->h263_pred)
|
||||||
s->mbintra_table[mb_x + mb_y*s->mb_width]=1;
|
s->mbintra_table[mb_x + mb_y*s->mb_width]=1;
|
||||||
|
|
||||||
/* update motion predictor */
|
/* update motion predictor */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user