Commit 3c30fb48 authored by Johann's avatar Johann

misc: apply clang-format v5.0.0

Change-Id: I4b60db5c43bb443ddd001ccb6601d1a7d825bfa6
parent f152ff6a
......@@ -144,7 +144,7 @@ enum aome_enc_control_id {
AOME_SET_SCALEMODE = 11,
/*!\brief Codec control function to set encoder enhancement layer id.
*/
*/
AOME_SET_ENHANCEMENT_LAYER_ID = 12,
/*!\brief Codec control function to set encoder internal speed settings.
......@@ -220,7 +220,7 @@ enum aome_enc_control_id {
AOME_SET_MAX_INTRA_BITRATE_PCT,
/*!\brief Codec control function to set number of spatial layers.
*/
*/
AOME_SET_NUMBER_SPATIAL_LAYERS,
/*!\brief Codec control function to set max data rate for Inter frames.
......
......@@ -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_
......@@ -1545,7 +1545,7 @@ static void open_output_file(struct stream_state *stream,
#if CONFIG_OBU_NO_IVF
&& stream->config.write_ivf
#endif
) {
) {
ivf_write_file_header(stream->file, cfg, global->codec->fourcc, 0);
}
}
......@@ -1566,7 +1566,7 @@ static void close_output_file(struct stream_state *stream,
#if CONFIG_OBU_NO_IVF
&& stream->config.write_ivf
#endif
) {
) {
if (!fseek(stream->file, 0, SEEK_SET))
ivf_write_file_header(stream->file, &stream->config.cfg, fourcc,
stream->frames_out);
......@@ -2374,18 +2374,18 @@ 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
"b/f %7" PRId64
"b/s"
" %7" PRId64 " %s (%.2f fps)\033[K\n",
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
: 0,
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,
stream->cx_time > 9999999 ? "ms" : "us",
......
......@@ -129,11 +129,10 @@ int AV1Decoder::getWidth() const {
}
int AV1Decoder::getWidthPadding() const {
return show_padding
? AOMMAX(info->frame_width + 16,
ALIGN_POWER_OF_TWO(info->frame_width, 6)) -
info->frame_width
: 0;
return show_padding ? AOMMAX(info->frame_width + 16,
ALIGN_POWER_OF_TWO(info->frame_width, 6)) -
info->frame_width
: 0;
}
int AV1Decoder::getHeight() const {
......@@ -141,11 +140,10 @@ int AV1Decoder::getHeight() const {
}
int AV1Decoder::getHeightPadding() const {
return show_padding
? AOMMAX(info->frame_height + 16,
ALIGN_POWER_OF_TWO(info->frame_height, 6)) -
info->frame_height
: 0;
return show_padding ? AOMMAX(info->frame_height + 16,
ALIGN_POWER_OF_TWO(info->frame_height, 6)) -
info->frame_height
: 0;
}
bool AV1Decoder::getAccountingStruct(Accounting **accounting) {
......@@ -285,19 +283,22 @@ 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),
65535);
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),
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 -
534117096223LL * cbval -
1334761232047LL * crval,
9745792000LL),
65535);
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++) {
unsigned char *px = px_row;
......
......@@ -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