499 |
const uint32_t VopFlags, |
const uint32_t VopFlags, |
500 |
const MBParam * const pParam, |
const MBParam * const pParam, |
501 |
int x, int y, |
int x, int y, |
502 |
int best_sad) |
int best_sad, |
503 |
|
int force_direct) |
504 |
{ |
{ |
505 |
int mode = MODE_DIRECT, k; |
int mode = MODE_DIRECT, k; |
506 |
int f_rd, b_rd, i_rd, d_rd, best_rd; |
int f_rd, b_rd, i_rd, d_rd, best_rd; |
535 |
Data_i->rel_var8[i] = pMB->rel_var8[i]; |
Data_i->rel_var8[i] = pMB->rel_var8[i]; |
536 |
} |
} |
537 |
|
|
538 |
|
if (force_direct) { |
539 |
|
best_rd = 0; |
540 |
|
goto set_mode; /* bypass checks for non-direct modes */ |
541 |
|
} |
542 |
|
|
543 |
/* find the best order of evaluation - smallest SAD comes first, because *if* it means smaller RD, |
/* find the best order of evaluation - smallest SAD comes first, because *if* it means smaller RD, |
544 |
early-stops will activate sooner */ |
early-stops will activate sooner */ |
545 |
|
|
593 |
best_rd = 0; |
best_rd = 0; |
594 |
} |
} |
595 |
|
|
596 |
|
|
597 |
|
set_mode: |
598 |
pMB->sad16 = best_rd; |
pMB->sad16 = best_rd; |
599 |
pMB->mode = mode; |
pMB->mode = mode; |
600 |
|
|