diff --git a/tests/Makefile b/tests/Makefile
index fcbb55eccf9f61616bac25776e9158c542a07278..6fed995e0a3e8db23dd15318519a74fbe6b2d451 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -58,6 +58,7 @@ include $(SRC_PATH)/tests/fate/voice.mak
 include $(SRC_PATH)/tests/fate/vorbis.mak
 include $(SRC_PATH)/tests/fate/vpx.mak
 include $(SRC_PATH)/tests/fate/vqf.mak
+include $(SRC_PATH)/tests/fate/wavpack.mak
 include $(SRC_PATH)/tests/fate/wma.mak
 
 FATE_ACODEC  = $(ACODEC_TESTS:%=fate-acodec-%)
diff --git a/tests/fate/lossless-audio.mak b/tests/fate/lossless-audio.mak
index 0a81b786773003d34370a9481bfb0835c599b4cc..f35d659264829c8100f973c0adbad3b45baab28a 100644
--- a/tests/fate/lossless-audio.mak
+++ b/tests/fate/lossless-audio.mak
@@ -12,6 +12,3 @@ fate-lossless-shorten: CMD = md5 -i $(SAMPLES)/lossless-audio/luckynight-partial
 
 FATE_TESTS += fate-lossless-tta
 fate-lossless-tta: CMD = crc -i $(SAMPLES)/lossless-audio/inside.tta
