Changeset 56bf2c2a in ffmpeg
- Timestamp:
- Dec 17, 2011, 7:25:13 PM (13 years ago)
- Branches:
- master
- Children:
- 9cb6a39
- Parents:
- c0bea184
- git-author:
- Michael Niedermayer <michaelni@gmx.at> (12/17/11 18:55:47)
- git-committer:
- Michael Niedermayer <michaelni@gmx.at> (12/17/11 19:25:13)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libavcodec/motion_est.c
rc0bea184 r56bf2c2a 537 537 c->xmin = - x - 16; 538 538 c->ymin = - y - 16; 539 c->xmax = - x + s-> mb_width *16;540 c->ymax = - y + s-> mb_height*16;539 c->xmax = - x + s->width; 540 c->ymax = - y + s->height; 541 541 } else if (s->out_format == FMT_H261){ 542 542 // Search range of H261 is different from other codec standards … … 577 577 int block; 578 578 int P[10][2]; 579 int dmin_sum=0, mx4_sum=0, my4_sum=0 ;579 int dmin_sum=0, mx4_sum=0, my4_sum=0, i; 580 580 int same=1; 581 581 const int stride= c->stride; 582 582 uint8_t *mv_penalty= c->current_mv_penalty; 583 int saftey_cliping= s->unrestricted_mv && (s->width&15) && (s->height&15); 583 584 584 585 init_mv4_ref(c); … … 591 592 const int mot_stride = s->b8_stride; 592 593 const int mot_xy = s->block_index[block]; 594 595 if(saftey_cliping){ 596 c->xmax = - 16*s->mb_x + s->width - 8*(block &1); 597 c->ymax = - 16*s->mb_y + s->height - 8*(block>>1); 598 } 593 599 594 600 P_LEFT[0] = s->current_picture.f.motion_val[0][mot_xy - 1][0]; … … 619 625 P_MV1[0]= mx; 620 626 P_MV1[1]= my; 627 if(saftey_cliping) 628 for(i=0; i<10; i++){ 629 if(P[i][0] > (c->xmax<<shift)) P[i][0]= (c->xmax<<shift); 630 if(P[i][1] > (c->ymax<<shift)) P[i][1]= (c->ymax<<shift); 631 } 621 632 622 633 dmin4 = epzs_motion_search4(s, &mx4, &my4, P, block, block, s->p_mv_table, (1<<16)>>shift);
Note:
See TracChangeset
for help on using the changeset viewer.