# HG changeset patch # User michael # Date 1262878314 0 # Node ID ab1844655871575e5a19ecac9998a60c18322ce2 # Parent 3cebe9b3562d2590b3a920301b1015a0fd344ca9 Move restore_ac_coeffs() call into decode_ac_pred(). This makes decode_ac_pred() easier to understand. diff -r 3cebe9b3562d -r ab1844655871 h263.c --- a/h263.c Thu Jan 07 15:24:50 2010 +0000 +++ b/h263.c Thu Jan 07 15:31:54 2010 +0000 @@ -462,7 +462,12 @@ score += get_block_rate(s, block[n], s->block_last_index[n], st[n]); } - return score < 0; + if(score < 0){ + return 1; + }else{ + restore_ac_coeffs(s, block, dir, st, zigzag_last_index); + return 0; + } } /** @@ -1453,8 +1458,6 @@ if(s->flags & CODEC_FLAG_AC_PRED){ s->ac_pred= decide_ac_pred(s, block, dir, scan_table, zigzag_last_index); - if(!s->ac_pred) - restore_ac_coeffs(s, block, dir, scan_table, zigzag_last_index); }else{ for(i=0; i<6; i++) scan_table[i]= s->intra_scantable.permutated;