-
-FATE_TESTS += fate-lossless-wavpack
-fate-lossless-wavpack: CMD = md5 -i $(SAMPLES)/lossless-audio/luckynight-partial.wv -f s16le
diff --git a/tests/fate/wavpack.mak b/tests/fate/wavpack.mak
new file mode 100644
index 0000000000000000000000000000000000000000..2807b26e950d8648066a18fce4387c16e49dee31
--- /dev/null
+++ b/tests/fate/wavpack.mak
@@ -0,0 +1,87 @@
+# Lossless
+
+FATE_TESTS += fate-wavpack-lossless-float
+fate-wavpack-lossless-float: CMD = md5 -i $(SAMPLES)/wavpack/lossless/32bit_float-partial.wv -f f32le
+
+FATE_TESTS += fate-wavpack-lossless-8bit
+fate-wavpack-lossless-8bit: CMD = md5 -i $(SAMPLES)/wavpack/lossless/8bit-partial.wv -f s8
+
+FATE_TESTS += fate-wavpack-lossless-12bit
+fate-wavpack-lossless-12bit: CMD = md5 -i $(SAMPLES)/wavpack/lossless/12bit-partial.wv -f s16le
+
+FATE_TESTS += fate-wavpack-lossless-16bit
+fate-wavpack-lossless-16bit: CMD = md5 -i $(SAMPLES)/wavpack/lossless/16bit-partial.wv -f s16le
+
+FATE_TESTS += fate-wavpack-lossless-24bit
+fate-wavpack-lossless-24bit: CMD = md5 -i $(SAMPLES)/wavpack/lossless/24bit-partial.wv -f s24le
+
+FATE_TESTS += fate-wavpack-lossless-32bit
+fate-wavpack-lossless-32bit: CMD = md5 -i $(SAMPLES)/wavpack/lossless/32bit_int-partial.wv -f s32le
+
+# Lossy
+
+FATE_TESTS += fate-wavpack-lossy-float
+fate-wavpack-lossy-float: CMD = md5 -i $(SAMPLES)/wavpack/lossy/2.0_32-bit_float.wv -f f32le
+
+FATE_TESTS += fate-wavpack-lossy-8bit
+fate-wavpack-lossy-8bit: CMD = md5 -i $(SAMPLES)/wavpack/lossy/4.0_8-bit.wv -f s8
+
+FATE_TESTS += fate-wavpack-lossy-16bit
+fate-wavpack-lossy-16bit: CMD = md5 -i $(SAMPLES)/wavpack/lossy/4.0_16-bit.wv -f s16le
+
+FATE_TESTS += fate-wavpack-lossy-24bit
+fate-wavpack-lossy-24bit: CMD = md5 -i $(SAMPLES)/wavpack/lossy/4.0_24-bit.wv -f s24le
+
+FATE_TESTS += fate-wavpack-lossy-32bit
+fate-wavpack-lossy-32bit: CMD = md5 -i $(SAMPLES)/wavpack/lossy/4.0_32-bit_int.wv -f s32le
+
+# Channel configurations
+
+FATE_TESTS += fate-wavpack-channels-monofloat
+fate-wavpack-channels-monofloat: CMD = md5 -i $(SAMPLES)/wavpack/num_channels/mono_float-partial.wv -f f32le
+
+FATE_TESTS += fate-wavpack-channels-monoint
+fate-wavpack-channels-monoint: CMD = md5 -i $(SAMPLES)/wavpack/num_channels/mono_16bit_int.wv -f s16le
+
+FATE_TESTS += fate-wavpack-channels-4.0
+fate-wavpack-channels-4.0: CMD = md5 -i $(SAMPLES)/wavpack/num_channels/edward_4.0_16bit-partial.wv -f s16le
+
+FATE_TESTS += fate-wavpack-channels-5.1
+fate-wavpack-channels-5.1: CMD = md5 -i $(SAMPLES)/wavpack/num_channels/panslab_sample_5.1_16bit-partial.wv -f s16le
+
+FATE_TESTS += fate-wavpack-channels-6.1
+fate-wavpack-channels-6.1: CMD = md5 -i $(SAMPLES)/wavpack/num_channels/eva_2.22_6.1_16bit-partial.wv -f s16le
+
+FATE_TESTS += fate-wavpack-channels-7.1
+fate-wavpack-channels-7.1: CMD = md5 -i $(SAMPLES)/wavpack/num_channels/panslab_sample_7.1_16bit-partial.wv -f s16le
+
+# Speed modes
+
+FATE_TESTS += fate-wavpack-speed-default
+fate-wavpack-speed-default: CMD = md5 -i $(SAMPLES)/wavpack/speed_modes/default-partial.wv  -f s16le
+
+FATE_TESTS += fate-wavpack-speed-fast
+fate-wavpack-speed-fast: CMD = md5 -i $(SAMPLES)/wavpack/speed_modes/fast-partial.wv  -f s16le
+
+FATE_TESTS += fate-wavpack-speed-high
+fate-wavpack-speed-high: CMD = md5 -i $(SAMPLES)/wavpack/speed_modes/high-partial.wv  -f s16le
+
+FATE_TESTS += fate-wavpack-speed-vhigh
+fate-wavpack-speed-vhigh: CMD = md5 -i $(SAMPLES)/wavpack/speed_modes/vhigh-partial.wv  -f s16le
+
+# Special Cases
+
+FATE_TESTS += fate-wavpack-cuesheet
+fate-wavpack-cuesheet: CMD = md5 -i $(SAMPLES)/wavpack/special/cue_sheet.wv -f s16le
+
+FATE_TESTS += fate-wavpack-zerolsbs
+fate-wavpack-zerolsbs: CMD = md5 -i $(SAMPLES)/wavpack/special/zero_lsbs.wv -f s16le
+
+FATE_TESTS += fate-wavpack-clipping
+fate-wavpack-clipping: CMD = md5 -i $(SAMPLES)/wavpack/special/clipping.wv -f s16le
+
+FATE_TESTS += fate-wavpack-falsestereo
+fate-wavpack-falsestereo: CMD = md5 -i $(SAMPLES)/wavpack/special/false_stereo.wv -f s16le
+
+FATE_TESTS += fate-wavpack-matroskamode
+fate-wavpack-matroskamode: CMD = md5 -i $(SAMPLES)/wavpack/special/matroska_mode.mka -f s16le
diff --git a/tests/ref/fate/lossless-wavpack b/tests/ref/fate/lossless-wavpack
deleted file mode 100644
index 6281924c419921e049d185b7e3857142850c5f12..0000000000000000000000000000000000000000
--- a/tests/ref/fate/lossless-wavpack
+++ /dev/null
@@ -1 +0,0 @@
-97223f65c91213694a660d52f87f35aa
diff --git a/tests/ref/fate/wavpack-channels-4.0 b/tests/ref/fate/wavpack-channels-4.0
new file mode 100644
index 0000000000000000000000000000000000000000..4cf67642b5785d90f5414592aa8533c1c1781f9c
--- /dev/null
+++ b/tests/ref/fate/wavpack-channels-4.0
@@ -0,0 +1 @@
+a03999c3ad17423f3a7e3d537fea8589
diff --git a/tests/ref/fate/wavpack-channels-5.1 b/tests/ref/fate/wavpack-channels-5.1
new file mode 100644
index 0000000000000000000000000000000000000000..49fe876f43aeb9438b7991759b90643d22366a83
--- /dev/null
+++ b/tests/ref/fate/wavpack-channels-5.1
@@ -0,0 +1 @@
+4ab874ad4a47141073f6db9aeec422a8
diff --git a/tests/ref/fate/wavpack-channels-6.1 b/tests/ref/fate/wavpack-channels-6.1
new file mode 100644
index 0000000000000000000000000000000000000000..ed46b7ce3d89b22830816e6cd37c9957c8e29ed8
--- /dev/null
+++ b/tests/ref/fate/wavpack-channels-6.1
@@ -0,0 +1 @@
+a524a76c85f55b7d63914fc1543a5268
diff --git a/tests/ref/fate/wavpack-channels-7.1 b/tests/ref/fate/wavpack-channels-7.1
new file mode 100644
index 0000000000000000000000000000000000000000..1f54afe8efd49da0c6b5164253877b11f5d4265b
--- /dev/null
+++ b/tests/ref/fate/wavpack-channels-7.1
@@ -0,0 +1 @@
+cffe4d47290ff3cef974e5aa6bc32559
diff --git a/tests/ref/fate/wavpack-channels-monofloat b/tests/ref/fate/wavpack-channels-monofloat
new file mode 100644
index 0000000000000000000000000000000000000000..41d94fab7fbe34179981f561e0726c7bebd85be3
--- /dev/null
+++ b/tests/ref/fate/wavpack-channels-monofloat
@@ -0,0 +1 @@
+71386c0f63105e414220f0f0d369a0e6
diff --git a/tests/ref/fate/wavpack-channels-monoint b/tests/ref/fate/wavpack-channels-monoint
new file mode 100644
index 0000000000000000000000000000000000000000..204ab6d322dbf4ad7b1086af76edfde5fff9e2c4
--- /dev/null
+++ b/tests/ref/fate/wavpack-channels-monoint
@@ -0,0 +1 @@
+931f27e3ec69fae0952548504461d97c
diff --git a/tests/ref/fate/wavpack-clipping b/tests/ref/fate/wavpack-clipping
new file mode 100644
index 0000000000000000000000000000000000000000..fd19f9347ccc3ed9d393c1e1d35aaf3f47654a52
--- /dev/null
+++ b/tests/ref/fate/wavpack-clipping
@@ -0,0 +1 @@
+d18d0b2dc7d329aefcbb889dc99383ab
diff --git a/tests/ref/fate/wavpack-cuesheet b/tests/ref/fate/wavpack-cuesheet
new file mode 100644
index 0000000000000000000000000000000000000000..e013bb0a7f8248991cad46b96a57f86e2da0709d
--- /dev/null
+++ b/tests/ref/fate/wavpack-cuesheet
@@ -0,0 +1 @@
+85eb2940491442ca25c2a702a6f30e5f
diff --git a/tests/ref/fate/wavpack-falsestereo b/tests/ref/fate/wavpack-falsestereo
new file mode 100644
index 0000000000000000000000000000000000000000..458ce65084666378a3b94cdfb2eb42895d27b378
--- /dev/null
+++ b/tests/ref/fate/wavpack-falsestereo
@@ -0,0 +1 @@
+e3fdd584bef84e85f4ca84e2769306f8
diff --git a/tests/ref/fate/wavpack-lossless-12bit b/tests/ref/fate/wavpack-lossless-12bit
new file mode 100644
index 0000000000000000000000000000000000000000..2adf043e2241943938fb227f4fae100159005b63
--- /dev/null
+++ b/tests/ref/fate/wavpack-lossless-12bit
@@ -0,0 +1 @@
+925e047ac0d4c874a9cff3cc9117ac91
diff --git a/tests/ref/fate/wavpack-lossless-16bit b/tests/ref/fate/wavpack-lossless-16bit
new file mode 100644
index 0000000000000000000000000000000000000000..04fc2805a41fdef025ff7fd98f3395f1495a3d2f
--- /dev/null
+++ b/tests/ref/fate/wavpack-lossless-16bit
@@ -0,0 +1 @@
+e2dc4b85377b275a48c8bd2a4f5b91fd
diff --git a/tests/ref/fate/wavpack-lossless-24bit b/tests/ref/fate/wavpack-lossless-24bit
new file mode 100644
index 0000000000000000000000000000000000000000..1fd8dca948a6121a77cc8c8ec6ea12aa5752f304
--- /dev/null
+++ b/tests/ref/fate/wavpack-lossless-24bit
@@ -0,0 +1 @@
+9d7bc1a45bd3ba9d1eb5706f0dfc3e47
diff --git a/tests/ref/fate/wavpack-lossless-32bit b/tests/ref/fate/wavpack-lossless-32bit
new file mode 100644
index 0000000000000000000000000000000000000000..cef05f37d6cf2bf1ef35f5db68da025a3791178d
--- /dev/null
+++ b/tests/ref/fate/wavpack-lossless-32bit
@@ -0,0 +1 @@
+c35f539bb5796ed93908c987fab1c26c
diff --git a/tests/ref/fate/wavpack-lossless-8bit b/tests/ref/fate/wavpack-lossless-8bit
new file mode 100644
index 0000000000000000000000000000000000000000..58cdb99dcdc7b3fb7183a5b1bd98572ceee45881
--- /dev/null
+++ b/tests/ref/fate/wavpack-lossless-8bit
@@ -0,0 +1 @@
+e4e65e2048ba373d89836907328cfb27
diff --git a/tests/ref/fate/wavpack-lossless-float b/tests/ref/fate/wavpack-lossless-float
new file mode 100644
index 0000000000000000000000000000000000000000..6081ae1cc5b6d0d7cc3e19c5ba42548958b0b2e1
--- /dev/null
+++ b/tests/ref/fate/wavpack-lossless-float
@@ -0,0 +1 @@
+04b860cf4f9ecba36c053fdf83dac14a
diff --git a/tests/ref/fate/wavpack-lossy-16bit b/tests/ref/fate/wavpack-lossy-16bit
new file mode 100644
index 0000000000000000000000000000000000000000..3adeaa074bd990949ff9e356fdede31223730d7f
--- /dev/null
+++ b/tests/ref/fate/wavpack-lossy-16bit
@@ -0,0 +1 @@
+c2aa8d83d14f799a9289b73bb6263fbc
diff --git a/tests/ref/fate/wavpack-lossy-24bit b/tests/ref/fate/wavpack-lossy-24bit
new file mode 100644
index 0000000000000000000000000000000000000000..566ec6d830556f278a4043353caebeabdf4addd8
--- /dev/null
+++ b/tests/ref/fate/wavpack-lossy-24bit
@@ -0,0 +1 @@
+0c04941424ba0981eac0e681130788f7
diff --git a/tests/ref/fate/wavpack-lossy-32bit b/tests/ref/fate/wavpack-lossy-32bit
new file mode 100644
index 0000000000000000000000000000000000000000..6b66d0ab0b09e3037caeebcb1b157466f30bc6d1
--- /dev/null
+++ b/tests/ref/fate/wavpack-lossy-32bit
@@ -0,0 +1 @@
+7b94c7ab8ec78ddf59bd7967199cdc8e
diff --git a/tests/ref/fate/wavpack-lossy-8bit b/tests/ref/fate/wavpack-lossy-8bit
new file mode 100644
index 0000000000000000000000000000000000000000..d921ea6a34fc8633ce1fec5ef295aa71b5120eb0
--- /dev/null
+++ b/tests/ref/fate/wavpack-lossy-8bit
@@ -0,0 +1 @@
+f0e452d762d5e7b675970e6e67b781e7
diff --git a/tests/ref/fate/wavpack-lossy-float b/tests/ref/fate/wavpack-lossy-float
new file mode 100644
index 0000000000000000000000000000000000000000..9f984acd4953ecfec9787416b65731239761e005
--- /dev/null
+++ b/tests/ref/fate/wavpack-lossy-float
@@ -0,0 +1 @@
+d4733e795e5af80da9a265cf83a6da69
diff --git a/tests/ref/fate/wavpack-matroskamode b/tests/ref/fate/wavpack-matroskamode
new file mode 100644
index 0000000000000000000000000000000000000000..1f54afe8efd49da0c6b5164253877b11f5d4265b
--- /dev/null
+++ b/tests/ref/fate/wavpack-matroskamode
@@ -0,0 +1 @@
+cffe4d47290ff3cef974e5aa6bc32559
diff --git a/tests/ref/fate/wavpack-speed-default b/tests/ref/fate/wavpack-speed-default
new file mode 100644
index 0000000000000000000000000000000000000000..9dc559fc7280deac8e02f4b722aed450e2a5250a
--- /dev/null
+++ b/tests/ref/fate/wavpack-speed-default
@@ -0,0 +1 @@
+a57bec3f270c3b294d1e5ea07760514c
diff --git a/tests/ref/fate/wavpack-speed-fast b/tests/ref/fate/wavpack-speed-fast
new file mode 100644
index 0000000000000000000000000000000000000000..181d7dde616d3395d11ea08823b6a90df072dc2a
--- /dev/null
+++ b/tests/ref/fate/wavpack-speed-fast
@@ -0,0 +1 @@
+ebff08f89073e3f662f822df428711d5
diff --git a/tests/ref/fate/wavpack-speed-high b/tests/ref/fate/wavpack-speed-high
new file mode 100644
index 0000000000000000000000000000000000000000..3d852013d3e3dfd4770c75544e228b2fb33ef359
--- /dev/null
+++ b/tests/ref/fate/wavpack-speed-high
@@ -0,0 +1 @@
+a28c4d0f1d0c6ac7739e05150a8c401a
diff --git a/tests/ref/fate/wavpack-speed-vhigh b/tests/ref/fate/wavpack-speed-vhigh
new file mode 100644
index 0000000000000000000000000000000000000000..3d852013d3e3dfd4770c75544e228b2fb33ef359
--- /dev/null
+++ b/tests/ref/fate/wavpack-speed-vhigh
@@ -0,0 +1 @@
+a28c4d0f1d0c6ac7739e05150a8c401a
diff --git a/tests/ref/fate/wavpack-zerolsbs b/tests/ref/fate/wavpack-zerolsbs
new file mode 100644
index 0000000000000000000000000000000000000000..cc16fb9c73bbd30cdb6070e89973fa7d3953a08c
--- /dev/null
+++ b/tests/ref/fate/wavpack-zerolsbs
@@ -0,0 +1 @@
+33c09fedba88693f6cc423ca3763e7fe