Mercurial > libavcodec.hg
comparison wmv2.c @ 1064:b32afefe7d33 libavcodec
* UINTX -> uintx_t INTX -> intx_t
author | kabi |
---|---|
date | Tue, 11 Feb 2003 16:35:48 +0000 |
parents | bb5de8a59da8 |
children | 6da5ae9ee199 |
comparison
equal
deleted
inserted
replaced
1063:fdeac9642346 | 1064:b32afefe7d33 |
---|---|
190 int motion_x, int motion_y) | 190 int motion_x, int motion_y) |
191 { | 191 { |
192 Wmv2Context * const w= (Wmv2Context*)s; | 192 Wmv2Context * const w= (Wmv2Context*)s; |
193 int cbp, coded_cbp, i; | 193 int cbp, coded_cbp, i; |
194 int pred_x, pred_y; | 194 int pred_x, pred_y; |
195 UINT8 *coded_block; | 195 uint8_t *coded_block; |
196 | 196 |
197 handle_slices(s); | 197 handle_slices(s); |
198 | 198 |
199 if (!s->mb_intra) { | 199 if (!s->mb_intra) { |
200 /* compute cbp */ | 200 /* compute cbp */ |
489 } | 489 } |
490 | 490 |
491 static int16_t *wmv2_pred_motion(Wmv2Context *w, int *px, int *py){ | 491 static int16_t *wmv2_pred_motion(Wmv2Context *w, int *px, int *py){ |
492 MpegEncContext * const s= &w->s; | 492 MpegEncContext * const s= &w->s; |
493 int xy, wrap, diff, type; | 493 int xy, wrap, diff, type; |
494 INT16 *A, *B, *C, *mot_val; | 494 int16_t *A, *B, *C, *mot_val; |
495 | 495 |
496 wrap = s->block_wrap[0]; | 496 wrap = s->block_wrap[0]; |
497 xy = s->block_index[0]; | 497 xy = s->block_index[0]; |
498 | 498 |
499 mot_val = s->motion_val[xy]; | 499 mot_val = s->motion_val[xy]; |
574 } | 574 } |
575 | 575 |
576 static void wmv2_add_block(Wmv2Context *w, DCTELEM *block1, uint8_t *dst, int stride, int n){ | 576 static void wmv2_add_block(Wmv2Context *w, DCTELEM *block1, uint8_t *dst, int stride, int n){ |
577 MpegEncContext * const s= &w->s; | 577 MpegEncContext * const s= &w->s; |
578 uint8_t temp[2][64]; | 578 uint8_t temp[2][64]; |
579 int i; | 579 |
580 | |
581 switch(w->abt_type_table[n]){ | 580 switch(w->abt_type_table[n]){ |
582 case 0: | 581 case 0: |
583 if (s->block_last_index[n] >= 0) { | 582 if (s->block_last_index[n] >= 0) { |
584 s->idct_add (dst, stride, block1); | 583 s->idct_add (dst, stride, block1); |
585 } | 584 } |
612 wmv2_add_block(w, block1[4], dest_cb , s->uvlinesize, 4); | 611 wmv2_add_block(w, block1[4], dest_cb , s->uvlinesize, 4); |
613 wmv2_add_block(w, block1[5], dest_cr , s->uvlinesize, 5); | 612 wmv2_add_block(w, block1[5], dest_cr , s->uvlinesize, 5); |
614 } | 613 } |
615 | 614 |
616 void ff_mspel_motion(MpegEncContext *s, | 615 void ff_mspel_motion(MpegEncContext *s, |
617 UINT8 *dest_y, UINT8 *dest_cb, UINT8 *dest_cr, | 616 uint8_t *dest_y, uint8_t *dest_cb, uint8_t *dest_cr, |
618 UINT8 **ref_picture, op_pixels_func (*pix_op)[4], | 617 uint8_t **ref_picture, op_pixels_func (*pix_op)[4], |
619 int motion_x, int motion_y, int h) | 618 int motion_x, int motion_y, int h) |
620 { | 619 { |
621 Wmv2Context * const w= (Wmv2Context*)s; | 620 Wmv2Context * const w= (Wmv2Context*)s; |
622 UINT8 *ptr; | 621 uint8_t *ptr; |
623 int dxy, offset, mx, my, src_x, src_y, v_edge_pos, linesize, uvlinesize; | 622 int dxy, offset, mx, my, src_x, src_y, v_edge_pos, linesize, uvlinesize; |
624 int emu=0; | 623 int emu=0; |
625 | 624 |
626 dxy = ((motion_y & 1) << 1) | (motion_x & 1); | 625 dxy = ((motion_y & 1) << 1) | (motion_x & 1); |
627 dxy = 2*dxy + w->hshift; | 626 dxy = 2*dxy + w->hshift; |
698 | 697 |
699 static int wmv2_decode_mb(MpegEncContext *s, DCTELEM block[6][64]) | 698 static int wmv2_decode_mb(MpegEncContext *s, DCTELEM block[6][64]) |
700 { | 699 { |
701 Wmv2Context * const w= (Wmv2Context*)s; | 700 Wmv2Context * const w= (Wmv2Context*)s; |
702 int cbp, code, i; | 701 int cbp, code, i; |
703 UINT8 *coded_val; | 702 uint8_t *coded_val; |
704 | 703 |
705 if(w->j_type) return 0; | 704 if(w->j_type) return 0; |
706 | 705 |
707 s->error_status_table[s->mb_x + s->mb_y*s->mb_width]= 0; | 706 s->error_status_table[s->mb_x + s->mb_y*s->mb_width]= 0; |
708 | 707 |