Move bit reader files to vpx_dsp
authorYaowu Xu <yaowu@google.com>
Fri, 17 Jul 2015 20:38:54 +0000 (13:38 -0700)
committerYaowu Xu <yaowu@google.com>
Fri, 17 Jul 2015 22:38:40 +0000 (15:38 -0700)
Change-Id: Ib1cb1fbe92a39ff5312cee069559be6d3ea458d0

24 files changed:
test/vp9_boolcoder_test.cc
vp9/common/vp9_entropy.h
vp9/common/vp9_entropymv.h
vp9/common/vp9_seg_common.h
vp9/decoder/vp9_decodeframe.c
vp9/decoder/vp9_decodemv.c
vp9/decoder/vp9_decodemv.h
vp9/decoder/vp9_decoder.h
vp9/decoder/vp9_detokenize.h
vp9/decoder/vp9_dsubexp.h
vp9/encoder/vp9_cost.c
vp9/encoder/vp9_cost.h
vp9/encoder/vp9_subexp.h
vp9/encoder/vp9_writer.h
vp9/vp9_common.mk
vp9/vp9_dx_iface.c
vp9/vp9dx.mk
vpx_dsp/vp9_prob.c [moved from vp9/common/vp9_prob.c with 98% similarity]
vpx_dsp/vp9_prob.h [moved from vp9/common/vp9_prob.h with 98% similarity]
vpx_dsp/vp9_read_bit_buffer.c [moved from vp9/decoder/vp9_read_bit_buffer.c with 96% similarity]
vpx_dsp/vp9_read_bit_buffer.h [moved from vp9/decoder/vp9_read_bit_buffer.h with 100% similarity]
vpx_dsp/vp9_reader.c [moved from vp9/decoder/vp9_reader.c with 97% similarity]
vpx_dsp/vp9_reader.h [moved from vp9/decoder/vp9_reader.h with 99% similarity]
vpx_dsp/vpx_dsp.mk

index c7f0cd8..44557d7 100644 (file)
 
 #include "third_party/googletest/src/include/gtest/gtest.h"
 
-#include "vp9/decoder/vp9_reader.h"
+#include "vpx/vpx_integer.h"
+#include "vpx_dsp/vp9_reader.h"
+
 #include "vp9/encoder/vp9_writer.h"
 
 #include "test/acm_random.h"
-#include "vpx/vpx_integer.h"
 
 using libvpx_test::ACMRandom;
 
index 2fc97c3..42dab91 100644 (file)
 #define VP9_COMMON_VP9_ENTROPY_H_
 
 #include "vpx/vpx_integer.h"
+#include "vpx_dsp/vp9_prob.h"
 
 #include "vp9/common/vp9_common.h"
 #include "vp9/common/vp9_enums.h"
-#include "vp9/common/vp9_prob.h"
 
 #ifdef __cplusplus
 extern "C" {
index 637f451..00890ab 100644 (file)
@@ -14,8 +14,9 @@
 
 #include "./vpx_config.h"
 
+#include "vpx_dsp/vp9_prob.h"
+
 #include "vp9/common/vp9_mv.h"
-#include "vp9/common/vp9_prob.h"
 
 #ifdef __cplusplus
 extern "C" {
index 95c9918..99b83c6 100644 (file)
@@ -11,7 +11,7 @@
 #ifndef VP9_COMMON_VP9_SEG_COMMON_H_
 #define VP9_COMMON_VP9_SEG_COMMON_H_
 
-#include "vp9/common/vp9_prob.h"
+#include "vpx_dsp/vp9_prob.h"
 
 #ifdef __cplusplus
 extern "C" {
index 8f7457e..9b70d46 100644 (file)
@@ -14,6 +14,8 @@
 #include "./vp9_rtcd.h"
 #include "./vpx_scale_rtcd.h"
 
+#include "vpx_dsp/vp9_read_bit_buffer.h"
+#include "vpx_dsp/vp9_reader.h"
 #include "vpx_mem/vpx_mem.h"
 #include "vpx_ports/mem.h"
 #include "vpx_ports/mem_ops.h"
@@ -38,8 +40,6 @@
 #include "vp9/decoder/vp9_decodemv.h"
 #include "vp9/decoder/vp9_decoder.h"
 #include "vp9/decoder/vp9_dsubexp.h"
-#include "vp9/decoder/vp9_read_bit_buffer.h"
-#include "vp9/decoder/vp9_reader.h"
 
 #define MAX_VP9_HEADER_SIZE 80
 
index d42a654..7b102ef 100644 (file)
@@ -21,7 +21,6 @@
 
 #include "vp9/decoder/vp9_decodemv.h"
 #include "vp9/decoder/vp9_decodeframe.h"
-#include "vp9/decoder/vp9_reader.h"
 
 static PREDICTION_MODE read_intra_mode(vp9_reader *r, const vp9_prob *p) {
   return (PREDICTION_MODE)vp9_read_tree(r, vp9_intra_mode_tree, p);
index 53bac8c..0024598 100644 (file)
@@ -11,8 +11,9 @@
 #ifndef VP9_DECODER_VP9_DECODEMV_H_
 #define VP9_DECODER_VP9_DECODEMV_H_
 
+#include "vpx_dsp/vp9_reader.h"
+
 #include "vp9/decoder/vp9_decoder.h"
-#include "vp9/decoder/vp9_reader.h"
 
 #ifdef __cplusplus
 extern "C" {
index af47f85..9eb4b4c 100644 (file)
@@ -14,6 +14,7 @@
 #include "./vpx_config.h"
 
 #include "vpx/vpx_codec.h"
+#include "vpx_dsp/vp9_reader.h"
 #include "vpx_scale/yv12config.h"
 #include "vpx_util/vpx_thread.h"
 
@@ -21,7 +22,6 @@
 #include "vp9/common/vp9_onyxc_int.h"
 #include "vp9/common/vp9_ppflags.h"
 #include "vp9/decoder/vp9_dthread.h"
-#include "vp9/decoder/vp9_reader.h"
 
 #ifdef __cplusplus
 extern "C" {
index cf0e48a..c67bb06 100644 (file)
@@ -12,8 +12,9 @@
 #ifndef VP9_DECODER_VP9_DETOKENIZE_H_
 #define VP9_DECODER_VP9_DETOKENIZE_H_
 
+#include "vpx_dsp/vp9_reader.h"
+
 #include "vp9/decoder/vp9_decoder.h"
-#include "vp9/decoder/vp9_reader.h"
 #include "vp9/common/vp9_scan.h"
 
 #ifdef __cplusplus
index 436f434..1197194 100644 (file)
@@ -12,7 +12,7 @@
 #ifndef VP9_DECODER_VP9_DSUBEXP_H_
 #define VP9_DECODER_VP9_DSUBEXP_H_
 
-#include "vp9/decoder/vp9_reader.h"
+#include "vpx_dsp/vp9_reader.h"
 
 #ifdef __cplusplus
 extern "C" {
index 1c3c3d2..01ee553 100644 (file)
@@ -7,6 +7,7 @@
  *  in the file PATENTS.  All contributing project authors may
  *  be found in the AUTHORS file in the root of the source tree.
  */
+#include <assert.h>
 
 #include "vp9/encoder/vp9_cost.h"
 
index 6d2b940..12adad7 100644 (file)
@@ -11,7 +11,7 @@
 #ifndef VP9_ENCODER_VP9_COST_H_
 #define VP9_ENCODER_VP9_COST_H_
 
-#include "vp9/common/vp9_prob.h"
+#include "vpx_dsp/vp9_prob.h"
 
 #ifdef __cplusplus
 extern "C" {
index 6fbb747..b749f04 100644 (file)
@@ -16,7 +16,7 @@
 extern "C" {
 #endif
 
-#include "vp9/common/vp9_prob.h"
+#include "vpx_dsp/vp9_prob.h"
 
 struct vp9_writer;
 
index e347ea4..5903964 100644 (file)
@@ -13,7 +13,7 @@
 
 #include "vpx_ports/mem.h"
 
-#include "vp9/common/vp9_prob.h"
+#include "vpx_dsp/vp9_prob.h"
 
 #ifdef __cplusplus
 extern "C" {
index 9e27257..e1463fc 100644 (file)
@@ -38,8 +38,6 @@ 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_prob.h
-VP9_COMMON_SRCS-yes += common/vp9_prob.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
index 5b62c3e..b86b1ca 100644 (file)
@@ -17,6 +17,7 @@
 #include "vpx/internal/vpx_codec_internal.h"
 #include "vpx/vp8dx.h"
 #include "vpx/vpx_decoder.h"
+#include "vpx_dsp/vp9_read_bit_buffer.h"
 #include "vpx_util/vpx_thread.h"
 
 #include "vp9/common/vp9_alloccommon.h"
@@ -24,7 +25,6 @@
 
 #include "vp9/decoder/vp9_decoder.h"
 #include "vp9/decoder/vp9_decodeframe.h"
-#include "vp9/decoder/vp9_read_bit_buffer.h"
 
 #include "vp9/vp9_iface_common.h"
 
index c105adb..0e9cf16 100644 (file)
@@ -21,10 +21,6 @@ VP9_DX_SRCS-yes += decoder/vp9_decodemv.c
 VP9_DX_SRCS-yes += decoder/vp9_decodeframe.c
 VP9_DX_SRCS-yes += decoder/vp9_decodeframe.h
 VP9_DX_SRCS-yes += decoder/vp9_detokenize.c
-VP9_DX_SRCS-yes += decoder/vp9_reader.h
-VP9_DX_SRCS-yes += decoder/vp9_reader.c
-VP9_DX_SRCS-yes += decoder/vp9_read_bit_buffer.c
-VP9_DX_SRCS-yes += decoder/vp9_read_bit_buffer.h
 VP9_DX_SRCS-yes += decoder/vp9_decodemv.h
 VP9_DX_SRCS-yes += decoder/vp9_detokenize.h
 VP9_DX_SRCS-yes += decoder/vp9_dthread.c
similarity index 98%
rename from vp9/common/vp9_prob.c
rename to vpx_dsp/vp9_prob.c
index 3b7b9bf..92dd2d5 100644 (file)
@@ -8,7 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#include "vp9/common/vp9_prob.h"
+#include "./vp9_prob.h"
 
 const uint8_t vp9_norm[256] = {
   0, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,
similarity index 98%
rename from vp9/common/vp9_prob.h
rename to vpx_dsp/vp9_prob.h
index c69c62c..09be344 100644 (file)
 #define VP9_COMMON_VP9_PROB_H_
 
 #include "./vpx_config.h"
+#include "./vpx_dsp_common.h"
 
 #include "vpx_ports/mem.h"
 
-#include "vp9/common/vp9_common.h"
-
 #ifdef __cplusplus
 extern "C" {
 #endif
similarity index 96%
rename from vp9/decoder/vp9_read_bit_buffer.c
rename to vpx_dsp/vp9_read_bit_buffer.c
index c3b38a9..c712a7f 100644 (file)
@@ -7,7 +7,7 @@
  *  in the file PATENTS.  All contributing project authors may
  *  be found in the AUTHORS file in the root of the source tree.
  */
-#include "vp9/decoder/vp9_read_bit_buffer.h"
+#include "./vp9_read_bit_buffer.h"
 
 size_t vp9_rb_bytes_read(struct vp9_read_bit_buffer *rb) {
   return (rb->bit_offset + 7) >> 3;
similarity index 97%
rename from vp9/decoder/vp9_reader.c
rename to vpx_dsp/vp9_reader.c
index 2c96f74..d97c94a 100644 (file)
@@ -7,12 +7,12 @@
  *  in the file PATENTS.  All contributing project authors may
  *  be found in the AUTHORS file in the root of the source tree.
  */
+#include "./vp9_prob.h"
+#include "./vp9_reader.h"
 
 #include "vpx_ports/mem.h"
 #include "vpx_mem/vpx_mem.h"
 
-#include "vp9/decoder/vp9_reader.h"
-
 int vp9_reader_init(vp9_reader *r,
                     const uint8_t *buffer,
                     size_t size,
similarity index 99%
rename from vp9/decoder/vp9_reader.h
rename to vpx_dsp/vp9_reader.h
index 4959985..f022fb1 100644 (file)
@@ -18,8 +18,7 @@
 #include "vpx_ports/mem.h"
 #include "vpx/vp8dx.h"
 #include "vpx/vpx_integer.h"
-
-#include "vp9/common/vp9_prob.h"
+#include "vpx_dsp/vp9_prob.h"
 
 #ifdef __cplusplus
 extern "C" {
index 4a43c98..f7d99e4 100644 (file)
@@ -13,6 +13,17 @@ DSP_SRCS-yes += vpx_dsp_common.h
 
 DSP_SRCS-$(HAVE_MSA)    += mips/macros_msa.h
 
+# bit reader
+DSP_SRCS-yes += vp9_prob.h
+DSP_SRCS-yes += vp9_prob.c
+
+ifeq ($(CONFIG_DECODERS),yes)
+DSP_SRCS-yes += vp9_reader.h
+DSP_SRCS-yes += vp9_reader.c
+DSP_SRCS-yes += vp9_read_bit_buffer.c
+DSP_SRCS-yes += vp9_read_bit_buffer.h
+endif
+
 # loop filters
 DSP_SRCS-yes += loopfilter.c