Commit efdad1f4 authored by hui su's avatar hui su Committed by Frédéric BARBIER

Add NELEMENTS() macro in aom_dsp/aom_dsp_common.h

Change-Id: Ia8da431c7a1faa43e130ce71da9561957c5556e7
parent 69d21011
......@@ -31,6 +31,8 @@ extern "C" {
#define AOMMIN(x, y) (((x) < (y)) ? (x) : (y))
#define AOMMAX(x, y) (((x) > (y)) ? (x) : (y))
#define NELEMENTS(x) (sizeof((x)) / sizeof((x)[0]))
#define IMPLIES(a, b) (!(a) || (b)) // Logical 'a implies b' (or 'a -> b')
#define IS_POWER_OF_TWO(x) (((x) & ((x)-1)) == 0)
......
......@@ -45,6 +45,7 @@
#include "./rate_hist.h"
#include "./warnings.h"
#include "aom/aom_integer.h"
#include "aom_dsp/aom_dsp_common.h"
#include "aom_ports/aom_timer.h"
#include "aom_ports/mem_ops.h"
#if CONFIG_WEBM_IO
......@@ -627,7 +628,6 @@ void usage_exit(void) {
exit(EXIT_FAILURE);
}
#define NELEMENTS(x) (sizeof(x) / sizeof(x[0]))
#if CONFIG_AV1_ENCODER
#define ARG_CTRL_CNT_MAX NELEMENTS(av1_arg_ctrl_map)
#endif
......
......@@ -348,8 +348,6 @@ static uint8_t get_filter_level(const loop_filter_info_n *lfi_n,
}
#endif
#define NELEMENTS(x) (sizeof((x)) / sizeof((x)[0]))
void av1_loop_filter_init(AV1_COMMON *cm) {
assert(MB_MODE_COUNT == NELEMENTS(mode_lf_lut));
loop_filter_info_n *lfi = &cm->lf_info;
......
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