vp9: rename 'near' parameters
+ nearest for consistency near is a reserved word in windows builds so using it as a parameter name may cause build failures with some configurations Change-Id: Iddf1d4ecdb39843f14e95dbfd9dca55f07f81403
This commit is contained in:
parent
f1ab5c1021
commit
f6c2a6c5d6
@ -149,21 +149,22 @@ static void lower_mv_precision(MV *mv, int allow_hp) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void vp9_find_best_ref_mvs(MACROBLOCKD *xd, int allow_hp,
|
void vp9_find_best_ref_mvs(MACROBLOCKD *xd, int allow_hp,
|
||||||
int_mv *mvlist, int_mv *nearest, int_mv *near) {
|
int_mv *mvlist, int_mv *nearest_mv,
|
||||||
|
int_mv *near_mv) {
|
||||||
int i;
|
int i;
|
||||||
// Make sure all the candidates are properly clamped etc
|
// Make sure all the candidates are properly clamped etc
|
||||||
for (i = 0; i < MAX_MV_REF_CANDIDATES; ++i) {
|
for (i = 0; i < MAX_MV_REF_CANDIDATES; ++i) {
|
||||||
lower_mv_precision(&mvlist[i].as_mv, allow_hp);
|
lower_mv_precision(&mvlist[i].as_mv, allow_hp);
|
||||||
clamp_mv2(&mvlist[i].as_mv, xd);
|
clamp_mv2(&mvlist[i].as_mv, xd);
|
||||||
}
|
}
|
||||||
*nearest = mvlist[0];
|
*nearest_mv = mvlist[0];
|
||||||
*near = mvlist[1];
|
*near_mv = mvlist[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
void vp9_append_sub8x8_mvs_for_idx(VP9_COMMON *cm, MACROBLOCKD *xd,
|
void vp9_append_sub8x8_mvs_for_idx(VP9_COMMON *cm, MACROBLOCKD *xd,
|
||||||
const TileInfo *const tile,
|
const TileInfo *const tile,
|
||||||
int block, int ref, int mi_row, int mi_col,
|
int block, int ref, int mi_row, int mi_col,
|
||||||
int_mv *nearest, int_mv *near) {
|
int_mv *nearest_mv, int_mv *near_mv) {
|
||||||
int_mv mv_list[MAX_MV_REF_CANDIDATES];
|
int_mv mv_list[MAX_MV_REF_CANDIDATES];
|
||||||
MODE_INFO *const mi = xd->mi[0].src_mi;
|
MODE_INFO *const mi = xd->mi[0].src_mi;
|
||||||
b_mode_info *bmi = mi->bmi;
|
b_mode_info *bmi = mi->bmi;
|
||||||
@ -174,18 +175,18 @@ void vp9_append_sub8x8_mvs_for_idx(VP9_COMMON *cm, MACROBLOCKD *xd,
|
|||||||
find_mv_refs_idx(cm, xd, tile, mi, mi->mbmi.ref_frame[ref], mv_list, block,
|
find_mv_refs_idx(cm, xd, tile, mi, mi->mbmi.ref_frame[ref], mv_list, block,
|
||||||
mi_row, mi_col);
|
mi_row, mi_col);
|
||||||
|
|
||||||
near->as_int = 0;
|
near_mv->as_int = 0;
|
||||||
switch (block) {
|
switch (block) {
|
||||||
case 0:
|
case 0:
|
||||||
nearest->as_int = mv_list[0].as_int;
|
nearest_mv->as_int = mv_list[0].as_int;
|
||||||
near->as_int = mv_list[1].as_int;
|
near_mv->as_int = mv_list[1].as_int;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
case 2:
|
case 2:
|
||||||
nearest->as_int = bmi[0].as_mv[ref].as_int;
|
nearest_mv->as_int = bmi[0].as_mv[ref].as_int;
|
||||||
for (n = 0; n < MAX_MV_REF_CANDIDATES; ++n)
|
for (n = 0; n < MAX_MV_REF_CANDIDATES; ++n)
|
||||||
if (nearest->as_int != mv_list[n].as_int) {
|
if (nearest_mv->as_int != mv_list[n].as_int) {
|
||||||
near->as_int = mv_list[n].as_int;
|
near_mv->as_int = mv_list[n].as_int;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -196,10 +197,10 @@ void vp9_append_sub8x8_mvs_for_idx(VP9_COMMON *cm, MACROBLOCKD *xd,
|
|||||||
candidates[2] = mv_list[0];
|
candidates[2] = mv_list[0];
|
||||||
candidates[3] = mv_list[1];
|
candidates[3] = mv_list[1];
|
||||||
|
|
||||||
nearest->as_int = bmi[2].as_mv[ref].as_int;
|
nearest_mv->as_int = bmi[2].as_mv[ref].as_int;
|
||||||
for (n = 0; n < 2 + MAX_MV_REF_CANDIDATES; ++n)
|
for (n = 0; n < 2 + MAX_MV_REF_CANDIDATES; ++n)
|
||||||
if (nearest->as_int != candidates[n].as_int) {
|
if (nearest_mv->as_int != candidates[n].as_int) {
|
||||||
near->as_int = candidates[n].as_int;
|
near_mv->as_int = candidates[n].as_int;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -216,12 +216,12 @@ void vp9_find_mv_refs(const VP9_COMMON *cm, const MACROBLOCKD *xd,
|
|||||||
// above and a number cols of pixels in the left to select the one with best
|
// above and a number cols of pixels in the left to select the one with best
|
||||||
// score to use as ref motion vector
|
// score to use as ref motion vector
|
||||||
void vp9_find_best_ref_mvs(MACROBLOCKD *xd, int allow_hp,
|
void vp9_find_best_ref_mvs(MACROBLOCKD *xd, int allow_hp,
|
||||||
int_mv *mvlist, int_mv *nearest, int_mv *near);
|
int_mv *mvlist, int_mv *nearest_mv, int_mv *near_mv);
|
||||||
|
|
||||||
void vp9_append_sub8x8_mvs_for_idx(VP9_COMMON *cm, MACROBLOCKD *xd,
|
void vp9_append_sub8x8_mvs_for_idx(VP9_COMMON *cm, MACROBLOCKD *xd,
|
||||||
const TileInfo *const tile,
|
const TileInfo *const tile,
|
||||||
int block, int ref, int mi_row, int mi_col,
|
int block, int ref, int mi_row, int mi_col,
|
||||||
int_mv *nearest, int_mv *near);
|
int_mv *nearest_mv, int_mv *near_mv);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
} // extern "C"
|
} // extern "C"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user