Commit e82e5774 authored by Thomas Daede's avatar Thomas Daede

Use AOM_CDF* macros instead of bare AOM_ICDF macros.

This will facilitate later experiments reducing the precision
of probabilities.

after_cdf_table_rewrite-3 -> before_cdf_table_rewrite-3

  PSNR | PSNR Cb | PSNR Cr | PSNR HVS |   SSIM | MS SSIM | CIEDE 2000
0.0000 |  0.0000 |  0.0000 |   0.0000 | 0.0000 |  0.0000 |     0.0000

Change-Id: Ief01b4d7fdca075c41e9add079f7ac836dafcfbe
parent ce4e4647
......@@ -44,6 +44,66 @@ typedef uint16_t aom_cdf_prob;
#define AOM_ICDF(x) (x)
#endif
#define AOM_CDF2(a0) AOM_ICDF(a0), AOM_ICDF(CDF_PROB_TOP), 0
#define AOM_CDF3(a0, a1) AOM_ICDF(a0), AOM_ICDF(a1), AOM_ICDF(CDF_PROB_TOP), 0
#define AOM_CDF4(a0, a1, a2) \
AOM_ICDF(a0), AOM_ICDF(a1), AOM_ICDF(a2), AOM_ICDF(CDF_PROB_TOP), 0
#define AOM_CDF5(a0, a1, a2, a3) \
AOM_ICDF(a0) \
, AOM_ICDF(a1), AOM_ICDF(a2), AOM_ICDF(a3), AOM_ICDF(CDF_PROB_TOP), 0
#define AOM_CDF6(a0, a1, a2, a3, a4) \
AOM_ICDF(a0) \
, AOM_ICDF(a1), AOM_ICDF(a2), AOM_ICDF(a3), AOM_ICDF(a4), \
AOM_ICDF(CDF_PROB_TOP), 0
#define AOM_CDF7(a0, a1, a2, a3, a4, a5) \
AOM_ICDF(a0) \
, AOM_ICDF(a1), AOM_ICDF(a2), AOM_ICDF(a3), AOM_ICDF(a4), AOM_ICDF(a5), \
AOM_ICDF(CDF_PROB_TOP), 0
#define AOM_CDF8(a0, a1, a2, a3, a4, a5, a6) \
AOM_ICDF(a0) \
, AOM_ICDF(a1), AOM_ICDF(a2), AOM_ICDF(a3), AOM_ICDF(a4), AOM_ICDF(a5), \
AOM_ICDF(a6), AOM_ICDF(CDF_PROB_TOP), 0
#define AOM_CDF9(a0, a1, a2, a3, a4, a5, a6, a7) \
AOM_ICDF(a0) \
, AOM_ICDF(a1), AOM_ICDF(a2), AOM_ICDF(a3), AOM_ICDF(a4), AOM_ICDF(a5), \
AOM_ICDF(a6), AOM_ICDF(a7), AOM_ICDF(CDF_PROB_TOP), 0
#define AOM_CDF10(a0, a1, a2, a3, a4, a5, a6, a7, a8) \
AOM_ICDF(a0) \
, AOM_ICDF(a1), AOM_ICDF(a2), AOM_ICDF(a3), AOM_ICDF(a4), AOM_ICDF(a5), \
AOM_ICDF(a6), AOM_ICDF(a7), AOM_ICDF(a8), AOM_ICDF(CDF_PROB_TOP), 0
#define AOM_CDF11(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9) \
AOM_ICDF(a0) \
, AOM_ICDF(a1), AOM_ICDF(a2), AOM_ICDF(a3), AOM_ICDF(a4), AOM_ICDF(a5), \
AOM_ICDF(a6), AOM_ICDF(a7), AOM_ICDF(a8), AOM_ICDF(a9), \
AOM_ICDF(CDF_PROB_TOP), 0
#define AOM_CDF12(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10) \
AOM_ICDF(a0) \
, AOM_ICDF(a1), AOM_ICDF(a2), AOM_ICDF(a3), AOM_ICDF(a4), AOM_ICDF(a5), \
AOM_ICDF(a6), AOM_ICDF(a7), AOM_ICDF(a8), AOM_ICDF(a9), AOM_ICDF(a10), \
AOM_ICDF(CDF_PROB_TOP), 0
#define AOM_CDF13(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11) \
AOM_ICDF(a0) \
, AOM_ICDF(a1), AOM_ICDF(a2), AOM_ICDF(a3), AOM_ICDF(a4), AOM_ICDF(a5), \
AOM_ICDF(a6), AOM_ICDF(a7), AOM_ICDF(a8), AOM_ICDF(a9), AOM_ICDF(a10), \
AOM_ICDF(a11), AOM_ICDF(CDF_PROB_TOP), 0
#define AOM_CDF14(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12) \
AOM_ICDF(a0) \
, AOM_ICDF(a1), AOM_ICDF(a2), AOM_ICDF(a3), AOM_ICDF(a4), AOM_ICDF(a5), \
AOM_ICDF(a6), AOM_ICDF(a7), AOM_ICDF(a8), AOM_ICDF(a9), AOM_ICDF(a10), \
AOM_ICDF(a11), AOM_ICDF(a12), AOM_ICDF(CDF_PROB_TOP), 0
#define AOM_CDF15(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13) \
AOM_ICDF(a0) \
, AOM_ICDF(a1), AOM_ICDF(a2), AOM_ICDF(a3), AOM_ICDF(a4), AOM_ICDF(a5), \
AOM_ICDF(a6), AOM_ICDF(a7), AOM_ICDF(a8), AOM_ICDF(a9), AOM_ICDF(a10), \
AOM_ICDF(a11), AOM_ICDF(a12), AOM_ICDF(a13), AOM_ICDF(CDF_PROB_TOP), 0
#define AOM_CDF16(a0, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, \
a14) \
AOM_ICDF(a0) \
, AOM_ICDF(a1), AOM_ICDF(a2), AOM_ICDF(a3), AOM_ICDF(a4), AOM_ICDF(a5), \
AOM_ICDF(a6), AOM_ICDF(a7), AOM_ICDF(a8), AOM_ICDF(a9), AOM_ICDF(a10), \
AOM_ICDF(a11), AOM_ICDF(a12), AOM_ICDF(a13), AOM_ICDF(a14), \
AOM_ICDF(CDF_PROB_TOP), 0
#define MAX_PROB 255
#define LV_MAP_PROB 1
......
This diff is collapsed.
This diff is collapsed.
......@@ -42,69 +42,60 @@ const aom_tree_index av1_mv_fp_tree[TREE_SIZE(MV_FP_SIZE)] = { -0, 2, -1,
4, -2, -3 };
static const nmv_context default_nmv_context = {
{ 32, 64, 96 }, // joints
{ AOM_ICDF(4096), AOM_ICDF(11264), AOM_ICDF(19328), AOM_ICDF(32768),
0 }, // joint_cdf
{ 32, 64, 96 }, // joints
{ AOM_CDF4(4096, 11264, 19328) }, // joint_cdf
{ {
// Vertical component
128, // sign
{ 224, 144, 192, 168, 192, 176, 192, 198, 198, 245 }, // class
{ AOM_ICDF(28672), AOM_ICDF(30976), AOM_ICDF(31858), AOM_ICDF(32320),
AOM_ICDF(32551), AOM_ICDF(32656), AOM_ICDF(32740), AOM_ICDF(32757),
AOM_ICDF(32762), AOM_ICDF(32767), AOM_ICDF(32768), 0 }, // class_cdf
{ 216 }, // class0
{ 136, 140, 148, 160, 176, 192, 224, 234, 234, 240 }, // bits
{ { 128, 128, 64 }, { 96, 112, 64 } }, // class0_fp
{ 64, 96, 64 }, // fp
{ { AOM_ICDF(16384), AOM_ICDF(24576), AOM_ICDF(26624), AOM_ICDF(32768),
0 },
{ AOM_ICDF(12288), AOM_ICDF(21248), AOM_ICDF(24128), AOM_ICDF(32768),
0 } }, // class0_fp_cdf
{ AOM_ICDF(8192), AOM_ICDF(17408), AOM_ICDF(21248), AOM_ICDF(32768),
0 }, // fp_cdf
160, // class0_hp bit
128, // hp
{ AOM_CDF11(28672, 30976, 31858, 32320, 32551, 32656, 32740, 32757,
32762, 32767) }, // class_cdf
{ 216 }, // class0
{ 136, 140, 148, 160, 176, 192, 224, 234, 234, 240 }, // bits
{ { 128, 128, 64 }, { 96, 112, 64 } }, // class0_fp
{ 64, 96, 64 }, // fp
{ { AOM_CDF4(16384, 24576, 26624) },
{ AOM_CDF4(12288, 21248, 24128) } }, // class0_fp_cdf
{ AOM_CDF4(8192, 17408, 21248) }, // fp_cdf
160, // class0_hp bit
128, // hp
#if CONFIG_NEW_MULTISYMBOL
{ AOM_ICDF(160 * 128), AOM_ICDF(32768), 0 },
{ AOM_ICDF(128 * 128), AOM_ICDF(32768), 0 },
{ AOM_ICDF(216 * 128), AOM_ICDF(32768), 0 },
{ { AOM_ICDF(128 * 196), AOM_ICDF(32768), 0 },
{ AOM_ICDF(128 * 198), AOM_ICDF(32768), 0 },
{ AOM_ICDF(128 * 208), AOM_ICDF(32768), 0 },
{ AOM_ICDF(128 * 224), AOM_ICDF(32768), 0 },
{ AOM_ICDF(128 * 245), AOM_ICDF(32768), 0 },
{ AOM_ICDF(128 * 240), AOM_ICDF(32768), 0 } }, // bits_cdf
{ AOM_CDF2(160 * 128) },
{ AOM_CDF2(128 * 128) },
{ AOM_CDF2(216 * 128) },
{ { AOM_CDF2(128 * 196) },
{ AOM_CDF2(128 * 198) },
{ AOM_CDF2(128 * 208) },
{ AOM_CDF2(128 * 224) },
{ AOM_CDF2(128 * 245) },
{ AOM_CDF2(128 * 240) } }, // bits_cdf
#endif
},
{
// Horizontal component
128, // sign
{ 216, 128, 176, 160, 176, 176, 192, 198, 198, 208 }, // class
{ AOM_ICDF(28672), AOM_ICDF(30976), AOM_ICDF(31858), AOM_ICDF(32320),
AOM_ICDF(32551), AOM_ICDF(32656), AOM_ICDF(32740), AOM_ICDF(32757),
AOM_ICDF(32762), AOM_ICDF(32767), AOM_ICDF(32768), 0 }, // class_cdf
{ 208 }, // class0
{ 136, 140, 148, 160, 176, 192, 224, 234, 234, 240 }, // bits
{ { 128, 128, 64 }, { 96, 112, 64 } }, // class0_fp
{ 64, 96, 64 }, // fp
{ { AOM_ICDF(16384), AOM_ICDF(24576), AOM_ICDF(26624), AOM_ICDF(32768),
0 },
{ AOM_ICDF(12288), AOM_ICDF(21248), AOM_ICDF(24128), AOM_ICDF(32768),
0 } }, // class0_fp_cdf
{ AOM_ICDF(8192), AOM_ICDF(17408), AOM_ICDF(21248), AOM_ICDF(32768),
0 }, // fp_cdf
160, // class0_hp bit
128, // hp
{ AOM_CDF11(28672, 30976, 31858, 32320, 32551, 32656, 32740, 32757,
32762, 32767) }, // class_cdf
{ 208 }, // class0
{ 136, 140, 148, 160, 176, 192, 224, 234, 234, 240 }, // bits
{ { 128, 128, 64 }, { 96, 112, 64 } }, // class0_fp
{ 64, 96, 64 }, // fp
{ { AOM_CDF4(16384, 24576, 26624) },
{ AOM_CDF4(12288, 21248, 24128) } }, // class0_fp_cdf
{ AOM_CDF4(8192, 17408, 21248) }, // fp_cdf
160, // class0_hp bit
128, // hp
#if CONFIG_NEW_MULTISYMBOL
{ AOM_ICDF(160 * 128), AOM_ICDF(32768), 0 },
{ AOM_ICDF(128 * 128), AOM_ICDF(32768), 0 },
{ AOM_ICDF(216 * 128), AOM_ICDF(32768), 0 },
{ { AOM_ICDF(128 * 196), AOM_ICDF(32768), 0 },
{ AOM_ICDF(128 * 198), AOM_ICDF(32768), 0 },
{ AOM_ICDF(128 * 208), AOM_ICDF(32768), 0 },
{ AOM_ICDF(128 * 224), AOM_ICDF(32768), 0 },
{ AOM_ICDF(128 * 245), AOM_ICDF(32768), 0 },
{ AOM_ICDF(128 * 240), AOM_ICDF(32768), 0 } }, // bits_cdf
{ AOM_CDF2(160 * 128) },
{ AOM_CDF2(128 * 128) },
{ AOM_CDF2(216 * 128) },
{ { AOM_CDF2(128 * 196) },
{ AOM_CDF2(128 * 198) },
{ AOM_CDF2(128 * 208) },
{ AOM_CDF2(128 * 224) },
{ AOM_CDF2(128 * 245) },
{ AOM_CDF2(128 * 240) } }, // bits_cdf
#endif
} },
};
......
This diff is collapsed.
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