diff --git a/test/variance_test.cc b/test/variance_test.cc
index 2012b186e7e500f65c72f9b4247e3703d3a13530..83f1139949dfb981fc7e25b17e414a7de429e8c2 100644
--- a/test/variance_test.cc
+++ b/test/variance_test.cc
@@ -14,7 +14,7 @@
 
 #include "vpx_config.h"
 extern "C" {
-#include "vp9/encoder/variance.h"
+#include "vp9/encoder/vp9_variance.h"
 #include "vpx/vpx_integer.h"
 #include "vp9_rtcd.h"
 }
diff --git a/test/vp9_boolcoder_test.cc b/test/vp9_boolcoder_test.cc
index 68a69d510c78665880f04ba636231cde81b2de4f..bde28a5f3086f8e320dd15b176eed11d39b82b28 100644
--- a/test/vp9_boolcoder_test.cc
+++ b/test/vp9_boolcoder_test.cc
@@ -15,8 +15,8 @@
 #include "third_party/googletest/src/include/gtest/gtest.h"
 
 extern "C" {
-#include "vp9/encoder/boolhuff.h"
-#include "vp9/decoder/dboolhuff.h"
+#include "vp9/encoder/vp9_boolhuff.h"
+#include "vp9/decoder/vp9_dboolhuff.h"
 }
 
 #include "acm_random.h"
diff --git a/vp9/common/arm/armv6/bilinearfilter_v6.asm b/vp9/common/arm/armv6/vp9_bilinearfilter_v6.asm
similarity index 100%
rename from vp9/common/arm/armv6/bilinearfilter_v6.asm
rename to vp9/common/arm/armv6/vp9_bilinearfilter_v6.asm
diff --git a/vp9/common/arm/armv6/copymem16x16_v6.asm b/vp9/common/arm/armv6/vp9_copymem16x16_v6.asm
similarity index 100%
rename from vp9/common/arm/armv6/copymem16x16_v6.asm
rename to vp9/common/arm/armv6/vp9_copymem16x16_v6.asm
diff --git a/vp9/common/arm/armv6/copymem8x4_v6.asm b/vp9/common/arm/armv6/vp9_copymem8x4_v6.asm
similarity index 100%
rename from vp9/common/arm/armv6/copymem8x4_v6.asm
rename to vp9/common/arm/armv6/vp9_copymem8x4_v6.asm
diff --git a/vp9/common/arm/armv6/copymem8x8_v6.asm b/vp9/common/arm/armv6/vp9_copymem8x8_v6.asm
similarity index 100%
rename from vp9/common/arm/armv6/copymem8x8_v6.asm
rename to vp9/common/arm/armv6/vp9_copymem8x8_v6.asm
diff --git a/vp9/common/arm/armv6/dc_only_idct_add_v6.asm b/vp9/common/arm/armv6/vp9_dc_only_idct_add_v6.asm
similarity index 100%
rename from vp9/common/arm/armv6/dc_only_idct_add_v6.asm
rename to vp9/common/arm/armv6/vp9_dc_only_idct_add_v6.asm
diff --git a/vp9/common/arm/armv6/filter_v6.asm b/vp9/common/arm/armv6/vp9_filter_v6.asm
similarity index 100%
rename from vp9/common/arm/armv6/filter_v6.asm
rename to vp9/common/arm/armv6/vp9_filter_v6.asm
diff --git a/vp9/common/arm/armv6/idct_v6.asm b/vp9/common/arm/armv6/vp9_idct_v6.asm
similarity index 100%
rename from vp9/common/arm/armv6/idct_v6.asm
rename to vp9/common/arm/armv6/vp9_idct_v6.asm
diff --git a/vp9/common/arm/armv6/iwalsh_v6.asm b/vp9/common/arm/armv6/vp9_iwalsh_v6.asm
similarity index 100%
rename from vp9/common/arm/armv6/iwalsh_v6.asm
rename to vp9/common/arm/armv6/vp9_iwalsh_v6.asm
diff --git a/vp9/common/arm/armv6/loopfilter_v6.asm b/vp9/common/arm/armv6/vp9_loopfilter_v6.asm
similarity index 100%
rename from vp9/common/arm/armv6/loopfilter_v6.asm
rename to vp9/common/arm/armv6/vp9_loopfilter_v6.asm
diff --git a/vp9/common/arm/armv6/recon_v6.asm b/vp9/common/arm/armv6/vp9_recon_v6.asm
similarity index 100%
rename from vp9/common/arm/armv6/recon_v6.asm
rename to vp9/common/arm/armv6/vp9_recon_v6.asm
diff --git a/vp9/common/arm/armv6/simpleloopfilter_v6.asm b/vp9/common/arm/armv6/vp9_simpleloopfilter_v6.asm
similarity index 100%
rename from vp9/common/arm/armv6/simpleloopfilter_v6.asm
rename to vp9/common/arm/armv6/vp9_simpleloopfilter_v6.asm
diff --git a/vp9/common/arm/armv6/sixtappredict8x4_v6.asm b/vp9/common/arm/armv6/vp9_sixtappredict8x4_v6.asm
similarity index 100%
rename from vp9/common/arm/armv6/sixtappredict8x4_v6.asm
rename to vp9/common/arm/armv6/vp9_sixtappredict8x4_v6.asm
diff --git a/vp9/common/arm/neon/bilinearpredict16x16_neon.asm b/vp9/common/arm/neon/vp9_bilinearpredict16x16_neon.asm
similarity index 100%
rename from vp9/common/arm/neon/bilinearpredict16x16_neon.asm
rename to vp9/common/arm/neon/vp9_bilinearpredict16x16_neon.asm
diff --git a/vp9/common/arm/neon/bilinearpredict4x4_neon.asm b/vp9/common/arm/neon/vp9_bilinearpredict4x4_neon.asm
similarity index 100%
rename from vp9/common/arm/neon/bilinearpredict4x4_neon.asm
rename to vp9/common/arm/neon/vp9_bilinearpredict4x4_neon.asm
diff --git a/vp9/common/arm/neon/bilinearpredict8x4_neon.asm b/vp9/common/arm/neon/vp9_bilinearpredict8x4_neon.asm
similarity index 100%
rename from vp9/common/arm/neon/bilinearpredict8x4_neon.asm
rename to vp9/common/arm/neon/vp9_bilinearpredict8x4_neon.asm
diff --git a/vp9/common/arm/neon/bilinearpredict8x8_neon.asm b/vp9/common/arm/neon/vp9_bilinearpredict8x8_neon.asm
similarity index 100%
rename from vp9/common/arm/neon/bilinearpredict8x8_neon.asm
rename to vp9/common/arm/neon/vp9_bilinearpredict8x8_neon.asm
diff --git a/vp9/common/arm/neon/buildintrapredictorsmby_neon.asm b/vp9/common/arm/neon/vp9_buildintrapredictorsmby_neon.asm
similarity index 100%
rename from vp9/common/arm/neon/buildintrapredictorsmby_neon.asm
rename to vp9/common/arm/neon/vp9_buildintrapredictorsmby_neon.asm
diff --git a/vp9/common/arm/neon/copymem16x16_neon.asm b/vp9/common/arm/neon/vp9_copymem16x16_neon.asm
similarity index 100%
rename from vp9/common/arm/neon/copymem16x16_neon.asm
rename to vp9/common/arm/neon/vp9_copymem16x16_neon.asm
diff --git a/vp9/common/arm/neon/copymem8x4_neon.asm b/vp9/common/arm/neon/vp9_copymem8x4_neon.asm
similarity index 100%
rename from vp9/common/arm/neon/copymem8x4_neon.asm
rename to vp9/common/arm/neon/vp9_copymem8x4_neon.asm
diff --git a/vp9/common/arm/neon/copymem8x8_neon.asm b/vp9/common/arm/neon/vp9_copymem8x8_neon.asm
similarity index 100%
rename from vp9/common/arm/neon/copymem8x8_neon.asm
rename to vp9/common/arm/neon/vp9_copymem8x8_neon.asm
diff --git a/vp9/common/arm/neon/dc_only_idct_add_neon.asm b/vp9/common/arm/neon/vp9_dc_only_idct_add_neon.asm
similarity index 100%
rename from vp9/common/arm/neon/dc_only_idct_add_neon.asm
rename to vp9/common/arm/neon/vp9_dc_only_idct_add_neon.asm
diff --git a/vp9/common/arm/neon/iwalsh_neon.asm b/vp9/common/arm/neon/vp9_iwalsh_neon.asm
similarity index 100%
rename from vp9/common/arm/neon/iwalsh_neon.asm
rename to vp9/common/arm/neon/vp9_iwalsh_neon.asm
diff --git a/vp9/common/arm/neon/loopfilter_neon.asm b/vp9/common/arm/neon/vp9_loopfilter_neon.asm
similarity index 100%
rename from vp9/common/arm/neon/loopfilter_neon.asm
rename to vp9/common/arm/neon/vp9_loopfilter_neon.asm
diff --git a/vp9/common/arm/neon/loopfiltersimplehorizontaledge_neon.asm b/vp9/common/arm/neon/vp9_loopfiltersimplehorizontaledge_neon.asm
similarity index 100%
rename from vp9/common/arm/neon/loopfiltersimplehorizontaledge_neon.asm
rename to vp9/common/arm/neon/vp9_loopfiltersimplehorizontaledge_neon.asm
diff --git a/vp9/common/arm/neon/loopfiltersimpleverticaledge_neon.asm b/vp9/common/arm/neon/vp9_loopfiltersimpleverticaledge_neon.asm
similarity index 100%
rename from vp9/common/arm/neon/loopfiltersimpleverticaledge_neon.asm
rename to vp9/common/arm/neon/vp9_loopfiltersimpleverticaledge_neon.asm
diff --git a/vp9/common/arm/neon/mbloopfilter_neon.asm b/vp9/common/arm/neon/vp9_mbloopfilter_neon.asm
similarity index 100%
rename from vp9/common/arm/neon/mbloopfilter_neon.asm
rename to vp9/common/arm/neon/vp9_mbloopfilter_neon.asm
diff --git a/vp9/common/arm/neon/recon16x16mb_neon.asm b/vp9/common/arm/neon/vp9_recon16x16mb_neon.asm
similarity index 100%
rename from vp9/common/arm/neon/recon16x16mb_neon.asm
rename to vp9/common/arm/neon/vp9_recon16x16mb_neon.asm
diff --git a/vp9/common/arm/neon/recon2b_neon.asm b/vp9/common/arm/neon/vp9_recon2b_neon.asm
similarity index 100%
rename from vp9/common/arm/neon/recon2b_neon.asm
rename to vp9/common/arm/neon/vp9_recon2b_neon.asm
diff --git a/vp9/common/arm/neon/recon4b_neon.asm b/vp9/common/arm/neon/vp9_recon4b_neon.asm
similarity index 100%
rename from vp9/common/arm/neon/recon4b_neon.asm
rename to vp9/common/arm/neon/vp9_recon4b_neon.asm
diff --git a/vp9/common/arm/neon/recon_neon.c b/vp9/common/arm/neon/vp9_recon_neon.c
similarity index 96%
rename from vp9/common/arm/neon/recon_neon.c
rename to vp9/common/arm/neon/vp9_recon_neon.c
index 10fd46feb465663e122f5b96e873f7585ee881e1..cc3f9f59d23b0f34c714d627cf6dd7954f9ea925 100644
--- a/vp9/common/arm/neon/recon_neon.c
+++ b/vp9/common/arm/neon/vp9_recon_neon.c
@@ -11,7 +11,7 @@
 
 #include "vpx_ports/config.h"
 #include "vp9/common/recon.h"
-#include "vp9/common/blockd.h"
+#include "vp9/common/vp9_blockd.h"
 
 extern void vp8_recon16x16mb_neon(unsigned char *pred_ptr, short *diff_ptr, unsigned char *dst_ptr, int ystride, unsigned char *udst_ptr, unsigned char *vdst_ptr);
 
diff --git a/vp9/common/arm/neon/reconb_neon.asm b/vp9/common/arm/neon/vp9_reconb_neon.asm
similarity index 100%
rename from vp9/common/arm/neon/reconb_neon.asm
rename to vp9/common/arm/neon/vp9_reconb_neon.asm
diff --git a/vp9/common/arm/neon/save_neon_reg.asm b/vp9/common/arm/neon/vp9_save_neon_reg.asm
similarity index 100%
rename from vp9/common/arm/neon/save_neon_reg.asm
rename to vp9/common/arm/neon/vp9_save_neon_reg.asm
diff --git a/vp9/common/arm/neon/shortidct4x4llm_1_neon.asm b/vp9/common/arm/neon/vp9_shortidct4x4llm_1_neon.asm
similarity index 100%
rename from vp9/common/arm/neon/shortidct4x4llm_1_neon.asm
rename to vp9/common/arm/neon/vp9_shortidct4x4llm_1_neon.asm
diff --git a/vp9/common/arm/neon/shortidct4x4llm_neon.asm b/vp9/common/arm/neon/vp9_shortidct4x4llm_neon.asm
similarity index 100%
rename from vp9/common/arm/neon/shortidct4x4llm_neon.asm
rename to vp9/common/arm/neon/vp9_shortidct4x4llm_neon.asm
diff --git a/vp9/common/arm/neon/sixtappredict16x16_neon.asm b/vp9/common/arm/neon/vp9_sixtappredict16x16_neon.asm
similarity index 100%
rename from vp9/common/arm/neon/sixtappredict16x16_neon.asm
rename to vp9/common/arm/neon/vp9_sixtappredict16x16_neon.asm
diff --git a/vp9/common/arm/neon/sixtappredict4x4_neon.asm b/vp9/common/arm/neon/vp9_sixtappredict4x4_neon.asm
similarity index 100%
rename from vp9/common/arm/neon/sixtappredict4x4_neon.asm
rename to vp9/common/arm/neon/vp9_sixtappredict4x4_neon.asm
diff --git a/vp9/common/arm/neon/sixtappredict8x4_neon.asm b/vp9/common/arm/neon/vp9_sixtappredict8x4_neon.asm
similarity index 100%
rename from vp9/common/arm/neon/sixtappredict8x4_neon.asm
rename to vp9/common/arm/neon/vp9_sixtappredict8x4_neon.asm
diff --git a/vp9/common/arm/neon/sixtappredict8x8_neon.asm b/vp9/common/arm/neon/vp9_sixtappredict8x8_neon.asm
similarity index 100%
rename from vp9/common/arm/neon/sixtappredict8x8_neon.asm
rename to vp9/common/arm/neon/vp9_sixtappredict8x8_neon.asm
diff --git a/vp9/common/arm/arm_systemdependent.c b/vp9/common/arm/vp9_arm_systemdependent.c
similarity index 95%
rename from vp9/common/arm/arm_systemdependent.c
rename to vp9/common/arm/vp9_arm_systemdependent.c
index 0a0e8098e4324603ab004cf410d286c0ed9a4013..a6319a4c503504df8838b0a982f7a09cef1dbe46 100644
--- a/vp9/common/arm/arm_systemdependent.c
+++ b/vp9/common/arm/vp9_arm_systemdependent.c
@@ -11,11 +11,11 @@
 
 #include "vpx_ports/config.h"
 #include "vpx_ports/arm.h"
-#include "vp9/common/pragmas.h"
-#include "vp9/common/subpixel.h"
-#include "vp9/common/loopfilter.h"
+#include "vp9/common/vp9_pragmas.h"
+#include "vp9/common/vp9_subpixel.h"
+#include "vp9/common/vp9_loopfilter.h"
 #include "vp9/common/recon.h"
