20 |
* along with this program ; if not, write to the Free Software |
* along with this program ; if not, write to the Free Software |
21 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
22 |
* |
* |
23 |
* $Id: estimation_rd_based_bvop.c,v 1.11 2010-11-28 15:18:21 Isibaar Exp $ |
* $Id: estimation_rd_based_bvop.c,v 1.12 2010-12-24 13:21:35 Isibaar Exp $ |
24 |
* |
* |
25 |
****************************************************************************/ |
****************************************************************************/ |
26 |
|
|
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 |
|
|