138 |
lpos = lx + ly * mb_width; |
lpos = lx + ly * mb_width; |
139 |
rpos = rx + ry * mb_width; |
rpos = rx + ry * mb_width; |
140 |
tpos = tx + ty * mb_width; |
tpos = tx + ty * mb_width; |
141 |
num_cand = 0; |
last_cand = num_cand = 0; |
142 |
|
|
143 |
if (lpos >= bound && lx >= 0) { |
if (lpos >= bound && lx >= 0) { |
144 |
num_cand++; |
num_cand++; |
164 |
pmv[3] = zeroMV; |
pmv[3] = zeroMV; |
165 |
} |
} |
166 |
|
|
167 |
/* if only one valid candidate predictor, the invalid candiates are set to the canidate */ |
/* |
168 |
|
* If there're more than one candidate, we return the median vector |
169 |
|
* edgomez : the special case "no candidates" is handled the same way |
170 |
|
* because all vectors are set to zero. So the median vector |
171 |
|
* is {0,0}, and this is exactly the vector we must return |
172 |
|
* according to the mpeg4 specs. |
173 |
|
*/ |
174 |
|
|
175 |
if (num_cand != 1) { |
if (num_cand != 1) { |
176 |
/* set median */ |
/* set median */ |
177 |
|
|
245 |
lpos = lx + ly * mb_width; |
lpos = lx + ly * mb_width; |
246 |
rpos = rx + ry * mb_width; |
rpos = rx + ry * mb_width; |
247 |
tpos = tx + ty * mb_width; |
tpos = tx + ty * mb_width; |
248 |
num_cand = 0; |
last_cand = num_cand = 0; |
249 |
|
|
250 |
if (lpos >= bound && lx >= 0) { |
if (lpos >= bound && lx >= 0) { |
251 |
num_cand++; |
num_cand++; |
363 |
lpos = lx + ly * mb_width; |
lpos = lx + ly * mb_width; |
364 |
rpos = rx + ry * mb_width; |
rpos = rx + ry * mb_width; |
365 |
tpos = tx + ty * mb_width; |
tpos = tx + ty * mb_width; |
366 |
num_cand = 0; |
last_cand = num_cand = 0; |
367 |
|
|
368 |
if (lpos >= bound && lx >= 0) { |
if (lpos >= bound && lx >= 0) { |
369 |
num_cand++; |
num_cand++; |
448 |
lpos = lx + ly * mb_width; |
lpos = lx + ly * mb_width; |
449 |
rpos = rx + ry * mb_width; |
rpos = rx + ry * mb_width; |
450 |
tpos = tx + ty * mb_width; |
tpos = tx + ty * mb_width; |
451 |
num_cand = 0; |
last_cand = num_cand = 0; |
452 |
|
|
453 |
if (lpos >= bound && lx >= 0) { |
if (lpos >= bound && lx >= 0) { |
454 |
num_cand++; |
num_cand++; |