comparison wmv2.c @ 1938:e2501e6e7ff7 libavcodec

unify table indexing (motion_val,dc_val,ac_val,coded_block changed) minor +-1 bugfix
author michael
date Fri, 16 Apr 2004 01:01:45 +0000
parents 30746f429df6
children 62beeb1a8676
comparison
equal deleted inserted replaced
1937:4d91a9342d95 1938:e2501e6e7ff7
214 put_bits(&s->pb, 214 put_bits(&s->pb,
215 wmv2_inter_table[w->cbp_table_index][cbp + 64][1], 215 wmv2_inter_table[w->cbp_table_index][cbp + 64][1],
216 wmv2_inter_table[w->cbp_table_index][cbp + 64][0]); 216 wmv2_inter_table[w->cbp_table_index][cbp + 64][0]);
217 217
218 /* motion vector */ 218 /* motion vector */
219 h263_pred_motion(s, 0, &pred_x, &pred_y); 219 h263_pred_motion(s, 0, 0, &pred_x, &pred_y);
220 msmpeg4_encode_motion(s, motion_x - pred_x, 220 msmpeg4_encode_motion(s, motion_x - pred_x,
221 motion_y - pred_y); 221 motion_y - pred_y);
222 } else { 222 } else {
223 /* compute cbp */ 223 /* compute cbp */
224 cbp = 0; 224 cbp = 0;
502 static int16_t *wmv2_pred_motion(Wmv2Context *w, int *px, int *py){ 502 static int16_t *wmv2_pred_motion(Wmv2Context *w, int *px, int *py){
503 MpegEncContext * const s= &w->s; 503 MpegEncContext * const s= &w->s;
504 int xy, wrap, diff, type; 504 int xy, wrap, diff, type;
505 int16_t *A, *B, *C, *mot_val; 505 int16_t *A, *B, *C, *mot_val;
506 506
507 wrap = s->block_wrap[0]; 507 wrap = s->b8_stride;
508 xy = s->block_index[0]; 508 xy = s->block_index[0];
509 509
510 mot_val = s->current_picture.motion_val[0][xy]; 510 mot_val = s->current_picture.motion_val[0][xy];
511 511
512 A = s->current_picture.motion_val[0][xy - 1]; 512 A = s->current_picture.motion_val[0][xy - 1];