--- mbtransquant.c 2003/11/30 16:13:16 1.21.2.21 +++ mbtransquant.c 2004/04/14 19:51:06 1.23.2.1 @@ -21,7 +21,7 @@ * along with this program ; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: mbtransquant.c,v 1.21.2.21 2003/11/30 16:13:16 edgomez Exp $ + * $Id: mbtransquant.c,v 1.23.2.1 2004/04/14 19:51:06 edgomez Exp $ * ****************************************************************************/ @@ -183,7 +183,8 @@ int Q, const uint16_t * const Zigzag, const uint16_t * const QuantMatrix, - int Non_Zero); + int Non_Zero, + int Sum); /* Quantize all blocks -- Inter mode */ static __inline uint8_t @@ -234,7 +235,8 @@ sum = dct_quantize_trellis_c(&qcoeff[i*64], &data[i*64], pMB->quant, &scan_tables[0][0], matrix, - 63); + 63, + sum); } stop_quant_timer(); @@ -372,11 +374,6 @@ transfer_operation_16to8_t *transfer_op = NULL; - if (pMB->field_dct) { - next_block = stride; - stride *= 2; - } - /* Makes this vars booleans */ vop_reduced = !!(frame->vop_flags & XVID_VOP_REDUCED); @@ -385,6 +382,11 @@ pU_Cur = pCurrent->u + (y_pos << (3+vop_reduced)) * stride2 + (x_pos << (3+vop_reduced)); pV_Cur = pCurrent->v + (y_pos << (3+vop_reduced)) * stride2 + (x_pos << (3+vop_reduced)); + if (pMB->field_dct) { + next_block = stride; + stride *= 2; + } + /* Block size */ cst = 8<=0) { Out[Zigzag[i]] = Nodes[i].Level; - sum += abs(Nodes[i].Level); + Sum += abs(Nodes[i].Level); i -= Nodes[i].Run; } - return sum; + return Sum; } /* original version including heavy debugging info */