Added missing kvz_ prefixes and fixed some warnings

This commit is contained in:
Marko Viitanen 2015-09-16 09:30:46 +03:00
parent 822c174377
commit 9a535e1c56
3 changed files with 13 additions and 14 deletions

View file

@ -961,13 +961,13 @@ uint32_t kvz_get_mvd_coding_cost_cabac(vector2d_t *mvd, cabac_data_t* cabac) {
} }
if (hor_abs_gr0) { if (hor_abs_gr0) {
if (mvd_hor_abs > 1) { if (mvd_hor_abs > 1) {
cabac_write_ep_ex_golomb(cabac, mvd_hor_abs - 2, 1); kvz_cabac_write_ep_ex_golomb(cabac, mvd_hor_abs - 2, 1);
} }
CABAC_BIN_EP(cabac, (mvd_hor > 0) ? 0 : 1, "mvd_sign_flag_hor"); CABAC_BIN_EP(cabac, (mvd_hor > 0) ? 0 : 1, "mvd_sign_flag_hor");
} }
if (ver_abs_gr0) { if (ver_abs_gr0) {
if (mvd_ver_abs > 1) { if (mvd_ver_abs > 1) {
cabac_write_ep_ex_golomb(cabac, mvd_ver_abs - 2, 1); kvz_cabac_write_ep_ex_golomb(cabac, mvd_ver_abs - 2, 1);
} }
CABAC_BIN_EP(cabac, (mvd_ver > 0) ? 0 : 1, "mvd_sign_flag_ver"); CABAC_BIN_EP(cabac, (mvd_ver > 0) ? 0 : 1, "mvd_sign_flag_ver");
} }
@ -987,7 +987,6 @@ int kvz_calc_mvd_cost_cabac(const encoder_state_t * const state, int x, int y, i
cabac_data_t* cabac; cabac_data_t* cabac;
uint32_t merge_idx; uint32_t merge_idx;
int cand1_cost, cand2_cost; int cand1_cost, cand2_cost;
uint32_t bitcost_before_mvd = 0;
vector2d_t mvd_temp1, mvd_temp2, mvd = { 0, 0 }; vector2d_t mvd_temp1, mvd_temp2, mvd = { 0, 0 };
int8_t merged = 0; int8_t merged = 0;
int8_t cur_mv_cand = 0; int8_t cur_mv_cand = 0;
@ -1135,7 +1134,7 @@ int kvz_calc_mvd_cost_cabac(const encoder_state_t * const state, int x, int y, i
if (hor_abs_gr0) { if (hor_abs_gr0) {
if (mvd_hor_abs > 1) { if (mvd_hor_abs > 1) {
cabac_write_ep_ex_golomb(cabac, mvd_hor_abs - 2, 1); kvz_cabac_write_ep_ex_golomb(cabac, mvd_hor_abs - 2, 1);
} }
CABAC_BIN_EP(cabac, (mvd_hor > 0) ? 0 : 1, "mvd_sign_flag_hor"); CABAC_BIN_EP(cabac, (mvd_hor > 0) ? 0 : 1, "mvd_sign_flag_hor");
@ -1143,7 +1142,7 @@ int kvz_calc_mvd_cost_cabac(const encoder_state_t * const state, int x, int y, i
if (ver_abs_gr0) { if (ver_abs_gr0) {
if (mvd_ver_abs > 1) { if (mvd_ver_abs > 1) {
cabac_write_ep_ex_golomb(cabac, mvd_ver_abs - 2, 1); kvz_cabac_write_ep_ex_golomb(cabac, mvd_ver_abs - 2, 1);
} }
CABAC_BIN_EP(cabac, (mvd_ver > 0) ? 0 : 1, "mvd_sign_flag_ver"); CABAC_BIN_EP(cabac, (mvd_ver > 0) ? 0 : 1, "mvd_sign_flag_ver");
@ -1151,7 +1150,7 @@ int kvz_calc_mvd_cost_cabac(const encoder_state_t * const state, int x, int y, i
} }
// Signal which candidate MV to use // Signal which candidate MV to use
cabac_write_unary_max_symbol(cabac, cabac->ctx.mvp_idx_model, /*mv_cand[ref_list_idx]*/cur_mv_cand, 1, kvz_cabac_write_unary_max_symbol(cabac, cabac->ctx.mvp_idx_model, /*mv_cand[ref_list_idx]*/cur_mv_cand, 1,
AMVP_MAX_NUM_CANDS - 1); AMVP_MAX_NUM_CANDS - 1);
} }

View file

@ -58,7 +58,7 @@ int kvz_calc_mvd_cost_cabac(const encoder_state_t * const state, int x, int y, i
int16_t num_cand, int32_t ref_idx, uint32_t *bitcost); int16_t num_cand, int32_t ref_idx, uint32_t *bitcost);
uint32_t kvz_get_mvd_coding_cost_cabac(vector2d_t *mvd, cabac_data_t* cabac); uint32_t kvz_get_mvd_coding_cost_cabac(vector2d_t *mvd, cabac_data_t* cabac);
extern const float f_entropy_bits[128]; extern const float kvz_f_entropy_bits[128];
#define CTX_ENTROPY_FBITS(ctx,val) f_entropy_bits[(ctx)->uc_state ^ (val)] #define CTX_ENTROPY_FBITS(ctx,val) kvz_f_entropy_bits[(ctx)->uc_state ^ (val)]
#endif #endif

View file

@ -1019,11 +1019,11 @@ int kvz_search_cu_inter(const encoder_state_t * const state, int x, int y, int d
mvd_temp1.x = mv.x - mv_cand[0][0]; mvd_temp1.x = mv.x - mv_cand[0][0];
mvd_temp1.y = mv.y - mv_cand[0][1]; mvd_temp1.y = mv.y - mv_cand[0][1];
cand1_cost = kvz_get_mvd_coding_cost_cabac(&mvd_temp1, &state->cabac); cand1_cost = kvz_get_mvd_coding_cost_cabac(&mvd_temp1, (cabac_data_t*)&state->cabac);
mvd_temp2.x = mv.x - mv_cand[1][0]; mvd_temp2.x = mv.x - mv_cand[1][0];
mvd_temp2.y = mv.y - mv_cand[1][1]; mvd_temp2.y = mv.y - mv_cand[1][1];
cand2_cost = kvz_get_mvd_coding_cost_cabac(&mvd_temp2, &state->cabac); cand2_cost = kvz_get_mvd_coding_cost_cabac(&mvd_temp2, (cabac_data_t*)&state->cabac);
// Select candidate 1 if it has lower cost // Select candidate 1 if it has lower cost
if (cand2_cost < cand1_cost) { if (cand2_cost < cand1_cost) {
@ -1110,8 +1110,8 @@ int kvz_search_cu_inter(const encoder_state_t * const state, int x, int y, int d
cost = satd(tmp_pic, tmp_block); cost = satd(tmp_pic, tmp_block);
cost += calc_mvd_cost_cabac(state, merge_cand[i].mv[0][0], merge_cand[i].mv[0][1], 0, mv_cand, merge_cand, 0, ref_idx, &bitcost[0]); cost += kvz_calc_mvd_cost_cabac(state, merge_cand[i].mv[0][0], merge_cand[i].mv[0][1], 0, mv_cand, merge_cand, 0, ref_idx, &bitcost[0]);
cost += calc_mvd_cost_cabac(state, merge_cand[i].mv[1][0], merge_cand[i].mv[1][1], 0, mv_cand, merge_cand, 0, ref_idx, &bitcost[1]); cost += kvz_calc_mvd_cost_cabac(state, merge_cand[i].mv[1][0], merge_cand[i].mv[1][1], 0, mv_cand, merge_cand, 0, ref_idx, &bitcost[1]);
if (cost < cur_cu->inter.cost) { if (cost < cur_cu->inter.cost) {
@ -1155,11 +1155,11 @@ int kvz_search_cu_inter(const encoder_state_t * const state, int x, int y, int d
mvd_temp1.x = cur_cu->inter.mv[reflist][0] - mv_cand[0][0]; mvd_temp1.x = cur_cu->inter.mv[reflist][0] - mv_cand[0][0];
mvd_temp1.y = cur_cu->inter.mv[reflist][1] - mv_cand[0][1]; mvd_temp1.y = cur_cu->inter.mv[reflist][1] - mv_cand[0][1];
cand1_cost = kvz_get_mvd_coding_cost_cabac(&mvd_temp1, &state->cabac); cand1_cost = kvz_get_mvd_coding_cost_cabac(&mvd_temp1, (cabac_data_t*)&state->cabac);
mvd_temp2.x = cur_cu->inter.mv[reflist][0] - mv_cand[1][0]; mvd_temp2.x = cur_cu->inter.mv[reflist][0] - mv_cand[1][0];
mvd_temp2.y = cur_cu->inter.mv[reflist][1] - mv_cand[1][1]; mvd_temp2.y = cur_cu->inter.mv[reflist][1] - mv_cand[1][1];
cand2_cost = kvz_get_mvd_coding_cost_cabac(&mvd_temp2, &state->cabac); cand2_cost = kvz_get_mvd_coding_cost_cabac(&mvd_temp2, (cabac_data_t*)&state->cabac);
// Select candidate 1 if it has lower cost // Select candidate 1 if it has lower cost
if (cand2_cost < cand1_cost) { if (cand2_cost < cand1_cost) {