Commit 931bc2a7 authored by Yaowu Xu's avatar Yaowu Xu
Browse files

Clear existing format issue in the codebase

Fix the clang-format warnings on the existing codes.

Change-Id: I8e9e781b6f68f41a7fbd0a2116f6b35290d73dc8
parent 1078dee5
......@@ -23,10 +23,10 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "./config.h"
#endif
#include "entcode.h"
#include "aom_dsp/entcode.h"
/*CDFs for uniform probability distributions of small sizes (2 through 16,
inclusive).*/
......
......@@ -23,12 +23,12 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "./config.h"
#endif
#include "entdec.h"
#include "aom_dsp/entdec.h"
#if OD_ACCOUNTING
#include "accounting.h"
#include "./accounting.h"
#endif
/*A range decoder.
......
......@@ -25,9 +25,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*/
#if !defined(_entdec_H)
#define _entdec_H (1)
#include <limits.h>
#include "entcode.h"
#include "aom_dsp/entcode.h"
#if OD_ACCOUNTING
#include "accounting.h"
#include "./accounting.h"
#endif
#ifdef __cplusplus
......
......@@ -23,12 +23,12 @@ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#include "./config.h"
#endif
#include <stdlib.h>
#include <string.h>
#include "entenc.h"
#include "aom_dsp/entenc.h"
/*A range encoder.
See entdec.c and the references for implementation details \cite{Mar79,MNW98}.
......@@ -419,8 +419,9 @@ void od_ec_enc_uint(od_ec_enc *enc, uint32_t fl, uint32_t ft) {
ft1 = (int)(ft >> ftb) + 1;
od_ec_encode_cdf_q15(enc, (int)(fl >> ftb), OD_UNIFORM_CDF_Q15(ft1), ft1);
od_ec_enc_bits(enc, fl & (((uint32_t)1 << ftb) - 1), ftb);
} else
} else {
od_ec_encode_cdf_q15(enc, (int)fl, OD_UNIFORM_CDF_Q15(ft), (int)ft);
}
}
/*Encodes a sequence of raw bits in the stream.
......@@ -506,10 +507,10 @@ void od_ec_enc_patch_initial_bits(od_ec_enc *enc, unsigned val, int nbits) {
/*The first byte has yet to be output.*/
enc->low = (enc->low & ~((od_ec_window)mask << (16 + enc->cnt))) |
(od_ec_window)val << (16 + enc->cnt + shift);
}
/*The encoder hasn't even encoded _nbits of data yet.*/
else
} else {
/*The encoder hasn't even encoded _nbits of data yet.*/
enc->error = -1;
}
}
#if OD_MEASURE_EC_OVERHEAD
......
......@@ -25,7 +25,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*/
#if !defined(_entenc_H)
#define _entenc_H (1)
#include <stddef.h>
#include "entcode.h"
#include "aom_dsp/entcode.h"
#ifdef __cplusplus
extern "C" {
......
......@@ -66,7 +66,7 @@ extern uint32_t OD_DIVU_SMALL_CONSTS[OD_DIVU_DMAX][2];
#if defined(__GNUC__) && defined(__GNUC_MINOR__) && defined(__GNUC_PATCHLEVEL__)
#define OD_GNUC_PREREQ(maj, min, pat) \
((__GNUC__ << 16) + (__GNUC_MINOR__ << 8) + __GNUC_PATCHLEVEL__ >= \
((maj) << 16) + ((min) << 8) + pat)
((maj) << 16) + ((min) << 8) + pat) // NOLINT
#else
#define OD_GNUC_PREREQ(maj, min, pat) (0)
#endif
......
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