Browse Source

h263enc: keep block_last_index always valid during advanced intra coding

Prevents a triggered assert during fate-vsynth{1,2}-rv20 in
dct_unquantize_h263_intra_c().
tags/n2.3
Janne Grunau 11 years ago
parent
commit
cd62c04d00
1 changed files with 3 additions and 5 deletions
  1. +3
    -5
      libavcodec/ituh263enc.c

+ 3
- 5
libavcodec/ituh263enc.c View File

@@ -566,10 +566,6 @@ void ff_h263_encode_mb(MpegEncContext * s,
else
level = (level - (scale>>1))/scale;

/* AIC can change CBP */
if (level == 0 && s->block_last_index[i] == 0)
s->block_last_index[i] = -1;

if(!s->modified_quant){
if (level < -127)
level = -127;
@@ -592,7 +588,9 @@ void ff_h263_encode_mb(MpegEncContext * s,

/* Update AC/DC tables */
*dc_ptr[i] = rec_intradc[i];
if (s->block_last_index[i] >= 0)
/* AIC can change CBP */
if (s->block_last_index[i] > 0 ||
(s->block_last_index[i] == 0 && level !=0))
cbp |= 1 << (5 - i);
}
}else{


Loading…
Cancel
Save