Move NELEMENTS macro to aom_dsp/aom_dsp_common.h
Move the NELEMENTS macro from the public header aom/aom_integer.h to the
internal header aom_dsp/aom_dsp_common.h.
The NELEMENTS macro was previously moved from aom_dsp/aom_dsp_common.h
to aom/aom_integer.h to unify the many definitions of the NELEMENTS and
ARRAY_SIZE macros:
https://aomedia-review.googlesource.com/c/aom/+/14961
However, defining the NELEMENTS macro in a public header has two
problems:
1) No public headers use the NELEMENTS macro, and this macro is
unrelated to video codecs.
2) The macro's name does not have the AOM_ prefix.
Moving the NELEMENTS macro back to aom_dsp/aom_dsp_common.h solves these
two problems, at the cost of duplicating the macro definition in only
one file, test/coding_path_sync.cc. test/coding_path_sync.cc only uses
libaom's public API, so it would be inappropriate to have it include the
internal header aom_dsp/aom_dsp_common.h.
BUG=aomedia:2657
Change-Id: I2353bc12d7cfaf9df9c182caa91c3ab29eb4d2c2
diff --git a/test/coding_path_sync.cc b/test/coding_path_sync.cc
index 6735236..4c613dc 100644
--- a/test/coding_path_sync.cc
+++ b/test/coding_path_sync.cc
@@ -15,12 +15,13 @@
#include "config/aom_config.h"
-#include "aom_ports/mem.h" // ROUND_POWER_OF_TWO
#include "aom/aomcx.h"
#include "aom/aomdx.h"
#include "aom/aom_encoder.h"
#include "aom/aom_decoder.h"
+#define NELEMENTS(x) static_cast<int>(sizeof(x) / sizeof(x[0]))
+
using libaom_test::ACMRandom;
namespace {