-#include "vp9/common/onyxc_int.h"
+#include "vp9/common/vp9_onyxc_int.h"
 
 void vp9_arch_arm_common_init(VP9_COMMON *ctx) {
 #if CONFIG_RUNTIME_CPU_DETECT
diff --git a/vp9/common/arm/bilinearfilter_arm.c b/vp9/common/arm/vp9_bilinearfilter_arm.c
similarity index 96%
rename from vp9/common/arm/bilinearfilter_arm.c
rename to vp9/common/arm/vp9_bilinearfilter_arm.c
index 287fdf04dbf20d1ec5f181db4c5310da3230d77d..409e271b11a2dc89c9a6116544ea3ddc5049c6bc 100644
--- a/vp9/common/arm/bilinearfilter_arm.c
+++ b/vp9/common/arm/vp9_bilinearfilter_arm.c
@@ -10,9 +10,9 @@
 
 
 #include <math.h>
-#include "vp9/common/filter.h"
-#include "vp9/common/subpixel.h"
-#include "bilinearfilter_arm.h"
+#include "vp9/common/vp9_filter.h"
+#include "vp9/common/vp9_subpixel.h"
+#include "vp9_bilinearfilter_arm.h"
 
 void vp9_filter_block2d_bil_armv6
 (
diff --git a/vp9/common/arm/bilinearfilter_arm.h b/vp9/common/arm/vp9_bilinearfilter_arm.h
similarity index 100%
rename from vp9/common/arm/bilinearfilter_arm.h
rename to vp9/common/arm/vp9_bilinearfilter_arm.h
diff --git a/vp9/common/arm/filter_arm.c b/vp9/common/arm/vp9_filter_arm.c
similarity index 98%
rename from vp9/common/arm/filter_arm.c
rename to vp9/common/arm/vp9_filter_arm.c
index ccb34e236e47c6f911a8f6787274fcd7e5521b4c..f55273c33e1321e8dce08e0cf23dae5d0329f81e 100644
--- a/vp9/common/arm/filter_arm.c
+++ b/vp9/common/arm/vp9_filter_arm.c
@@ -11,8 +11,8 @@
 
 #include "vpx_ports/config.h"
 #include <math.h>
-#include "vp9/common/filter.h"
-#include "vp9/common/subpixel.h"
+#include "vp9/common/vp9_filter.h"
+#include "vp9/common/vp9_subpixel.h"
 #include "vpx_ports/mem.h"
 
 extern void vp9_filter_block2d_first_pass_armv6
diff --git a/vp9/common/arm/idct_arm.h b/vp9/common/arm/vp9_idct_arm.h
similarity index 100%
rename from vp9/common/arm/idct_arm.h
rename to vp9/common/arm/vp9_idct_arm.h
diff --git a/vp9/common/arm/loopfilter_arm.c b/vp9/common/arm/vp9_loopfilter_arm.c
similarity index 98%
rename from vp9/common/arm/loopfilter_arm.c
rename to vp9/common/arm/vp9_loopfilter_arm.c
index abcb4c7cc2ea0a6b5cab90e5cdf05879afd95086..b61f1a86b7e12250c21c079e8cc0127714cc828e 100644
--- a/vp9/common/arm/loopfilter_arm.c
+++ b/vp9/common/arm/vp9_loopfilter_arm.c
@@ -10,8 +10,8 @@
 
 
 #include "vpx_config.h"
-#include "vp9/common/loopfilter.h"
-#include "vp9/common/onyxc_int.h"
+#include "vp9/common/vp9_loopfilter.h"
+#include "vp9/common/vp9_onyxc_int.h"
 
 #if HAVE_ARMV6
 extern prototype_loopfilter(vp9_loop_filter_horizontal_edge_armv6);
diff --git a/vp9/common/arm/loopfilter_arm.h b/vp9/common/arm/vp9_loopfilter_arm.h
similarity index 100%
rename from vp9/common/arm/loopfilter_arm.h
rename to vp9/common/arm/vp9_loopfilter_arm.h
diff --git a/vp9/common/arm/recon_arm.h b/vp9/common/arm/vp9_recon_arm.h
similarity index 100%
rename from vp9/common/arm/recon_arm.h
rename to vp9/common/arm/vp9_recon_arm.h
diff --git a/vp9/common/arm/reconintra_arm.c b/vp9/common/arm/vp9_reconintra_arm.c
similarity index 95%
rename from vp9/common/arm/reconintra_arm.c
rename to vp9/common/arm/vp9_reconintra_arm.c
index 5902546807eaeb4f8e64986b863d548107a0aef6..5720828c7abc9190affad4416570e23f391d9c93 100644
--- a/vp9/common/arm/reconintra_arm.c
+++ b/vp9/common/arm/vp9_reconintra_arm.c
@@ -10,8 +10,8 @@
 
 
 #include "vpx_ports/config.h"
-#include "vp9/common/blockd.h"
-#include "vp9/common/reconintra.h"
+#include "vp9/common/vp9_blockd.h"
+#include "vp9/common/vp9_reconintra.h"
 #include "vpx_mem/vpx_mem.h"
 #include "vp9/common/recon.h"
 
diff --git a/vp9/common/arm/subpixel_arm.h b/vp9/common/arm/vp9_subpixel_arm.h
similarity index 100%
rename from vp9/common/arm/subpixel_arm.h
rename to vp9/common/arm/vp9_subpixel_arm.h
diff --git a/vp9/common/generic/systemdependent.c b/vp9/common/generic/vp9_systemdependent.c
similarity index 92%
rename from vp9/common/generic/systemdependent.c
rename to vp9/common/generic/vp9_systemdependent.c
index 6d1a271f565419dbc22812898b7f60ab9ff07db6..29d1c3057dd37e63e3f0d2c856a1ca0f815465bc 100644
--- a/vp9/common/generic/systemdependent.c
+++ b/vp9/common/generic/vp9_systemdependent.c
@@ -11,9 +11,9 @@
 
 #include "vpx_ports/config.h"
 #include "vp9_rtcd.h"
-#include "vp9/common/subpixel.h"
-#include "vp9/common/loopfilter.h"
-#include "vp9/common/onyxc_int.h"
+#include "vp9/common/vp9_subpixel.h"
+#include "vp9/common/vp9_loopfilter.h"
+#include "vp9/common/vp9_onyxc_int.h"
 
 extern void vp9_arch_x86_common_init(VP9_COMMON *ctx);
 extern void vp9_arch_arm_common_init(VP9_COMMON *ctx);
diff --git a/vp9/common/ppc/copy_altivec.asm b/vp9/common/ppc/vp9_copy_altivec.asm
similarity index 100%
rename from vp9/common/ppc/copy_altivec.asm
rename to vp9/common/ppc/vp9_copy_altivec.asm
diff --git a/vp9/common/ppc/filter_altivec.asm b/vp9/common/ppc/vp9_filter_altivec.asm
similarity index 100%
rename from vp9/common/ppc/filter_altivec.asm
rename to vp9/common/ppc/vp9_filter_altivec.asm
diff --git a/vp9/common/ppc/filter_bilinear_altivec.asm b/vp9/common/ppc/vp9_filter_bilinear_altivec.asm
similarity index 100%
rename from vp9/common/ppc/filter_bilinear_altivec.asm
rename to vp9/common/ppc/vp9_filter_bilinear_altivec.asm
diff --git a/vp9/common/ppc/idctllm_altivec.asm b/vp9/common/ppc/vp9_idctllm_altivec.asm
similarity index 100%
rename from vp9/common/ppc/idctllm_altivec.asm
rename to vp9/common/ppc/vp9_idctllm_altivec.asm
diff --git a/vp9/common/ppc/loopfilter_altivec.c b/vp9/common/ppc/vp9_loopfilter_altivec.c
similarity index 98%
rename from vp9/common/ppc/loopfilter_altivec.c
rename to vp9/common/ppc/vp9_loopfilter_altivec.c
index 962da2319404cdbfe44dd108727ca1a39c426982..cae171805e76e11d13f40a49562f8656069fa4ba 100644
--- a/vp9/common/ppc/loopfilter_altivec.c
+++ b/vp9/common/ppc/vp9_loopfilter_altivec.c
@@ -9,8 +9,8 @@
  */
 
 
-#include "loopfilter.h"
-#include "onyxc_int.h"
+#include "vp9_loopfilter.h"
+#include "vp9_onyxc_int.h"
 
 typedef void loop_filter_function_y_ppc
 (
diff --git a/vp9/common/ppc/loopfilter_filters_altivec.asm b/vp9/common/ppc/vp9_loopfilter_filters_altivec.asm
similarity index 100%
rename from vp9/common/ppc/loopfilter_filters_altivec.asm
rename to vp9/common/ppc/vp9_loopfilter_filters_altivec.asm
diff --git a/vp9/common/ppc/platform_altivec.asm b/vp9/common/ppc/vp9_platform_altivec.asm
similarity index 100%
rename from vp9/common/ppc/platform_altivec.asm
rename to vp9/common/ppc/vp9_platform_altivec.asm
diff --git a/vp9/common/ppc/recon_altivec.asm b/vp9/common/ppc/vp9_recon_altivec.asm
similarity index 100%
rename from vp9/common/ppc/recon_altivec.asm
rename to vp9/common/ppc/vp9_recon_altivec.asm
diff --git a/vp9/common/ppc/systemdependent.c b/vp9/common/ppc/vp9_systemdependent.c
similarity index 98%
rename from vp9/common/ppc/systemdependent.c
rename to vp9/common/ppc/vp9_systemdependent.c
index 941c11bd6ec6cdd03c2b0e589f07a5b37d63e7fa..2137dee9cde2e5c37fdde585ed2da45f8a4179b1 100644
--- a/vp9/common/ppc/systemdependent.c
+++ b/vp9/common/ppc/vp9_systemdependent.c
@@ -8,10 +8,10 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "subpixel.h"
-#include "loopfilter.h"
+#include "vp9_subpixel.h"
+#include "vp9_loopfilter.h"
 #include "recon.h"
-#include "onyxc_int.h"
+#include "vp9_onyxc_int.h"
 
 void (*vp8_short_idct4x4)(short *input, short *output, int pitch);
 void (*vp8_short_idct4x4_1)(short *input, short *output, int pitch);
diff --git a/vp9/common/alloccommon.c b/vp9/common/vp9_alloccommon.c
similarity index 97%
rename from vp9/common/alloccommon.c
rename to vp9/common/vp9_alloccommon.c
index 33d32209941965327b3fea0000513c0a955e6061..04a8b368a2832565de37fd7db258a6cbc2c39399 100644
--- a/vp9/common/alloccommon.c
+++ b/vp9/common/vp9_alloccommon.c
@@ -10,13 +10,13 @@
 
 
 #include "vpx_ports/config.h"
-#include "blockd.h"
+#include "vp9_blockd.h"
 #include "vpx_mem/vpx_mem.h"
-#include "onyxc_int.h"
-#include "findnearmv.h"
-#include "entropymode.h"
-#include "entropymv.h"
-#include "systemdependent.h"
+#include "vp9_onyxc_int.h"
+#include "vp9_findnearmv.h"
+#include "vp9_entropymode.h"
+#include "vp9_entropymv.h"
+#include "vp9_systemdependent.h"
 
 
 void vp9_update_mode_info_border(VP9_COMMON *cpi, MODE_INFO *mi_base) {
diff --git a/vp9/common/alloccommon.h b/vp9/common/vp9_alloccommon.h
similarity index 96%
rename from vp9/common/alloccommon.h
rename to vp9/common/vp9_alloccommon.h
index 490b869b7a285832e4c6116400e5a7f91987edf1..df94f421e45acb2d38f24d66e1a4d48e7cde0c74 100644
--- a/vp9/common/alloccommon.h
+++ b/vp9/common/vp9_alloccommon.h
@@ -12,7 +12,7 @@
 #ifndef __INC_ALLOCCOMMON_H
 #define __INC_ALLOCCOMMON_H
 
-#include "onyxc_int.h"
+#include "vp9_onyxc_int.h"
 
 void vp9_create_common(VP9_COMMON *oci);
 void vp9_remove_common(VP9_COMMON *oci);
diff --git a/vp9/common/asm_com_offsets.c b/vp9/common/vp9_asm_com_offsets.c
similarity index 100%
rename from vp9/common/asm_com_offsets.c
rename to vp9/common/vp9_asm_com_offsets.c
diff --git a/vp9/common/blockd.c b/vp9/common/vp9_blockd.c
similarity index 97%
rename from vp9/common/blockd.c
rename to vp9/common/vp9_blockd.c
index 140500ec4799a76cd0f057ad8b313186bbfca561..d8bb394d4d27895a7dc6fcbadbdd62679bf6516b 100644
--- a/vp9/common/blockd.c
+++ b/vp9/common/vp9_blockd.c
@@ -9,7 +9,7 @@
  */
 
 
-#include "blockd.h"
+#include "vp9_blockd.h"
 #include "vpx_mem/vpx_mem.h"
 
 
diff --git a/vp9/common/blockd.h b/vp9/common/vp9_blockd.h
similarity index 99%
rename from vp9/common/blockd.h
rename to vp9/common/vp9_blockd.h
index 409c7b8f8bac29a6c58fc658bcbb8fa290bc6aa6..a91e8d4d072830ff7508047a735f868814cb197b 100644
--- a/vp9/common/blockd.h
+++ b/vp9/common/vp9_blockd.h
@@ -16,11 +16,11 @@ void vpx_log(const char *format, ...);
 
 #include "vpx_ports/config.h"
 #include "vpx_scale/yv12config.h"
-#include "mv.h"
-#include "treecoder.h"
-#include "subpixel.h"
+#include "vp9_mv.h"
+#include "vp9_treecoder.h"
+#include "vp9_subpixel.h"
 #include "vpx_ports/mem.h"
-#include "common.h"
+#include "vp9_common.h"
 
 #define TRUE    1
 #define FALSE   0
diff --git a/vp9/common/coefupdateprobs.h b/vp9/common/vp9_coefupdateprobs.h
similarity index 92%
rename from vp9/common/coefupdateprobs.h
rename to vp9/common/vp9_coefupdateprobs.h
index 185bc6d842477fcf52662bda111b1938a1ac31a1..cd7eabfa523ac88ed84e8b53072164cf023731f7 100644
--- a/vp9/common/coefupdateprobs.h
+++ b/vp9/common/vp9_coefupdateprobs.h
@@ -10,7 +10,7 @@
 
 
 /* Update probabilities for the nodes in the token entropy tree.
-   Generated file included by entropy.c */
+   Generated file included by vp9_entropy.c */
 #define COEF_UPDATE_PROB 252
 #define COEF_UPDATE_PROB_8X8 252
 #define COEF_UPDATE_PROB_16X16 252
diff --git a/vp9/common/common.h b/vp9/common/vp9_common.h
similarity index 97%
rename from vp9/common/common.h
rename to vp9/common/vp9_common.h
index bd34bf9b138e123932d56c18d6fd79505bc3d11c..61c0e25d8f1d6c24a13e3b3948474047f9e0a1d2 100644
--- a/vp9/common/common.h
+++ b/vp9/common/vp9_common.h
@@ -18,7 +18,7 @@
 
 #include "vpx_mem/vpx_mem.h"
 
-#include "common_types.h"
+#include "vp9_common_types.h"
 
 /* Only need this for fixed-size arrays, for structs just assign. */
 
diff --git a/vp9/common/common_types.h b/vp9/common/vp9_common_types.h
similarity index 100%
rename from vp9/common/common_types.h
rename to vp9/common/vp9_common_types.h
diff --git a/vp9/common/context.c b/vp9/common/vp9_context.c
similarity index 99%
rename from vp9/common/context.c
rename to vp9/common/vp9_context.c
index 181a27f3e7de9b514272d57bb881f3f018bb024b..90a1f796fa7a42ba3dd6b5d407977aaeab18244d 100644
--- a/vp9/common/context.c
+++ b/vp9/common/vp9_context.c
@@ -9,7 +9,7 @@
  */
 
 
-#include "entropy.h"
+#include "vp9_entropy.h"
 
 /* *** GENERATED FILE: DO NOT EDIT *** */
 
diff --git a/vp9/common/debugmodes.c b/vp9/common/vp9_debugmodes.c
similarity index 99%
rename from vp9/common/debugmodes.c
rename to vp9/common/vp9_debugmodes.c
index 5cd84c51bfcc46b4ce5c30e638cdc97af9b731d5..058abb57e1b12324bdf0e5bc3d538fbdce0f06e7 100644
--- a/vp9/common/debugmodes.c
+++ b/vp9/common/vp9_debugmodes.c
@@ -9,7 +9,7 @@
  */
 
 #include <stdio.h>
-#include "blockd.h"
+#include "vp9_blockd.h"
 
 void vp9_print_modes_and_motion_vectors(MODE_INFO *mi, int rows, int cols,
                                         int frame) {
diff --git a/vp9/common/default_coef_probs.h b/vp9/common/vp9_default_coef_probs.h
similarity index 99%
rename from vp9/common/default_coef_probs.h
rename to vp9/common/vp9_default_coef_probs.h
index 4caf8818ddfdad379ac74d6b2b6ddd428d640f75..52fb02f36af34ef5fbcfb8c421fb992544264eb3 100644
--- a/vp9/common/default_coef_probs.h
+++ b/vp9/common/vp9_default_coef_probs.h
@@ -9,7 +9,7 @@
 */
 
 
-/*Generated file, included by entropy.c*/
+/*Generated file, included by vp9_entropy.c*/
 
 
 static const vp9_prob default_coef_probs [BLOCK_TYPES]
diff --git a/vp9/common/entropy.c b/vp9/common/vp9_entropy.c
similarity index 99%
rename from vp9/common/entropy.c
rename to vp9/common/vp9_entropy.c
index a4ecae09fdb293e2c48f39cd79d139762a45ed38..e6ee2729e2b7b644f688414cdb21f75ce8da8d0a 100644
--- a/vp9/common/entropy.c
+++ b/vp9/common/vp9_entropy.c
@@ -11,11 +11,11 @@
 
 #include <stdio.h>
 
-#include "entropy.h"
+#include "vp9_entropy.h"
 #include "string.h"
-#include "blockd.h"
-#include "onyxc_int.h"
-#include "entropymode.h"
+#include "vp9_blockd.h"
+#include "vp9_onyxc_int.h"
+#include "vp9_entropymode.h"
 #include "vpx_mem/vpx_mem.h"
 
 #define uchar unsigned char     /* typedefs can clash */
@@ -26,7 +26,7 @@ typedef const uint cuint;
 
 typedef vp9_prob Prob;
 
-#include "coefupdateprobs.h"
+#include "vp9_coefupdateprobs.h"
 
 const int vp9_i8x8_block[4] = {0, 2, 8, 10};
 
@@ -200,7 +200,7 @@ vp9_extra_bit_struct vp9_extra_bits[12] = {
   { 0, 0, 0, 0}
 };
 
-#include "default_coef_probs.h"
+#include "vp9_default_coef_probs.h"
 
 void vp9_default_coef_probs(VP9_COMMON *pc) {
   vpx_memcpy(pc->fc.coef_probs, default_coef_probs,
diff --git a/vp9/common/entropy.h b/vp9/common/vp9_entropy.h
similarity index 97%
rename from vp9/common/entropy.h
rename to vp9/common/vp9_entropy.h
index fa24a058e568baea29a1e7571f3c65b37ca938de..a2053609b9a40de1a0a4c0d6ab7d259ede44a8b6 100644
--- a/vp9/common/entropy.h
+++ b/vp9/common/vp9_entropy.h
@@ -12,10 +12,10 @@
 #ifndef __INC_ENTROPY_H
 #define __INC_ENTROPY_H
 
-#include "treecoder.h"
-#include "blockd.h"
-#include "common.h"
-#include "coefupdateprobs.h"
+#include "vp9_treecoder.h"
+#include "vp9_blockd.h"
+#include "vp9_common.h"
+#include "vp9_coefupdateprobs.h"
 
 extern const int vp9_i8x8_block[4];
 
diff --git a/vp9/common/entropymode.c b/vp9/common/vp9_entropymode.c
similarity index 99%
rename from vp9/common/entropymode.c
rename to vp9/common/vp9_entropymode.c
index 5d33369163b064496c9815280d29c26d878bc0a8..69acbab021d0ec6aeb32e2a1a34d9813564e94b0 100644
--- a/vp9/common/entropymode.c
+++ b/vp9/common/vp9_entropymode.c
@@ -9,8 +9,8 @@
  */
 
 
-#include "onyxc_int.h"
-#include "modecont.h"
+#include "vp9_onyxc_int.h"
+#include "vp9_modecont.h"
 #include "vpx_mem/vpx_mem.h"
 
 
@@ -519,7 +519,7 @@ void vp9_update_mode_context(VP9_COMMON *pc) {
 }
 
 #ifdef MODE_STATS
-#include "vp9/common/modecont.h"
+#include "vp9/common/vp9_modecont.h"
 void print_mode_contexts(VP9_COMMON *pc) {
   int j, i;
   printf("\n====================\n");
diff --git a/vp9/common/entropymode.h b/vp9/common/vp9_entropymode.h
similarity index 98%
rename from vp9/common/entropymode.h
rename to vp9/common/vp9_entropymode.h
index 9f20ae94d8b5fd0c1212389112c3b99675477f79..aee6e6c7621534598cf1e8dc0a6756c836008636 100644
--- a/vp9/common/entropymode.h
+++ b/vp9/common/vp9_entropymode.h
@@ -12,8 +12,8 @@
 #ifndef __INC_ENTROPYMODE_H
 #define __INC_ENTROPYMODE_H
 
-#include "blockd.h"
-#include "treecoder.h"
+#include "vp9_blockd.h"
+#include "vp9_treecoder.h"
 
 #define SUBMVREF_COUNT 5
 #define VP9_NUMMBSPLITS 4
diff --git a/vp9/common/entropymv.c b/vp9/common/vp9_entropymv.c
similarity index 99%
rename from vp9/common/entropymv.c
rename to vp9/common/vp9_entropymv.c
index 85c21ba2abac2528fb2459d95deae8ccd2577134..8d2ebebc487396957c9a98a09d800f29139afe66 100644
--- a/vp9/common/entropymv.c
+++ b/vp9/common/vp9_entropymv.c
@@ -9,8 +9,8 @@
  */
 
 
-#include "onyxc_int.h"
-#include "entropymv.h"
+#include "vp9_onyxc_int.h"
+#include "vp9_entropymv.h"
 
 //#define MV_COUNT_TESTING
 
diff --git a/vp9/common/entropymv.h b/vp9/common/vp9_entropymv.h
similarity index 98%
rename from vp9/common/entropymv.h
rename to vp9/common/vp9_entropymv.h
index 7a5fadff1fd4bf2715db2420926529b4725a41a0..3be95117ce0a82446ddfda79ab64676a8c994d9b 100644
--- a/vp9/common/entropymv.h
+++ b/vp9/common/vp9_entropymv.h
@@ -12,9 +12,9 @@
 #ifndef __INC_ENTROPYMV_H
 #define __INC_ENTROPYMV_H
 
-#include "treecoder.h"
+#include "vp9_treecoder.h"
 #include "vpx_config.h"
-#include "blockd.h"
+#include "vp9_blockd.h"
 
 struct VP9Common;
 
diff --git a/vp9/common/extend.c b/vp9/common/vp9_extend.c
similarity index 99%
rename from vp9/common/extend.c
rename to vp9/common/vp9_extend.c
index ad3b89b44757358c8a071d12f6b529d3354cc856..4f2aa0e0ce83083386d6b484f31f04c48bf72d0b 100644
--- a/vp9/common/extend.c
+++ b/vp9/common/vp9_extend.c
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "extend.h"
+#include "vp9_extend.h"
 #include "vpx_mem/vpx_mem.h"
 
 static void copy_and_extend_plane(unsigned char *s, /* source */
diff --git a/vp9/common/extend.h b/vp9/common/vp9_extend.h
similarity index 100%
rename from vp9/common/extend.h
rename to vp9/common/vp9_extend.h
diff --git a/vp9/common/filter.c b/vp9/common/vp9_filter.c
similarity index 99%
rename from vp9/common/filter.c
rename to vp9/common/vp9_filter.c
index 429f408c7a0ea9c201a75c2b3f316210ab4e3a89..8d5eb9333b96e6805ebc9c03fa07d130a2ed8e25 100644
--- a/vp9/common/filter.c
+++ b/vp9/common/vp9_filter.c
@@ -10,7 +10,7 @@
 
 
 #include <stdlib.h>
-#include "filter.h"
+#include "vp9_filter.h"
 #include "vpx_ports/mem.h"
 #include "vp9_rtcd.h"
 
diff --git a/vp9/common/filter.h b/vp9/common/vp9_filter.h
similarity index 100%
rename from vp9/common/filter.h
rename to vp9/common/vp9_filter.h
diff --git a/vp9/common/findnearmv.c b/vp9/common/vp9_findnearmv.c
similarity index 99%
rename from vp9/common/findnearmv.c
rename to vp9/common/vp9_findnearmv.c
index a551db81021fe9688918411e4964ea109fbc6c98..bfbac4e1876e8a778a7176c17799cac3e8175221 100644
--- a/vp9/common/findnearmv.c
+++ b/vp9/common/vp9_findnearmv.c
@@ -9,9 +9,9 @@
  */
 
 
-#include "findnearmv.h"
-#include "vp9/common/sadmxn.h"
-#include "vp9/common/subpelvar.h"
+#include "vp9_findnearmv.h"
+#include "vp9/common/vp9_sadmxn.h"
+#include "vp9/common/vp9_subpelvar.h"
 #include <limits.h>
 
 const unsigned char vp9_mbsplit_offset[4][16] = {
diff --git a/vp9/common/findnearmv.h b/vp9/common/vp9_findnearmv.h
similarity index 98%
rename from vp9/common/findnearmv.h
rename to vp9/common/vp9_findnearmv.h
index 4e6418a51296b7a2524964bc0a56c2fee1789a26..759bdbaff74c027e031f8a2ac2ae20ab1f21391b 100644
--- a/vp9/common/findnearmv.h
+++ b/vp9/common/vp9_findnearmv.h
@@ -12,10 +12,10 @@
 #ifndef __INC_FINDNEARMV_H
 #define __INC_FINDNEARMV_H
 
-#include "mv.h"
-#include "blockd.h"
-#include "treecoder.h"
-#include "onyxc_int.h"
+#include "vp9_mv.h"
+#include "vp9_blockd.h"
+#include "vp9_treecoder.h"
+#include "vp9_onyxc_int.h"
 
 /* check a list of motion vectors by sad score using a number rows of pixels
  * above and a number cols of pixels in the left to select the one with best
diff --git a/vp9/common/header.h b/vp9/common/vp9_header.h
similarity index 100%
rename from vp9/common/header.h
rename to vp9/common/vp9_header.h
diff --git a/vp9/common/idctllm.c b/vp9/common/vp9_idctllm.c
similarity index 99%
rename from vp9/common/idctllm.c
rename to vp9/common/vp9_idctllm.c
index 55b7a8571c46103e1fe391bf89827eba3fd39c50..9d559ed228086d4c5b0aae0a29cb91d93c53fc9d 100644
--- a/vp9/common/idctllm.c
+++ b/vp9/common/vp9_idctllm.c
@@ -25,9 +25,9 @@
 #include <assert.h>
 #include <math.h>
 #include "vpx_ports/config.h"
-#include "vp9/common/systemdependent.h"
+#include "vp9/common/vp9_systemdependent.h"
 
-#include "vp9/common/blockd.h"
+#include "vp9/common/vp9_blockd.h"
 
 static const int cospi8sqrt2minus1 = 20091;
 static const int sinpi8sqrt2      = 35468;
diff --git a/vp9/common/implicit_segmentation.c b/vp9/common/vp9_implicit_segmentation.c
similarity index 99%
rename from vp9/common/implicit_segmentation.c
rename to vp9/common/vp9_implicit_segmentation.c
index 9194e2a308ef7a850b0eb3c5bbd7afe564097201..472c3d1a5675ca90444d312bc03b57b53b316acf 100644
--- a/vp9/common/implicit_segmentation.c
+++ b/vp9/common/vp9_implicit_segmentation.c
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "vp9/common/onyxc_int.h"
+#include "vp9/common/vp9_onyxc_int.h"
 
 #define MAX_REGIONS 24000
 #ifndef NULL
diff --git a/vp9/common/invtrans.c b/vp9/common/vp9_invtrans.c
similarity index 99%
rename from vp9/common/invtrans.c
rename to vp9/common/vp9_invtrans.c
index ac5553e6eb70caee9b41844f7bab365e01f3710e..76eb10307855d1c27665259e179bfa36bd1b99f4 100644
--- a/vp9/common/invtrans.c
+++ b/vp9/common/vp9_invtrans.c
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "invtrans.h"
+#include "vp9_invtrans.h"
 #include "./vp9_rtcd.h"
 
 static void recon_dcblock(MACROBLOCKD *xd) {
diff --git a/vp9/common/invtrans.h b/vp9/common/vp9_invtrans.h
similarity index 98%
rename from vp9/common/invtrans.h
rename to vp9/common/vp9_invtrans.h
index 58dc4d7043f706f07f3077280a5e30fdc3342025..0e50c45d7614981f87f9d5b755fc55d845f1ced1 100644
--- a/vp9/common/invtrans.h
+++ b/vp9/common/vp9_invtrans.h
@@ -12,7 +12,7 @@
 #define __INC_INVTRANS_H
 
 #include "vpx_ports/config.h"
-#include "blockd.h"
+#include "vp9_blockd.h"
 
 extern void vp9_inverse_transform_b_4x4(MACROBLOCKD *xd, int block, int pitch);
 
diff --git a/vp9/common/loopfilter.c b/vp9/common/vp9_loopfilter.c
similarity index 99%
rename from vp9/common/loopfilter.c
rename to vp9/common/vp9_loopfilter.c
index 0d295c66a765ca690406cddd80e10c10d6e72773..73b34397407441ee758903b7b54ea7bdcf3e8008 100644
--- a/vp9/common/loopfilter.c
+++ b/vp9/common/vp9_loopfilter.c
@@ -9,11 +9,11 @@
  */
 
 #include "vpx_config.h"
-#include "loopfilter.h"
-#include "onyxc_int.h"
+#include "vp9_loopfilter.h"
+#include "vp9_onyxc_int.h"
 #include "vpx_mem/vpx_mem.h"
 
-#include "vp9/common/seg_common.h"
+#include "vp9/common/vp9_seg_common.h"
 
 static void lf_init_lut(loop_filter_info_n *lfi) {
   int filt_lvl;
diff --git a/vp9/common/loopfilter.h b/vp9/common/vp9_loopfilter.h
similarity index 97%
rename from vp9/common/loopfilter.h
rename to vp9/common/vp9_loopfilter.h
index 0b7de682c176340d701e929cb2920edf34717ff5..b3254f6922e0d5cba96fb85ad76f35b348839e83 100644
--- a/vp9/common/loopfilter.h
+++ b/vp9/common/vp9_loopfilter.h
@@ -13,7 +13,7 @@
 
 #include "vpx_ports/mem.h"
 #include "vpx_config.h"
-#include "blockd.h"
+#include "vp9_blockd.h"
 
 #define MAX_LOOP_FILTER 63
 
@@ -64,11 +64,11 @@ struct loop_filter_info {
   void sym(unsigned char *y, int ystride, const unsigned char *blimit)
 
 #if ARCH_X86 || ARCH_X86_64
-#include "x86/loopfilter_x86.h"
+#include "x86/vp9_loopfilter_x86.h"
 #endif
 
 #if ARCH_ARM
-#include "arm/loopfilter_arm.h"
+#include "arm/vp9_loopfilter_arm.h"
 #endif
 
 typedef void loop_filter_uvfunction(unsigned char *u,   /* source pointer */
diff --git a/vp9/common/loopfilter_filters.c b/vp9/common/vp9_loopfilter_filters.c
similarity index 99%
rename from vp9/common/loopfilter_filters.c
rename to vp9/common/vp9_loopfilter_filters.c
index c719b44c320360c532c9b32a504088ce9641eed0..9fd6c5fa697b4b9e0bd8de914d5224498553ef0b 100644
--- a/vp9/common/loopfilter_filters.c
+++ b/vp9/common/vp9_loopfilter_filters.c
@@ -10,8 +10,8 @@
 
 #include <stdlib.h>
 #include "vpx_config.h"
-#include "loopfilter.h"
-#include "onyxc_int.h"
+#include "vp9_loopfilter.h"
+#include "vp9_onyxc_int.h"
 
 typedef unsigned char uc;
 
diff --git a/vp9/common/maskingmv.c b/vp9/common/vp9_maskingmv.c
similarity index 99%
rename from vp9/common/maskingmv.c
rename to vp9/common/vp9_maskingmv.c
index 05cfb4a46f22c69ae20f23f9c0700f3c8096f950..f1151e3dc2132f0233005a6dfa33cabaa8934f3b 100644
--- a/vp9/common/maskingmv.c
+++ b/vp9/common/vp9_maskingmv.c
@@ -1,6 +1,6 @@
 /*
  ============================================================================
- Name        : maskingmv.c
+ Name        : vp9_maskingmv.c
  Author      : jimbankoski
  Version     :
  Copyright   : Your copyright notice
diff --git a/vp9/common/mbpitch.c b/vp9/common/vp9_mbpitch.c
similarity index 99%
rename from vp9/common/mbpitch.c
rename to vp9/common/vp9_mbpitch.c
index 5ef4dd6183e75ee0ea0bb63a57ab1a951c92e78d..b42db987ada14a52d1dd3aa8da62e0d875a2d6eb 100644
--- a/vp9/common/mbpitch.c
+++ b/vp9/common/vp9_mbpitch.c
@@ -9,7 +9,7 @@
  */
 
 
-#include "blockd.h"
+#include "vp9_blockd.h"
 
 typedef enum {
   PRED = 0,
diff --git a/vp9/common/modecont.c b/vp9/common/vp9_modecont.c
similarity index 98%
rename from vp9/common/modecont.c
rename to vp9/common/vp9_modecont.c
index 1a71eceb513d1eb7e4570a222ca48d11c753f295..2f5bbd2bac0935e97a084a20f7ae2b34efd9dc04 100644
--- a/vp9/common/modecont.c
+++ b/vp9/common/vp9_modecont.c
@@ -9,7 +9,7 @@
  */
 
 
-#include "entropy.h"
+#include "vp9_entropy.h"
 
 const int vp9_default_mode_contexts[INTER_MODE_CONTEXTS][4] = {
   {223,     1,     1,    237},  // 0,0 best: Only candidate
diff --git a/vp9/common/modecont.h b/vp9/common/vp9_modecont.h
similarity index 100%
rename from vp9/common/modecont.h
rename to vp9/common/vp9_modecont.h
diff --git a/vp9/common/modecontext.c b/vp9/common/vp9_modecontext.c
similarity index 99%
rename from vp9/common/modecontext.c
rename to vp9/common/vp9_modecontext.c
index 52249860928f3ad81370d8afcd3c7a25e497a691..e18cf63c1e1f85b674cf8b065661469eabdefa84 100644
--- a/vp9/common/modecontext.c
+++ b/vp9/common/vp9_modecontext.c
@@ -9,7 +9,7 @@
  */
 
 
-#include "entropymode.h"
+#include "vp9_entropymode.h"
 
 const unsigned int vp9_kf_default_bmode_counts[VP9_KF_BINTRAMODES]
                                               [VP9_KF_BINTRAMODES]
diff --git a/vp9/common/mv.h b/vp9/common/vp9_mv.h
similarity index 100%
rename from vp9/common/mv.h
rename to vp9/common/vp9_mv.h
diff --git a/vp9/common/mvref_common.c b/vp9/common/vp9_mvref_common.c
similarity index 99%
rename from vp9/common/mvref_common.c
rename to vp9/common/vp9_mvref_common.c
index ebb8fa4bd37930778a5f1f184a9c41fa5870afaa..33dc3fa5b69bdde37894988a9ceb5401ed5aa9f9 100644
--- a/vp9/common/mvref_common.c
+++ b/vp9/common/vp9_mvref_common.c
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "mvref_common.h"
+#include "vp9_mvref_common.h"
 
 #define MVREF_NEIGHBOURS 8
 static int mb_mv_ref_search[MVREF_NEIGHBOURS][2] = {
diff --git a/vp9/common/mvref_common.h b/vp9/common/vp9_mvref_common.h
similarity index 92%
rename from vp9/common/mvref_common.h
rename to vp9/common/vp9_mvref_common.h
index 06050406b504912ec4551424e7d78e4242e72461..9a1877919c62eb63f9f45afe920f418573d646de 100644
--- a/vp9/common/mvref_common.h
+++ b/vp9/common/vp9_mvref_common.h
@@ -8,8 +8,8 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "onyxc_int.h"
-#include "blockd.h"
+#include "vp9_onyxc_int.h"
+#include "vp9_blockd.h"
 
 
 #ifndef __INC_MVREF_COMMON_H
diff --git a/vp9/common/onyx.h b/vp9/common/vp9_onyx.h
similarity index 99%
rename from vp9/common/onyx.h
rename to vp9/common/vp9_onyx.h
index 0f84e8cec36caf298969c3b97c8f61baf18cce76..92ec667e7c04cab3a706c5a8927ae8c96359270e 100644
--- a/vp9/common/onyx.h
+++ b/vp9/common/vp9_onyx.h
@@ -20,8 +20,8 @@ extern "C"
 #include "vpx/internal/vpx_codec_internal.h"
 #include "vpx/vp8cx.h"
 #include "vpx_scale/yv12config.h"
-#include "type_aliases.h"
-#include "ppflags.h"
+#include "vp9_type_aliases.h"
+#include "vp9_ppflags.h"
   typedef int *VP9_PTR;
 
   /* Create/destroy static data structures. */
diff --git a/vp9/common/onyxc_int.h b/vp9/common/vp9_onyxc_int.h
similarity index 98%
rename from vp9/common/onyxc_int.h
rename to vp9/common/vp9_onyxc_int.h
index 27a6ca1324e9e108dd1d97f57da9a1a5abb2bab8..18750e76736b8c6dea5d1bfa2c9dee0b4f520fd5 100644
--- a/vp9/common/onyxc_int.h
+++ b/vp9/common/vp9_onyxc_int.h
@@ -15,16 +15,16 @@
 #include "vpx_config.h"
 #include "vpx/internal/vpx_codec_internal.h"
 #include "vp9_rtcd.h"
-#include "loopfilter.h"
-#include "entropymv.h"
-#include "entropy.h"
-#include "entropymode.h"
+#include "vp9_loopfilter.h"
+#include "vp9_entropymv.h"
+#include "vp9_entropy.h"
+#include "vp9_entropymode.h"
 #if CONFIG_POSTPROC
-#include "postproc.h"
+#include "vp9_postproc.h"
 #endif
 
 /*#ifdef PACKET_TESTING*/
-#include "header.h"
+#include "vp9_header.h"
 /*#endif*/
 
 /* Create/destroy static data structures. */
diff --git a/vp9/common/onyxd.h b/vp9/common/vp9_onyxd.h
similarity index 97%
rename from vp9/common/onyxd.h
rename to vp9/common/vp9_onyxd.h
index 7b7662b3c94bed293ef7a435b346067c1b4fa398..2fc51db96e885831383f652e5db717c5afe33eaa 100644
--- a/vp9/common/onyxd.h
+++ b/vp9/common/vp9_onyxd.h
@@ -18,9 +18,9 @@
 extern "C"
 {
 #endif
-#include "type_aliases.h"
+#include "vp9_type_aliases.h"
 #include "vpx_scale/yv12config.h"
-#include "ppflags.h"
+#include "vp9_ppflags.h"
 #include "vpx_ports/mem.h"
 #include "vpx/vpx_codec.h"
 
diff --git a/vp9/common/postproc.c b/vp9/common/vp9_postproc.c
similarity index 99%
rename from vp9/common/postproc.c
rename to vp9/common/vp9_postproc.c
index 4c5748e7af19ca7c35607f521a92597a0f3112f9..5752fbd8240217dde8e7806cee0bfdeae8e10f24 100644
--- a/vp9/common/postproc.c
+++ b/vp9/common/vp9_postproc.c
@@ -11,10 +11,10 @@
 
 #include "vpx_ports/config.h"
 #include "vpx_scale/yv12config.h"
-#include "postproc.h"
-#include "vp9/common/textblit.h"
+#include "vp9_postproc.h"
+#include "vp9/common/vp9_textblit.h"
 #include "vpx_scale/vpxscale.h"
-#include "systemdependent.h"
+#include "vp9_systemdependent.h"
 
 #include <math.h>
 #include <stdlib.h>
diff --git a/vp9/common/postproc.h b/vp9/common/vp9_postproc.h
similarity index 98%
rename from vp9/common/postproc.h
rename to vp9/common/vp9_postproc.h
index f43a8f08a7f1c64278ad502892a7b3cd9ff386ce..bf56b5692e9f37b80779fd5ba252f5f3413b48e7 100644
--- a/vp9/common/postproc.h
+++ b/vp9/common/vp9_postproc.h
@@ -37,7 +37,7 @@
            int y1, int u1, int v1, int alpha, int stride)
 
 #if ARCH_X86 || ARCH_X86_64
-#include "x86/postproc_x86.h"
+#include "x86/vp9_postproc_x86.h"
 #endif
 
 #ifndef vp9_postproc_down
@@ -106,8 +106,8 @@ struct postproc_state {
   DECLARE_ALIGNED(16, char, whiteclamp[16]);
   DECLARE_ALIGNED(16, char, bothclamp[16]);
 };
-#include "onyxc_int.h"
-#include "ppflags.h"
+#include "vp9_onyxc_int.h"
+#include "vp9_ppflags.h"
 int vp9_post_proc_frame(struct VP9Common *oci, YV12_BUFFER_CONFIG *dest,
                         vp9_ppflags_t *flags);
 
diff --git a/vp9/common/ppflags.h b/vp9/common/vp9_ppflags.h
similarity index 100%
rename from vp9/common/ppflags.h
rename to vp9/common/vp9_ppflags.h
diff --git a/vp9/common/pragmas.h b/vp9/common/vp9_pragmas.h
similarity index 100%
rename from vp9/common/pragmas.h
rename to vp9/common/vp9_pragmas.h
diff --git a/vp9/common/pred_common.c b/vp9/common/vp9_pred_common.c
similarity index 99%
rename from vp9/common/pred_common.c
rename to vp9/common/vp9_pred_common.c
index d779c641dfe97c220434225b774c2cecba860bc6..cb65d72828dd8ff9e45bd554d6624905310e0743 100644
--- a/vp9/common/pred_common.c
+++ b/vp9/common/vp9_pred_common.c
@@ -9,8 +9,8 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "vp9/common/pred_common.h"
-#include "vp9/common/seg_common.h"
+#include "vp9/common/vp9_pred_common.h"
+#include "vp9/common/vp9_seg_common.h"
 
 // TBD prediction functions for various bitstream signals
 
diff --git a/vp9/common/pred_common.h b/vp9/common/vp9_pred_common.h
similarity index 95%
rename from vp9/common/pred_common.h
rename to vp9/common/vp9_pred_common.h
index 33656f23ab09bc422a6e42e382930888a0cff591..2628bb3cac3ab849fe4c08fc1a895d6a79746fda 100644
--- a/vp9/common/pred_common.h
+++ b/vp9/common/vp9_pred_common.h
@@ -8,9 +8,9 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "type_aliases.h"
-#include "onyxc_int.h"
-#include "vp9/common/blockd.h"
+#include "vp9_type_aliases.h"
+#include "vp9_onyxc_int.h"
+#include "vp9/common/vp9_blockd.h"
 
 #ifndef __INC_PRED_COMMON_H__
 #define __INC_PRED_COMMON_H__ 1
diff --git a/vp9/common/quant_common.c b/vp9/common/vp9_quant_common.c
similarity index 98%
rename from vp9/common/quant_common.c
rename to vp9/common/vp9_quant_common.c
index 720b271134b9334f650bfbd0824eba34322dd6fd..5d1f2594ad47a923faff6220aca021d7570f9346 100644
--- a/vp9/common/quant_common.c
+++ b/vp9/common/vp9_quant_common.c
@@ -9,7 +9,7 @@
  */
 
 
-#include "quant_common.h"
+#include "vp9_quant_common.h"
 
 static int dc_qlookup[QINDEX_RANGE];
 static int ac_qlookup[QINDEX_RANGE];
diff --git a/vp9/common/quant_common.h b/vp9/common/vp9_quant_common.h
similarity index 93%
rename from vp9/common/quant_common.h
rename to vp9/common/vp9_quant_common.h
index 2978dd8a2ce979ac34473d27c1ed45a5d303b17d..88588d5d2fdbaa2f6b6f29fc012afa60d23b098c 100644
--- a/vp9/common/quant_common.h
+++ b/vp9/common/vp9_quant_common.h
@@ -10,8 +10,8 @@
 
 
 #include "string.h"
-#include "blockd.h"
-#include "onyxc_int.h"
+#include "vp9_blockd.h"
+#include "vp9_onyxc_int.h"
 
 extern void vp9_init_quant_tables();
 extern int vp9_ac_yquant(int QIndex);
diff --git a/vp9/common/recon.c b/vp9/common/vp9_recon.c
similarity index 99%
rename from vp9/common/recon.c
rename to vp9/common/vp9_recon.c
index 77035668e8d90111f2e923980ae8e85485328a82..9c9029f2ad564106effe48369c6316809ffb3aeb 100644
--- a/vp9/common/recon.c
+++ b/vp9/common/vp9_recon.c
@@ -11,7 +11,7 @@
 
 #include "vpx_ports/config.h"
 #include "vp9_rtcd.h"
-#include "blockd.h"
+#include "vp9_blockd.h"
 
 void vp9_recon_b_c
 (
diff --git a/vp9/common/reconinter.c b/vp9/common/vp9_reconinter.c
similarity index 99%
rename from vp9/common/reconinter.c
rename to vp9/common/vp9_reconinter.c
index 37478f71e85abd5ea54ae9ca55190482c55683a9..eac07ae19d44d05db27d0fa36bb3dacd874e5420 100644
--- a/vp9/common/reconinter.c
+++ b/vp9/common/vp9_reconinter.c
@@ -11,11 +11,11 @@
 
 #include "vpx_ports/config.h"
 #include "vpx/vpx_integer.h"
-#include "blockd.h"
-#include "reconinter.h"
-#include "vp9/common/reconintra.h"
+#include "vp9_blockd.h"
+#include "vp9_reconinter.h"
+#include "vp9/common/vp9_reconintra.h"
 #if CONFIG_RUNTIME_CPU_DETECT
-#include "onyxc_int.h"
+#include "vp9_onyxc_int.h"
 #endif
 
 void vp9_setup_interp_filters(MACROBLOCKD *xd,
@@ -368,7 +368,7 @@ void filter_mb(unsigned char *src, int src_stride,
   }
 }
 #else
-// Based on vp9_post_proc_down_and_across_c (postproc.c)
+// Based on vp9_post_proc_down_and_across_c (vp9_postproc.c)
 void filter_mb(unsigned char *src, int src_stride,
                unsigned char *dst, int dst_stride,
                int width, int height) {
diff --git a/vp9/common/reconinter.h b/vp9/common/vp9_reconinter.h
similarity index 99%
rename from vp9/common/reconinter.h
rename to vp9/common/vp9_reconinter.h
index ad1cf9197b0c526f1e64594dd7b3c986a5cc709d..25a8adc3b2cbdeead8f41786ac963129ff7a6c95 100644
--- a/vp9/common/reconinter.h
+++ b/vp9/common/vp9_reconinter.h
@@ -11,7 +11,7 @@
 #ifndef __INC_RECONINTER_H
 #define __INC_RECONINTER_H
 
-#include "onyxc_int.h"
+#include "vp9_onyxc_int.h"
 
 extern void vp9_build_1st_inter16x16_predictors_mby(MACROBLOCKD *xd,
                                                     unsigned char *dst_y,
diff --git a/vp9/common/reconintra.c b/vp9/common/vp9_reconintra.c
similarity index 99%
rename from vp9/common/reconintra.c
rename to vp9/common/vp9_reconintra.c
index 89533c7aed7ccbb810758c08a8eec3306883e859..8199b94aefef7bc263398a5e920a7601f61cff67 100644
--- a/vp9/common/reconintra.c
+++ b/vp9/common/vp9_reconintra.c
@@ -11,7 +11,7 @@
 #include <stdio.h>
 #include "vpx_ports/config.h"
 #include "vp9_rtcd.h"
-#include "reconintra.h"
+#include "vp9_reconintra.h"
 #include "vpx_mem/vpx_mem.h"
 
 /* For skip_recon_mb(), add vp9_build_intra_predictors_mby_s(MACROBLOCKD *xd)
diff --git a/vp9/common/reconintra.h b/vp9/common/vp9_reconintra.h
similarity index 98%
rename from vp9/common/reconintra.h
rename to vp9/common/vp9_reconintra.h
index c72e8e912bf68d6adec2880f4ac73651fc403be4..dd35b06ad6ed2916709d01d03c19bfce336d1279 100644
--- a/vp9/common/reconintra.h
+++ b/vp9/common/vp9_reconintra.h
@@ -11,7 +11,7 @@
 #ifndef __INC_RECONINTRA_H
 #define __INC_RECONINTRA_H
 
-#include "blockd.h"
+#include "vp9_blockd.h"
 
 extern void vp9_recon_intra_mbuv(MACROBLOCKD *xd);
 extern B_PREDICTION_MODE vp9_find_dominant_direction(unsigned char *ptr,
diff --git a/vp9/common/reconintra4x4.c b/vp9/common/vp9_reconintra4x4.c
similarity index 99%
rename from vp9/common/reconintra4x4.c
rename to vp9/common/vp9_reconintra4x4.c
index 1cf960cb72c9c0651399f92512bd9cf2fa41bd90..d5203acd0a79b98a31bbe50dcaa676f9a35e1764 100644
--- a/vp9/common/reconintra4x4.c
+++ b/vp9/common/vp9_reconintra4x4.c
@@ -11,7 +11,7 @@
 
 #include "vpx_ports/config.h"
 #include "vpx_mem/vpx_mem.h"
-#include "reconintra.h"
+#include "vp9_reconintra.h"
 #include "vp9_rtcd.h"
 
 #if CONFIG_NEWBINTRAMODES
diff --git a/vp9/common/reconintra4x4.h b/vp9/common/vp9_reconintra4x4.h
similarity index 100%
rename from vp9/common/reconintra4x4.h
rename to vp9/common/vp9_reconintra4x4.h
diff --git a/vp9/common/rtcd.c b/vp9/common/vp9_rtcd.c
similarity index 100%
rename from vp9/common/rtcd.c
rename to vp9/common/vp9_rtcd.c
diff --git a/vp9/common/rtcd_defs.sh b/vp9/common/vp9_rtcd_defs.sh
similarity index 100%
rename from vp9/common/rtcd_defs.sh
rename to vp9/common/vp9_rtcd_defs.sh
diff --git a/vp9/common/sadmxn.h b/vp9/common/vp9_sadmxn.h
similarity index 100%
rename from vp9/common/sadmxn.h
rename to vp9/common/vp9_sadmxn.h
diff --git a/vp9/common/seg_common.c b/vp9/common/vp9_seg_common.c
similarity index 98%
rename from vp9/common/seg_common.c
rename to vp9/common/vp9_seg_common.c
index 0ca55ffd8d2169439a532c8e8e4e9a3bf5f8d1d5..6ac27e396bf44a3f79d05ed8a8a78f7a69350bfa 100644
--- a/vp9/common/seg_common.c
+++ b/vp9/common/vp9_seg_common.c
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "vp9/common/seg_common.h"
+#include "vp9/common/vp9_seg_common.h"
 
 static const int segfeaturedata_signed[SEG_LVL_MAX] = { 1, 1, 0, 0, 0, 0 };
 static const int seg_feature_data_bits[SEG_LVL_MAX] =
diff --git a/vp9/common/seg_common.h b/vp9/common/vp9_seg_common.h
similarity index 95%
rename from vp9/common/seg_common.h
rename to vp9/common/vp9_seg_common.h
index 58edf1612d221ce4246849a398ff2dd40d63a8f2..fb0570c6bdd3fb12772f4890180ba2a531ff5582 100644
--- a/vp9/common/seg_common.h
+++ b/vp9/common/vp9_seg_common.h
@@ -8,9 +8,9 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "type_aliases.h"
-#include "onyxc_int.h"
-#include "vp9/common/blockd.h"
+#include "vp9_type_aliases.h"
+#include "vp9_onyxc_int.h"
+#include "vp9/common/vp9_blockd.h"
 
 #ifndef __INC_SEG_COMMON_H__
 #define __INC_SEG_COMMON_H__ 1
diff --git a/vp9/common/setupintrarecon.c b/vp9/common/vp9_setupintrarecon.c
similarity index 97%
rename from vp9/common/setupintrarecon.c
rename to vp9/common/vp9_setupintrarecon.c
index 9cb037228208a668b2668a67421c36059c75039f..3fe4e3e50e5e61cfa3d72f0494d26628761fd1ff 100644
--- a/vp9/common/setupintrarecon.c
+++ b/vp9/common/vp9_setupintrarecon.c
@@ -9,7 +9,7 @@
  */
 
 
-#include "setupintrarecon.h"
+#include "vp9_setupintrarecon.h"
 #include "vpx_mem/vpx_mem.h"
 
 void vp9_setup_intra_recon(YV12_BUFFER_CONFIG *ybf) {
diff --git a/vp9/common/setupintrarecon.h b/vp9/common/vp9_setupintrarecon.h
similarity index 100%
rename from vp9/common/setupintrarecon.h
rename to vp9/common/vp9_setupintrarecon.h
diff --git a/vp9/common/subpelvar.h b/vp9/common/vp9_subpelvar.h
similarity index 99%
rename from vp9/common/subpelvar.h
rename to vp9/common/vp9_subpelvar.h
index 83cc2a7ce0caae0083cd1329ddbc44b11134ba65..b3c3fcdaf6278e0f43dfd56f92f34100cbe38419 100644
--- a/vp9/common/subpelvar.h
+++ b/vp9/common/vp9_subpelvar.h
@@ -9,7 +9,7 @@
  */
 
 
-#include "vp9/common/filter.h"
+#include "vp9/common/vp9_filter.h"
 
 
 
diff --git a/vp9/common/subpixel.h b/vp9/common/vp9_subpixel.h
similarity index 100%
rename from vp9/common/subpixel.h
rename to vp9/common/vp9_subpixel.h
diff --git a/vp9/common/swapyv12buffer.c b/vp9/common/vp9_swapyv12buffer.c
similarity index 96%
rename from vp9/common/swapyv12buffer.c
rename to vp9/common/vp9_swapyv12buffer.c
index 13fc8d4bc142c6a61357cba7253bde1425988e53..7882e0be0088c776cd3fc481a04339c02df73c59 100644
--- a/vp9/common/swapyv12buffer.c
+++ b/vp9/common/vp9_swapyv12buffer.c
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "swapyv12buffer.h"
+#include "vp9_swapyv12buffer.h"
 
 void vp9_swap_yv12_buffer(YV12_BUFFER_CONFIG *new_frame,
                           YV12_BUFFER_CONFIG *last_frame) {
diff --git a/vp9/common/swapyv12buffer.h b/vp9/common/vp9_swapyv12buffer.h
similarity index 100%
rename from vp9/common/swapyv12buffer.h
rename to vp9/common/vp9_swapyv12buffer.h
diff --git a/vp9/common/systemdependent.h b/vp9/common/vp9_systemdependent.h
similarity index 100%
rename from vp9/common/systemdependent.h
rename to vp9/common/vp9_systemdependent.h
diff --git a/vp9/common/tapify.py b/vp9/common/vp9_tapify.py
similarity index 100%
rename from vp9/common/tapify.py
rename to vp9/common/vp9_tapify.py
diff --git a/vp9/common/textblit.c b/vp9/common/vp9_textblit.c
similarity index 98%
rename from vp9/common/textblit.c
rename to vp9/common/vp9_textblit.c
index 601d298dc5572821b1868528805562c8afcdfdb4..52c6b87c628519cb1fd0483d9c8fdc03b1e2504b 100644
--- a/vp9/common/textblit.c
+++ b/vp9/common/vp9_textblit.c
@@ -10,7 +10,7 @@
 
 #include <stdlib.h>
 
-#include "vp9/common/textblit.h"
+#include "vp9/common/vp9_textblit.h"
 
 void vp9_blit_text(const char *msg, unsigned char *address, const int pitch) {
   int letter_bitmap;
diff --git a/vp9/common/textblit.h b/vp9/common/vp9_textblit.h
similarity index 100%
rename from vp9/common/textblit.h
rename to vp9/common/vp9_textblit.h
diff --git a/vp9/common/treecoder.c b/vp9/common/vp9_treecoder.c
similarity index 99%
rename from vp9/common/treecoder.c
rename to vp9/common/vp9_treecoder.c
index 39629406e20f30bcd015ad44f2968a2653b74a8d..096dd59e544a989a4dee5bbd7a6c16f66457c81e 100644
--- a/vp9/common/treecoder.c
+++ b/vp9/common/vp9_treecoder.c
@@ -16,7 +16,7 @@
 #endif
 #include <stdio.h>
 
-#include "treecoder.h"
+#include "vp9_treecoder.h"
 
 static void tree2tok(
   struct vp9_token_struct *const p,
diff --git a/vp9/common/treecoder.h b/vp9/common/vp9_treecoder.h
similarity index 100%
rename from vp9/common/treecoder.h
rename to vp9/common/vp9_treecoder.h
diff --git a/vp9/common/type_aliases.h b/vp9/common/vp9_type_aliases.h
similarity index 98%
rename from vp9/common/type_aliases.h
rename to vp9/common/vp9_type_aliases.h
index eda6a2ec2fcc0ce2e243629f1918abc3ab7c978b..91939ee1978ac4d43776a4007675046d0d257eee 100644
--- a/vp9/common/type_aliases.h
+++ b/vp9/common/vp9_type_aliases.h
@@ -11,7 +11,7 @@
 
 /****************************************************************************
 *
-*   Module Title :     type_aliases.h
+*   Module Title :     vp9_type_aliases.h
 *
 *   Description  :     Standard type aliases
 *
diff --git a/vp9/common/x86/filter_sse2.c b/vp9/common/x86/vp9_filter_sse2.c
similarity index 99%
rename from vp9/common/x86/filter_sse2.c
rename to vp9/common/x86/vp9_filter_sse2.c
index 92d0a2e5b0060f1e72fb3a458d887e889ecb1b4e..09f8de3849c08ec84bdaf9641e4fd91ad35ee069 100644
--- a/vp9/common/x86/filter_sse2.c
+++ b/vp9/common/x86/vp9_filter_sse2.c
@@ -10,7 +10,7 @@
 
 #include <assert.h> // for alignment checks
 #include <emmintrin.h> // SSE2
-#include "vp9/common/filter.h"
+#include "vp9/common/vp9_filter.h"
 #include "vpx_ports/mem.h" // for DECLARE_ALIGNED
 #include "vp9_rtcd.h"
 
diff --git a/vp9/common/x86/filter_sse4.c b/vp9/common/x86/vp9_filter_sse4.c
similarity index 99%
rename from vp9/common/x86/filter_sse4.c
rename to vp9/common/x86/vp9_filter_sse4.c
index 9efe9f44a4f6161aec4c43117ad4e8837fc3516e..52c35b29689d85f0e33778feaee08139772e2b01 100644
--- a/vp9/common/x86/filter_sse4.c
+++ b/vp9/common/x86/vp9_filter_sse4.c
@@ -10,7 +10,7 @@
 
 #include <assert.h> // for alignment checks
 #include <smmintrin.h> // SSE4.1
-#include "vp9/common/filter.h"
+#include "vp9/common/vp9_filter.h"
 #include "vpx_ports/mem.h" // for DECLARE_ALIGNED
 #include "vp9_rtcd.h"
 
diff --git a/vp9/common/x86/idct_x86.h b/vp9/common/x86/vp9_idct_x86.h
similarity index 100%
rename from vp9/common/x86/idct_x86.h
rename to vp9/common/x86/vp9_idct_x86.h
diff --git a/vp9/common/x86/idctllm_mmx.asm b/vp9/common/x86/vp9_idctllm_mmx.asm
similarity index 100%
rename from vp9/common/x86/idctllm_mmx.asm
rename to vp9/common/x86/vp9_idctllm_mmx.asm
diff --git a/vp9/common/x86/idctllm_sse2.asm b/vp9/common/x86/vp9_idctllm_sse2.asm
similarity index 100%
rename from vp9/common/x86/idctllm_sse2.asm
rename to vp9/common/x86/vp9_idctllm_sse2.asm
diff --git a/vp9/common/x86/iwalsh_mmx.asm b/vp9/common/x86/vp9_iwalsh_mmx.asm
similarity index 100%
rename from vp9/common/x86/iwalsh_mmx.asm
rename to vp9/common/x86/vp9_iwalsh_mmx.asm
diff --git a/vp9/common/x86/iwalsh_sse2.asm b/vp9/common/x86/vp9_iwalsh_sse2.asm
similarity index 100%
rename from vp9/common/x86/iwalsh_sse2.asm
rename to vp9/common/x86/vp9_iwalsh_sse2.asm
diff --git a/vp9/common/x86/loopfilter_mmx.asm b/vp9/common/x86/vp9_loopfilter_mmx.asm
similarity index 100%
rename from vp9/common/x86/loopfilter_mmx.asm
rename to vp9/common/x86/vp9_loopfilter_mmx.asm
diff --git a/vp9/common/x86/loopfilter_sse2.asm b/vp9/common/x86/vp9_loopfilter_sse2.asm
similarity index 100%
rename from vp9/common/x86/loopfilter_sse2.asm
rename to vp9/common/x86/vp9_loopfilter_sse2.asm
diff --git a/vp9/common/x86/loopfilter_x86.c b/vp9/common/x86/vp9_loopfilter_x86.c
similarity index 99%
rename from vp9/common/x86/loopfilter_x86.c
rename to vp9/common/x86/vp9_loopfilter_x86.c
index 1ce6540929d15ab97c2db583d943c03bb9fe3af3..af8bb69228dfe0cdcc0f1f8d1889cb88baceaa1c 100644
--- a/vp9/common/x86/loopfilter_x86.c
+++ b/vp9/common/x86/vp9_loopfilter_x86.c
@@ -10,7 +10,7 @@
 
 #include <emmintrin.h>  // SSE2
 #include "vpx_config.h"
-#include "vp9/common/loopfilter.h"
+#include "vp9/common/vp9_loopfilter.h"
 
 prototype_loopfilter(vp9_loop_filter_vertical_edge_mmx);
 prototype_loopfilter(vp9_loop_filter_horizontal_edge_mmx);
diff --git a/vp9/common/x86/loopfilter_x86.h b/vp9/common/x86/vp9_loopfilter_x86.h
similarity index 100%
rename from vp9/common/x86/loopfilter_x86.h
rename to vp9/common/x86/vp9_loopfilter_x86.h
diff --git a/vp9/common/x86/mask_sse3.asm b/vp9/common/x86/vp9_mask_sse3.asm
similarity index 100%
rename from vp9/common/x86/mask_sse3.asm
rename to vp9/common/x86/vp9_mask_sse3.asm
diff --git a/vp9/common/x86/postproc_mmx.asm b/vp9/common/x86/vp9_postproc_mmx.asm
similarity index 100%
rename from vp9/common/x86/postproc_mmx.asm
rename to vp9/common/x86/vp9_postproc_mmx.asm
diff --git a/vp9/common/x86/postproc_sse2.asm b/vp9/common/x86/vp9_postproc_sse2.asm
similarity index 100%
rename from vp9/common/x86/postproc_sse2.asm
rename to vp9/common/x86/vp9_postproc_sse2.asm
diff --git a/vp9/common/x86/postproc_x86.h b/vp9/common/x86/vp9_postproc_x86.h
similarity index 100%
rename from vp9/common/x86/postproc_x86.h
rename to vp9/common/x86/vp9_postproc_x86.h
diff --git a/vp9/common/x86/recon_mmx.asm b/vp9/common/x86/vp9_recon_mmx.asm
similarity index 100%
rename from vp9/common/x86/recon_mmx.asm
rename to vp9/common/x86/vp9_recon_mmx.asm
diff --git a/vp9/common/x86/recon_sse2.asm b/vp9/common/x86/vp9_recon_sse2.asm
similarity index 100%
rename from vp9/common/x86/recon_sse2.asm
rename to vp9/common/x86/vp9_recon_sse2.asm
diff --git a/vp9/common/x86/recon_wrapper_sse2.c b/vp9/common/x86/vp9_recon_wrapper_sse2.c
similarity index 99%
rename from vp9/common/x86/recon_wrapper_sse2.c
rename to vp9/common/x86/vp9_recon_wrapper_sse2.c
index d20e13871941af02f8112877c8e78d2a0f992b11..49b36dbd66f71b12c392c949a08535f998989f6a 100644
--- a/vp9/common/x86/recon_wrapper_sse2.c
+++ b/vp9/common/x86/vp9_recon_wrapper_sse2.c
@@ -10,7 +10,7 @@
 
 #include "vpx_ports/config.h"
 #include "vpx_mem/vpx_mem.h"
-#include "vp9/common/blockd.h"
+#include "vp9/common/vp9_blockd.h"
 
 #define build_intra_predictors_mbuv_prototype(sym) \
   void sym(unsigned char *dst, int dst_stride, \
diff --git a/vp9/common/x86/sadmxn_x86.c b/vp9/common/x86/vp9_sadmxn_x86.c
similarity index 100%
rename from vp9/common/x86/sadmxn_x86.c
rename to vp9/common/x86/vp9_sadmxn_x86.c
diff --git a/vp9/common/x86/subpixel_8t_ssse3.asm b/vp9/common/x86/vp9_subpixel_8t_ssse3.asm
similarity index 100%
rename from vp9/common/x86/subpixel_8t_ssse3.asm
rename to vp9/common/x86/vp9_subpixel_8t_ssse3.asm
diff --git a/vp9/common/x86/subpixel_mmx.asm b/vp9/common/x86/vp9_subpixel_mmx.asm
similarity index 100%
rename from vp9/common/x86/subpixel_mmx.asm
rename to vp9/common/x86/vp9_subpixel_mmx.asm
diff --git a/vp9/common/x86/subpixel_sse2.asm b/vp9/common/x86/vp9_subpixel_sse2.asm
similarity index 100%
rename from vp9/common/x86/subpixel_sse2.asm
rename to vp9/common/x86/vp9_subpixel_sse2.asm
diff --git a/vp9/common/x86/subpixel_ssse3.asm b/vp9/common/x86/vp9_subpixel_ssse3.asm
similarity index 100%
rename from vp9/common/x86/subpixel_ssse3.asm
rename to vp9/common/x86/vp9_subpixel_ssse3.asm
diff --git a/vp9/common/x86/subpixel_x86.h b/vp9/common/x86/vp9_subpixel_x86.h
similarity index 100%
rename from vp9/common/x86/subpixel_x86.h
rename to vp9/common/x86/vp9_subpixel_x86.h
diff --git a/vp9/common/x86/vp8_asm_stubs.c b/vp9/common/x86/vp9_vp8_asm_stubs.c
similarity index 99%
rename from vp9/common/x86/vp8_asm_stubs.c
rename to vp9/common/x86/vp9_vp8_asm_stubs.c
index 817a93e243acc006bc8027835b7475ced6da2bf2..f804af6985b77aadb1ef20e483b47f6c7584458c 100644
--- a/vp9/common/x86/vp8_asm_stubs.c
+++ b/vp9/common/x86/vp9_vp8_asm_stubs.c
@@ -11,7 +11,7 @@
 
 #include "vpx_ports/config.h"
 #include "vpx_ports/mem.h"
-#include "vp9/common/subpixel.h"
+#include "vp9/common/vp9_subpixel.h"
 
 extern const short vp9_six_tap_mmx[16][6 * 8];
 
diff --git a/vp9/common/x86/x86_systemdependent.c b/vp9/common/x86/vp9_x86_systemdependent.c
similarity index 94%
rename from vp9/common/x86/x86_systemdependent.c
rename to vp9/common/x86/vp9_x86_systemdependent.c
index 62e75ffde38f324bcb51dce2a2bd58335fe76f3f..8a9f04c9a45b91016b42ed92877c443b83fdf85e 100644
--- a/vp9/common/x86/x86_systemdependent.c
+++ b/vp9/common/x86/vp9_x86_systemdependent.c
@@ -10,9 +10,9 @@
 
 #include "vpx_config.h"
 #include "vpx_ports/x86.h"
-#include "vp9/common/loopfilter.h"
-#include "vp9/common/pragmas.h"
-#include "vp9/common/onyxc_int.h"
+#include "vp9/common/vp9_loopfilter.h"
+#include "vp9/common/vp9_pragmas.h"
+#include "vp9/common/vp9_onyxc_int.h"
 
 void vp9_arch_x86_common_init(VP9_COMMON *ctx) {
 #if CONFIG_RUNTIME_CPU_DETECT
diff --git a/vp9/decoder/arm/armv6/dequant_dc_idct_v6.asm b/vp9/decoder/arm/armv6/vp9_dequant_dc_idct_v6.asm
similarity index 100%
rename from vp9/decoder/arm/armv6/dequant_dc_idct_v6.asm
rename to vp9/decoder/arm/armv6/vp9_dequant_dc_idct_v6.asm
diff --git a/vp9/decoder/arm/armv6/dequant_idct_v6.asm b/vp9/decoder/arm/armv6/vp9_dequant_idct_v6.asm
similarity index 100%
rename from vp9/decoder/arm/armv6/dequant_idct_v6.asm
rename to vp9/decoder/arm/armv6/vp9_dequant_idct_v6.asm
diff --git a/vp9/decoder/arm/armv6/dequantize_v6.asm b/vp9/decoder/arm/armv6/vp9_dequantize_v6.asm
similarity index 100%
rename from vp9/decoder/arm/armv6/dequantize_v6.asm
rename to vp9/decoder/arm/armv6/vp9_dequantize_v6.asm
diff --git a/vp9/decoder/arm/armv6/idct_blk_v6.c b/vp9/decoder/arm/armv6/vp9_idct_blk_v6.c
similarity index 98%
rename from vp9/decoder/arm/armv6/idct_blk_v6.c
rename to vp9/decoder/arm/armv6/vp9_idct_blk_v6.c
index bf0c8141df626347ed4c956a573f39b2f76f9fe8..d4fa4b52fa07be6d485a77673eb5b2da75441da2 100644
--- a/vp9/decoder/arm/armv6/idct_blk_v6.c
+++ b/vp9/decoder/arm/armv6/vp9_idct_blk_v6.c
@@ -9,8 +9,8 @@
  */
 
 #include "vpx_ports/config.h"
-#include "vp9/common/blockd.h"
-#include "vp9/decoder/dequantize.h"
+#include "vp9/common/vp9_blockd.h"
+#include "vp9/decoder/vp9_dequantize.h"
 
 void vp8_dequant_dc_idct_add_y_block_v6(short *q, short *dq,
                                         unsigned char *pre,
diff --git a/vp9/decoder/arm/neon/dequant_idct_neon.asm b/vp9/decoder/arm/neon/vp9_dequant_idct_neon.asm
similarity index 100%
rename from vp9/decoder/arm/neon/dequant_idct_neon.asm
rename to vp9/decoder/arm/neon/vp9_dequant_idct_neon.asm
diff --git a/vp9/decoder/arm/neon/dequantizeb_neon.asm b/vp9/decoder/arm/neon/vp9_dequantizeb_neon.asm
similarity index 100%
rename from vp9/decoder/arm/neon/dequantizeb_neon.asm
rename to vp9/decoder/arm/neon/vp9_dequantizeb_neon.asm
diff --git a/vp9/decoder/arm/neon/idct_blk_neon.c b/vp9/decoder/arm/neon/vp9_idct_blk_neon.c
similarity index 97%
rename from vp9/decoder/arm/neon/idct_blk_neon.c
rename to vp9/decoder/arm/neon/vp9_idct_blk_neon.c
index cc68fd49603327a6044f8e11643b9161f62d1755..f2620d972291911c8e8d25fd27e251c1d95e236f 100644
--- a/vp9/decoder/arm/neon/idct_blk_neon.c
+++ b/vp9/decoder/arm/neon/vp9_idct_blk_neon.c
@@ -9,8 +9,8 @@
  */
 
 #include "vpx_ports/config.h"
-#include "vp9/common/blockd.h"
-#include "vp9/decoder/dequantize.h"
+#include "vp9/common/vp9_blockd.h"
+#include "vp9/decoder/vp9_dequantize.h"
 
 /* place these declarations here because we don't want to maintain them
  * outside of this scope
diff --git a/vp9/decoder/arm/neon/idct_dequant_0_2x_neon.asm b/vp9/decoder/arm/neon/vp9_idct_dequant_0_2x_neon.asm
similarity index 100%
rename from vp9/decoder/arm/neon/idct_dequant_0_2x_neon.asm
rename to vp9/decoder/arm/neon/vp9_idct_dequant_0_2x_neon.asm
diff --git a/vp9/decoder/arm/neon/idct_dequant_dc_0_2x_neon.asm b/vp9/decoder/arm/neon/vp9_idct_dequant_dc_0_2x_neon.asm
similarity index 100%
rename from vp9/decoder/arm/neon/idct_dequant_dc_0_2x_neon.asm
rename to vp9/decoder/arm/neon/vp9_idct_dequant_dc_0_2x_neon.asm
diff --git a/vp9/decoder/arm/neon/idct_dequant_dc_full_2x_neon.asm b/vp9/decoder/arm/neon/vp9_idct_dequant_dc_full_2x_neon.asm
similarity index 100%
rename from vp9/decoder/arm/neon/idct_dequant_dc_full_2x_neon.asm
rename to vp9/decoder/arm/neon/vp9_idct_dequant_dc_full_2x_neon.asm
diff --git a/vp9/decoder/arm/neon/idct_dequant_full_2x_neon.asm b/vp9/decoder/arm/neon/vp9_idct_dequant_full_2x_neon.asm
similarity index 100%
rename from vp9/decoder/arm/neon/idct_dequant_full_2x_neon.asm
rename to vp9/decoder/arm/neon/vp9_idct_dequant_full_2x_neon.asm
diff --git a/vp9/decoder/arm/dequantize_arm.c b/vp9/decoder/arm/vp9_dequantize_arm.c
similarity index 93%
rename from vp9/decoder/arm/dequantize_arm.c
rename to vp9/decoder/arm/vp9_dequantize_arm.c
index 5ec78f39f2e0a4a94bb7f6be5c76a65c8b150f92..ff1eec6400eb23b896c6cee0b2e24e548eef68ad 100644
--- a/vp9/decoder/arm/dequantize_arm.c
+++ b/vp9/decoder/arm/vp9_dequantize_arm.c
@@ -10,8 +10,8 @@
 
 
 #include "vpx_ports/config.h"
-#include "vp9/decoder/dequantize.h"
-#include "vp9/common/blockd.h"
+#include "vp9/decoder/vp9_dequantize.h"
+#include "vp9/common/vp9_blockd.h"
 #include "vpx_mem/vpx_mem.h"
 
 #if HAVE_ARMV7
diff --git a/vp9/decoder/asm_dec_offsets.c b/vp9/decoder/vp9_asm_dec_offsets.c
similarity index 98%
rename from vp9/decoder/asm_dec_offsets.c
rename to vp9/decoder/vp9_asm_dec_offsets.c
index 270a4e0bce007216fad1748a2286da8f57494052..ece315ac817582cf736f2080966546e708445ba0 100644
--- a/vp9/decoder/asm_dec_offsets.c
+++ b/vp9/decoder/vp9_asm_dec_offsets.c
@@ -10,7 +10,7 @@
 
 
 #include "vpx_ports/asm_offsets.h"
-#include "onyxd_int.h"
+#include "vp9_onyxd_int.h"
 
 BEGIN
 
diff --git a/vp9/decoder/dboolhuff.c b/vp9/decoder/vp9_dboolhuff.c
similarity index 98%
rename from vp9/decoder/dboolhuff.c
rename to vp9/decoder/vp9_dboolhuff.c
index f1e1cdbe0d60a817432aab5fc3b7ff0cf16bb9f4..dc3878e9d31cb0f8528bd059883675a7bf257077 100644
--- a/vp9/decoder/dboolhuff.c
+++ b/vp9/decoder/vp9_dboolhuff.c
@@ -9,7 +9,7 @@
  */
 
 
-#include "dboolhuff.h"
+#include "vp9_dboolhuff.h"
 #include "vpx_ports/mem.h"
 #include "vpx_mem/vpx_mem.h"
 
diff --git a/vp9/decoder/dboolhuff.h b/vp9/decoder/vp9_dboolhuff.h
similarity index 100%
rename from vp9/decoder/dboolhuff.h
rename to vp9/decoder/vp9_dboolhuff.h
diff --git a/vp9/decoder/decodemv.c b/vp9/decoder/vp9_decodemv.c
similarity index 99%
rename from vp9/decoder/decodemv.c
rename to vp9/decoder/vp9_decodemv.c
index 0e5f66b60ad2ff97ef702d94b7147419dcbbaaf4..f17e526bae39a2ad825396b2c4cc6970208bab60 100644
--- a/vp9/decoder/decodemv.c
+++ b/vp9/decoder/vp9_decodemv.c
@@ -9,17 +9,17 @@
  */
 
 
-#include "treereader.h"
-#include "vp9/common/entropymv.h"
-#include "vp9/common/entropymode.h"
-#include "onyxd_int.h"
-#include "vp9/common/findnearmv.h"
-
-#include "vp9/common/seg_common.h"
-#include "vp9/common/pred_common.h"
-#include "vp9/common/entropy.h"
-#include "vp9/decoder/decodemv.h"
-#include "vp9/common/mvref_common.h"
+#include "vp9_treereader.h"
+#include "vp9/common/vp9_entropymv.h"
+#include "vp9/common/vp9_entropymode.h"
+#include "vp9_onyxd_int.h"
+#include "vp9/common/vp9_findnearmv.h"
+
+#include "vp9/common/vp9_seg_common.h"
+#include "vp9/common/vp9_pred_common.h"
+#include "vp9/common/vp9_entropy.h"
+#include "vp9/decoder/vp9_decodemv.h"
+#include "vp9/common/vp9_mvref_common.h"
 #if CONFIG_DEBUG
 #include <assert.h>
 #endif
diff --git a/vp9/decoder/decodemv.h b/vp9/decoder/vp9_decodemv.h
similarity index 96%
rename from vp9/decoder/decodemv.h
rename to vp9/decoder/vp9_decodemv.h
index 8b0406f6df03babf5e9ff631c098babcfe46f0c9..10ae4f54e297a9b2f5b00d15d0eb0f8303d71041 100644
--- a/vp9/decoder/decodemv.h
+++ b/vp9/decoder/vp9_decodemv.h
@@ -9,7 +9,7 @@
  */
 
 
-#include "onyxd_int.h"
+#include "vp9_onyxd_int.h"
 
 void vp9_decode_mb_mode_mv(VP9D_COMP* const pbi,
                            MACROBLOCKD* const xd,
diff --git a/vp9/decoder/decodframe.c b/vp9/decoder/vp9_decodframe.c
similarity index 98%
rename from vp9/decoder/decodframe.c
rename to vp9/decoder/vp9_decodframe.c
index 625053e4894db56a984ab8af678de5ccaeac114a..c083323511a4acf5d8fffb798bc64f3649ce1a42 100644
--- a/vp9/decoder/decodframe.c
+++ b/vp9/decoder/vp9_decodframe.c
@@ -9,28 +9,28 @@
  */
 
 
-#include "onyxd_int.h"
-#include "vp9/common/header.h"
-#include "vp9/common/reconintra.h"
-#include "vp9/common/reconintra4x4.h"
-#include "vp9/common/reconinter.h"
-#include "vp9/decoder/decodframe.h"
-#include "detokenize.h"
-#include "vp9/common/invtrans.h"
-#include "vp9/common/alloccommon.h"
-#include "vp9/common/entropymode.h"
-#include "vp9/common/quant_common.h"
+#include "vp9_onyxd_int.h"
+#include "vp9/common/vp9_header.h"
+#include "vp9/common/vp9_reconintra.h"
+#include "vp9/common/vp9_reconintra4x4.h"
+#include "vp9/common/vp9_reconinter.h"
+#include "vp9/decoder/vp9_decodframe.h"
+#include "vp9_detokenize.h"
+#include "vp9/common/vp9_invtrans.h"
+#include "vp9/common/vp9_alloccommon.h"
+#include "vp9/common/vp9_entropymode.h"
+#include "vp9/common/vp9_quant_common.h"
 #include "vpx_scale/vpxscale.h"
-#include "vp9/common/setupintrarecon.h"
+#include "vp9/common/vp9_setupintrarecon.h"
 
-#include "decodemv.h"
-#include "vp9/common/extend.h"
-#include "vp9/common/modecont.h"
+#include "vp9_decodemv.h"
+#include "vp9/common/vp9_extend.h"
+#include "vp9/common/vp9_modecont.h"
 #include "vpx_mem/vpx_mem.h"
-#include "dboolhuff.h"
+#include "vp9_dboolhuff.h"
 
-#include "vp9/common/seg_common.h"
-#include "vp9/common/entropy.h"
+#include "vp9/common/vp9_seg_common.h"
+#include "vp9/common/vp9_entropy.h"
 #include "vp9_rtcd.h"
 
 #include <assert.h>
diff --git a/vp9/decoder/decodframe.h b/vp9/decoder/vp9_decodframe.h
similarity index 100%
rename from vp9/decoder/decodframe.h
rename to vp9/decoder/vp9_decodframe.h
diff --git a/vp9/decoder/dequantize.c b/vp9/decoder/vp9_dequantize.c
similarity index 99%
rename from vp9/decoder/dequantize.c
rename to vp9/decoder/vp9_dequantize.c
index 37e8e4cee1e1947a16e67ce68264a23f39ff86d0..f3a22b543690bed7a350e9eced7cbde92e6b433a 100644
--- a/vp9/decoder/dequantize.c
+++ b/vp9/decoder/vp9_dequantize.c
@@ -10,9 +10,9 @@
 
 
 #include "vp9_rtcd.h"
-#include "dequantize.h"
+#include "vp9_dequantize.h"
 #include "vpx_mem/vpx_mem.h"
-#include "onyxd_int.h"
+#include "vp9_onyxd_int.h"
 
 #ifdef DEC_DEBUG
 extern int dec_debug;
diff --git a/vp9/decoder/dequantize.h b/vp9/decoder/vp9_dequantize.h
similarity index 99%
rename from vp9/decoder/dequantize.h
rename to vp9/decoder/vp9_dequantize.h
index 4b90a4d7031dcae930802c9d385a5caf16a616cf..0b455200ce2657b1aa492c26ac7da79208843998 100644
--- a/vp9/decoder/dequantize.h
+++ b/vp9/decoder/vp9_dequantize.h
@@ -11,7 +11,7 @@
 
 #ifndef DEQUANTIZE_H
 #define DEQUANTIZE_H
-#include "vp9/common/blockd.h"
+#include "vp9/common/vp9_blockd.h"
 
 #if CONFIG_LOSSLESS
 extern void vp9_dequant_idct_add_lossless_c(short *input, const short *dq,
diff --git a/vp9/decoder/detokenize.c b/vp9/decoder/vp9_detokenize.c
similarity index 98%
rename from vp9/decoder/detokenize.c
rename to vp9/decoder/vp9_detokenize.c
index b6823e7efa9075842d0df0b1e75e16a264e0f7f2..8c469c4034fc854dbd0b89ce5bc8de976d31bbc7 100644
--- a/vp9/decoder/detokenize.c
+++ b/vp9/decoder/vp9_detokenize.c
@@ -9,14 +9,14 @@
  */
 
 
-#include "vp9/common/type_aliases.h"
-#include "vp9/common/blockd.h"
-#include "onyxd_int.h"
+#include "vp9/common/vp9_type_aliases.h"
+#include "vp9/common/vp9_blockd.h"
+#include "vp9_onyxd_int.h"
 #include "vpx_mem/vpx_mem.h"
 #include "vpx_ports/mem.h"
-#include "detokenize.h"
+#include "vp9_detokenize.h"
 
-#include "vp9/common/seg_common.h"
+#include "vp9/common/vp9_seg_common.h"
 
 #define EOB_CONTEXT_NODE            0
 #define ZERO_CONTEXT_NODE           1
diff --git a/vp9/decoder/detokenize.h b/vp9/decoder/vp9_detokenize.h
similarity index 97%
rename from vp9/decoder/detokenize.h
rename to vp9/decoder/vp9_detokenize.h
index 9f00d297d707bb2d9b5d83098e744701486cf979..1425a36e348e49e158667466b772b4fc1c750fce 100644
--- a/vp9/decoder/detokenize.h
+++ b/vp9/decoder/vp9_detokenize.h
@@ -12,7 +12,7 @@
 #ifndef DETOKENIZE_H
 #define DETOKENIZE_H
 
-#include "onyxd_int.h"
+#include "vp9_onyxd_int.h"
 
 void vp9_reset_mb_tokens_context(MACROBLOCKD* const);
 
diff --git a/vp9/decoder/idct_blk.c b/vp9/decoder/vp9_idct_blk.c
similarity index 99%
rename from vp9/decoder/idct_blk.c
rename to vp9/decoder/vp9_idct_blk.c
index 98eb81ca6c0e3d96c1b1e409be3c2d836a3570f8..f84e30e81ed5bc63c503fff1d8975295a7e5062f 100644
--- a/vp9/decoder/idct_blk.c
+++ b/vp9/decoder/vp9_idct_blk.c
@@ -9,7 +9,7 @@
  */
 
 #include "vp9_rtcd.h"
-#include "vp9/common/blockd.h"
+#include "vp9/common/vp9_blockd.h"
 
 void vp9_dequant_dc_idct_add_y_block_c(short *q, const short *dq,
                                        unsigned char *pre,
diff --git a/vp9/decoder/onyxd_if.c b/vp9/decoder/vp9_onyxd_if.c
similarity index 96%
rename from vp9/decoder/onyxd_if.c
rename to vp9/decoder/vp9_onyxd_if.c
index 6c20223d36d8e22bd82b157dd8d968db0465dc65..70671683b210e1e4c283d227105232858fabea53 100644
--- a/vp9/decoder/onyxd_if.c
+++ b/vp9/decoder/vp9_onyxd_if.c
@@ -9,25 +9,25 @@
  */
 
 
-#include "vp9/common/onyxc_int.h"
+#include "vp9/common/vp9_onyxc_int.h"
 #if CONFIG_POSTPROC
-#include "vp9/common/postproc.h"
+#include "vp9/common/vp9_postproc.h"
 #endif
-#include "vp9/common/onyxd.h"
-#include "onyxd_int.h"
+#include "vp9/common/vp9_onyxd.h"
+#include "vp9_onyxd_int.h"
 #include "vpx_mem/vpx_mem.h"
-#include "vp9/common/alloccommon.h"
-#include "vp9/common/loopfilter.h"
-#include "vp9/common/swapyv12buffer.h"
+#include "vp9/common/vp9_alloccommon.h"
+#include "vp9/common/vp9_loopfilter.h"
+#include "vp9/common/vp9_swapyv12buffer.h"
 #include <stdio.h>
 #include <assert.h>
 
-#include "vp9/common/quant_common.h"
+#include "vp9/common/vp9_quant_common.h"
 #include "vpx_scale/vpxscale.h"
-#include "vp9/common/systemdependent.h"
+#include "vp9/common/vp9_systemdependent.h"
 #include "vpx_ports/vpx_timer.h"
-#include "vp9/decoder/decodframe.h"
-#include "detokenize.h"
+#include "vp9/decoder/vp9_decodframe.h"
+#include "vp9_detokenize.h"
 #if ARCH_ARM
 #include "vpx_ports/arm.h"
 #endif
diff --git a/vp9/decoder/onyxd_int.h b/vp9/decoder/vp9_onyxd_int.h
similarity index 95%
rename from vp9/decoder/onyxd_int.h
rename to vp9/decoder/vp9_onyxd_int.h
index cbb13ffe835e691f3d50aa84cb97433d7bfe57ff..023e8eefdbf0824ae2f8bb978ffd6db6440fc6ae 100644
--- a/vp9/decoder/onyxd_int.h
+++ b/vp9/decoder/vp9_onyxd_int.h
@@ -12,10 +12,10 @@
 #ifndef __INC_ONYXD_INT_H
 #define __INC_ONYXD_INT_H
 #include "vpx_ports/config.h"
-#include "vp9/common/onyxd.h"
-#include "treereader.h"
-#include "vp9/common/onyxc_int.h"
-#include "dequantize.h"
+#include "vp9/common/vp9_onyxd.h"
+#include "vp9_treereader.h"
+#include "vp9/common/vp9_onyxc_int.h"
+#include "vp9_dequantize.h"
 
 // #define DEC_DEBUG
 
diff --git a/vp9/decoder/reconintra_mt.h b/vp9/decoder/vp9_reconintra_mt.h
similarity index 100%
rename from vp9/decoder/reconintra_mt.h
rename to vp9/decoder/vp9_reconintra_mt.h
diff --git a/vp9/decoder/treereader.h b/vp9/decoder/vp9_treereader.h
similarity index 93%
rename from vp9/decoder/treereader.h
rename to vp9/decoder/vp9_treereader.h
index 931a6405ced5bdeb5f41b7f4b85d42737f0a7083..4c49c9a75411e6d4927b336676e93491b314de1f 100644
--- a/vp9/decoder/treereader.h
+++ b/vp9/decoder/vp9_treereader.h
@@ -12,9 +12,9 @@
 #ifndef tree_reader_h
 #define tree_reader_h 1
 
-#include "vp9/common/treecoder.h"
+#include "vp9/common/vp9_treecoder.h"
 
-#include "dboolhuff.h"
+#include "vp9_dboolhuff.h"
 
 typedef BOOL_DECODER vp9_reader;
 
diff --git a/vp9/decoder/x86/dequantize_mmx.asm b/vp9/decoder/x86/vp9_dequantize_mmx.asm
similarity index 100%
rename from vp9/decoder/x86/dequantize_mmx.asm
rename to vp9/decoder/x86/vp9_dequantize_mmx.asm
diff --git a/vp9/decoder/x86/idct_blk_mmx.c b/vp9/decoder/x86/vp9_idct_blk_mmx.c
similarity index 98%
rename from vp9/decoder/x86/idct_blk_mmx.c
rename to vp9/decoder/x86/vp9_idct_blk_mmx.c
index 8445b28f0894f02668bec4e62b609a4e3b57c2e5..2657786ed099ac6127351e710eb83bcaa62e88df 100644
--- a/vp9/decoder/x86/idct_blk_mmx.c
+++ b/vp9/decoder/x86/vp9_idct_blk_mmx.c
@@ -9,8 +9,8 @@
  */
 
 #include "vpx_ports/config.h"
-#include "vp9/common/blockd.h"
-#include "vp9/decoder/dequantize.h"
+#include "vp9/common/vp9_blockd.h"
+#include "vp9/decoder/vp9_dequantize.h"
 
 void vp9_dequant_dc_idct_add_y_block_mmx(short *q, const short *dq,
                                          unsigned char *pre,
diff --git a/vp9/decoder/x86/idct_blk_sse2.c b/vp9/decoder/x86/vp9_idct_blk_sse2.c
similarity index 98%
rename from vp9/decoder/x86/idct_blk_sse2.c
rename to vp9/decoder/x86/vp9_idct_blk_sse2.c
index 6e66f53470af9104e25219a4b4b29ca28678de55..6c1fd143920c4307257ffeedfe305f6ecba938e6 100644
--- a/vp9/decoder/x86/idct_blk_sse2.c
+++ b/vp9/decoder/x86/vp9_idct_blk_sse2.c
@@ -9,8 +9,8 @@
  */
 
 #include "vpx_ports/config.h"
-#include "vp9/common/blockd.h"
-#include "vp9/decoder/dequantize.h"
+#include "vp9/common/vp9_blockd.h"
+#include "vp9/decoder/vp9_dequantize.h"
 
 void vp9_idct_dequant_dc_0_2x_sse2(short *q, const short *dq,
                                    unsigned char *pre, unsigned char *dst,
diff --git a/vp9/decoder/x86/x86_dsystemdependent.c b/vp9/decoder/x86/vp9_x86_dsystemdependent.c
similarity index 95%
rename from vp9/decoder/x86/x86_dsystemdependent.c
rename to vp9/decoder/x86/vp9_x86_dsystemdependent.c
index 35d2f97323714391952c35bcca4afc4bc8857745..d1cc53fce9368263dff92ae7bd73f91fdc70e049 100644
--- a/vp9/decoder/x86/x86_dsystemdependent.c
+++ b/vp9/decoder/x86/vp9_x86_dsystemdependent.c
@@ -10,7 +10,7 @@
 
 #include "vpx_ports/config.h"
 #include "vpx_ports/x86.h"
-#include "vp9/decoder/onyxd_int.h"
+#include "vp9/decoder/vp9_onyxd_int.h"
 
 #if HAVE_MMX
 void vp9_dequantize_b_impl_mmx(short *sq, short *dq, short *q);
diff --git a/vp9/encoder/arm/armv5te/boolhuff_armv5te.asm b/vp9/encoder/arm/armv5te/vp9_boolhuff_armv5te.asm
similarity index 100%
rename from vp9/encoder/arm/armv5te/boolhuff_armv5te.asm
rename to vp9/encoder/arm/armv5te/vp9_boolhuff_armv5te.asm
diff --git a/vp9/encoder/arm/armv5te/vp8_packtokens_armv5.asm b/vp9/encoder/arm/armv5te/vp9_vp8_packtokens_armv5.asm
similarity index 100%
rename from vp9/encoder/arm/armv5te/vp8_packtokens_armv5.asm
rename to vp9/encoder/arm/armv5te/vp9_vp8_packtokens_armv5.asm
diff --git a/vp9/encoder/arm/armv5te/vp8_packtokens_mbrow_armv5.asm b/vp9/encoder/arm/armv5te/vp9_vp8_packtokens_mbrow_armv5.asm
similarity index 100%
rename from vp9/encoder/arm/armv5te/vp8_packtokens_mbrow_armv5.asm
rename to vp9/encoder/arm/armv5te/vp9_vp8_packtokens_mbrow_armv5.asm
diff --git a/vp9/encoder/arm/armv5te/vp8_packtokens_partitions_armv5.asm b/vp9/encoder/arm/armv5te/vp9_vp8_packtokens_partitions_armv5.asm
similarity index 100%
rename from vp9/encoder/arm/armv5te/vp8_packtokens_partitions_armv5.asm
rename to vp9/encoder/arm/armv5te/vp9_vp8_packtokens_partitions_armv5.asm
diff --git a/vp9/encoder/arm/armv6/vp8_fast_quantize_b_armv6.asm b/vp9/encoder/arm/armv6/vp9_vp8_fast_quantize_b_armv6.asm
similarity index 100%
rename from vp9/encoder/arm/armv6/vp8_fast_quantize_b_armv6.asm
rename to vp9/encoder/arm/armv6/vp9_vp8_fast_quantize_b_armv6.asm
diff --git a/vp9/encoder/arm/armv6/vp8_mse16x16_armv6.asm b/vp9/encoder/arm/armv6/vp9_vp8_mse16x16_armv6.asm
similarity index 100%
rename from vp9/encoder/arm/armv6/vp8_mse16x16_armv6.asm
rename to vp9/encoder/arm/armv6/vp9_vp8_mse16x16_armv6.asm
diff --git a/vp9/encoder/arm/armv6/vp8_sad16x16_armv6.asm b/vp9/encoder/arm/armv6/vp9_vp8_sad16x16_armv6.asm
similarity index 100%
rename from vp9/encoder/arm/armv6/vp8_sad16x16_armv6.asm
rename to vp9/encoder/arm/armv6/vp9_vp8_sad16x16_armv6.asm
diff --git a/vp9/encoder/arm/armv6/vp8_short_fdct4x4_armv6.asm b/vp9/encoder/arm/armv6/vp9_vp8_short_fdct4x4_armv6.asm
similarity index 100%
rename from vp9/encoder/arm/armv6/vp8_short_fdct4x4_armv6.asm
rename to vp9/encoder/arm/armv6/vp9_vp8_short_fdct4x4_armv6.asm
diff --git a/vp9/encoder/arm/armv6/vp8_subtract_armv6.asm b/vp9/encoder/arm/armv6/vp9_vp8_subtract_armv6.asm
similarity index 100%
rename from vp9/encoder/arm/armv6/vp8_subtract_armv6.asm
rename to vp9/encoder/arm/armv6/vp9_vp8_subtract_armv6.asm
diff --git a/vp9/encoder/arm/armv6/vp8_variance16x16_armv6.asm b/vp9/encoder/arm/armv6/vp9_vp8_variance16x16_armv6.asm
similarity index 100%
rename from vp9/encoder/arm/armv6/vp8_variance16x16_armv6.asm
rename to vp9/encoder/arm/armv6/vp9_vp8_variance16x16_armv6.asm
diff --git a/vp9/encoder/arm/armv6/vp8_variance8x8_armv6.asm b/vp9/encoder/arm/armv6/vp9_vp8_variance8x8_armv6.asm
similarity index 100%
rename from vp9/encoder/arm/armv6/vp8_variance8x8_armv6.asm
rename to vp9/encoder/arm/armv6/vp9_vp8_variance8x8_armv6.asm
diff --git a/vp9/encoder/arm/armv6/vp8_variance_halfpixvar16x16_h_armv6.asm b/vp9/encoder/arm/armv6/vp9_vp8_variance_halfpixvar16x16_h_armv6.asm
similarity index 100%
rename from vp9/encoder/arm/armv6/vp8_variance_halfpixvar16x16_h_armv6.asm
rename to vp9/encoder/arm/armv6/vp9_vp8_variance_halfpixvar16x16_h_armv6.asm
diff --git a/vp9/encoder/arm/armv6/vp8_variance_halfpixvar16x16_hv_armv6.asm b/vp9/encoder/arm/armv6/vp9_vp8_variance_halfpixvar16x16_hv_armv6.asm
similarity index 100%
rename from vp9/encoder/arm/armv6/vp8_variance_halfpixvar16x16_hv_armv6.asm
rename to vp9/encoder/arm/armv6/vp9_vp8_variance_halfpixvar16x16_hv_armv6.asm
diff --git a/vp9/encoder/arm/armv6/vp8_variance_halfpixvar16x16_v_armv6.asm b/vp9/encoder/arm/armv6/vp9_vp8_variance_halfpixvar16x16_v_armv6.asm
similarity index 100%
rename from vp9/encoder/arm/armv6/vp8_variance_halfpixvar16x16_v_armv6.asm
rename to vp9/encoder/arm/armv6/vp9_vp8_variance_halfpixvar16x16_v_armv6.asm
diff --git a/vp9/encoder/arm/armv6/walsh_v6.asm b/vp9/encoder/arm/armv6/vp9_walsh_v6.asm
similarity index 100%
rename from vp9/encoder/arm/armv6/walsh_v6.asm
rename to vp9/encoder/arm/armv6/vp9_walsh_v6.asm
diff --git a/vp9/encoder/arm/neon/fastquantizeb_neon.asm b/vp9/encoder/arm/neon/vp9_fastquantizeb_neon.asm
similarity index 99%
rename from vp9/encoder/arm/neon/fastquantizeb_neon.asm
rename to vp9/encoder/arm/neon/vp9_fastquantizeb_neon.asm
index fa3aff8aca62c3d042cba23266fc27b75ebb3172..c682336172f751cfb71389fb2a5c0e01eccffaf9 100644
--- a/vp9/encoder/arm/neon/fastquantizeb_neon.asm
+++ b/vp9/encoder/arm/neon/vp9_fastquantizeb_neon.asm
@@ -246,7 +246,7 @@ zero_output
 
     ENDP
 
-; default inverse zigzag table is defined in vp9/common/entropy.c
+; default inverse zigzag table is defined in vp9/common/vp9_entropy.c
 _inv_zig_zag_
     DCD inv_zig_zag
 
diff --git a/vp9/encoder/arm/neon/picklpf_arm.c b/vp9/encoder/arm/neon/vp9_picklpf_arm.c
similarity index 89%
rename from vp9/encoder/arm/neon/picklpf_arm.c
rename to vp9/encoder/arm/neon/vp9_picklpf_arm.c
index 9357769fefbdfcab3c4e62e5d0763ea0fdc170db..b427e5ef7239586ff7b70222afd1f263977949b0 100644
--- a/vp9/encoder/arm/neon/picklpf_arm.c
+++ b/vp9/encoder/arm/neon/vp9_picklpf_arm.c
@@ -9,12 +9,12 @@
  */
 
 
-#include "vp9/common/onyxc_int.h"
-#include "vp9/encoder/onyx_int.h"
-#include "vp9/encoder/quantize.h"
+#include "vp9/common/vp9_onyxc_int.h"
+#include "vp9/encoder/vp9_onyx_int.h"
+#include "vp9/encoder/vp9_quantize.h"
 #include "vpx_mem/vpx_mem.h"
 #include "vpx_scale/vpxscale.h"
-#include "vp9/common/alloccommon.h"
+#include "vp9/common/vp9_alloccommon.h"
 
 extern void vp8_memcpy_neon(unsigned char *dst_ptr, unsigned char *src_ptr, int sz);
 
diff --git a/vp9/encoder/arm/neon/sad16_neon.asm b/vp9/encoder/arm/neon/vp9_sad16_neon.asm
similarity index 100%
rename from vp9/encoder/arm/neon/sad16_neon.asm
rename to vp9/encoder/arm/neon/vp9_sad16_neon.asm
diff --git a/vp9/encoder/arm/neon/sad8_neon.asm b/vp9/encoder/arm/neon/vp9_sad8_neon.asm
similarity index 100%
rename from vp9/encoder/arm/neon/sad8_neon.asm
rename to vp9/encoder/arm/neon/vp9_sad8_neon.asm
diff --git a/vp9/encoder/arm/neon/shortfdct_neon.asm b/vp9/encoder/arm/neon/vp9_shortfdct_neon.asm
similarity index 100%
rename from vp9/encoder/arm/neon/shortfdct_neon.asm
rename to vp9/encoder/arm/neon/vp9_shortfdct_neon.asm
diff --git a/vp9/encoder/arm/neon/subtract_neon.asm b/vp9/encoder/arm/neon/vp9_subtract_neon.asm
similarity index 100%
rename from vp9/encoder/arm/neon/subtract_neon.asm
rename to vp9/encoder/arm/neon/vp9_subtract_neon.asm
diff --git a/vp9/encoder/arm/neon/variance_neon.asm b/vp9/encoder/arm/neon/vp9_variance_neon.asm
similarity index 100%
rename from vp9/encoder/arm/neon/variance_neon.asm
rename to vp9/encoder/arm/neon/vp9_variance_neon.asm
diff --git a/vp9/encoder/arm/neon/vp8_memcpy_neon.asm b/vp9/encoder/arm/neon/vp9_vp8_memcpy_neon.asm
similarity index 100%
rename from vp9/encoder/arm/neon/vp8_memcpy_neon.asm
rename to vp9/encoder/arm/neon/vp9_vp8_memcpy_neon.asm
diff --git a/vp9/encoder/arm/neon/vp8_mse16x16_neon.asm b/vp9/encoder/arm/neon/vp9_vp8_mse16x16_neon.asm
similarity index 100%
rename from vp9/encoder/arm/neon/vp8_mse16x16_neon.asm
rename to vp9/encoder/arm/neon/vp9_vp8_mse16x16_neon.asm
diff --git a/vp9/encoder/arm/neon/vp8_shortwalsh4x4_neon.asm b/vp9/encoder/arm/neon/vp9_vp8_shortwalsh4x4_neon.asm
similarity index 100%
rename from vp9/encoder/arm/neon/vp8_shortwalsh4x4_neon.asm
rename to vp9/encoder/arm/neon/vp9_vp8_shortwalsh4x4_neon.asm
diff --git a/vp9/encoder/arm/neon/vp8_subpixelvariance16x16_neon.asm b/vp9/encoder/arm/neon/vp9_vp8_subpixelvariance16x16_neon.asm
similarity index 100%
rename from vp9/encoder/arm/neon/vp8_subpixelvariance16x16_neon.asm
rename to vp9/encoder/arm/neon/vp9_vp8_subpixelvariance16x16_neon.asm
diff --git a/vp9/encoder/arm/neon/vp8_subpixelvariance16x16s_neon.asm b/vp9/encoder/arm/neon/vp9_vp8_subpixelvariance16x16s_neon.asm
similarity index 100%
rename from vp9/encoder/arm/neon/vp8_subpixelvariance16x16s_neon.asm
rename to vp9/encoder/arm/neon/vp9_vp8_subpixelvariance16x16s_neon.asm
diff --git a/vp9/encoder/arm/neon/vp8_subpixelvariance8x8_neon.asm b/vp9/encoder/arm/neon/vp9_vp8_subpixelvariance8x8_neon.asm
similarity index 100%
rename from vp9/encoder/arm/neon/vp8_subpixelvariance8x8_neon.asm
rename to vp9/encoder/arm/neon/vp9_vp8_subpixelvariance8x8_neon.asm
diff --git a/vp9/encoder/arm/arm_csystemdependent.c b/vp9/encoder/arm/vp9_arm_csystemdependent.c
similarity index 98%
rename from vp9/encoder/arm/arm_csystemdependent.c
rename to vp9/encoder/arm/vp9_arm_csystemdependent.c
index 99129de982d4ddf066985d62aec66076cfb5c0a5..5ad3e8dc86382636322351b9dded94cf91d280f7 100644
--- a/vp9/encoder/arm/arm_csystemdependent.c
+++ b/vp9/encoder/arm/vp9_arm_csystemdependent.c
@@ -11,8 +11,8 @@
 
 #include "vpx_ports/config.h"
 #include "vpx_ports/arm.h"
-#include "vp9/encoder/variance.h"
-#include "vp9/encoder/onyx_int.h"
+#include "vp9/encoder/vp9_variance.h"
+#include "vp9/encoder/vp9_onyx_int.h"
 
 extern void (*vp9_yv12_copy_partial_frame_ptr)(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc, int Fraction);
 extern void vp9_yv12_copy_partial_frame(YV12_BUFFER_CONFIG *src_ybc, YV12_BUFFER_CONFIG *dst_ybc, int Fraction);
diff --git a/vp9/encoder/arm/boolhuff_arm.c b/vp9/encoder/arm/vp9_boolhuff_arm.c
similarity index 96%
rename from vp9/encoder/arm/boolhuff_arm.c
rename to vp9/encoder/arm/vp9_boolhuff_arm.c
index 49cc6d63b1b9b2296924e4f0ef8e7472c1a90a00..9ff8e5f569408de1c481229ff31ccb75908bc811 100644
--- a/vp9/encoder/arm/boolhuff_arm.c
+++ b/vp9/encoder/arm/vp9_boolhuff_arm.c
@@ -9,8 +9,8 @@
  */
 
 
-#include "vp9/encoder/boolhuff.h"
-#include "vp9/common/blockd.h"
+#include "vp9/encoder/vp9_boolhuff.h"
+#include "vp9/common/vp9_blockd.h"
 
 const unsigned int vp9_prob_cost[256] = {
   2047, 2047, 1791, 1641, 1535, 1452, 1385, 1328, 1279, 1235, 1196, 1161, 1129, 1099, 1072, 1046,
diff --git a/vp9/encoder/arm/dct_arm.c b/vp9/encoder/arm/vp9_dct_arm.c
similarity index 100%
rename from vp9/encoder/arm/dct_arm.c
rename to vp9/encoder/arm/vp9_dct_arm.c
diff --git a/vp9/encoder/arm/dct_arm.h b/vp9/encoder/arm/vp9_dct_arm.h
similarity index 100%
rename from vp9/encoder/arm/dct_arm.h
rename to vp9/encoder/arm/vp9_dct_arm.h
diff --git a/vp9/encoder/arm/encodemb_arm.h b/vp9/encoder/arm/vp9_encodemb_arm.h
similarity index 100%
rename from vp9/encoder/arm/encodemb_arm.h
rename to vp9/encoder/arm/vp9_encodemb_arm.h
diff --git a/vp9/encoder/arm/quantize_arm.c b/vp9/encoder/arm/vp9_quantize_arm.c
similarity index 91%
rename from vp9/encoder/arm/quantize_arm.c
rename to vp9/encoder/arm/vp9_quantize_arm.c
index e8aef4f08e75619827a469345f6a812061484250..f300871662437e9dfebd05a76f6ae89d40193c9b 100644
--- a/vp9/encoder/arm/quantize_arm.c
+++ b/vp9/encoder/arm/vp9_quantize_arm.c
@@ -12,14 +12,14 @@
 #include <math.h>
 #include "vpx_mem/vpx_mem.h"
 
-#include "vp9/encoder/quantize.h"
-#include "vp9/common/entropy.h"
+#include "vp9/encoder/vp9_quantize.h"
+#include "vp9/common/vp9_entropy.h"
 
 
 #if HAVE_ARMV7
 
 /* vp8_quantize_mbX functions here differs from corresponding ones in
- * quantize.c only by using quantize_b_pair function pointer instead of
+ * vp9_quantize.c only by using quantize_b_pair function pointer instead of
  * the regular quantize_b function pointer */
 void vp8_quantize_mby_neon(MACROBLOCK *x) {
   int i;
diff --git a/vp9/encoder/arm/quantize_arm.h b/vp9/encoder/arm/vp9_quantize_arm.h
similarity index 100%
rename from vp9/encoder/arm/quantize_arm.h
rename to vp9/encoder/arm/vp9_quantize_arm.h
diff --git a/vp9/encoder/arm/variance_arm.c b/vp9/encoder/arm/vp9_variance_arm.c
similarity index 96%
rename from vp9/encoder/arm/variance_arm.c
rename to vp9/encoder/arm/vp9_variance_arm.c
index c3da1135de96b1ccdab93e8318f35150c7dd3b2f..91c0236e35e148bf400482ac9b1b1a60b2f568b5 100644
--- a/vp9/encoder/arm/variance_arm.c
+++ b/vp9/encoder/arm/vp9_variance_arm.c
@@ -9,9 +9,9 @@
  */
 
 #include "vpx_config.h"
-#include "vp9/encoder/variance.h"
-#include "vp9/common/filter.h"
-#include "vp9/common/arm/bilinearfilter_arm.h"
+#include "vp9/encoder/vp9_variance.h"
+#include "vp9/common/vp9_filter.h"
+#include "vp9/common/arm/vp9_bilinearfilter_arm.h"
 
 #define HALFNDX 8
 
diff --git a/vp9/encoder/arm/variance_arm.h b/vp9/encoder/arm/vp9_variance_arm.h
similarity index 100%
rename from vp9/encoder/arm/variance_arm.h
rename to vp9/encoder/arm/vp9_variance_arm.h
diff --git a/vp9/encoder/generic/csystemdependent.c b/vp9/encoder/generic/vp9_csystemdependent.c
similarity index 88%
rename from vp9/encoder/generic/csystemdependent.c
rename to vp9/encoder/generic/vp9_csystemdependent.c
index 411408cad679ac49a02800c941dc7a3586f20d25..20f03a783576bf49876448d2830c0a9706478f40 100644
--- a/vp9/encoder/generic/csystemdependent.c
+++ b/vp9/encoder/generic/vp9_csystemdependent.c
@@ -10,8 +10,8 @@
 
 
 #include "vpx_ports/config.h"
-#include "vp9/encoder/variance.h"
-#include "vp9/encoder/onyx_int.h"
+#include "vp9/encoder/vp9_variance.h"
+#include "vp9/encoder/vp9_onyx_int.h"
 
 
 void vp9_cmachine_specific_config(VP9_COMP *cpi) {
diff --git a/vp9/encoder/ppc/csystemdependent.c b/vp9/encoder/ppc/vp9_csystemdependent.c
similarity index 98%
rename from vp9/encoder/ppc/csystemdependent.c
rename to vp9/encoder/ppc/vp9_csystemdependent.c
index f06f43b8dc095d9a8092fe307ec5df22f1434959..cc67625e7dcfc8aa4e74831f2160ea5180b3cfaf 100644
--- a/vp9/encoder/ppc/csystemdependent.c
+++ b/vp9/encoder/ppc/vp9_csystemdependent.c
@@ -9,8 +9,8 @@
  */
 
 
-#include "vp9/encoder/variance.h"
-#include "vp9/encoder/onyx_int.h"
+#include "vp9/encoder/vp9_variance.h"
+#include "vp9/encoder/vp9_onyx_int.h"
 
 SADFunction *vp9_sad16x16;
 SADFunction *vp9_sad16x8;
diff --git a/vp9/encoder/ppc/encodemb_altivec.asm b/vp9/encoder/ppc/vp9_encodemb_altivec.asm
similarity index 100%
rename from vp9/encoder/ppc/encodemb_altivec.asm
rename to vp9/encoder/ppc/vp9_encodemb_altivec.asm
diff --git a/vp9/encoder/ppc/fdct_altivec.asm b/vp9/encoder/ppc/vp9_fdct_altivec.asm
similarity index 100%
rename from vp9/encoder/ppc/fdct_altivec.asm
rename to vp9/encoder/ppc/vp9_fdct_altivec.asm
diff --git a/vp9/encoder/ppc/rdopt_altivec.asm b/vp9/encoder/ppc/vp9_rdopt_altivec.asm
similarity index 100%
rename from vp9/encoder/ppc/rdopt_altivec.asm
rename to vp9/encoder/ppc/vp9_rdopt_altivec.asm
diff --git a/vp9/encoder/ppc/sad_altivec.asm b/vp9/encoder/ppc/vp9_sad_altivec.asm
similarity index 100%
rename from vp9/encoder/ppc/sad_altivec.asm
rename to vp9/encoder/ppc/vp9_sad_altivec.asm
diff --git a/vp9/encoder/ppc/variance_altivec.asm b/vp9/encoder/ppc/vp9_variance_altivec.asm
similarity index 100%
rename from vp9/encoder/ppc/variance_altivec.asm
rename to vp9/encoder/ppc/vp9_variance_altivec.asm
diff --git a/vp9/encoder/ppc/variance_subpixel_altivec.asm b/vp9/encoder/ppc/vp9_variance_subpixel_altivec.asm
similarity index 100%
rename from vp9/encoder/ppc/variance_subpixel_altivec.asm
rename to vp9/encoder/ppc/vp9_variance_subpixel_altivec.asm
diff --git a/vp9/encoder/asm_enc_offsets.c b/vp9/encoder/vp9_asm_enc_offsets.c
similarity index 96%
rename from vp9/encoder/asm_enc_offsets.c
rename to vp9/encoder/vp9_asm_enc_offsets.c
index 2be2e4b0b73dd07dc9e5ef23dc39f22eae577616..52b7e9d0190543675be551b0af2559768cf6eb42 100644
--- a/vp9/encoder/asm_enc_offsets.c
+++ b/vp9/encoder/vp9_asm_enc_offsets.c
@@ -11,11 +11,11 @@
 
 #include "vpx_ports/asm_offsets.h"
 #include "vpx_config.h"
-#include "block.h"
-#include "vp9/common/blockd.h"
-#include "onyx_int.h"
-#include "treewriter.h"
-#include "tokenize.h"
+#include "vp9_block.h"
+#include "vp9/common/vp9_blockd.h"
+#include "vp9_onyx_int.h"
+#include "vp9_treewriter.h"
+#include "vp9_tokenize.h"
 
 BEGIN
 
diff --git a/vp9/encoder/bitstream.c b/vp9/encoder/vp9_bitstream.c
similarity index 99%
rename from vp9/encoder/bitstream.c
rename to vp9/encoder/vp9_bitstream.c
index 9be2db0040bcd04b4f5d4076d1ebbbafd8d97e38..ae8a7c616abfda2ec4ddd5eed3dc472d10caec89 100644
--- a/vp9/encoder/bitstream.c
+++ b/vp9/encoder/vp9_bitstream.c
@@ -9,27 +9,27 @@
  */
 
 
-#include "vp9/common/header.h"
-#include "encodemv.h"
-#include "vp9/common/entropymode.h"
-#include "vp9/common/findnearmv.h"
-#include "mcomp.h"
-#include "vp9/common/systemdependent.h"
+#include "vp9/common/vp9_header.h"
+#include "vp9_encodemv.h"
+#include "vp9/common/vp9_entropymode.h"
+#include "vp9/common/vp9_findnearmv.h"
+#include "vp9_mcomp.h"
+#include "vp9/common/vp9_systemdependent.h"
 #include <assert.h>
 #include <stdio.h>
 #include <limits.h>
-#include "vp9/common/pragmas.h"
+#include "vp9/common/vp9_pragmas.h"
 #include "vpx/vpx_encoder.h"
 #include "vpx_mem/vpx_mem.h"
-#include "bitstream.h"
-#include "segmentation.h"
-
-#include "vp9/common/seg_common.h"
-#include "vp9/common/pred_common.h"
-#include "vp9/common/entropy.h"
-#include "vp9/encoder/encodemv.h"
-#include "vp9/common/entropymv.h"
-#include "vp9/common/mvref_common.h"
+#include "vp9_bitstream.h"
+#include "vp9_segmentation.h"
+
+#include "vp9/common/vp9_seg_common.h"
+#include "vp9/common/vp9_pred_common.h"
+#include "vp9/common/vp9_entropy.h"
+#include "vp9/encoder/vp9_encodemv.h"
+#include "vp9/common/vp9_entropymv.h"
+#include "vp9/common/vp9_mvref_common.h"
 
 #if defined(SECTIONBITS_OUTPUT)
 unsigned __int64 Sectionbits[500];
diff --git a/vp9/encoder/bitstream.h b/vp9/encoder/vp9_bitstream.h
similarity index 100%
rename from vp9/encoder/bitstream.h
rename to vp9/encoder/vp9_bitstream.h
diff --git a/vp9/encoder/block.h b/vp9/encoder/vp9_block.h
similarity index 97%
rename from vp9/encoder/block.h
rename to vp9/encoder/vp9_block.h
index 9f4d060ccbfe4218c87b61d7c7268a755c73e027..986807e3c88ed741218be4ef4985d500a85445a3 100644
--- a/vp9/encoder/block.h
+++ b/vp9/encoder/vp9_block.h
@@ -12,11 +12,11 @@
 #ifndef __INC_BLOCK_H
 #define __INC_BLOCK_H
 
-#include "vp9/common/onyx.h"
-#include "vp9/common/entropymv.h"
-#include "vp9/common/entropy.h"
+#include "vp9/common/vp9_onyx.h"
+#include "vp9/common/vp9_entropymv.h"
+#include "vp9/common/vp9_entropy.h"
 #include "vpx_ports/mem.h"
-#include "vp9/common/onyxc_int.h"
+#include "vp9/common/vp9_onyxc_int.h"
 
 // motion search site
 typedef struct {
diff --git a/vp9/encoder/boolhuff.c b/vp9/encoder/vp9_boolhuff.c
similarity index 99%
rename from vp9/encoder/boolhuff.c
rename to vp9/encoder/vp9_boolhuff.c
index 0cb4b68cc89f40efde8b7f3719f17f42cb1aa9cc..7619dfadfea0869ad585f8b853f7875a3c8a5037 100644
--- a/vp9/encoder/boolhuff.c
+++ b/vp9/encoder/vp9_boolhuff.c
@@ -9,7 +9,7 @@
  */
 
 
-#include "boolhuff.h"
+#include "vp9_boolhuff.h"
 
 #if defined(SECTIONBITS_OUTPUT)
 unsigned __int64 Sectionbits[500];
diff --git a/vp9/encoder/boolhuff.h b/vp9/encoder/vp9_boolhuff.h
similarity index 98%
rename from vp9/encoder/boolhuff.h
rename to vp9/encoder/vp9_boolhuff.h
index e5fd0fb94ec62561104caafbaa73a67c6af7640a..2fad86b2e25dc51f586cc3ad0e67dda6460e72eb 100644
--- a/vp9/encoder/boolhuff.h
+++ b/vp9/encoder/vp9_boolhuff.h
@@ -11,7 +11,7 @@
 
 /****************************************************************************
 *
-*   Module Title :     boolhuff.h
+*   Module Title :     vp9_boolhuff.h
 *
 *   Description  :     Bool Coder header file.
 *
diff --git a/vp9/encoder/dct.c b/vp9/encoder/vp9_dct.c
similarity index 99%
rename from vp9/encoder/dct.c
rename to vp9/encoder/vp9_dct.c
index 108bdbeb033ade4f3703f19b37c8bfe881abe5cc..6753f2462883d9c9b272efb8387f79b999b5c5c4 100644
--- a/vp9/encoder/dct.c
+++ b/vp9/encoder/vp9_dct.c
@@ -12,9 +12,9 @@
 #include <assert.h>
 #include <math.h>
 #include "vpx_ports/config.h"
-#include "vp9/common/systemdependent.h"
+#include "vp9/common/vp9_systemdependent.h"
 
-#include "vp9/common/blockd.h"
+#include "vp9/common/vp9_blockd.h"
 
 // TODO: these transforms can be converted into integer forms to reduce
 //       the complexity
diff --git a/vp9/encoder/encodeframe.c b/vp9/encoder/vp9_encodeframe.c
similarity index 99%
rename from vp9/encoder/encodeframe.c
rename to vp9/encoder/vp9_encodeframe.c
index 6ad9eaeed626162f1049d01fb7289a5434d01339..fe486b192a44553b56a603cb75ecd016c7e96111 100644
--- a/vp9/encoder/encodeframe.c
+++ b/vp9/encoder/vp9_encodeframe.c
@@ -10,32 +10,32 @@
 
 
 #include "vpx_ports/config.h"
-#include "vp9/encoder/encodeframe.h"
-#include "encodemb.h"
-#include "encodemv.h"
-#include "vp9/common/common.h"
-#include "onyx_int.h"
-#include "vp9/common/extend.h"
-#include "vp9/common/entropymode.h"
-#include "vp9/common/quant_common.h"
-#include "segmentation.h"
-#include "vp9/common/setupintrarecon.h"
-#include "vp9/common/reconintra4x4.h"
-#include "encodeintra.h"
-#include "vp9/common/reconinter.h"
-#include "vp9/common/invtrans.h"
-#include "rdopt.h"
-#include "vp9/common/findnearmv.h"
-#include "vp9/common/reconintra.h"
-#include "vp9/common/seg_common.h"
-#include "vp9/encoder/tokenize.h"
+#include "vp9/encoder/vp9_encodeframe.h"
+#include "vp9_encodemb.h"
+#include "vp9_encodemv.h"
+#include "vp9/common/vp9_common.h"
+#include "vp9_onyx_int.h"
+#include "vp9/common/vp9_extend.h"
+#include "vp9/common/vp9_entropymode.h"
+#include "vp9/common/vp9_quant_common.h"
+#include "vp9_segmentation.h"
+#include "vp9/common/vp9_setupintrarecon.h"
+#include "vp9/common/vp9_reconintra4x4.h"
+#include "vp9_encodeintra.h"
+#include "vp9/common/vp9_reconinter.h"
+#include "vp9/common/vp9_invtrans.h"
+#include "vp9_rdopt.h"
+#include "vp9/common/vp9_findnearmv.h"
+#include "vp9/common/vp9_reconintra.h"
+#include "vp9/common/vp9_seg_common.h"
+#include "vp9/encoder/vp9_tokenize.h"
 #include "vp9_rtcd.h"
 #include <stdio.h>
 #include <math.h>
 #include <limits.h>
 #include "vpx_ports/vpx_timer.h"
-#include "vp9/common/pred_common.h"
-#include "vp9/common/mvref_common.h"
+#include "vp9/common/vp9_pred_common.h"
+#include "vp9/common/vp9_mvref_common.h"
 
 #define DBG_PRNT_SEGMAP 0
 
diff --git a/vp9/encoder/encodeframe.h b/vp9/encoder/vp9_encodeframe.h
similarity index 100%
rename from vp9/encoder/encodeframe.h
rename to vp9/encoder/vp9_encodeframe.h
diff --git a/vp9/encoder/encodeintra.c b/vp9/encoder/vp9_encodeintra.c
similarity index 97%
rename from vp9/encoder/encodeintra.c
rename to vp9/encoder/vp9_encodeintra.c
index 42e5e18733040830bffd948e84e5e652493daaa5..185b4319230c2ff251cc9948fcbcff63b51b10db 100644
--- a/vp9/encoder/encodeintra.c
+++ b/vp9/encoder/vp9_encodeintra.c
@@ -10,12 +10,12 @@
 
 #include "vpx_ports/config.h"
 #include "vp9_rtcd.h"
-#include "quantize.h"
-#include "vp9/common/reconintra.h"
-#include "vp9/common/reconintra4x4.h"
-#include "encodemb.h"
-#include "vp9/common/invtrans.h"
-#include "encodeintra.h"
+#include "vp9_quantize.h"
+#include "vp9/common/vp9_reconintra.h"
+#include "vp9/common/vp9_reconintra4x4.h"
+#include "vp9_encodemb.h"
+#include "vp9/common/vp9_invtrans.h"
+#include "vp9_encodeintra.h"
 
 #if CONFIG_RUNTIME_CPU_DETECT
 #define IF_RTCD(x) (x)
diff --git a/vp9/encoder/encodeintra.h b/vp9/encoder/vp9_encodeintra.h
similarity index 97%
rename from vp9/encoder/encodeintra.h
rename to vp9/encoder/vp9_encodeintra.h
index 9326ad65777a2a38a82a6d053019ed4e0609e7e3..8d6f41e62a801e10d97c0aa71b8408cf0c9a9eeb 100644
--- a/vp9/encoder/encodeintra.h
+++ b/vp9/encoder/vp9_encodeintra.h
@@ -11,7 +11,7 @@
 #ifndef __ENCODEINTRA_H_
 #define __ENCODEINTRA_H_
 
-#include "onyx_int.h"
+#include "vp9_onyx_int.h"
 
 int vp9_encode_intra(VP9_COMP *cpi, MACROBLOCK *x, int use_16x16_pred);
 void vp9_encode_intra16x16mby(MACROBLOCK *x);
diff --git a/vp9/encoder/encodemb.c b/vp9/encoder/vp9_encodemb.c
similarity index 99%
rename from vp9/encoder/encodemb.c
rename to vp9/encoder/vp9_encodemb.c
index 136a2489334e44f2ef05c87af7fa41539719a36a..145f75a3f9d54ed1bdc8a6f5305f10770994b794 100644
--- a/vp9/encoder/encodemb.c
+++ b/vp9/encoder/vp9_encodemb.c
@@ -9,15 +9,15 @@
  */
 
 #include "vpx_ports/config.h"
-#include "encodemb.h"
-#include "vp9/common/reconinter.h"
-#include "quantize.h"
-#include "tokenize.h"
-#include "vp9/common/invtrans.h"
-#include "vp9/common/reconintra.h"
+#include "vp9_encodemb.h"
+#include "vp9/common/vp9_reconinter.h"
+#include "vp9_quantize.h"
+#include "vp9_tokenize.h"
+#include "vp9/common/vp9_invtrans.h"
+#include "vp9/common/vp9_reconintra.h"
 #include "vpx_mem/vpx_mem.h"
-#include "rdopt.h"
-#include "vp9/common/systemdependent.h"
+#include "vp9_rdopt.h"
+#include "vp9/common/vp9_systemdependent.h"
 #include "vp9_rtcd.h"
 
 void vp9_subtract_b_c(BLOCK *be, BLOCKD *bd, int pitch) {
diff --git a/vp9/encoder/encodemb.h b/vp9/encoder/vp9_encodemb.h
similarity index 97%
rename from vp9/encoder/encodemb.h
rename to vp9/encoder/vp9_encodemb.h
index 905dad3c7c9543e9f1abca67e2b0d88019ea904d..38d7c73d4160126a95997633dac5cf7f10e0d9e0 100644
--- a/vp9/encoder/encodemb.h
+++ b/vp9/encoder/vp9_encodemb.h
@@ -13,7 +13,7 @@
 #define __INC_ENCODEMB_H
 
 #include "vpx_ports/config.h"
-#include "block.h"
+#include "vp9_block.h"
 
 typedef struct {
   MB_PREDICTION_MODE mode;
@@ -33,7 +33,7 @@ typedef struct {
 
 
 
-#include "onyx_int.h"
+#include "vp9_onyx_int.h"
 struct VP9_ENCODER_RTCD;
 void vp9_encode_inter16x16(MACROBLOCK *x);
 
diff --git a/vp9/encoder/encodemv.c b/vp9/encoder/vp9_encodemv.c
similarity index 99%
rename from vp9/encoder/encodemv.c
rename to vp9/encoder/vp9_encodemv.c
index 8b9c170a1e2c2cbc261c64032fa003aa8ec518d6..301fa24b1b2416b96c4e9d8d28b1c83bb2fc41c5 100644
--- a/vp9/encoder/encodemv.c
+++ b/vp9/encoder/vp9_encodemv.c
@@ -9,10 +9,10 @@
  */
 
 
-#include "vp9/common/common.h"
-#include "encodemv.h"
-#include "vp9/common/entropymode.h"
-#include "vp9/common/systemdependent.h"
+#include "vp9/common/vp9_common.h"
+#include "vp9_encodemv.h"
+#include "vp9/common/vp9_entropymode.h"
+#include "vp9/common/vp9_systemdependent.h"
 
 #include <math.h>
 
diff --git a/vp9/encoder/encodemv.h b/vp9/encoder/vp9_encodemv.h
similarity index 98%
rename from vp9/encoder/encodemv.h
rename to vp9/encoder/vp9_encodemv.h
index 639c44104e93b6ca87e0776c8d6c78f9adc0700f..f3589c147471819f63cdd5441ee038eedb727ec5 100644
--- a/vp9/encoder/encodemv.h
+++ b/vp9/encoder/vp9_encodemv.h
@@ -12,7 +12,7 @@
 #ifndef __INC_ENCODEMV_H
 #define __INC_ENCODEMV_H
 
-#include "onyx_int.h"
+#include "vp9_onyx_int.h"
 
 void vp9_write_nmv_probs(VP9_COMP* const, int usehp, vp9_writer* const);
 void vp9_encode_nmv(vp9_writer* const w, const MV* const mv,
diff --git a/vp9/encoder/firstpass.c b/vp9/encoder/vp9_firstpass.c
similarity index 99%
rename from vp9/encoder/firstpass.c
rename to vp9/encoder/vp9_firstpass.c
index 3e232efe828d7066fc1e4a2ed0afb63cbb1169c9..4a8f5ef2381eca1f3e7e25fa6f4698ed2fa4ea62 100644
--- a/vp9/encoder/firstpass.c
+++ b/vp9/encoder/vp9_firstpass.c
@@ -10,27 +10,27 @@
 
 #include "math.h"
 #include "limits.h"
-#include "block.h"
-#include "onyx_int.h"
-#include "variance.h"
-#include "encodeintra.h"
-#include "vp9/common/setupintrarecon.h"
-#include "mcomp.h"
-#include "firstpass.h"
+#include "vp9_block.h"
+#include "vp9_onyx_int.h"
+#include "vp9_variance.h"
+#include "vp9_encodeintra.h"
+#include "vp9/common/vp9_setupintrarecon.h"
+#include "vp9_mcomp.h"
+#include "vp9_firstpass.h"
 #include "vpx_scale/vpxscale.h"
-#include "vp9/encoder/encodeframe.h"
-#include "encodemb.h"
-#include "vp9/common/extend.h"
-#include "vp9/common/systemdependent.h"
+#include "vp9/encoder/vp9_encodeframe.h"
+#include "vp9_encodemb.h"
+#include "vp9/common/vp9_extend.h"
+#include "vp9/common/vp9_systemdependent.h"
 #include "vpx_mem/vpx_mem.h"
-#include "vp9/common/swapyv12buffer.h"
+#include "vp9/common/vp9_swapyv12buffer.h"
 #include <stdio.h>
-#include "vp9/encoder/quantize.h"
-#include "rdopt.h"
-#include "ratectrl.h"
-#include "vp9/common/quant_common.h"
-#include "vp9/common/entropymv.h"
-#include "encodemv.h"
+#include "vp9/encoder/vp9_quantize.h"
+#include "vp9_rdopt.h"
+#include "vp9_ratectrl.h"
+#include "vp9/common/vp9_quant_common.h"
+#include "vp9/common/vp9_entropymv.h"
+#include "vp9_encodemv.h"
 
 #define OUTPUT_FPF 0
 
diff --git a/vp9/encoder/firstpass.h b/vp9/encoder/vp9_firstpass.h
similarity index 100%
rename from vp9/encoder/firstpass.h
rename to vp9/encoder/vp9_firstpass.h
diff --git a/vp9/encoder/lookahead.c b/vp9/encoder/vp9_lookahead.c
similarity index 98%
rename from vp9/encoder/lookahead.c
rename to vp9/encoder/vp9_lookahead.c
index c10fecd47978e9f277d505a2755812b5edddee3c..ae17656dc33b47f08e3b97bee247d1605da1e37a 100644
--- a/vp9/encoder/lookahead.c
+++ b/vp9/encoder/vp9_lookahead.c
@@ -10,8 +10,8 @@
 #include <assert.h>
 #include <stdlib.h>
 #include "vpx_config.h"
-#include "lookahead.h"
-#include "vp9/common/extend.h"
+#include "vp9_lookahead.h"
+#include "vp9/common/vp9_extend.h"
 
 #define MAX_LAG_BUFFERS 25
 
diff --git a/vp9/encoder/lookahead.h b/vp9/encoder/vp9_lookahead.h
similarity index 100%
rename from vp9/encoder/lookahead.h
rename to vp9/encoder/vp9_lookahead.h
diff --git a/vp9/encoder/mbgraph.c b/vp9/encoder/vp9_mbgraph.c
similarity index 98%
rename from vp9/encoder/mbgraph.c
rename to vp9/encoder/vp9_mbgraph.c
index 2bcb3b5cf6566c5662e47cd2bf98f174a9e573c9..0a3e24671e2850ca77340577737756ecc4dbcf37 100644
--- a/vp9/encoder/mbgraph.c
+++ b/vp9/encoder/vp9_mbgraph.c
@@ -9,14 +9,14 @@
  */
 
 #include <limits.h>
-#include <vp9/encoder/encodeintra.h>
-#include <vp9/encoder/rdopt.h>
-#include <vp9/common/setupintrarecon.h>
-#include <vp9/common/blockd.h>
-#include <vp9/common/reconinter.h>
-#include <vp9/common/systemdependent.h>
+#include <vp9/encoder/vp9_encodeintra.h>
+#include <vp9/encoder/vp9_rdopt.h>
+#include <vp9/common/vp9_setupintrarecon.h>
+#include <vp9/common/vp9_blockd.h>
+#include <vp9/common/vp9_reconinter.h>
+#include <vp9/common/vp9_systemdependent.h>
 #include <vpx_mem/vpx_mem.h>
-#include <vp9/encoder/segmentation.h>
+#include <vp9/encoder/vp9_segmentation.h>
 
 static unsigned int do_16x16_motion_iteration(VP9_COMP *cpi,
                                               int_mv *ref_mv,
diff --git a/vp9/encoder/mbgraph.h b/vp9/encoder/vp9_mbgraph.h
similarity index 100%
rename from vp9/encoder/mbgraph.h
rename to vp9/encoder/vp9_mbgraph.h
diff --git a/vp9/encoder/mcomp.c b/vp9/encoder/vp9_mcomp.c
similarity index 99%
rename from vp9/encoder/mcomp.c
rename to vp9/encoder/vp9_mcomp.c
index a4914d877151931a1ff489f15aac881a14d9b3b7..b9be68c79497aa081a3cd4f0a53c56ac8bc20a76 100644
--- a/vp9/encoder/mcomp.c
+++ b/vp9/encoder/vp9_mcomp.c
@@ -9,14 +9,14 @@
  */
 
 
-#include "vp9/encoder/onyx_int.h"
-#include "mcomp.h"
+#include "vp9/encoder/vp9_onyx_int.h"
+#include "vp9_mcomp.h"
 #include "vpx_mem/vpx_mem.h"
 #include "vpx_ports/config.h"
 #include <stdio.h>
 #include <limits.h>
 #include <math.h>
-#include "vp9/common/findnearmv.h"
+#include "vp9/common/vp9_findnearmv.h"
 
 #ifdef ENTROPY_STATS
 static int mv_ref_ct [31] [4] [2];
@@ -2142,10 +2142,10 @@ int vp9_refining_search_sadx4(MACROBLOCK *x, BLOCK *b, BLOCKD *d,
 
 #ifdef ENTROPY_STATS
 void print_mode_context(void) {
-  FILE *f = fopen("modecont.c", "a");
+  FILE *f = fopen("vp9_modecont.c", "a");
   int i, j;
 
-  fprintf(f, "#include \"entropy.h\"\n");
+  fprintf(f, "#include \"vp9_entropy.h\"\n");
   fprintf(f, "const int vp9_mode_contexts[6][4] =");
   fprintf(f, "{\n");
   for (j = 0; j < 6; j++) {
diff --git a/vp9/encoder/mcomp.h b/vp9/encoder/vp9_mcomp.h
similarity index 98%
rename from vp9/encoder/mcomp.h
rename to vp9/encoder/vp9_mcomp.h
index 924ff21c8eec9bbfb70b226e66a74fe8aafae7b6..accb47b7bcbf9fc97a2cac94ef8ebaac519f757a 100644
--- a/vp9/encoder/mcomp.h
+++ b/vp9/encoder/vp9_mcomp.h
@@ -12,8 +12,8 @@
 #ifndef __INC_MCOMP_H
 #define __INC_MCOMP_H
 
-#include "block.h"
-#include "variance.h"
+#include "vp9_block.h"
+#include "vp9_variance.h"
 
 #ifdef ENTROPY_STATS
 extern void init_mv_ref_counts();
diff --git a/vp9/encoder/modecosts.c b/vp9/encoder/vp9_modecosts.c
similarity index 93%
rename from vp9/encoder/modecosts.c
rename to vp9/encoder/vp9_modecosts.c
index d5266c025cc0a2fa96f31ce2e723d5fb6deee898..5c2eeda84c6d69238d0da33bbde3a375d06bdb6e 100644
--- a/vp9/encoder/modecosts.c
+++ b/vp9/encoder/vp9_modecosts.c
@@ -9,10 +9,10 @@
  */
 
 
-#include "vp9/common/blockd.h"
-#include "onyx_int.h"
-#include "treewriter.h"
-#include "vp9/common/entropymode.h"
+#include "vp9/common/vp9_blockd.h"
+#include "vp9_onyx_int.h"
+#include "vp9_treewriter.h"
+#include "vp9/common/vp9_entropymode.h"
 
 
 void vp9_init_mode_costs(VP9_COMP *c) {
diff --git a/vp9/encoder/modecosts.h b/vp9/encoder/vp9_modecosts.h
similarity index 100%
rename from vp9/encoder/modecosts.h
rename to vp9/encoder/vp9_modecosts.h
diff --git a/vp9/encoder/onyx_if.c b/vp9/encoder/vp9_onyx_if.c
similarity index 99%
rename from vp9/encoder/onyx_if.c
rename to vp9/encoder/vp9_onyx_if.c
index 7d2a177c34d7f3abe35078df79a6e853aa39f54c..ec9f14e8a98fb99a1f92d9ba57937f05522a2050 100644
--- a/vp9/encoder/onyx_if.c
+++ b/vp9/encoder/vp9_onyx_if.c
@@ -10,36 +10,36 @@
 
 
 #include "vpx_config.h"
-#include "vp9/common/onyxc_int.h"
-#include "onyx_int.h"
-#include "vp9/common/systemdependent.h"
-#include "quantize.h"
-#include "vp9/common/alloccommon.h"
-#include "mcomp.h"
-#include "firstpass.h"
-#include "psnr.h"
+#include "vp9/common/vp9_onyxc_int.h"
+#include "vp9_onyx_int.h"
+#include "vp9/common/vp9_systemdependent.h"
+#include "vp9_quantize.h"
+#include "vp9/common/vp9_alloccommon.h"
+#include "vp9_mcomp.h"
+#include "vp9_firstpass.h"
+#include "vp9_psnr.h"
 #include "vpx_scale/vpxscale.h"
-#include "vp9/common/extend.h"
-#include "ratectrl.h"
-#include "vp9/common/quant_common.h"
-#include "segmentation.h"
+#include "vp9/common/vp9_extend.h"
+#include "vp9_ratectrl.h"
+#include "vp9/common/vp9_quant_common.h"
+#include "vp9_segmentation.h"
 #include "./vp9_rtcd.h"
 #if CONFIG_POSTPROC
-#include "vp9/common/postproc.h"
+#include "vp9/common/vp9_postproc.h"
 #endif
 #include "vpx_mem/vpx_mem.h"
-#include "vp9/common/swapyv12buffer.h"
+#include "vp9/common/vp9_swapyv12buffer.h"
 #include "vpx_ports/vpx_timer.h"
-#include "temporal_filter.h"
+#include "vp9_temporal_filter.h"
 
-#include "vp9/common/seg_common.h"
-#include "mbgraph.h"
-#include "vp9/common/pred_common.h"
-#include "vp9/encoder/rdopt.h"
-#include "bitstream.h"
-#include "vp9/encoder/picklpf.h"
-#include "ratectrl.h"
-#include "vp9/common/mvref_common.h"
+#include "vp9/common/vp9_seg_common.h"
+#include "vp9_mbgraph.h"
+#include "vp9/common/vp9_pred_common.h"
+#include "vp9/encoder/vp9_rdopt.h"
+#include "vp9_bitstream.h"
+#include "vp9/encoder/vp9_picklpf.h"
+#include "vp9_ratectrl.h"
+#include "vp9/common/vp9_mvref_common.h"
 
 
 #if ARCH_ARM
@@ -2244,9 +2244,9 @@ void vp9_remove_compressor(VP9_PTR *ptr) {
 #ifdef ENTROPY_STATS
     {
       int i, j, k;
-      FILE *fmode = fopen("modecontext.c", "w");
+      FILE *fmode = fopen("vp9_modecontext.c", "w");
 
-      fprintf(fmode, "\n#include \"entropymode.h\"\n\n");
+      fprintf(fmode, "\n#include \"vp9_entropymode.h\"\n\n");
       fprintf(fmode, "const unsigned int vp9_kf_default_bmode_counts ");
       fprintf(fmode, "[VP9_KF_BINTRAMODES][VP9_KF_BINTRAMODES]"
                      "[VP9_KF_BINTRAMODES] =\n{\n");
diff --git a/vp9/encoder/onyx_int.h b/vp9/encoder/vp9_onyx_int.h
similarity index 98%
rename from vp9/encoder/onyx_int.h
rename to vp9/encoder/vp9_onyx_int.h
index 696c0e36c7b0659b50f12e1cce580e488d9150ec..8cb77c352152d7d6d4b000c3b4b5f28db13cc7b3 100644
--- a/vp9/encoder/onyx_int.h
+++ b/vp9/encoder/vp9_onyx_int.h
@@ -14,21 +14,21 @@
 
 #include <stdio.h>
 #include "vpx_ports/config.h"
-#include "vp9/common/onyx.h"
-#include "treewriter.h"
-#include "tokenize.h"
-#include "vp9/common/onyxc_int.h"
-#include "variance.h"
-#include "encodemb.h"
-#include "quantize.h"
-#include "vp9/common/entropy.h"
-#include "vp9/common/entropymode.h"
+#include "vp9/common/vp9_onyx.h"
+#include "vp9_treewriter.h"
+#include "vp9_tokenize.h"
+#include "vp9/common/vp9_onyxc_int.h"
+#include "vp9_variance.h"
+#include "vp9_encodemb.h"
+#include "vp9_quantize.h"
+#include "vp9/common/vp9_entropy.h"
+#include "vp9/common/vp9_entropymode.h"
 #include "vpx_ports/mem.h"
 #include "vpx/internal/vpx_codec_internal.h"
-#include "mcomp.h"
-#include "temporal_filter.h"
-#include "vp9/common/findnearmv.h"
-#include "lookahead.h"
+#include "vp9_mcomp.h"
+#include "vp9_temporal_filter.h"
+#include "vp9/common/vp9_findnearmv.h"
+#include "vp9_lookahead.h"
 
 // #define SPEEDSTATS 1
 #define MIN_GF_INTERVAL             4
diff --git a/vp9/encoder/picklpf.c b/vp9/encoder/vp9_picklpf.c
similarity index 98%
rename from vp9/encoder/picklpf.c
rename to vp9/encoder/vp9_picklpf.c
index d5631bd235ba4bfa5a817194c50c43a3b3aecc81..4c971e200c79b55d847723f55ba52b0a8239c1d2 100644
--- a/vp9/encoder/picklpf.c
+++ b/vp9/encoder/vp9_picklpf.c
@@ -9,14 +9,14 @@
  */
 
 
-#include "vp9/common/onyxc_int.h"
-#include "onyx_int.h"
-#include "vp9/encoder/picklpf.h"
-#include "quantize.h"
+#include "vp9/common/vp9_onyxc_int.h"
+#include "vp9_onyx_int.h"
+#include "vp9/encoder/vp9_picklpf.h"
+#include "vp9_quantize.h"
 #include "vpx_mem/vpx_mem.h"
 #include "vpx_scale/vpxscale.h"
-#include "vp9/common/alloccommon.h"
-#include "vp9/common/loopfilter.h"
+#include "vp9/common/vp9_alloccommon.h"
+#include "vp9/common/vp9_loopfilter.h"
 #if ARCH_ARM
 #include "vpx_ports/arm.h"
 #endif
diff --git a/vp9/encoder/picklpf.h b/vp9/encoder/vp9_picklpf.h
similarity index 100%
rename from vp9/encoder/picklpf.h
rename to vp9/encoder/vp9_picklpf.h
diff --git a/vp9/encoder/psnr.c b/vp9/encoder/vp9_psnr.c
similarity index 90%
rename from vp9/encoder/psnr.c
rename to vp9/encoder/vp9_psnr.c
index 6b67bd3b952a89237d96e285e5ff05a3c075c145..eb00f41590b470466215a1f8b0a85ae053901482 100644
--- a/vp9/encoder/psnr.c
+++ b/vp9/encoder/vp9_psnr.c
@@ -11,7 +11,7 @@
 
 #include "vpx_scale/yv12config.h"
 #include "math.h"
-#include "vp9/common/systemdependent.h" /* for vp9_clear_system_state() */
+#include "vp9/common/vp9_systemdependent.h" /* for vp9_clear_system_state() */
 
 #define MAX_PSNR 100
 
diff --git a/vp9/encoder/psnr.h b/vp9/encoder/vp9_psnr.h
similarity index 100%
rename from vp9/encoder/psnr.h
rename to vp9/encoder/vp9_psnr.h
diff --git a/vp9/encoder/quantize.c b/vp9/encoder/vp9_quantize.c
similarity index 99%
rename from vp9/encoder/quantize.c
rename to vp9/encoder/vp9_quantize.c
index 807a55c18e7127a664fc4136752b488a2f26e8bd..f3c2bcb89e32bd5901599dd554d1819269e7f1b7 100644
--- a/vp9/encoder/quantize.c
+++ b/vp9/encoder/vp9_quantize.c
@@ -11,11 +11,11 @@
 #include <math.h>
 #include "vpx_mem/vpx_mem.h"
 
-#include "onyx_int.h"
-#include "quantize.h"
-#include "vp9/common/quant_common.h"
+#include "vp9_onyx_int.h"
+#include "vp9_quantize.h"
+#include "vp9/common/vp9_quant_common.h"
 
-#include "vp9/common/seg_common.h"
+#include "vp9/common/vp9_seg_common.h"
 
 #ifdef ENC_DEBUG
 extern int enc_debug;
diff --git a/vp9/encoder/quantize.h b/vp9/encoder/vp9_quantize.h
similarity index 96%
rename from vp9/encoder/quantize.h
rename to vp9/encoder/vp9_quantize.h
index b7a77613f298472c37d6ffbcd1a39a72846076c1..a62e7723e376b4dbf0a0aa62e4c531dd64594978 100644
--- a/vp9/encoder/quantize.h
+++ b/vp9/encoder/vp9_quantize.h
@@ -11,7 +11,7 @@
 #ifndef __INC_QUANTIZE_H
 #define __INC_QUANTIZE_H
 
-#include "block.h"
+#include "vp9_block.h"
 
 #define prototype_quantize_block(sym) \
   void (sym)(BLOCK *b,BLOCKD *d)
@@ -23,11 +23,11 @@
   void (sym)(MACROBLOCK *x)
 
 #if ARCH_X86 || ARCH_X86_64
-#include "x86/quantize_x86.h"
+#include "x86/vp9_quantize_x86.h"
 #endif
 
 #if ARCH_ARM
-#include "arm/quantize_arm.h"
+#include "arm/vp9_quantize_arm.h"
 #endif
 
 #define prototype_quantize_block_type(sym) \
diff --git a/vp9/encoder/ratectrl.c b/vp9/encoder/vp9_ratectrl.c
similarity index 98%
rename from vp9/encoder/ratectrl.c
rename to vp9/encoder/vp9_ratectrl.c
index e4972d2156f664a60bcce2dd7d66675f73693147..ab9dc71c895838998ae05c384f3ddbc887e12744 100644
--- a/vp9/encoder/ratectrl.c
+++ b/vp9/encoder/vp9_ratectrl.c
@@ -16,14 +16,14 @@
 #include <assert.h>
 
 #include "math.h"
-#include "vp9/common/alloccommon.h"
-#include "vp9/common/common.h"
-#include "ratectrl.h"
-#include "vp9/common/entropymode.h"
+#include "vp9/common/vp9_alloccommon.h"
+#include "vp9/common/vp9_common.h"
+#include "vp9_ratectrl.h"
+#include "vp9/common/vp9_entropymode.h"
 #include "vpx_mem/vpx_mem.h"
-#include "vp9/common/systemdependent.h"
-#include "encodemv.h"
-#include "vp9/common/quant_common.h"
+#include "vp9/common/vp9_systemdependent.h"
+#include "vp9_encodemv.h"
+#include "vp9/common/vp9_quant_common.h"
 
 #define MIN_BPB_FACTOR          0.005
 #define MAX_BPB_FACTOR          50
diff --git a/vp9/encoder/ratectrl.h b/vp9/encoder/vp9_ratectrl.h
similarity index 98%
rename from vp9/encoder/ratectrl.h
rename to vp9/encoder/vp9_ratectrl.h
index f5c751ea0ac6c4a3b2da216a95bfdf14af9c8092..a64b8f927f9859b4f0c47e5691137b4c87955f7a 100644
--- a/vp9/encoder/ratectrl.h
+++ b/vp9/encoder/vp9_ratectrl.h
@@ -11,7 +11,7 @@
 
 #if !defined __INC_RATECTRL_H
 
-#include "onyx_int.h"
+#include "vp9_onyx_int.h"
 
 #define FRAME_OVERHEAD_BITS 200
 
diff --git a/vp9/encoder/rdopt.c b/vp9/encoder/vp9_rdopt.c
similarity index 99%
rename from vp9/encoder/rdopt.c
rename to vp9/encoder/vp9_rdopt.c
index 53a87a49b20131c6ea207127d4786bbf8bcbb35c..017bf037763a6dd0a3559b3f54a3565a49a7670a 100644
--- a/vp9/encoder/rdopt.c
+++ b/vp9/encoder/vp9_rdopt.c
@@ -13,34 +13,34 @@
 #include <math.h>
 #include <limits.h>
 #include <assert.h>
-#include "vp9/common/pragmas.h"
-
-#include "tokenize.h"
-#include "treewriter.h"
-#include "onyx_int.h"
-#include "modecosts.h"
-#include "encodeintra.h"
-#include "vp9/common/entropymode.h"
-#include "vp9/common/reconinter.h"
-#include "vp9/common/reconintra.h"
-#include "vp9/common/reconintra4x4.h"
-#include "vp9/common/findnearmv.h"
-#include "vp9/common/quant_common.h"
-#include "encodemb.h"
-#include "quantize.h"
-#include "variance.h"
-#include "mcomp.h"
-#include "rdopt.h"
-#include "ratectrl.h"
+#include "vp9/common/vp9_pragmas.h"
+
+#include "vp9_tokenize.h"
+#include "vp9_treewriter.h"
+#include "vp9_onyx_int.h"
+#include "vp9_modecosts.h"
+#include "vp9_encodeintra.h"
+#include "vp9/common/vp9_entropymode.h"
+#include "vp9/common/vp9_reconinter.h"
+#include "vp9/common/vp9_reconintra.h"
+#include "vp9/common/vp9_reconintra4x4.h"
+#include "vp9/common/vp9_findnearmv.h"
+#include "vp9/common/vp9_quant_common.h"
+#include "vp9_encodemb.h"
+#include "vp9_quantize.h"
+#include "vp9_variance.h"
+#include "vp9_mcomp.h"
+#include "vp9_rdopt.h"
+#include "vp9_ratectrl.h"
 #include "vpx_mem/vpx_mem.h"
-#include "vp9/common/systemdependent.h"
-#include "vp9/encoder/encodemv.h"
+#include "vp9/common/vp9_systemdependent.h"
+#include "vp9/encoder/vp9_encodemv.h"
 
-#include "vp9/common/seg_common.h"
-#include "vp9/common/pred_common.h"
-#include "vp9/common/entropy.h"
+#include "vp9/common/vp9_seg_common.h"
+#include "vp9/common/vp9_pred_common.h"
+#include "vp9/common/vp9_entropy.h"
 #include "vp9_rtcd.h"
-#include "vp9/common/mvref_common.h"
+#include "vp9/common/vp9_mvref_common.h"
 
 #if CONFIG_RUNTIME_CPU_DETECT
 #define IF_RTCD(x)  (x)
diff --git a/vp9/encoder/rdopt.h b/vp9/encoder/vp9_rdopt.h
similarity index 100%
rename from vp9/encoder/rdopt.h
rename to vp9/encoder/vp9_rdopt.h
diff --git a/vp9/encoder/sad_c.c b/vp9/encoder/vp9_sad_c.c
similarity index 99%
rename from vp9/encoder/sad_c.c
rename to vp9/encoder/vp9_sad_c.c
index 0e02fabdf2b3f915a0932e1eeb6a83aa092abcf2..8e12f16db78cf7abfcf2c5badd4df97a88b92ccd 100644
--- a/vp9/encoder/sad_c.c
+++ b/vp9/encoder/vp9_sad_c.c
@@ -10,7 +10,7 @@
 
 
 #include <stdlib.h>
-#include "vp9/common/sadmxn.h"
+#include "vp9/common/vp9_sadmxn.h"
 #include "vpx_ports/config.h"
 #include "vpx/vpx_integer.h"
 
diff --git a/vp9/encoder/satd_c.c b/vp9/encoder/vp9_satd_c.c
similarity index 100%
rename from vp9/encoder/satd_c.c
rename to vp9/encoder/vp9_satd_c.c
diff --git a/vp9/encoder/segmentation.c b/vp9/encoder/vp9_segmentation.c
similarity index 99%
rename from vp9/encoder/segmentation.c
rename to vp9/encoder/vp9_segmentation.c
index 501299f1dc5fe80a5b22f585559f2aca00f190c2..a9efff9f894896f48ae26588efe047f1b5fc0bf9 100644
--- a/vp9/encoder/segmentation.c
+++ b/vp9/encoder/vp9_segmentation.c
@@ -11,8 +11,8 @@
 
 #include "limits.h"
 #include "vpx_mem/vpx_mem.h"
-#include "segmentation.h"
-#include "vp9/common/pred_common.h"
+#include "vp9_segmentation.h"
+#include "vp9/common/vp9_pred_common.h"
 
 void vp9_update_gf_useage_maps(VP9_COMP *cpi, VP9_COMMON *cm, MACROBLOCK *x) {
   int mb_row, mb_col;
diff --git a/vp9/encoder/segmentation.h b/vp9/encoder/vp9_segmentation.h
similarity index 96%
rename from vp9/encoder/segmentation.h
rename to vp9/encoder/vp9_segmentation.h
index 8caea4878ef8f2bf2064eb42d368621b4eefcd86..3d963f1d5223db8437cbdd794ac519629f98c192 100644
--- a/vp9/encoder/segmentation.h
+++ b/vp9/encoder/vp9_segmentation.h
@@ -10,8 +10,8 @@
 
 
 #include "string.h"
-#include "vp9/common/blockd.h"
-#include "onyx_int.h"
+#include "vp9/common/vp9_blockd.h"
+#include "vp9_onyx_int.h"
 
 #ifndef __INC_SEGMENTATION_H__
 #define __INC_SEGMENTATION_H__ 1
diff --git a/vp9/encoder/ssim.c b/vp9/encoder/vp9_ssim.c
similarity index 99%
rename from vp9/encoder/ssim.c
rename to vp9/encoder/vp9_ssim.c
index 464dfd341ac99a1210e721e276d71e3fd657b0d7..71ea02e087f06d999f9e36baa55cd1667e92bec1 100644
--- a/vp9/encoder/ssim.c
+++ b/vp9/encoder/vp9_ssim.c
@@ -9,7 +9,7 @@
  */
 
 
-#include "onyx_int.h"
+#include "vp9_onyx_int.h"
 
 void vp9_ssim_parms_16x16_c(unsigned char *s, int sp, unsigned char *r,
                             int rp, unsigned long *sum_s, unsigned long *sum_r,
diff --git a/vp9/encoder/temporal_filter.c b/vp9/encoder/vp9_temporal_filter.c
similarity index 97%
rename from vp9/encoder/temporal_filter.c
rename to vp9/encoder/vp9_temporal_filter.c
index 90037f92a7f24a21290c31cc23dcd1ee12c47fdd..c8fc6b7d0614b3e6f5886e5a2b33b27babfeae35 100644
--- a/vp9/encoder/temporal_filter.c
+++ b/vp9/encoder/vp9_temporal_filter.c
@@ -9,21 +9,21 @@
  */
 
 
-#include "vp9/common/onyxc_int.h"
-#include "onyx_int.h"
-#include "vp9/common/systemdependent.h"
-#include "quantize.h"
-#include "vp9/common/alloccommon.h"
-#include "mcomp.h"
-#include "firstpass.h"
-#include "psnr.h"
+#include "vp9/common/vp9_onyxc_int.h"
+#include "vp9_onyx_int.h"
+#include "vp9/common/vp9_systemdependent.h"
+#include "vp9_quantize.h"
+#include "vp9/common/vp9_alloccommon.h"
+#include "vp9_mcomp.h"
+#include "vp9_firstpass.h"
+#include "vp9_psnr.h"
 #include "vpx_scale/vpxscale.h"
-#include "vp9/common/extend.h"
-#include "ratectrl.h"
-#include "vp9/common/quant_common.h"
-#include "segmentation.h"
+#include "vp9/common/vp9_extend.h"
+#include "vp9_ratectrl.h"
+#include "vp9/common/vp9_quant_common.h"
+#include "vp9_segmentation.h"
 #include "vpx_mem/vpx_mem.h"
-#include "vp9/common/swapyv12buffer.h"
+#include "vp9/common/vp9_swapyv12buffer.h"
 #include "vpx_ports/vpx_timer.h"
 
 #include <math.h>
diff --git a/vp9/encoder/temporal_filter.h b/vp9/encoder/vp9_temporal_filter.h
similarity index 96%
rename from vp9/encoder/temporal_filter.h
rename to vp9/encoder/vp9_temporal_filter.h
index 0d9161db157e7f22ceee92196a4fd8171defd96b..c22ff2bab5b920ed86dd9cf1e05cd8adaa35e12c 100644
--- a/vp9/encoder/temporal_filter.h
+++ b/vp9/encoder/vp9_temporal_filter.h
@@ -26,7 +26,7 @@
   )
 
 #if ARCH_X86 || ARCH_X86_64
-#include "x86/temporal_filter_x86.h"
+#include "x86/vp9_temporal_filter_x86.h"
 #endif
 
 #ifndef vp9_temporal_filter_apply
diff --git a/vp9/encoder/tokenize.c b/vp9/encoder/vp9_tokenize.c
similarity index 98%
rename from vp9/encoder/tokenize.c
rename to vp9/encoder/vp9_tokenize.c
index bf835b7f2e4d3203696eea1f47a8e116f4928acb..c080408302714be32de533224d99425ad3bdb727 100644
--- a/vp9/encoder/tokenize.c
+++ b/vp9/encoder/vp9_tokenize.c
@@ -13,16 +13,16 @@
 #include <stdio.h>
 #include <string.h>
 #include <assert.h>
-#include "onyx_int.h"
-#include "tokenize.h"
+#include "vp9_onyx_int.h"
+#include "vp9_tokenize.h"
 #include "vpx_mem/vpx_mem.h"
 
-#include "vp9/common/pred_common.h"
-#include "vp9/common/seg_common.h"
-#include "vp9/common/entropy.h"
+#include "vp9/common/vp9_pred_common.h"
+#include "vp9/common/vp9_seg_common.h"
+#include "vp9/common/vp9_entropy.h"
 
 /* Global event counters used for accumulating statistics across several
-   compressions, then generating context.c = initial stats. */
+   compressions, then generating vp9_context.c = initial stats. */
 
 #ifdef ENTROPY_STATS
 INT64 context_counters[BLOCK_TYPES] [COEF_BANDS] [PREV_COEF_CONTEXTS] [MAX_ENTROPY_TOKENS];
@@ -447,9 +447,9 @@ void init_context_counters(void) {
 
 void print_context_counters() {
   int type, band, pt, t;
-  FILE *f = fopen("context.c", "w");
+  FILE *f = fopen("vp9_context.c", "w");
 
-  fprintf(f, "#include \"entropy.h\"\n");
+  fprintf(f, "#include \"vp9_entropy.h\"\n");
   fprintf(f, "\n/* *** GENERATED FILE: DO NOT EDIT *** */\n\n");
   fprintf(f, "static const unsigned int\n"
           "vp9_default_coef_counts[BLOCK_TYPES]\n"
diff --git a/vp9/encoder/tokenize.h b/vp9/encoder/vp9_tokenize.h
similarity index 97%
rename from vp9/encoder/tokenize.h
rename to vp9/encoder/vp9_tokenize.h
index 648e8cd4b528d8fb2534913f6bc6b03f7080e979..e69d8f6333197809500673948cb0257243a86005 100644
--- a/vp9/encoder/tokenize.h
+++ b/vp9/encoder/vp9_tokenize.h
@@ -12,8 +12,8 @@
 #ifndef tokenize_h
 #define tokenize_h
 
-#include "vp9/common/entropy.h"
-#include "block.h"
+#include "vp9/common/vp9_entropy.h"
+#include "vp9_block.h"
 
 void vp9_tokenize_initialize();
 
diff --git a/vp9/encoder/treewriter.c b/vp9/encoder/vp9_treewriter.c
similarity index 96%
rename from vp9/encoder/treewriter.c
rename to vp9/encoder/vp9_treewriter.c
index 2fb984b492ba60eb4693c4fe901c4f561dafd521..4bdf473dbcd8c75246af624e83d0dea3723830e1 100644
--- a/vp9/encoder/treewriter.c
+++ b/vp9/encoder/vp9_treewriter.c
@@ -9,7 +9,7 @@
  */
 
 
-#include "treewriter.h"
+#include "vp9_treewriter.h"
 
 static void cost(
   int *const C,
diff --git a/vp9/encoder/treewriter.h b/vp9/encoder/vp9_treewriter.h
similarity index 97%
rename from vp9/encoder/treewriter.h
rename to vp9/encoder/vp9_treewriter.h
index 1e1bf3d6bdb765b5934442b4c2873d30b68c2002..d9198afcf47a48be7c12896066b462a0f9ba93ff 100644
--- a/vp9/encoder/treewriter.h
+++ b/vp9/encoder/vp9_treewriter.h
@@ -15,9 +15,9 @@
 /* Trees map alphabets into huffman-like codes suitable for an arithmetic
    bit coder.  Timothy S Murphy  11 October 2004 */
 
-#include "vp9/common/treecoder.h"
+#include "vp9/common/vp9_treecoder.h"
 
-#include "boolhuff.h"       /* for now */
+#include "vp9_boolhuff.h"       /* for now */
 
 typedef BOOL_CODER vp9_writer;
 
diff --git a/vp9/encoder/variance.h b/vp9/encoder/vp9_variance.h
similarity index 100%
rename from vp9/encoder/variance.h
rename to vp9/encoder/vp9_variance.h
diff --git a/vp9/encoder/variance_c.c b/vp9/encoder/vp9_variance_c.c
similarity index 99%
rename from vp9/encoder/variance_c.c
rename to vp9/encoder/vp9_variance_c.c
index 7703ef0c20cac8e8ca6ee9184cb9af7e9f074a18..278c7ebbe6658bcff3c247c359237964e0c39119 100644
--- a/vp9/encoder/variance_c.c
+++ b/vp9/encoder/vp9_variance_c.c
@@ -9,9 +9,9 @@
  */
 
 
-#include "variance.h"
-#include "vp9/common/filter.h"
-#include "vp9/common/subpelvar.h"
+#include "vp9_variance.h"
+#include "vp9/common/vp9_filter.h"
+#include "vp9/common/vp9_subpelvar.h"
 #include "vpx/vpx_integer.h"
 
 unsigned int vp9_get_mb_ss_c(const short *src_ptr) {
diff --git a/vp9/encoder/x86/dct_mmx.asm b/vp9/encoder/x86/vp9_dct_mmx.asm
similarity index 100%
rename from vp9/encoder/x86/dct_mmx.asm
rename to vp9/encoder/x86/vp9_dct_mmx.asm
diff --git a/vp9/encoder/x86/dct_sse2.asm b/vp9/encoder/x86/vp9_dct_sse2.asm
similarity index 100%
rename from vp9/encoder/x86/dct_sse2.asm
rename to vp9/encoder/x86/vp9_dct_sse2.asm
diff --git a/vp9/encoder/x86/encodeopt.asm b/vp9/encoder/x86/vp9_encodeopt.asm
similarity index 100%
rename from vp9/encoder/x86/encodeopt.asm
rename to vp9/encoder/x86/vp9_encodeopt.asm
diff --git a/vp9/encoder/x86/fwalsh_sse2.asm b/vp9/encoder/x86/vp9_fwalsh_sse2.asm
similarity index 100%
rename from vp9/encoder/x86/fwalsh_sse2.asm
rename to vp9/encoder/x86/vp9_fwalsh_sse2.asm
diff --git a/vp9/encoder/x86/mcomp_x86.h b/vp9/encoder/x86/vp9_mcomp_x86.h
similarity index 100%
rename from vp9/encoder/x86/mcomp_x86.h
rename to vp9/encoder/x86/vp9_mcomp_x86.h
diff --git a/vp9/encoder/x86/quantize_mmx.asm b/vp9/encoder/x86/vp9_quantize_mmx.asm
similarity index 100%
rename from vp9/encoder/x86/quantize_mmx.asm
rename to vp9/encoder/x86/vp9_quantize_mmx.asm
diff --git a/vp9/encoder/x86/quantize_sse2.asm b/vp9/encoder/x86/vp9_quantize_sse2.asm
similarity index 99%
rename from vp9/encoder/x86/quantize_sse2.asm
rename to vp9/encoder/x86/vp9_quantize_sse2.asm
index af6aa6b3b859e9dc20a04c7807197e13ccbab0f5..0b3db6caa9fe8c02f67d790ac405f7f14866034f 100644
--- a/vp9/encoder/x86/quantize_sse2.asm
+++ b/vp9/encoder/x86/vp9_quantize_sse2.asm
@@ -149,7 +149,7 @@ sym(vp9_regular_quantize_b_sse2):
     mov         rdx, [rsp + zrun_zbin_boost] ; reset to b->zrun_zbin_boost
 .rq_zigzag_loop_%1:
 %endmacro
-; in vp9_default_zig_zag1d order: see vp9/common/entropy.c
+; in vp9_default_zig_zag1d order: see vp9/common/vp9_entropy.c
 ZIGZAG_LOOP  0
 ZIGZAG_LOOP  1
 ZIGZAG_LOOP  4
diff --git a/vp9/encoder/x86/quantize_sse4.asm b/vp9/encoder/x86/vp9_quantize_sse4.asm
similarity index 98%
rename from vp9/encoder/x86/quantize_sse4.asm
rename to vp9/encoder/x86/vp9_quantize_sse4.asm
index 4245b947cc78a2a5b41bb79ae27e3554034b8853..98269f120ac9167a2f971418fb6a51f795f7dc97 100644
--- a/vp9/encoder/x86/quantize_sse4.asm
+++ b/vp9/encoder/x86/vp9_quantize_sse4.asm
@@ -156,7 +156,7 @@ sym(vp9_regular_quantize_b_sse4):
     mov         rdx, rax                    ; reset to b->zrun_zbin_boost
 .rq_zigzag_loop_%1:
 %endmacro
-; in vp9_default_zig_zag1d order: see vp9/common/entropy.c
+; in vp9_default_zig_zag1d order: see vp9/common/vp9_entropy.c
 ZIGZAG_LOOP  0, 0, xmm2, xmm6, xmm4
 ZIGZAG_LOOP  1, 1, xmm2, xmm6, xmm4
 ZIGZAG_LOOP  4, 4, xmm2, xmm6, xmm4
@@ -249,6 +249,6 @@ ZIGZAG_LOOP 15, 7, xmm3, xmm7, xmm8
 
 SECTION_RODATA
 align 16
-; vp9/common/entropy.c: vp9_default_zig_zag1d
+; vp9/common/vp9_entropy.c: vp9_default_zig_zag1d
 zig_zag1d:
     db 0, 1, 4, 8, 5, 2, 3, 6, 9, 12, 13, 10, 7, 11, 14, 15
diff --git a/vp9/encoder/x86/quantize_ssse3.asm b/vp9/encoder/x86/vp9_quantize_ssse3.asm
similarity index 100%
rename from vp9/encoder/x86/quantize_ssse3.asm
rename to vp9/encoder/x86/vp9_quantize_ssse3.asm
diff --git a/vp9/encoder/x86/quantize_x86.h b/vp9/encoder/x86/vp9_quantize_x86.h
similarity index 100%
rename from vp9/encoder/x86/quantize_x86.h
rename to vp9/encoder/x86/vp9_quantize_x86.h
diff --git a/vp9/encoder/x86/sad_mmx.asm b/vp9/encoder/x86/vp9_sad_mmx.asm
similarity index 100%
rename from vp9/encoder/x86/sad_mmx.asm
rename to vp9/encoder/x86/vp9_sad_mmx.asm
diff --git a/vp9/encoder/x86/sad_sse2.asm b/vp9/encoder/x86/vp9_sad_sse2.asm
similarity index 100%
rename from vp9/encoder/x86/sad_sse2.asm
rename to vp9/encoder/x86/vp9_sad_sse2.asm
diff --git a/vp9/encoder/x86/sad_sse3.asm b/vp9/encoder/x86/vp9_sad_sse3.asm
similarity index 100%
rename from vp9/encoder/x86/sad_sse3.asm
rename to vp9/encoder/x86/vp9_sad_sse3.asm
diff --git a/vp9/encoder/x86/sad_sse4.asm b/vp9/encoder/x86/vp9_sad_sse4.asm
similarity index 100%
rename from vp9/encoder/x86/sad_sse4.asm
rename to vp9/encoder/x86/vp9_sad_sse4.asm
diff --git a/vp9/encoder/x86/sad_ssse3.asm b/vp9/encoder/x86/vp9_sad_ssse3.asm
similarity index 100%
rename from vp9/encoder/x86/sad_ssse3.asm
rename to vp9/encoder/x86/vp9_sad_ssse3.asm
diff --git a/vp9/encoder/x86/ssim_opt.asm b/vp9/encoder/x86/vp9_ssim_opt.asm
similarity index 100%
rename from vp9/encoder/x86/ssim_opt.asm
rename to vp9/encoder/x86/vp9_ssim_opt.asm
diff --git a/vp9/encoder/x86/subtract_mmx.asm b/vp9/encoder/x86/vp9_subtract_mmx.asm
similarity index 100%
rename from vp9/encoder/x86/subtract_mmx.asm
rename to vp9/encoder/x86/vp9_subtract_mmx.asm
diff --git a/vp9/encoder/x86/subtract_sse2.asm b/vp9/encoder/x86/vp9_subtract_sse2.asm
similarity index 100%
rename from vp9/encoder/x86/subtract_sse2.asm
rename to vp9/encoder/x86/vp9_subtract_sse2.asm
diff --git a/vp9/encoder/x86/temporal_filter_apply_sse2.asm b/vp9/encoder/x86/vp9_temporal_filter_apply_sse2.asm
similarity index 100%
rename from vp9/encoder/x86/temporal_filter_apply_sse2.asm
rename to vp9/encoder/x86/vp9_temporal_filter_apply_sse2.asm
diff --git a/vp9/encoder/x86/temporal_filter_x86.h b/vp9/encoder/x86/vp9_temporal_filter_x86.h
similarity index 100%
rename from vp9/encoder/x86/temporal_filter_x86.h
rename to vp9/encoder/x86/vp9_temporal_filter_x86.h
diff --git a/vp9/encoder/x86/variance_impl_mmx.asm b/vp9/encoder/x86/vp9_variance_impl_mmx.asm
similarity index 100%
rename from vp9/encoder/x86/variance_impl_mmx.asm
rename to vp9/encoder/x86/vp9_variance_impl_mmx.asm
diff --git a/vp9/encoder/x86/variance_impl_sse2.asm b/vp9/encoder/x86/vp9_variance_impl_sse2.asm
similarity index 100%
rename from vp9/encoder/x86/variance_impl_sse2.asm
rename to vp9/encoder/x86/vp9_variance_impl_sse2.asm
diff --git a/vp9/encoder/x86/variance_impl_ssse3.asm b/vp9/encoder/x86/vp9_variance_impl_ssse3.asm
similarity index 100%
rename from vp9/encoder/x86/variance_impl_ssse3.asm
rename to vp9/encoder/x86/vp9_variance_impl_ssse3.asm
diff --git a/vp9/encoder/x86/variance_mmx.c b/vp9/encoder/x86/vp9_variance_mmx.c
similarity index 99%
rename from vp9/encoder/x86/variance_mmx.c
rename to vp9/encoder/x86/vp9_variance_mmx.c
index 3b5f2a1b91c076850b77ffcc5e1373f8d5959adc..fa69130a10e2b6ae99f85741d0bd8a05805c9f32 100644
--- a/vp9/encoder/x86/variance_mmx.c
+++ b/vp9/encoder/x86/vp9_variance_mmx.c
@@ -9,8 +9,8 @@
  */
 
 #include "vpx_config.h"
-#include "vp9/encoder/variance.h"
-#include "vp9/common/pragmas.h"
+#include "vp9/encoder/vp9_variance.h"
+#include "vp9/common/vp9_pragmas.h"
 #include "vpx_ports/mem.h"
 
 extern void filter_block1d_h6_mmx
diff --git a/vp9/encoder/x86/variance_sse2.c b/vp9/encoder/x86/vp9_variance_sse2.c
similarity index 99%
rename from vp9/encoder/x86/variance_sse2.c
rename to vp9/encoder/x86/vp9_variance_sse2.c
index 9f897da51173827ffe40b8b1980b24192be29dd2..280efcd7aa9ada22675d924419ae99eae5fdfd64 100644
--- a/vp9/encoder/x86/variance_sse2.c
+++ b/vp9/encoder/x86/vp9_variance_sse2.c
@@ -9,8 +9,8 @@
  */
 
 #include "vpx_config.h"
-#include "vp9/encoder/variance.h"
-#include "vp9/common/pragmas.h"
+#include "vp9/encoder/vp9_variance.h"
+#include "vp9/common/vp9_pragmas.h"
 #include "vpx_ports/mem.h"
 
 #define HALFNDX 8
diff --git a/vp9/encoder/x86/variance_ssse3.c b/vp9/encoder/x86/vp9_variance_ssse3.c
similarity index 98%
rename from vp9/encoder/x86/variance_ssse3.c
rename to vp9/encoder/x86/vp9_variance_ssse3.c
index 81b06d117532182669627c509feaf0e088d279b7..f95a5423c89896f3d6fb45a91136ea4dc589b553 100644
--- a/vp9/encoder/x86/variance_ssse3.c
+++ b/vp9/encoder/x86/vp9_variance_ssse3.c
@@ -9,8 +9,8 @@
  */
 
 #include "vpx_config.h"
-#include "vp9/encoder/variance.h"
-#include "vp9/common/pragmas.h"
+#include "vp9/encoder/vp9_variance.h"
+#include "vp9/common/vp9_pragmas.h"
 #include "vpx_ports/mem.h"
 
 #define HALFNDX 8
diff --git a/vp9/encoder/x86/x86_csystemdependent.c b/vp9/encoder/x86/vp9_x86_csystemdependent.c
similarity index 97%
rename from vp9/encoder/x86/x86_csystemdependent.c
rename to vp9/encoder/x86/vp9_x86_csystemdependent.c
index 5fc86c1012fb55f1e191c6d4aec39321f90b8306..be3fe96dc7573e16f489d11e5ba8194bd0179734 100644
--- a/vp9/encoder/x86/x86_csystemdependent.c
+++ b/vp9/encoder/x86/vp9_x86_csystemdependent.c
@@ -11,8 +11,8 @@
 
 #include "vpx_ports/config.h"
 #include "vpx_ports/x86.h"
-#include "vp9/encoder/variance.h"
-#include "vp9/encoder/onyx_int.h"
+#include "vp9/encoder/vp9_variance.h"
+#include "vp9/encoder/vp9_onyx_int.h"
 
 // TODO(jimbankoski) Consider rewriting the c to take the same values rather
 // than going through these pointer conversions
diff --git a/vp9/vp9_common.mk b/vp9/vp9_common.mk
index 7b77231bceb991d37ac57518afae403df93205b0..0868be77cca76fc38d15910b47feea0d4dac693d 100644
--- a/vp9/vp9_common.mk
+++ b/vp9/vp9_common.mk
@@ -9,132 +9,132 @@
 ##
 
 VP9_COMMON_SRCS-yes += vp9_common.mk
-VP9_COMMON_SRCS-yes += common/type_aliases.h
-VP9_COMMON_SRCS-yes += common/pragmas.h
-VP9_COMMON_SRCS-yes += common/ppflags.h
-VP9_COMMON_SRCS-yes += common/onyx.h
-VP9_COMMON_SRCS-yes += common/onyxd.h
-VP9_COMMON_SRCS-yes += common/alloccommon.c
-VP9_COMMON_SRCS-yes += common/asm_com_offsets.c
-VP9_COMMON_SRCS-yes += common/blockd.c
-VP9_COMMON_SRCS-yes += common/coefupdateprobs.h
-VP9_COMMON_SRCS-yes += common/debugmodes.c
-VP9_COMMON_SRCS-yes += common/entropy.c
-VP9_COMMON_SRCS-yes += common/entropymode.c
-VP9_COMMON_SRCS-yes += common/entropymv.c
-VP9_COMMON_SRCS-yes += common/extend.c
-VP9_COMMON_SRCS-yes += common/filter.c
-VP9_COMMON_SRCS-yes += common/filter.h
-VP9_COMMON_SRCS-yes += common/findnearmv.c
-VP9_COMMON_SRCS-yes += common/generic/systemdependent.c
-VP9_COMMON_SRCS-yes += common/idctllm.c
-VP9_COMMON_SRCS-yes += common/alloccommon.h
-VP9_COMMON_SRCS-yes += common/blockd.h
-VP9_COMMON_SRCS-yes += common/common.h
-VP9_COMMON_SRCS-yes += common/common_types.h
-VP9_COMMON_SRCS-yes += common/entropy.h
-VP9_COMMON_SRCS-yes += common/entropymode.h
-VP9_COMMON_SRCS-yes += common/entropymv.h
-VP9_COMMON_SRCS-yes += common/extend.h
-VP9_COMMON_SRCS-yes += common/findnearmv.h
-VP9_COMMON_SRCS-yes += common/header.h
-VP9_COMMON_SRCS-yes += common/invtrans.h
-VP9_COMMON_SRCS-yes += common/loopfilter.h
-VP9_COMMON_SRCS-yes += common/modecont.h
-VP9_COMMON_SRCS-yes += common/mv.h
-VP9_COMMON_SRCS-yes += common/onyxc_int.h
-VP9_COMMON_SRCS-yes += common/pred_common.h
-VP9_COMMON_SRCS-yes += common/pred_common.c
-VP9_COMMON_SRCS-yes += common/quant_common.h
-VP9_COMMON_SRCS-yes += common/reconinter.h
-VP9_COMMON_SRCS-yes += common/reconintra.h
-VP9_COMMON_SRCS-yes += common/reconintra4x4.h
-VP9_COMMON_SRCS-yes += common/rtcd.c
-VP9_COMMON_SRCS-yes += common/rtcd_defs.sh
-VP9_COMMON_SRCS-yes += common/sadmxn.h
-VP9_COMMON_SRCS-yes += common/subpelvar.h
-VP9_COMMON_SRCS-yes += common/seg_common.h
-VP9_COMMON_SRCS-yes += common/seg_common.c
-VP9_COMMON_SRCS-yes += common/setupintrarecon.h
-VP9_COMMON_SRCS-yes += common/subpixel.h
-VP9_COMMON_SRCS-yes += common/swapyv12buffer.h
-VP9_COMMON_SRCS-yes += common/systemdependent.h
-VP9_COMMON_SRCS-yes += common/treecoder.h
-VP9_COMMON_SRCS-yes += common/invtrans.c
-VP9_COMMON_SRCS-yes += common/loopfilter.c
-VP9_COMMON_SRCS-yes += common/loopfilter_filters.c
-VP9_COMMON_SRCS-yes += common/mbpitch.c
-VP9_COMMON_SRCS-yes += common/modecont.c
-VP9_COMMON_SRCS-yes += common/modecontext.c
-VP9_COMMON_SRCS-yes += common/mvref_common.c
-VP9_COMMON_SRCS-yes += common/mvref_common.h
-VP9_COMMON_SRCS-yes += common/quant_common.c
-VP9_COMMON_SRCS-yes += common/recon.c
-VP9_COMMON_SRCS-yes += common/reconinter.c
-VP9_COMMON_SRCS-yes += common/reconintra.c
-VP9_COMMON_SRCS-yes += common/reconintra4x4.c
-VP9_COMMON_SRCS-yes += common/setupintrarecon.c
-VP9_COMMON_SRCS-yes += common/swapyv12buffer.c
-VP9_COMMON_SRCS-$(CONFIG_POSTPROC_VISUALIZER) += common/textblit.c
-VP9_COMMON_SRCS-yes += common/treecoder.c
-VP9_COMMON_SRCS-$(CONFIG_IMPLICIT_SEGMENTATION) += common/implicit_segmentation.c
+VP9_COMMON_SRCS-yes += common/vp9_type_aliases.h
+VP9_COMMON_SRCS-yes += common/vp9_pragmas.h
+VP9_COMMON_SRCS-yes += common/vp9_ppflags.h
+VP9_COMMON_SRCS-yes += common/vp9_onyx.h
+VP9_COMMON_SRCS-yes += common/vp9_onyxd.h
+VP9_COMMON_SRCS-yes += common/vp9_alloccommon.c
+VP9_COMMON_SRCS-yes += common/vp9_asm_com_offsets.c
+VP9_COMMON_SRCS-yes += common/vp9_blockd.c
+VP9_COMMON_SRCS-yes += common/vp9_coefupdateprobs.h
+VP9_COMMON_SRCS-yes += common/vp9_debugmodes.c
+VP9_COMMON_SRCS-yes += common/vp9_entropy.c
+VP9_COMMON_SRCS-yes += common/vp9_entropymode.c
+VP9_COMMON_SRCS-yes += common/vp9_entropymv.c
+VP9_COMMON_SRCS-yes += common/vp9_extend.c
+VP9_COMMON_SRCS-yes += common/vp9_filter.c
+VP9_COMMON_SRCS-yes += common/vp9_filter.h
+VP9_COMMON_SRCS-yes += common/vp9_findnearmv.c
+VP9_COMMON_SRCS-yes += common/generic/vp9_systemdependent.c
+VP9_COMMON_SRCS-yes += common/vp9_idctllm.c
+VP9_COMMON_SRCS-yes += common/vp9_alloccommon.h
+VP9_COMMON_SRCS-yes += common/vp9_blockd.h
+VP9_COMMON_SRCS-yes += common/vp9_common.h
+VP9_COMMON_SRCS-yes += common/vp9_common_types.h
+VP9_COMMON_SRCS-yes += common/vp9_entropy.h
+VP9_COMMON_SRCS-yes += common/vp9_entropymode.h
+VP9_COMMON_SRCS-yes += common/vp9_entropymv.h
+VP9_COMMON_SRCS-yes += common/vp9_extend.h
+VP9_COMMON_SRCS-yes += common/vp9_findnearmv.h
+VP9_COMMON_SRCS-yes += common/vp9_header.h
+VP9_COMMON_SRCS-yes += common/vp9_invtrans.h
+VP9_COMMON_SRCS-yes += common/vp9_loopfilter.h
+VP9_COMMON_SRCS-yes += common/vp9_modecont.h
+VP9_COMMON_SRCS-yes += common/vp9_mv.h
+VP9_COMMON_SRCS-yes += common/vp9_onyxc_int.h
+VP9_COMMON_SRCS-yes += common/vp9_pred_common.h
+VP9_COMMON_SRCS-yes += common/vp9_pred_common.c
+VP9_COMMON_SRCS-yes += common/vp9_quant_common.h
+VP9_COMMON_SRCS-yes += common/vp9_reconinter.h
+VP9_COMMON_SRCS-yes += common/vp9_reconintra.h
+VP9_COMMON_SRCS-yes += common/vp9_reconintra4x4.h
+VP9_COMMON_SRCS-yes += common/vp9_rtcd.c
+VP9_COMMON_SRCS-yes += common/vp9_rtcd_defs.sh
+VP9_COMMON_SRCS-yes += common/vp9_sadmxn.h
+VP9_COMMON_SRCS-yes += common/vp9_subpelvar.h
+VP9_COMMON_SRCS-yes += common/vp9_seg_common.h
+VP9_COMMON_SRCS-yes += common/vp9_seg_common.c
+VP9_COMMON_SRCS-yes += common/vp9_setupintrarecon.h
+VP9_COMMON_SRCS-yes += common/vp9_subpixel.h
+VP9_COMMON_SRCS-yes += common/vp9_swapyv12buffer.h
+VP9_COMMON_SRCS-yes += common/vp9_systemdependent.h
+VP9_COMMON_SRCS-yes += common/vp9_treecoder.h
+VP9_COMMON_SRCS-yes += common/vp9_invtrans.c
+VP9_COMMON_SRCS-yes += common/vp9_loopfilter.c
+VP9_COMMON_SRCS-yes += common/vp9_loopfilter_filters.c
+VP9_COMMON_SRCS-yes += common/vp9_mbpitch.c
+VP9_COMMON_SRCS-yes += common/vp9_modecont.c
+VP9_COMMON_SRCS-yes += common/vp9_modecontext.c
+VP9_COMMON_SRCS-yes += common/vp9_mvref_common.c
+VP9_COMMON_SRCS-yes += common/vp9_mvref_common.h
+VP9_COMMON_SRCS-yes += common/vp9_quant_common.c
+VP9_COMMON_SRCS-yes += common/vp9_recon.c
+VP9_COMMON_SRCS-yes += common/vp9_reconinter.c
+VP9_COMMON_SRCS-yes += common/vp9_reconintra.c
+VP9_COMMON_SRCS-yes += common/vp9_reconintra4x4.c
+VP9_COMMON_SRCS-yes += common/vp9_setupintrarecon.c
+VP9_COMMON_SRCS-yes += common/vp9_swapyv12buffer.c
+VP9_COMMON_SRCS-$(CONFIG_POSTPROC_VISUALIZER) += common/vp9_textblit.c
+VP9_COMMON_SRCS-yes += common/vp9_treecoder.c
+VP9_COMMON_SRCS-$(CONFIG_IMPLICIT_SEGMENTATION) += common/vp9_implicit_segmentation.c
 
-VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/idct_x86.h
-VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/subpixel_x86.h
-VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/loopfilter_x86.h
-VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/postproc_x86.h
-VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/x86_systemdependent.c
-VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/vp8_asm_stubs.c
-VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/loopfilter_x86.c
-VP9_COMMON_SRCS-$(CONFIG_POSTPROC) += common/postproc.h
-VP9_COMMON_SRCS-$(CONFIG_POSTPROC) += common/postproc.c
-VP9_COMMON_SRCS-$(HAVE_MMX) += common/x86/idctllm_mmx.asm
-VP9_COMMON_SRCS-$(HAVE_MMX) += common/x86/iwalsh_mmx.asm
-VP9_COMMON_SRCS-$(HAVE_MMX) += common/x86/recon_mmx.asm
-VP9_COMMON_SRCS-$(HAVE_MMX) += common/x86/subpixel_mmx.asm
-VP9_COMMON_SRCS-$(HAVE_MMX) += common/x86/loopfilter_mmx.asm
-VP9_COMMON_SRCS-$(HAVE_SSE2) += common/x86/idctllm_sse2.asm
-VP9_COMMON_SRCS-$(HAVE_SSE2) += common/x86/recon_sse2.asm
-VP9_COMMON_SRCS-$(HAVE_SSE2) += common/x86/recon_wrapper_sse2.c
-VP9_COMMON_SRCS-$(HAVE_SSE2) += common/x86/subpixel_sse2.asm
-VP9_COMMON_SRCS-$(HAVE_SSE2) += common/x86/loopfilter_sse2.asm
-VP9_COMMON_SRCS-$(HAVE_SSE2) += common/x86/iwalsh_sse2.asm
-VP9_COMMON_SRCS-$(HAVE_SSSE3) += common/x86/subpixel_8t_ssse3.asm
-VP9_COMMON_SRCS-$(HAVE_SSSE3) += common/x86/subpixel_ssse3.asm
+VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/vp9_idct_x86.h
+VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/vp9_subpixel_x86.h
+VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/vp9_loopfilter_x86.h
+VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/vp9_postproc_x86.h
+VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/vp9_x86_systemdependent.c
+VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/vp9_vp8_asm_stubs.c
+VP9_COMMON_SRCS-$(ARCH_X86)$(ARCH_X86_64) += common/x86/vp9_loopfilter_x86.c
+VP9_COMMON_SRCS-$(CONFIG_POSTPROC) += common/vp9_postproc.h
+VP9_COMMON_SRCS-$(CONFIG_POSTPROC) += common/vp9_postproc.c
+VP9_COMMON_SRCS-$(HAVE_MMX) += common/x86/vp9_idctllm_mmx.asm
+VP9_COMMON_SRCS-$(HAVE_MMX) += common/x86/vp9_iwalsh_mmx.asm
+VP9_COMMON_SRCS-$(HAVE_MMX) += common/x86/vp9_recon_mmx.asm
+VP9_COMMON_SRCS-$(HAVE_MMX) += common/x86/vp9_subpixel_mmx.asm
+VP9_COMMON_SRCS-$(HAVE_MMX) += common/x86/vp9_loopfilter_mmx.asm
+VP9_COMMON_SRCS-$(HAVE_SSE2) += common/x86/vp9_idctllm_sse2.asm
+VP9_COMMON_SRCS-$(HAVE_SSE2) += common/x86/vp9_recon_sse2.asm
+VP9_COMMON_SRCS-$(HAVE_SSE2) += common/x86/vp9_recon_wrapper_sse2.c
+VP9_COMMON_SRCS-$(HAVE_SSE2) += common/x86/vp9_subpixel_sse2.asm
+VP9_COMMON_SRCS-$(HAVE_SSE2) += common/x86/vp9_loopfilter_sse2.asm
+VP9_COMMON_SRCS-$(HAVE_SSE2) += common/x86/vp9_iwalsh_sse2.asm
+VP9_COMMON_SRCS-$(HAVE_SSSE3) += common/x86/vp9_subpixel_8t_ssse3.asm
+VP9_COMMON_SRCS-$(HAVE_SSSE3) += common/x86/vp9_subpixel_ssse3.asm
 ifeq ($(CONFIG_POSTPROC),yes)
-VP9_COMMON_SRCS-$(HAVE_MMX) += common/x86/postproc_mmx.asm
-VP9_COMMON_SRCS-$(HAVE_SSE2) += common/x86/postproc_sse2.asm
+VP9_COMMON_SRCS-$(HAVE_MMX) += common/x86/vp9_postproc_mmx.asm
+VP9_COMMON_SRCS-$(HAVE_SSE2) += common/x86/vp9_postproc_sse2.asm
 endif
 
 # common (c)
 ifeq ($(CONFIG_CSM),yes)
-VP9_COMMON_SRCS-yes += common/maskingmv.c
-VP9_COMMON_SRCS-$(HAVE_SSE3) += common/x86/mask_sse3.asm
+VP9_COMMON_SRCS-yes += common/vp9_maskingmv.c
+VP9_COMMON_SRCS-$(HAVE_SSE3) += common/x86/vp9_mask_sse3.asm
 endif
 
-VP9_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/filter_sse4.c
+VP9_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/vp9_filter_sse4.c
 ifeq ($(HAVE_SSE4_1),yes)
-$(call xform_obj_path_o_d,vp9/common/x86/filter_sse4.c): CFLAGS += -msse4
+$(call xform_obj_path_o_d,vp9/common/x86/vp9_filter_sse4.c): CFLAGS += -msse4
 endif
 
-VP9_COMMON_SRCS-$(HAVE_SSE2) += common/x86/filter_sse2.c
-VP9_COMMON_SRCS-$(HAVE_SSE2) += common/x86/sadmxn_x86.c
+VP9_COMMON_SRCS-$(HAVE_SSE2) += common/x86/vp9_filter_sse2.c
+VP9_COMMON_SRCS-$(HAVE_SSE2) += common/x86/vp9_sadmxn_x86.c
 ifeq ($(HAVE_SSE2),yes)
-$(call xform_obj_path_o_d,vp9/common/x86/filter_sse2.c): CFLAGS += -msse2
-$(call xform_obj_path_o_d,vp9/common/x86/loopfilter_x86.c): CFLAGS += -msse2
-$(call xform_obj_path_o_d,vp9/common/x86/sadmxn_x86.c): CFLAGS += -msse2
+$(call xform_obj_path_o_d,vp9/common/x86/vp9_filter_sse2.c): CFLAGS += -msse2
+$(call xform_obj_path_o_d,vp9/common/x86/vp9_loopfilter_x86.c): CFLAGS += -msse2
+$(call xform_obj_path_o_d,vp9/common/x86/vp9_sadmxn_x86.c): CFLAGS += -msse2
 endif
 
-VP9_COMMON_SRCS-$(ARCH_ARM)  += common/arm/arm_systemdependent.c
-VP9_COMMON_SRCS-$(ARCH_ARM)  += common/arm/bilinearfilter_arm.c
-VP9_COMMON_SRCS-$(ARCH_ARM)  += common/arm/bilinearfilter_arm.h
-VP9_COMMON_SRCS-$(ARCH_ARM)  += common/arm/filter_arm.c
-VP9_COMMON_SRCS-$(ARCH_ARM)  += common/arm/idct_arm.h
-VP9_COMMON_SRCS-$(ARCH_ARM)  += common/arm/loopfilter_arm.c
-VP9_COMMON_SRCS-$(ARCH_ARM)  += common/arm/loopfilter_arm.h
-VP9_COMMON_SRCS-$(ARCH_ARM)  += common/arm/recon_arm.h
-VP9_COMMON_SRCS-$(ARCH_ARM)  += common/arm/reconintra_arm.c
-VP9_COMMON_SRCS-$(ARCH_ARM)  += common/arm/subpixel_arm.h
+VP9_COMMON_SRCS-$(ARCH_ARM)  += common/arm/vp9_arm_systemdependent.c
+VP9_COMMON_SRCS-$(ARCH_ARM)  += common/arm/vp9_bilinearfilter_arm.c
+VP9_COMMON_SRCS-$(ARCH_ARM)  += common/arm/vp9_bilinearfilter_arm.h
+VP9_COMMON_SRCS-$(ARCH_ARM)  += common/arm/vp9_filter_arm.c
+VP9_COMMON_SRCS-$(ARCH_ARM)  += common/arm/vp9_idct_arm.h
+VP9_COMMON_SRCS-$(ARCH_ARM)  += common/arm/vp9_loopfilter_arm.c
+VP9_COMMON_SRCS-$(ARCH_ARM)  += common/arm/vp9_loopfilter_arm.h
+VP9_COMMON_SRCS-$(ARCH_ARM)  += common/arm/vp9_recon_arm.h
+VP9_COMMON_SRCS-$(ARCH_ARM)  += common/arm/vp9_reconintra_arm.c
+VP9_COMMON_SRCS-$(ARCH_ARM)  += common/arm/vp9_subpixel_arm.h
 
 # common (armv6)
 VP9_COMMON_SRCS-$(HAVE_ARMV6)  += common/arm/armv6/bilinearfilter_v6$(ASM)
@@ -176,10 +176,10 @@ VP9_COMMON_SRCS-$(HAVE_ARMV7)  += common/arm/neon/sixtappredict16x16_neon$(ASM)
 VP9_COMMON_SRCS-$(HAVE_ARMV7)  += common/arm/neon/recon16x16mb_neon$(ASM)
 VP9_COMMON_SRCS-$(HAVE_ARMV7)  += common/arm/neon/buildintrapredictorsmby_neon$(ASM)
 VP9_COMMON_SRCS-$(HAVE_ARMV7)  += common/arm/neon/save_neon_reg$(ASM)
-VP9_COMMON_SRCS-$(HAVE_ARMV7)  += common/arm/neon/recon_neon.c
+VP9_COMMON_SRCS-$(HAVE_ARMV7)  += common/arm/neon/vp9_recon_neon.c
 
 
 $(eval $(call asm_offsets_template,\
-         vp9_asm_com_offsets.asm, $(VP9_PREFIX)common/asm_com_offsets.c))
+         vp9_asm_com_offsets.asm, $(VP9_PREFIX)common/vp9_asm_com_offsets.c))
 
-$(eval $(call rtcd_h_template,vp9_rtcd,vp9/common/rtcd_defs.sh))
+$(eval $(call rtcd_h_template,vp9_rtcd,vp9/common/vp9_rtcd_defs.sh))
diff --git a/vp9/vp9_cx_iface.c b/vp9/vp9_cx_iface.c
index ae60ae1225c5afdc4b4ae3bfd71dc7fe870b1acd..1ef5ff19efe99025186ee667e641e7f293c30757 100644
--- a/vp9/vp9_cx_iface.c
+++ b/vp9/vp9_cx_iface.c
@@ -12,10 +12,10 @@
 #include "vpx/vpx_codec.h"
 #include "vpx/internal/vpx_codec_internal.h"
 #include "vpx_version.h"
-#include "vp9/encoder/onyx_int.h"
+#include "vp9/encoder/vp9_onyx_int.h"
 #include "vpx/vp8cx.h"
-#include "vp9/encoder/firstpass.h"
-#include "vp9/common/onyx.h"
+#include "vp9/encoder/vp9_firstpass.h"
+#include "vp9/common/vp9_onyx.h"
 #include <stdlib.h>
 #include <string.h>
 
diff --git a/vp9/vp9_dx_iface.c b/vp9/vp9_dx_iface.c
index 74321560f055f2a33ba987ec1af97264cae87a39..c35ebedb8b2cb63d4af0d0ada7f8ab6af907ccff 100644
--- a/vp9/vp9_dx_iface.c
+++ b/vp9/vp9_dx_iface.c
@@ -15,8 +15,8 @@
 #include "vpx/vp8dx.h"
 #include "vpx/internal/vpx_codec_internal.h"
 #include "vpx_version.h"
-#include "common/onyxd.h"
-#include "decoder/onyxd_int.h"
+#include "common/vp9_onyxd.h"
+#include "decoder/vp9_onyxd_int.h"
 
 #define VP8_CAP_POSTPROC (CONFIG_POSTPROC ? VPX_CODEC_CAP_POSTPROC : 0)
 typedef vpx_codec_stream_info_t  vp8_stream_info_t;
diff --git a/vp9/vp9cx.mk b/vp9/vp9cx.mk
index 6e157b0c48cad5284d66084736856645907df0bc..79997d1aaa449f3cbbcd9ee3470797aab5f080e5 100644
--- a/vp9/vp9cx.mk
+++ b/vp9/vp9cx.mk
@@ -30,91 +30,91 @@ VP9_CX_SRCS-yes += vp9_cx_iface.c
 #INCLUDES += common
 #INCLUDES += encoder
 
-VP9_CX_SRCS-yes += encoder/asm_enc_offsets.c
-VP9_CX_SRCS-yes += encoder/bitstream.c
-VP9_CX_SRCS-yes += encoder/boolhuff.c
-VP9_CX_SRCS-yes += encoder/dct.c
-VP9_CX_SRCS-yes += encoder/encodeframe.c
-VP9_CX_SRCS-yes += encoder/encodeintra.c
-VP9_CX_SRCS-yes += encoder/encodemb.c
-VP9_CX_SRCS-yes += encoder/encodemv.c
-VP9_CX_SRCS-yes += encoder/firstpass.c
-VP9_CX_SRCS-yes += encoder/generic/csystemdependent.c
-VP9_CX_SRCS-yes += encoder/block.h
-VP9_CX_SRCS-yes += encoder/boolhuff.h
-VP9_CX_SRCS-yes += encoder/bitstream.h
-VP9_CX_SRCS-yes += encoder/encodeintra.h
-VP9_CX_SRCS-yes += encoder/encodemb.h
-VP9_CX_SRCS-yes += encoder/encodemv.h
-VP9_CX_SRCS-yes += encoder/firstpass.h
-VP9_CX_SRCS-yes += encoder/lookahead.c
-VP9_CX_SRCS-yes += encoder/lookahead.h
-VP9_CX_SRCS-yes += encoder/mcomp.h
-VP9_CX_SRCS-yes += encoder/modecosts.h
-VP9_CX_SRCS-yes += encoder/onyx_int.h
-VP9_CX_SRCS-yes += encoder/psnr.h
-VP9_CX_SRCS-yes += encoder/quantize.h
-VP9_CX_SRCS-yes += encoder/ratectrl.h
-VP9_CX_SRCS-yes += encoder/rdopt.h
-VP9_CX_SRCS-yes += encoder/tokenize.h
-VP9_CX_SRCS-yes += encoder/treewriter.h
-VP9_CX_SRCS-yes += encoder/variance.h
-VP9_CX_SRCS-yes += encoder/mcomp.c
-VP9_CX_SRCS-yes += encoder/modecosts.c
-VP9_CX_SRCS-yes += encoder/onyx_if.c
-VP9_CX_SRCS-yes += encoder/picklpf.c
-VP9_CX_SRCS-yes += encoder/psnr.c
-VP9_CX_SRCS-yes += encoder/quantize.c
-VP9_CX_SRCS-yes += encoder/ratectrl.c
-VP9_CX_SRCS-yes += encoder/rdopt.c
-VP9_CX_SRCS-yes += encoder/sad_c.c
-VP9_CX_SRCS-yes += encoder/satd_c.c
-VP9_CX_SRCS-yes += encoder/segmentation.c
-VP9_CX_SRCS-yes += encoder/segmentation.h
-VP9_CX_SRCS-$(CONFIG_INTERNAL_STATS) += encoder/ssim.c
-VP9_CX_SRCS-yes += encoder/tokenize.c
-VP9_CX_SRCS-yes += encoder/treewriter.c
-VP9_CX_SRCS-yes += encoder/variance_c.c
+VP9_CX_SRCS-yes += encoder/vp9_asm_enc_offsets.c
+VP9_CX_SRCS-yes += encoder/vp9_bitstream.c
+VP9_CX_SRCS-yes += encoder/vp9_boolhuff.c
+VP9_CX_SRCS-yes += encoder/vp9_dct.c
+VP9_CX_SRCS-yes += encoder/vp9_encodeframe.c
+VP9_CX_SRCS-yes += encoder/vp9_encodeintra.c
+VP9_CX_SRCS-yes += encoder/vp9_encodemb.c
+VP9_CX_SRCS-yes += encoder/vp9_encodemv.c
+VP9_CX_SRCS-yes += encoder/vp9_firstpass.c
+VP9_CX_SRCS-yes += encoder/generic/vp9_csystemdependent.c
+VP9_CX_SRCS-yes += encoder/vp9_block.h
+VP9_CX_SRCS-yes += encoder/vp9_boolhuff.h
+VP9_CX_SRCS-yes += encoder/vp9_bitstream.h
+VP9_CX_SRCS-yes += encoder/vp9_encodeintra.h
+VP9_CX_SRCS-yes += encoder/vp9_encodemb.h
+VP9_CX_SRCS-yes += encoder/vp9_encodemv.h
+VP9_CX_SRCS-yes += encoder/vp9_firstpass.h
+VP9_CX_SRCS-yes += encoder/vp9_lookahead.c
+VP9_CX_SRCS-yes += encoder/vp9_lookahead.h
+VP9_CX_SRCS-yes += encoder/vp9_mcomp.h
+VP9_CX_SRCS-yes += encoder/vp9_modecosts.h
+VP9_CX_SRCS-yes += encoder/vp9_onyx_int.h
+VP9_CX_SRCS-yes += encoder/vp9_psnr.h
+VP9_CX_SRCS-yes += encoder/vp9_quantize.h
+VP9_CX_SRCS-yes += encoder/vp9_ratectrl.h
+VP9_CX_SRCS-yes += encoder/vp9_rdopt.h
+VP9_CX_SRCS-yes += encoder/vp9_tokenize.h
+VP9_CX_SRCS-yes += encoder/vp9_treewriter.h
+VP9_CX_SRCS-yes += encoder/vp9_variance.h
+VP9_CX_SRCS-yes += encoder/vp9_mcomp.c
+VP9_CX_SRCS-yes += encoder/vp9_modecosts.c
+VP9_CX_SRCS-yes += encoder/vp9_onyx_if.c
+VP9_CX_SRCS-yes += encoder/vp9_picklpf.c
+VP9_CX_SRCS-yes += encoder/vp9_psnr.c
+VP9_CX_SRCS-yes += encoder/vp9_quantize.c
+VP9_CX_SRCS-yes += encoder/vp9_ratectrl.c
+VP9_CX_SRCS-yes += encoder/vp9_rdopt.c
+VP9_CX_SRCS-yes += encoder/vp9_sad_c.c
+VP9_CX_SRCS-yes += encoder/vp9_satd_c.c
+VP9_CX_SRCS-yes += encoder/vp9_segmentation.c
+VP9_CX_SRCS-yes += encoder/vp9_segmentation.h
+VP9_CX_SRCS-$(CONFIG_INTERNAL_STATS) += encoder/vp9_ssim.c
+VP9_CX_SRCS-yes += encoder/vp9_tokenize.c
+VP9_CX_SRCS-yes += encoder/vp9_treewriter.c
+VP9_CX_SRCS-yes += encoder/vp9_variance_c.c
 ifeq ($(CONFIG_POSTPROC),yes)
-VP9_CX_SRCS-$(CONFIG_INTERNAL_STATS) += common/postproc.h
-VP9_CX_SRCS-$(CONFIG_INTERNAL_STATS) += common/postproc.c
+VP9_CX_SRCS-$(CONFIG_INTERNAL_STATS) += common/vp9_postproc.h
+VP9_CX_SRCS-$(CONFIG_INTERNAL_STATS) += common/vp9_postproc.c
 endif
-VP9_CX_SRCS-yes += encoder/temporal_filter.c
-VP9_CX_SRCS-yes += encoder/temporal_filter.h
-VP9_CX_SRCS-yes += encoder/mbgraph.c
-VP9_CX_SRCS-yes += encoder/mbgraph.h
+VP9_CX_SRCS-yes += encoder/vp9_temporal_filter.c
+VP9_CX_SRCS-yes += encoder/vp9_temporal_filter.h
+VP9_CX_SRCS-yes += encoder/vp9_mbgraph.c
+VP9_CX_SRCS-yes += encoder/vp9_mbgraph.h
 
 
-VP9_CX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += encoder/x86/mcomp_x86.h
-VP9_CX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += encoder/x86/quantize_x86.h
-VP9_CX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += encoder/x86/temporal_filter_x86.h
-VP9_CX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += encoder/x86/x86_csystemdependent.c
-VP9_CX_SRCS-$(HAVE_MMX) += encoder/x86/variance_mmx.c
-VP9_CX_SRCS-$(HAVE_MMX) += encoder/x86/variance_impl_mmx.asm
-VP9_CX_SRCS-$(HAVE_MMX) += encoder/x86/sad_mmx.asm
-VP9_CX_SRCS-$(HAVE_MMX) += encoder/x86/dct_mmx.asm
-VP9_CX_SRCS-$(HAVE_MMX) += encoder/x86/subtract_mmx.asm
-VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/dct_sse2.asm
-VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/variance_sse2.c
-VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/variance_impl_sse2.asm
-VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/sad_sse2.asm
-VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/fwalsh_sse2.asm
-VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/quantize_sse2.asm
-VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/subtract_sse2.asm
-VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/temporal_filter_apply_sse2.asm
-VP9_CX_SRCS-$(HAVE_SSE3) += encoder/x86/sad_sse3.asm
-VP9_CX_SRCS-$(HAVE_SSSE3) += encoder/x86/sad_ssse3.asm
-VP9_CX_SRCS-$(HAVE_SSSE3) += encoder/x86/variance_ssse3.c
-VP9_CX_SRCS-$(HAVE_SSSE3) += encoder/x86/variance_impl_ssse3.asm
-VP9_CX_SRCS-$(HAVE_SSSE3) += encoder/x86/quantize_ssse3.asm
-VP9_CX_SRCS-$(HAVE_SSE4_1) += encoder/x86/sad_sse4.asm
-VP9_CX_SRCS-$(HAVE_SSE4_1) += encoder/x86/quantize_sse4.asm
-VP9_CX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += encoder/x86/quantize_mmx.asm
-VP9_CX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += encoder/x86/encodeopt.asm
-VP9_CX_SRCS-$(ARCH_X86_64) += encoder/x86/ssim_opt.asm
+VP9_CX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += encoder/x86/vp9_mcomp_x86.h
+VP9_CX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += encoder/x86/vp9_quantize_x86.h
+VP9_CX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += encoder/x86/vp9_temporal_filter_x86.h
+VP9_CX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += encoder/x86/vp9_x86_csystemdependent.c
+VP9_CX_SRCS-$(HAVE_MMX) += encoder/x86/vp9_variance_mmx.c
+VP9_CX_SRCS-$(HAVE_MMX) += encoder/x86/vp9_variance_impl_mmx.asm
+VP9_CX_SRCS-$(HAVE_MMX) += encoder/x86/vp9_sad_mmx.asm
+VP9_CX_SRCS-$(HAVE_MMX) += encoder/x86/vp9_dct_mmx.asm
+VP9_CX_SRCS-$(HAVE_MMX) += encoder/x86/vp9_subtract_mmx.asm
+VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/vp9_dct_sse2.asm
+VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/vp9_variance_sse2.c
+VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/vp9_variance_impl_sse2.asm
+VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/vp9_sad_sse2.asm
+VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/vp9_fwalsh_sse2.asm
+VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/vp9_quantize_sse2.asm
+VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/vp9_subtract_sse2.asm
+VP9_CX_SRCS-$(HAVE_SSE2) += encoder/x86/vp9_temporal_filter_apply_sse2.asm
+VP9_CX_SRCS-$(HAVE_SSE3) += encoder/x86/vp9_sad_sse3.asm
+VP9_CX_SRCS-$(HAVE_SSSE3) += encoder/x86/vp9_sad_ssse3.asm
+VP9_CX_SRCS-$(HAVE_SSSE3) += encoder/x86/vp9_variance_ssse3.c
+VP9_CX_SRCS-$(HAVE_SSSE3) += encoder/x86/vp9_variance_impl_ssse3.asm
+VP9_CX_SRCS-$(HAVE_SSSE3) += encoder/x86/vp9_quantize_ssse3.asm
+VP9_CX_SRCS-$(HAVE_SSE4_1) += encoder/x86/vp9_sad_sse4.asm
+VP9_CX_SRCS-$(HAVE_SSE4_1) += encoder/x86/vp9_quantize_sse4.asm
+VP9_CX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += encoder/x86/vp9_quantize_mmx.asm
+VP9_CX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += encoder/x86/vp9_encodeopt.asm
+VP9_CX_SRCS-$(ARCH_X86_64) += encoder/x86/vp9_ssim_opt.asm
 
 
 VP9_CX_SRCS-yes := $(filter-out $(VP9_CX_SRCS_REMOVE-yes),$(VP9_CX_SRCS-yes))
 
 $(eval $(call asm_offsets_template,\
-         vp9_asm_enc_offsets.asm, $(VP9_PREFIX)encoder/asm_enc_offsets.c))
+         vp9_asm_enc_offsets.asm, $(VP9_PREFIX)encoder/vp9_asm_enc_offsets.c))
diff --git a/vp9/vp9cx_arm.mk b/vp9/vp9cx_arm.mk
index 92dece33c731faaeed4eae8688b3f9035e520152..d0108a84e0337111d4f8eaf1616270864939f052 100644
--- a/vp9/vp9cx_arm.mk
+++ b/vp9/vp9cx_arm.mk
@@ -13,20 +13,20 @@
 
 #File list for arm
 # encoder
-VP9_CX_SRCS-$(ARCH_ARM)  += encoder/arm/arm_csystemdependent.c
+VP9_CX_SRCS-$(ARCH_ARM)  += encoder/arm/vp9_arm_csystemdependent.c
 
-VP9_CX_SRCS-$(ARCH_ARM)  += encoder/arm/dct_arm.c
-VP9_CX_SRCS-$(ARCH_ARM)  += encoder/arm/dct_arm.h
-VP9_CX_SRCS-$(ARCH_ARM)  += encoder/arm/encodemb_arm.h
-VP9_CX_SRCS-$(ARCH_ARM)  += encoder/arm/quantize_arm.c
-VP9_CX_SRCS-$(ARCH_ARM)  += encoder/arm/quantize_arm.h
-VP9_CX_SRCS-$(ARCH_ARM)  += encoder/arm/variance_arm.c
-VP9_CX_SRCS-$(ARCH_ARM)  += encoder/arm/variance_arm.h
+VP9_CX_SRCS-$(ARCH_ARM)  += encoder/arm/vp9_dct_arm.c
+VP9_CX_SRCS-$(ARCH_ARM)  += encoder/arm/vp9_dct_arm.h
+VP9_CX_SRCS-$(ARCH_ARM)  += encoder/arm/vp9_encodemb_arm.h
+VP9_CX_SRCS-$(ARCH_ARM)  += encoder/arm/vp9_quantize_arm.c
+VP9_CX_SRCS-$(ARCH_ARM)  += encoder/arm/vp9_quantize_arm.h
+VP9_CX_SRCS-$(ARCH_ARM)  += encoder/arm/vp9_variance_arm.c
+VP9_CX_SRCS-$(ARCH_ARM)  += encoder/arm/vp9_variance_arm.h
 
 #File list for armv5te
 # encoder
-VP9_CX_SRCS-$(HAVE_ARMV5TE) += encoder/arm/boolhuff_arm.c
-VP9_CX_SRCS_REMOVE-$(HAVE_ARMV5TE)  += encoder/boolhuff.c
+VP9_CX_SRCS-$(HAVE_ARMV5TE) += encoder/arm/vp9_boolhuff_arm.c
+VP9_CX_SRCS_REMOVE-$(HAVE_ARMV5TE)  += encoder/vp9_boolhuff.c
 VP9_CX_SRCS-$(HAVE_ARMV5TE)  += encoder/arm/armv5te/boolhuff_armv5te$(ASM)
 VP9_CX_SRCS-$(HAVE_ARMV5TE)  += encoder/arm/armv5te/vp8_packtokens_armv5$(ASM)
 VP9_CX_SRCS-$(HAVE_ARMV5TE)  += encoder/arm/armv5te/vp8_packtokens_mbrow_armv5$(ASM)
@@ -49,7 +49,7 @@ VP9_CX_SRCS-$(HAVE_ARMV6)  += encoder/arm/armv6/walsh_v6$(ASM)
 #File list for neon
 # encoder
 VP9_CX_SRCS-$(HAVE_ARMV7)  += encoder/arm/neon/fastquantizeb_neon$(ASM)
-VP9_CX_SRCS-$(HAVE_ARMV7)  += encoder/arm/neon/picklpf_arm.c
+VP9_CX_SRCS-$(HAVE_ARMV7)  += encoder/arm/neon/vp9_picklpf_arm.c
 VP9_CX_SRCS-$(HAVE_ARMV7)  += encoder/arm/neon/sad8_neon$(ASM)
 VP9_CX_SRCS-$(HAVE_ARMV7)  += encoder/arm/neon/sad16_neon$(ASM)
 VP9_CX_SRCS-$(HAVE_ARMV7)  += encoder/arm/neon/shortfdct_neon$(ASM)
diff --git a/vp9/vp9dx.mk b/vp9/vp9dx.mk
index 75f6bfd6ee2add29f9670a4516ed924d2aee0d78..54af58d7f5b97b2b8b153376db45e4cdd6fc9b76 100644
--- a/vp9/vp9dx.mk
+++ b/vp9/vp9dx.mk
@@ -45,27 +45,27 @@ VP9_DX_SRCS-yes += vp9_dx_iface.c
 #INCLUDES += common
 #INCLUDES += decoder
 
-VP9_DX_SRCS-yes += decoder/asm_dec_offsets.c
-VP9_DX_SRCS-yes += decoder/dboolhuff.c
-VP9_DX_SRCS-yes += decoder/decodemv.c
-VP9_DX_SRCS-yes += decoder/decodframe.c
-VP9_DX_SRCS-yes += decoder/dequantize.c
-VP9_DX_SRCS-yes += decoder/detokenize.c
-VP9_DX_SRCS-yes += decoder/dboolhuff.h
-VP9_DX_SRCS-yes += decoder/decodemv.h
-VP9_DX_SRCS-yes += decoder/dequantize.h
-VP9_DX_SRCS-yes += decoder/detokenize.h
-VP9_DX_SRCS-yes += decoder/onyxd_int.h
-VP9_DX_SRCS-yes += decoder/treereader.h
-VP9_DX_SRCS-yes += decoder/onyxd_if.c
-VP9_DX_SRCS-yes += decoder/idct_blk.c
+VP9_DX_SRCS-yes += decoder/vp9_asm_dec_offsets.c
+VP9_DX_SRCS-yes += decoder/vp9_dboolhuff.c
+VP9_DX_SRCS-yes += decoder/vp9_decodemv.c
+VP9_DX_SRCS-yes += decoder/vp9_decodframe.c
+VP9_DX_SRCS-yes += decoder/vp9_dequantize.c
+VP9_DX_SRCS-yes += decoder/vp9_detokenize.c
+VP9_DX_SRCS-yes += decoder/vp9_dboolhuff.h
+VP9_DX_SRCS-yes += decoder/vp9_decodemv.h
+VP9_DX_SRCS-yes += decoder/vp9_dequantize.h
+VP9_DX_SRCS-yes += decoder/vp9_detokenize.h
+VP9_DX_SRCS-yes += decoder/vp9_onyxd_int.h
+VP9_DX_SRCS-yes += decoder/vp9_treereader.h
+VP9_DX_SRCS-yes += decoder/vp9_onyxd_if.c
+VP9_DX_SRCS-yes += decoder/vp9_idct_blk.c
 
 VP9_DX_SRCS-yes := $(filter-out $(VP9_DX_SRCS_REMOVE-yes),$(VP9_DX_SRCS-yes))
 
-VP9_DX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += decoder/x86/x86_dsystemdependent.c
-VP9_DX_SRCS-$(HAVE_MMX) += decoder/x86/dequantize_mmx.asm
-VP9_DX_SRCS-$(HAVE_MMX) += decoder/x86/idct_blk_mmx.c
-VP9_DX_SRCS-$(HAVE_SSE2) += decoder/x86/idct_blk_sse2.c
+VP9_DX_SRCS-$(ARCH_X86)$(ARCH_X86_64) += decoder/x86/vp9_x86_dsystemdependent.c
+VP9_DX_SRCS-$(HAVE_MMX) += decoder/x86/vp9_dequantize_mmx.asm
+VP9_DX_SRCS-$(HAVE_MMX) += decoder/x86/vp9_idct_blk_mmx.c
+VP9_DX_SRCS-$(HAVE_SSE2) += decoder/x86/vp9_idct_blk_sse2.c
 
 $(eval $(call asm_offsets_template,\
-         vp9_asm_dec_offsets.asm, $(VP9_PREFIX)decoder/asm_dec_offsets.c))
+         vp9_asm_dec_offsets.asm, $(VP9_PREFIX)decoder/vp9_asm_dec_offsets.c))
diff --git a/vp9/vp9dx_arm.mk b/vp9/vp9dx_arm.mk
index 8020c3d61096f6fa6f96500b12713a39478e2c3e..32ec26afad208cc15aaee958db4a48b0352db313 100644
--- a/vp9/vp9dx_arm.mk
+++ b/vp9/vp9dx_arm.mk
@@ -11,13 +11,13 @@
 
 #VP8_DX_SRCS list is modified according to different platforms.
 
-VP8_DX_SRCS-$(ARCH_ARM)  += decoder/arm/dequantize_arm.c
+VP8_DX_SRCS-$(ARCH_ARM)  += decoder/arm/vp9_dequantize_arm.c
 
 #File list for armv6
 VP8_DX_SRCS-$(HAVE_ARMV6)  += decoder/arm/armv6/dequant_dc_idct_v6$(ASM)
 VP8_DX_SRCS-$(HAVE_ARMV6)  += decoder/arm/armv6/dequant_idct_v6$(ASM)
 VP8_DX_SRCS-$(HAVE_ARMV6)  += decoder/arm/armv6/dequantize_v6$(ASM)
-VP8_DX_SRCS-$(HAVE_ARMV6)  += decoder/arm/armv6/idct_blk_v6.c
+VP8_DX_SRCS-$(HAVE_ARMV6)  += decoder/arm/armv6/vp9_idct_blk_v6.c
 
 #File list for neon
 VP8_DX_SRCS-$(HAVE_ARMV7)  += decoder/arm/neon/idct_dequant_dc_full_2x_neon$(ASM)
@@ -26,4 +26,4 @@ VP8_DX_SRCS-$(HAVE_ARMV7)  += decoder/arm/neon/dequant_idct_neon$(ASM)
 VP8_DX_SRCS-$(HAVE_ARMV7)  += decoder/arm/neon/idct_dequant_full_2x_neon$(ASM)
 VP8_DX_SRCS-$(HAVE_ARMV7)  += decoder/arm/neon/idct_dequant_0_2x_neon$(ASM)
 VP8_DX_SRCS-$(HAVE_ARMV7)  += decoder/arm/neon/dequantizeb_neon$(ASM)
-VP8_DX_SRCS-$(HAVE_ARMV7)  += decoder/arm/neon/idct_blk_neon.c
+VP8_DX_SRCS-$(HAVE_ARMV7)  += decoder/arm/neon/vp9_idct_blk_neon.c