diff --git a/Workspace_msvc/lib_dec.vcxproj b/Workspace_msvc/lib_dec.vcxproj
index 354348b4c925e0fd7d84548c7b29a18b3b3061e4..662502a1a614e6e6fb0f171f52f0326b6f301b12 100644
--- a/Workspace_msvc/lib_dec.vcxproj
+++ b/Workspace_msvc/lib_dec.vcxproj
@@ -264,7 +264,6 @@
-
diff --git a/Workspace_msvc/lib_dec.vcxproj.filters b/Workspace_msvc/lib_dec.vcxproj.filters
index ef14ddf0e47f22646d686d7263637b5628af85e2..8eddbb60a098e2b807e849b7bc72e1fe003e8a53 100644
--- a/Workspace_msvc/lib_dec.vcxproj.filters
+++ b/Workspace_msvc/lib_dec.vcxproj.filters
@@ -1,9 +1,6 @@
-
- decoder_ivas_c
-
decoder_ivas_c
diff --git a/Workspace_msvc/lib_rend.vcxproj b/Workspace_msvc/lib_rend.vcxproj
index e0bcd06033b582e5b94cd8f35e3668f450b24971..672c6dfac2b9e0a769e5554cd6e5d70974861b01 100644
--- a/Workspace_msvc/lib_rend.vcxproj
+++ b/Workspace_msvc/lib_rend.vcxproj
@@ -191,6 +191,7 @@
+
diff --git a/Workspace_msvc/lib_rend.vcxproj.filters b/Workspace_msvc/lib_rend.vcxproj.filters
index 406ba2c85ee9fc8f3adfb0910136e2f379fe553b..6d71aabf0312f96b44483dcb109d1a7293389a38 100644
--- a/Workspace_msvc/lib_rend.vcxproj.filters
+++ b/Workspace_msvc/lib_rend.vcxproj.filters
@@ -158,6 +158,9 @@
rend_c
+
+ rend_c
+
rend_c
diff --git a/lib_com/ivas_prot.h b/lib_com/ivas_prot.h
index 96ff286bfe6afa6865af036e29b5292b62a76109..fc4cfe9366a3e94923cedec898faa023d7688cca 100755
--- a/lib_com/ivas_prot.h
+++ b/lib_com/ivas_prot.h
@@ -5385,10 +5385,15 @@ void ivas_ism2sba_sf(
const int16_t sba_order /* i : Ambisonic (SBA) order */
);
-
+#ifndef FIX_866_MOVE_VBAP
+/*----------------------------------------------------------------------------------*
+ * Amplitude Panning tool prototypes
+ *----------------------------------------------------------------------------------*/
+#else
/*----------------------------------------------------------------------------------*
* Amplitude Panning VBAP prototypes
*----------------------------------------------------------------------------------*/
+#endif
void panning_wrap_angles(
const float azi_deg, /* i : azimuth in degrees for panning direction (positive left) */
@@ -5396,7 +5401,7 @@ void panning_wrap_angles(
float *azi_wrapped, /* o : wrapped azimuth component */
float *ele_wrapped /* o : wrapped elevation component */
);
-
+#ifndef FIX_866_MOVE_VBAP
ivas_error vbap_init_data(
VBAP_HANDLE *hVBAPdata, /* i/o: handle for VBAP data structure that will be initialized */
const float *speaker_node_azi_deg, /* i : vector of speaker node azimuths (positive left) */
@@ -5416,6 +5421,7 @@ void vbap_determine_gains(
const int16_t ele_deg, /* i : elevation in degrees for panning direction (positive up) */
const int16_t use_object_mode /* i : select between object mode panning and spatial mode panning */
);
+#endif
void v_sort_ind(
float *x, /* i/o: Vector to be sorted */
diff --git a/lib_com/options.h b/lib_com/options.h
index 0d3ff752a406dde3ce3c610f4cd29a80da6e54b1..574c453a175a4d431ffa20c0850cd02140463d0f 100644
--- a/lib_com/options.h
+++ b/lib_com/options.h
@@ -160,6 +160,7 @@
#define FIX_520_REMOVE_MEMMOVE_JBM /* VA: issue 520: Remove memmove() from JBM code */
#define FIX_853_ARRAY_SIZE_MISMATCH /* Nokia: Issue #853: Mismatch of declaration and definition of computeIntensityVector_ana and computeReferencePower_ana */
#define FIX_814_DOUBLE_PREC_IN_REVERB /* Philips: Issue 814: Replace double precision arithmetic in reverb */
+#define FIX_866_MOVE_VBAP /* Nokia: Issue 866: Move VBAP to lib_rend */
/* #################### End BE switches ################################## */
diff --git a/lib_rend/ivas_prot_rend.h b/lib_rend/ivas_prot_rend.h
index dbed26f7196fd1ae3fb1f5bd26885b4b69019878..cc2425e49b4da0357b31ff7791eec4303b9b4a32 100644
--- a/lib_rend/ivas_prot_rend.h
+++ b/lib_rend/ivas_prot_rend.h
@@ -133,7 +133,32 @@ void efap_determine_gains(
const float ele_deg, /* i : elevation in degrees for panning direction (positive up) */
const int16_t efap_mode /* i : indicates whether EFAP or EFIP is used */
);
+#ifdef FIX_866_MOVE_VBAP
+/*----------------------------------------------------------------------------------*
+ * Amplitude Panning VBAP prototypes
+ *----------------------------------------------------------------------------------*/
+
+ivas_error vbap_init_data(
+ VBAP_HANDLE *hVBAPdata, /* i/o: handle for VBAP data structure that will be initialized */
+ const float *speaker_node_azi_deg, /* i : vector of speaker node azimuths (positive left) */
+ const float *speaker_node_ele_deg, /* i : vector of speaker node elevations (positive up) */
+ const int16_t num_speaker_nodes, /* i : number of speaker nodes in the set */
+ const IVAS_FORMAT ivas_format /* i : IVAS format */
+);
+
+void vbap_free_data(
+ VBAP_HANDLE *hVBAPdata /* i/o: VBAP handle to be freed */
+);
+
+void vbap_determine_gains(
+ const VBAP_HANDLE hVBAPdata, /* i : VBAP structure */
+ float *gains, /* o : gain vector for speaker nodes for given direction */
+ const int16_t azi_deg, /* i : azimuth in degrees for panning direction (positive left) */
+ const int16_t ele_deg, /* i : elevation in degrees for panning direction (positive up) */
+ const int16_t use_object_mode /* i : select between object mode panning and spatial mode panning */
+);
+#endif
/*----------------------------------------------------------------------------------*
* DirAC/MASA rendering
diff --git a/lib_dec/ivas_vbap.c b/lib_rend/ivas_vbap.c
similarity index 99%
rename from lib_dec/ivas_vbap.c
rename to lib_rend/ivas_vbap.c
index 52e92ed7e3726b50eac18e8718a84369e5d022a0..602d64df6890670bccee4c2d6a8e6d28ffdf257a 100644
--- a/lib_dec/ivas_vbap.c
+++ b/lib_rend/ivas_vbap.c
@@ -36,6 +36,7 @@
#include
#include "prot.h"
#include "ivas_prot.h"
+#include "ivas_prot_rend.h"
#include "ivas_stat_dec.h"
#ifdef DEBUGGING
#include "debug.h"