549 |
lpos = lx + ly * mb_width; |
lpos = lx + ly * mb_width; |
550 |
rpos = rx + ry * mb_width; |
rpos = rx + ry * mb_width; |
551 |
tpos = tx + ty * mb_width; |
tpos = tx + ty * mb_width; |
552 |
num_cand = 0; |
last_cand = num_cand = 0; |
553 |
|
|
554 |
if (lpos >= bound && lx >= 0) { |
if (lpos >= bound && lx >= 0) { |
555 |
num_cand++; |
num_cand++; |
575 |
pmv[3] = zeroMV; |
pmv[3] = zeroMV; |
576 |
} |
} |
577 |
|
|
578 |
/* if only one valid candidate predictor, the invalid candiates are set to the canidate */ |
/* |
579 |
|
* If there're more than one candidate, we return the median vector |
580 |
|
* edgomez : the special case "no candidates" is handled the same way |
581 |
|
* because all vectors are set to zero. So the median vector |
582 |
|
* is {0,0}, and this is exactly the vector we must return |
583 |
|
* according to the mpeg4 specs. |
584 |
|
*/ |
585 |
if (num_cand != 1) { |
if (num_cand != 1) { |
586 |
/* set median */ |
/* set median */ |
587 |
|
|
655 |
lpos = lx + ly * mb_width; |
lpos = lx + ly * mb_width; |
656 |
rpos = rx + ry * mb_width; |
rpos = rx + ry * mb_width; |
657 |
tpos = tx + ty * mb_width; |
tpos = tx + ty * mb_width; |
658 |
num_cand = 0; |
last_cand = num_cand = 0; |
659 |
|
|
660 |
if (lpos >= bound && lx >= 0) { |
if (lpos >= bound && lx >= 0) { |
661 |
num_cand++; |
num_cand++; |
681 |
pmv[3] = zeroMV; |
pmv[3] = zeroMV; |
682 |
} |
} |
683 |
|
|
684 |
/* if only one valid candidate predictor, the invalid candiates are set to the canidate */ |
/* |
685 |
|
* If there're more than one candidate, we return the median vector |
686 |
|
* edgomez : the special case "no candidates" is handled the same way |
687 |
|
* because all vectors are set to zero. So the median vector |
688 |
|
* is {0,0}, and this is exactly the vector we must return |
689 |
|
* according to the mpeg4 specs. |
690 |
|
*/ |
691 |
if (num_cand != 1) { |
if (num_cand != 1) { |
692 |
/* set median */ |
/* set median */ |
693 |
|
|
760 |
lpos = lx + ly * mb_width; |
lpos = lx + ly * mb_width; |
761 |
rpos = rx + ry * mb_width; |
rpos = rx + ry * mb_width; |
762 |
tpos = tx + ty * mb_width; |
tpos = tx + ty * mb_width; |
763 |
num_cand = 0; |
last_cand = num_cand = 0; |
764 |
|
|
765 |
if (lpos >= bound && lx >= 0) { |
if (lpos >= bound && lx >= 0) { |
766 |
num_cand++; |
num_cand++; |