JNT_COMP: Refactor code

The refactoring serves two purposes:
1. Separate code paths for jnt_comp and original compound average
computation. It provides function interface for jnt_comp while leaving
original compound average computation unchanged. In near future, SIMD
functions can be added for jnt_comp using the interface.

2. Previous implementation uses a hack on second_pred. But it may cause
segmentation fault when the test clip is small. As reported in Issue
944. This refactoring removes hacking and make it possible to address
the seg fault problem in the future.

Change-Id: Idd2cb99f6c77dae03d32ccfa1f9cbed1d7eed067
diff --git a/av1/common/reconinter.h b/av1/common/reconinter.h
index 441fe79..272e4f6 100644
--- a/av1/common/reconinter.h
+++ b/av1/common/reconinter.h
@@ -560,6 +560,12 @@
                                               uint8_t *ext_dst1[3],
                                               int ext_dst_stride1[3]);
 
+#if CONFIG_JNT_COMP
+void av1_jnt_comp_weight_assign(const AV1_COMMON *cm, const MB_MODE_INFO *mbmi,
+                                int order_idx, int *fwd_offset, int *bck_offset,
+                                int is_compound);
+#endif  // CONFIG_JNT_COMP
+
 #ifdef __cplusplus
 }  // extern "C"
 #endif