]> granicus.if.org Git - libvpx/commitdiff
Converting vp9_treecoder.h to vp9_prob.{h, c}
authorDmitry Kovalev <dkovalev@google.com>
Mon, 16 Dec 2013 20:53:09 +0000 (12:53 -0800)
committerDmitry Kovalev <dkovalev@google.com>
Mon, 16 Dec 2013 20:53:09 +0000 (12:53 -0800)
Moving vp9_norm probability table from vp9_entropy.c to vp9_prob.c

Change-Id: Ie757b73860c6f43130790c332b292e2a1a81b788

15 files changed:
vp9/common/vp9_blockd.h
vp9/common/vp9_entropy.c
vp9/common/vp9_entropy.h
vp9/common/vp9_entropymode.h
vp9/common/vp9_entropymv.h
vp9/common/vp9_findnearmv.h
vp9/common/vp9_pred_common.c
vp9/common/vp9_prob.c [new file with mode: 0644]
vp9/common/vp9_prob.h [moved from vp9/common/vp9_treecoder.h with 94% similarity]
vp9/common/vp9_seg_common.h
vp9/decoder/vp9_dboolhuff.h
vp9/encoder/vp9_bitstream.c
vp9/encoder/vp9_boolhuff.h
vp9/encoder/vp9_treewriter.h
vp9/vp9_common.mk

index 93f96c8bcc0480887566c35b45d64e2808b9d499..a932df8e245d8a0c31cfd94ce64abcd9cd024ea4 100644 (file)
@@ -24,7 +24,6 @@
 #include "vp9/common/vp9_mv.h"
 #include "vp9/common/vp9_scale.h"
 #include "vp9/common/vp9_seg_common.h"
-#include "vp9/common/vp9_treecoder.h"
 
 #define BLOCK_SIZE_GROUPS 4
 #define MBSKIP_CONTEXTS 3
index adab33f74d47fc8126730795e9ab2c2af457697c..13e954efeec3b8cbff6d05fe3d995274bf474f23 100644 (file)
 #include "vpx/vpx_integer.h"
 
 
-DECLARE_ALIGNED(16, const uint8_t, vp9_norm[256]) = {
-  0, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,
-  3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
-  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
-  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
-  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-
 DECLARE_ALIGNED(16, const uint8_t, vp9_coefband_trans_8x8plus[1024]) = {
   0, 1, 1, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4,
   4, 4, 4, 4, 4, 5,
index 65b679ad2e7671ffb9e5a76391efe3f1869b4b50..0ed06b4b0e29d4bd177461103b8a52f9d73f0d22 100644 (file)
@@ -16,7 +16,6 @@
 #include "vp9/common/vp9_blockd.h"
 #include "vp9/common/vp9_common.h"
 #include "vp9/common/vp9_scan.h"
-#include "vp9/common/vp9_treecoder.h"
 #include "vp9/common/vp9_entropymode.h"
 
 #define DIFF_UPDATE_PROB 252
index df58bea3c2e44cdfd79a58494eae38ffdf565e59..5312553c70c026cce9f7afac486377ca11c236fe 100644 (file)
@@ -12,7 +12,6 @@
 #define VP9_COMMON_VP9_ENTROPYMODE_H_
 
 #include "vp9/common/vp9_blockd.h"
-#include "vp9/common/vp9_treecoder.h"
 
 #define TX_SIZE_CONTEXTS 2
 #define SWITCHABLE_FILTERS 3   // number of switchable filters
index 3175a1e4998378192cb463292d03997187bc5eba..48cb82db12915c607e209b94705c844510c0c6ca 100644 (file)
@@ -12,7 +12,6 @@
 #ifndef VP9_COMMON_VP9_ENTROPYMV_H_
 #define VP9_COMMON_VP9_ENTROPYMV_H_
 
-#include "vp9/common/vp9_treecoder.h"
 #include "./vpx_config.h"
 #include "vp9/common/vp9_blockd.h"
 
index 5028af77c1f9dea2ab30d16aff724be07d8c0045..5af961a77de84c8b6a6f9ae418fc5346ed0676fc 100644 (file)
@@ -14,7 +14,6 @@
 
 #include "vp9/common/vp9_mv.h"
 #include "vp9/common/vp9_blockd.h"
-#include "vp9/common/vp9_treecoder.h"
 #include "vp9/common/vp9_onyxc_int.h"
 
 #define LEFT_TOP_MARGIN     ((VP9BORDERINPIXELS - VP9_INTERP_EXTEND) << 3)
index 40cfc8146534db5dca07109433ec132714cc8c3e..6a9a36c2b39a77f130d2e8f2b2500f1ccea750db 100644 (file)
@@ -14,7 +14,6 @@
 #include "vp9/common/vp9_common.h"
 #include "vp9/common/vp9_pred_common.h"
 #include "vp9/common/vp9_seg_common.h"
-#include "vp9/common/vp9_treecoder.h"
 
 static INLINE const MB_MODE_INFO *get_above_mbmi(const MODE_INFO *const above) {
   return (above != NULL) ? &above->mbmi : NULL;
diff --git a/vp9/common/vp9_prob.c b/vp9/common/vp9_prob.c
new file mode 100644 (file)
index 0000000..884884e
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+ *  Copyright (c) 2013 The WebM project authors. All Rights Reserved.
+ *
+ *  Use of this source code is governed by a BSD-style license
+ *  that can be found in the LICENSE file in the root of the source
+ *  tree. An additional intellectual property rights grant can be found
+ *  in the file PATENTS.  All contributing project authors may
+ *  be found in the AUTHORS file in the root of the source tree.
+ */
+
+#include "vp9/common/vp9_prob.h"
+
+DECLARE_ALIGNED(16, const uint8_t, vp9_norm[256]) = {
+  0, 7, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4,
+  3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+  0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
similarity index 94%
rename from vp9/common/vp9_treecoder.h
rename to vp9/common/vp9_prob.h
index ed8c74ae017ca3aaa4d8b78bfcd405d5ce482d5a..d1bd37ab3c598509f168e0d20157bb09c784790b 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
+ *  Copyright (c) 2013 The WebM project authors. All Rights Reserved.
  *
  *  Use of this source code is governed by a BSD-style license
  *  that can be found in the LICENSE file in the root of the source
@@ -8,11 +8,14 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
-#ifndef VP9_COMMON_VP9_TREECODER_H_
-#define VP9_COMMON_VP9_TREECODER_H_
+#ifndef VP9_COMMON_VP9_PROB_H_
+#define VP9_COMMON_VP9_PROB_H_
 
 #include "./vpx_config.h"
+
+#include "vpx_ports/mem.h"
 #include "vpx/vpx_integer.h"
+
 #include "vp9/common/vp9_common.h"
 
 typedef uint8_t vp9_prob;
@@ -107,5 +110,6 @@ static void tree_merge_probs(const vp9_tree_index *tree,
                         count_sat, max_update_factor, probs);
 }
 
+DECLARE_ALIGNED(16, extern const uint8_t, vp9_norm[256]);
 
-#endif  // VP9_COMMON_VP9_TREECODER_H_
+#endif  // VP9_COMMON_VP9_PROB_H_
index eb38c06be5ad788f53f341176ed43a30a370dfc1..d7aca37479e8065d63df6ad562d87dd3df3dbe3c 100644 (file)
@@ -11,7 +11,7 @@
 #ifndef VP9_COMMON_VP9_SEG_COMMON_H_
 #define VP9_COMMON_VP9_SEG_COMMON_H_
 
-#include "vp9/common/vp9_treecoder.h"
+#include "vp9/common/vp9_prob.h"
 
 #define SEGMENT_DELTADATA   0
 #define SEGMENT_ABSDATA     1
index 8339c270115ac141001afb4713d9c9ab728340bb..645252461d4ddc9636bc84b5b9322fce071189d4 100644 (file)
 #include "vpx_ports/mem.h"
 #include "vpx/vpx_integer.h"
 
-#include "vp9/common/vp9_treecoder.h"
+#include "vp9/common/vp9_prob.h"
 
 typedef size_t BD_VALUE;
 
 #define BD_VALUE_SIZE ((int)sizeof(BD_VALUE) * CHAR_BIT)
 
-DECLARE_ALIGNED(16, extern const uint8_t, vp9_norm[256]);
-
 typedef struct {
   const uint8_t *buffer_end;
   const uint8_t *buffer;
index 88e25ebf26000e40468530550ff14ccc04b7e72a..eef4d345730a9b5ba68316c4de7d4d53c4d4fd9b 100644 (file)
@@ -23,7 +23,6 @@
 #include "vp9/common/vp9_pred_common.h"
 #include "vp9/common/vp9_entropy.h"
 #include "vp9/common/vp9_mvref_common.h"
-#include "vp9/common/vp9_treecoder.h"
 #include "vp9/common/vp9_systemdependent.h"
 #include "vp9/common/vp9_pragmas.h"
 
index a0fff3861edde402bc8255322615b144a868b968..343c1bb9b719e02770ed420c103b26817b0cbfae 100644 (file)
@@ -21,6 +21,8 @@
 
 #include "vpx_ports/mem.h"
 
+#include "vp9/common/vp9_prob.h"
+
 typedef struct {
   unsigned int lowvalue;
   unsigned int range;
@@ -39,8 +41,6 @@ extern const unsigned int vp9_prob_cost[256];
 void vp9_start_encode(vp9_writer *bc, uint8_t *buffer);
 void vp9_stop_encode(vp9_writer *bc);
 
-DECLARE_ALIGNED(16, extern const unsigned char, vp9_norm[256]);
-
 static void vp9_write(vp9_writer *br, int bit, int probability) {
   unsigned int split;
   int count = br->count;
index 703272c646077df462b33e5611a5cae9a230b7b3..913b5f0cab84010700214d38994c0d359aedc29c 100644 (file)
@@ -11,7 +11,6 @@
 #ifndef VP9_ENCODER_VP9_TREEWRITER_H_
 #define VP9_ENCODER_VP9_TREEWRITER_H_
 
-#include "vp9/common/vp9_treecoder.h"
 #include "vp9/encoder/vp9_boolhuff.h"       /* for now */
 
 #define vp9_cost_zero(prob) (vp9_prob_cost[prob])
index 01c55a4ada68b065a780fc4a536c619305186483..0587f3cc85ecbc2b805cb70514167cab84f92bb3 100644 (file)
@@ -39,6 +39,8 @@ 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
@@ -52,7 +54,6 @@ VP9_COMMON_SRCS-yes += common/vp9_systemdependent.h
 VP9_COMMON_SRCS-yes += common/vp9_textblit.h
 VP9_COMMON_SRCS-yes += common/vp9_tile_common.h
 VP9_COMMON_SRCS-yes += common/vp9_tile_common.c
-VP9_COMMON_SRCS-yes += common/vp9_treecoder.h
 VP9_COMMON_SRCS-yes += common/vp9_loopfilter.c
 VP9_COMMON_SRCS-yes += common/vp9_loopfilter_filters.c
 VP9_COMMON_SRCS-yes += common/vp9_mvref_common.c