From: Dmitry Kovalev Date: Mon, 1 Jul 2013 17:17:15 +0000 (-0700) Subject: Removing vp9_modecont.{h, c}. X-Git-Tag: v1.3.0~973^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2ab3bc8871c6e0bc57585bfe2bfcc1fc81c4512e;p=libvpx Removing vp9_modecont.{h, c}. Moving vp9_default_inter_mode_probs array to vp9_entropymode.c. Change-Id: I88ebda86ccc07f2a43c6c01d4b37898214cfb6de --- diff --git a/vp9/common/vp9_entropymode.c b/vp9/common/vp9_entropymode.c index 9c8d3552d..35fb7a42f 100644 --- a/vp9/common/vp9_entropymode.c +++ b/vp9/common/vp9_entropymode.c @@ -10,7 +10,6 @@ #include "vp9/common/vp9_onyxc_int.h" -#include "vp9/common/vp9_modecont.h" #include "vp9/common/vp9_seg_common.h" #include "vp9/common/vp9_alloccommon.h" #include "vpx_mem/vpx_mem.h" @@ -98,6 +97,17 @@ const vp9_prob vp9_partition_probs[NUM_FRAME_TYPES][NUM_PARTITION_CONTEXTS] } }; +static const vp9_prob default_inter_mode_probs[INTER_MODE_CONTEXTS] + [VP9_INTER_MODES - 1] = { + {2, 173, 34}, // 0 = both zero mv + {7, 145, 85}, // 1 = one zero mv + one a predicted mv + {7, 166, 63}, // 2 = two predicted mvs + {7, 94, 66}, // 3 = one predicted/zero and one new mv + {8, 64, 46}, // 4 = two new mvs + {17, 81, 31}, // 5 = one intra neighbour + x + {25, 29, 30}, // 6 = two intra neighbours +}; + /* Array indices are identical to previously-existing INTRAMODECONTEXTNODES. */ const vp9_tree_index vp9_intra_mode_tree[VP9_INTRA_MODES * 2 - 2] = { -DC_PRED, 2, /* 0 = DC_NODE */ @@ -242,8 +252,8 @@ void vp9_entropy_mode_init() { void vp9_init_mode_contexts(VP9_COMMON *pc) { vpx_memset(pc->fc.inter_mode_counts, 0, sizeof(pc->fc.inter_mode_counts)); - vpx_memcpy(pc->fc.inter_mode_probs, vp9_default_inter_mode_probs, - sizeof(vp9_default_inter_mode_probs)); + vpx_memcpy(pc->fc.inter_mode_probs, default_inter_mode_probs, + sizeof(default_inter_mode_probs)); } void vp9_accum_mv_refs(VP9_COMMON *pc, diff --git a/vp9/common/vp9_modecont.c b/vp9/common/vp9_modecont.c deleted file mode 100644 index 5d92cfa00..000000000 --- a/vp9/common/vp9_modecont.c +++ /dev/null @@ -1,23 +0,0 @@ -/* - * Copyright (c) 2010 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_modecont.h" - -const vp9_prob vp9_default_inter_mode_probs[INTER_MODE_CONTEXTS] - [VP9_INTER_MODES - 1] = { - {2, 173, 34}, // 0 = both zero mv - {7, 145, 85}, // 1 = one zero mv + one a predicted mv - {7, 166, 63}, // 2 = two predicted mvs - {7, 94, 66}, // 3 = one predicted/zero and one new mv - {8, 64, 46}, // 4 = two new mvs - {17, 81, 31}, // 5 = one intra neighbour + x - {25, 29, 30}, // 6 = two intra neighbours -}; diff --git a/vp9/common/vp9_modecont.h b/vp9/common/vp9_modecont.h deleted file mode 100644 index 3ec607947..000000000 --- a/vp9/common/vp9_modecont.h +++ /dev/null @@ -1,19 +0,0 @@ -/* - * Copyright (c) 2010 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. - */ - -#ifndef VP9_COMMON_VP9_MODECONT_H_ -#define VP9_COMMON_VP9_MODECONT_H_ - -#include "vp9/common/vp9_entropy.h" - -extern const vp9_prob vp9_default_inter_mode_probs[INTER_MODE_CONTEXTS] - [VP9_INTER_MODES - 1]; - -#endif // VP9_COMMON_VP9_MODECONT_H_ diff --git a/vp9/decoder/vp9_decodframe.c b/vp9/decoder/vp9_decodframe.c index eac925bb5..07ca50d75 100644 --- a/vp9/decoder/vp9_decodframe.c +++ b/vp9/decoder/vp9_decodframe.c @@ -19,7 +19,6 @@ #include "vp9/common/vp9_entropy.h" #include "vp9/common/vp9_entropymode.h" #include "vp9/common/vp9_extend.h" -#include "vp9/common/vp9_modecont.h" #include "vp9/common/vp9_pred_common.h" #include "vp9/common/vp9_quant_common.h" #include "vp9/common/vp9_reconintra.h" diff --git a/vp9/encoder/vp9_ratectrl.c b/vp9/encoder/vp9_ratectrl.c index 430d3a8d6..93f8bb56d 100644 --- a/vp9/encoder/vp9_ratectrl.c +++ b/vp9/encoder/vp9_ratectrl.c @@ -17,7 +17,6 @@ #include #include "vp9/common/vp9_alloccommon.h" -#include "vp9/common/vp9_modecont.h" #include "vp9/common/vp9_common.h" #include "vp9/encoder/vp9_ratectrl.h" #include "vp9/common/vp9_entropymode.h" diff --git a/vp9/vp9_common.mk b/vp9/vp9_common.mk index 7eac3a1a2..5a86c6520 100644 --- a/vp9/vp9_common.mk +++ b/vp9/vp9_common.mk @@ -39,7 +39,6 @@ VP9_COMMON_SRCS-yes += common/vp9_extend.h VP9_COMMON_SRCS-yes += common/vp9_findnearmv.h VP9_COMMON_SRCS-yes += common/vp9_idct.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 @@ -61,7 +60,6 @@ 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_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