Commit 4bd0b2f8 authored by Yue Chen's avatar Yue Chen
Browse files

filter_intra: stats collection and cdf optimizer

Change-Id: Ic4c5cb2baa661733662cdf932a05dc6de1667b6b
parent 31122f57
......@@ -568,6 +568,7 @@ typedef struct FRAME_COUNTS {
#endif // CONFIG_EXT_INTRA
#if CONFIG_FILTER_INTRA
unsigned int filter_intra[PLANE_TYPES][2];
unsigned int filter_intra_mode[PLANE_TYPES][10];
#endif // CONFIG_FILTER_INTRA
#if CONFIG_LPF_SB
unsigned int lpf_reuse[LPF_REUSE_CONTEXT][2];
......
......@@ -5966,6 +5966,8 @@ static void sum_intra_stats(FRAME_COUNTS *counts, MACROBLOCKD *xd,
const int use_filter_intra_mode =
mbmi->filter_intra_mode_info.use_filter_intra_mode[0];
++counts->filter_intra[0][use_filter_intra_mode];
++counts->filter_intra_mode[0][mbmi->filter_intra_mode_info
.filter_intra_mode[0]];
}
if (mbmi->uv_mode == UV_DC_PRED
#if CONFIG_CB4X4
......@@ -5977,6 +5979,8 @@ static void sum_intra_stats(FRAME_COUNTS *counts, MACROBLOCKD *xd,
const int use_filter_intra_mode =
mbmi->filter_intra_mode_info.use_filter_intra_mode[1];
++counts->filter_intra[1][use_filter_intra_mode];
++counts->filter_intra_mode[1][mbmi->filter_intra_mode_info
.filter_intra_mode[1]];
}
#endif // CONFIG_FILTER_INTRA
#if CONFIG_EXT_INTRA && CONFIG_INTRA_INTERP
......
......@@ -791,6 +791,11 @@ int main(int argc, const char **argv) {
optimize_cdf_table(
&fc.filter_intra[0][0], probsfile, 2, cts_each_dim,
"static const aom_cdf_prob default_filter_intra_cdf[2][CDF_SIZE(2)]");
cts_each_dim[0] = PLANE_TYPES;
cts_each_dim[1] = 10;
optimize_cdf_table(&fc.filter_intra_mode[0][0], probsfile, 2, cts_each_dim,
"static const aom_cdf_prob "
"default_filter_intra_mode_cdf[2][CDF_SIZE(10)]");
#endif
#if CONFIG_LV_MAP
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment