Commit 3c30fb48 authored by Johann's avatar Johann

misc: apply clang-format v5.0.0

Change-Id: I4b60db5c43bb443ddd001ccb6601d1a7d825bfa6
parent f152ff6a
......@@ -179,11 +179,6 @@ aom_codec_err_t aom_codec_enc_config_default(aom_codec_iface_t *iface,
return res;
}
/* clang-format off */
#define FLOATING_POINT_BEGIN_SCOPE do {
#define FLOATING_POINT_END_SCOPE } while (0);
/* clang-format on */
#if ARCH_X86 || ARCH_X86_64
/* On X86, disable the x87 unit's internal 80 bit precision for better
* consistency with the SSE unit's 64 bit precision.
......@@ -206,15 +201,17 @@ aom_codec_err_t aom_codec_enc_config_default(aom_codec_iface_t *iface,
#define FLOATING_POINT_RESTORE_EXCEPTIONS
#endif // HAVE_FEXCEPT && CONFIG_DEBUG
/* clang-format off */
#define FLOATING_POINT_INIT \
FLOATING_POINT_BEGIN_SCOPE \
do { \
FLOATING_POINT_SET_PRECISION \
FLOATING_POINT_SET_EXCEPTIONS
#define FLOATING_POINT_RESTORE \
FLOATING_POINT_RESTORE_EXCEPTIONS \
FLOATING_POINT_RESTORE_PRECISION \
FLOATING_POINT_END_SCOPE
} while (0);
/* clang-format on */
aom_codec_err_t aom_codec_encode(aom_codec_ctx_t *ctx, const aom_image_t *img,
aom_codec_pts_t pts, unsigned long duration,
......
......@@ -225,5 +225,4 @@ static AOM_INLINE void mem_put_le32(void *vmem, MEM_VALUE_T val) {
mem[3] = (MAU_T)((val >> 24) & 0xff);
}
/* clang-format on */
#endif // AOM_PORTS_MEM_OPS_H_
......@@ -2374,17 +2374,17 @@ int main(int argc, const char **argv_) {
if (!global.quiet) {
FOREACH_STREAM(stream, streams) {
fprintf(stderr, "\rPass %d/%d frame %4d/%-4d %7" PRId64 "B %7" PRId64
fprintf(stderr,
"\rPass %d/%d frame %4d/%-4d %7" PRId64 "B %7" PRId64
"b/f %7" PRId64
"b/s"
" %7" PRId64 " %s (%.2f fps)\033[K\n",
pass + 1, global.passes, frames_in, stream->frames_out,
(int64_t)stream->nbytes,
seen_frames ? (int64_t)(stream->nbytes * 8 / seen_frames) : 0,
seen_frames
? (int64_t)stream->nbytes * 8 *
(int64_t)global.framerate.num / global.framerate.den /
seen_frames
seen_frames ? (int64_t)stream->nbytes * 8 *
(int64_t)global.framerate.num /
global.framerate.den / seen_frames
: 0,
stream->cx_time > 9999999 ? stream->cx_time / 1000
: stream->cx_time,
......
......@@ -129,8 +129,7 @@ int AV1Decoder::getWidth() const {
}
int AV1Decoder::getWidthPadding() const {
return show_padding
? AOMMAX(info->frame_width + 16,
return show_padding ? AOMMAX(info->frame_width + 16,
ALIGN_POWER_OF_TWO(info->frame_width, 6)) -
info->frame_width
: 0;
......@@ -141,8 +140,7 @@ int AV1Decoder::getHeight() const {
}
int AV1Decoder::getHeightPadding() const {
return show_padding
? AOMMAX(info->frame_height + 16,
return show_padding ? AOMMAX(info->frame_height + 16,
ALIGN_POWER_OF_TWO(info->frame_height, 6)) -
info->frame_height
: 0;
......@@ -285,18 +283,21 @@ void AnalyzerPanel::render() {
cbval = ((pmask & OD_CB_MASK) >> 1) * (cbval - 128);
crval = ((pmask & OD_CR_MASK) >> 2) * (crval - 128);
/*This is intentionally slow and very accurate.*/
rval = OD_CLAMPI(0, (int32_t)OD_DIV_ROUND(
2916394880000LL * yval + 4490222169144LL * crval,
9745792000LL),
rval = OD_CLAMPI(
0,
(int32_t)OD_DIV_ROUND(
2916394880000LL * yval + 4490222169144LL * crval, 9745792000LL),
65535);
gval = OD_CLAMPI(0, (int32_t)OD_DIV_ROUND(2916394880000LL * yval -
gval = OD_CLAMPI(0,
(int32_t)OD_DIV_ROUND(2916394880000LL * yval -
534117096223LL * cbval -
1334761232047LL * crval,
9745792000LL),
65535);
bval = OD_CLAMPI(0, (int32_t)OD_DIV_ROUND(
2916394880000LL * yval + 5290866304968LL * cbval,
9745792000LL),
bval = OD_CLAMPI(
0,
(int32_t)OD_DIV_ROUND(
2916394880000LL * yval + 5290866304968LL * cbval, 9745792000LL),
65535);
unsigned char *px_row = p;
for (int v = 0; v < zoom; v++) {
......
......@@ -134,7 +134,6 @@ static int y4m_parse_tags(y4m_input *_y4m, char *_tags) {
Conversions which require both horizontal and vertical filtering could
have these steps pipelined, for less memory consumption and better cache
performance, but we do them separately for simplicity.*/
#define OC_MINI(_a, _b) ((_a) > (_b) ? (_b) : (_a))
#define OC_MAXI(_a, _b) ((_a) < (_b) ? (_b) : (_a))
#define OC_CLAMPI(_a, _b, _c) (OC_MAXI(_a, OC_MINI(_b, _c)))
......
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