Commit 8b1732ad authored by Cheng Chen's avatar Cheng Chen

Minor refactor jnt_comp distance value

Instead of using -1 to indicate jnt_comp is used or not, use a separate
variable.

Change-Id: I9b206d63394c431741d89611a614087343a417fc
parent d78224f7
......@@ -1049,8 +1049,7 @@ static INLINE void build_inter_predictors(const AV1_COMMON *cm, MACROBLOCKD *xd,
ConvolveParams conv_params = get_conv_params(0, 0, plane);
#endif
#if CONFIG_JNT_COMP
conv_params.fwd_offset = -1;
conv_params.bck_offset = -1;
conv_params.use_jnt_comp_avg = 0;
#endif // CONFIG_JNT_COMP
struct buf_2d *const dst_buf = &pd->dst;
x = x_base + idx;
......
......@@ -5860,8 +5860,7 @@ static void joint_motion_search(const AV1_COMP *cpi, MACROBLOCK *x,
const int plane = 0;
ConvolveParams conv_params = get_conv_params(!id, 0, plane);
#if CONFIG_JNT_COMP
conv_params.fwd_offset = -1;
conv_params.bck_offset = -1;
conv_params.use_jnt_comp_avg = 0;
#endif
WarpTypesAllowed warp_types;
warp_types.global_warp_allowed = is_global[!id];
......
......@@ -151,9 +151,9 @@ void AV1WarpFilterTest::RunCheckOutput(warp_affine_func test_impl) {
#endif
#if CONFIG_JNT_COMP && CONFIG_CONVOLVE_ROUND
if (jj >= 4) {
conv_params.fwd_offset = -1;
conv_params.bck_offset = -1;
conv_params.use_jnt_comp_avg = 0;
} else {
conv_params.use_jnt_comp_avg = 1;
conv_params.fwd_offset = quant_dist_lookup_table[ii][jj][0];
conv_params.bck_offset = quant_dist_lookup_table[ii][jj][1];
}
......@@ -169,9 +169,9 @@ void AV1WarpFilterTest::RunCheckOutput(warp_affine_func test_impl) {
#endif
#if CONFIG_JNT_COMP && CONFIG_CONVOLVE_ROUND
if (jj >= 4) {
conv_params.fwd_offset = -1;
conv_params.bck_offset = -1;
conv_params.use_jnt_comp_avg = 0;
} else {
conv_params.use_jnt_comp_avg = 1;
conv_params.fwd_offset = quant_dist_lookup_table[ii][jj][0];
conv_params.bck_offset = quant_dist_lookup_table[ii][jj][1];
}
......@@ -360,9 +360,9 @@ void AV1HighbdWarpFilterTest::RunCheckOutput(
#endif
#if CONFIG_JNT_COMP && CONFIG_CONVOLVE_ROUND
if (jj >= 4) {
conv_params.fwd_offset = -1;
conv_params.bck_offset = -1;
conv_params.use_jnt_comp_avg = 0;
} else {
conv_params.use_jnt_comp_avg = 1;
conv_params.fwd_offset = quant_dist_lookup_table[ii][jj][0];
conv_params.bck_offset = quant_dist_lookup_table[ii][jj][1];
}
......@@ -379,9 +379,9 @@ void AV1HighbdWarpFilterTest::RunCheckOutput(
#endif
#if CONFIG_JNT_COMP && CONFIG_CONVOLVE_ROUND
if (jj >= 4) {
conv_params.fwd_offset = -1;
conv_params.bck_offset = -1;
conv_params.use_jnt_comp_avg = 0;
} else {
conv_params.use_jnt_comp_avg = 1;
conv_params.fwd_offset = quant_dist_lookup_table[ii][jj][0];
conv_params.bck_offset = quant_dist_lookup_table[ii][jj][1];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment