adopt some clang 5.0.0 formatting

At least the changes that don't conflict with 4.0.1

Change-Id: I9b6a7c14dadc0738cd0f628a10ece90fc7ee89fd
This commit is contained in:
Johann 2017-12-28 14:57:02 -08:00
parent 1633786bfb
commit f5b2dd2a66
23 changed files with 92 additions and 92 deletions

View File

@ -28,8 +28,8 @@
using libvpx_test::ACMRandom;
using libvpx_test::Buffer;
using std::tr1::tuple;
using std::tr1::make_tuple;
using std::tr1::tuple;
namespace {
typedef void (*PartialFdctFunc)(const int16_t *in, tran_low_t *out, int stride);

View File

@ -28,8 +28,8 @@
using libvpx_test::ACMRandom;
using libvpx_test::Buffer;
using std::tr1::tuple;
using std::tr1::make_tuple;
using std::tr1::tuple;
namespace {
typedef void (*FdctFunc)(const int16_t *in, tran_low_t *out, int stride);

View File

@ -174,4 +174,4 @@ INSTANTIATE_TEST_CASE_P(MSA, IDCTTest,
INSTANTIATE_TEST_CASE_P(MMI, IDCTTest,
::testing::Values(vp8_short_idct4x4llm_mmi));
#endif // HAVE_MMI
}
} // namespace

View File

@ -27,8 +27,8 @@
namespace {
using std::string;
using libvpx_test::ACMRandom;
using std::string;
#if CONFIG_WEBM_IO

View File

@ -6,7 +6,7 @@
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
*/
#ifndef VP8_COMMON_DEFAULT_COEF_PROBS_H_
#define VP8_COMMON_DEFAULT_COEF_PROBS_H_

View File

@ -934,8 +934,8 @@ void vp8_loop_filter_uvvertical_edge_mips(unsigned char *s, int p,
s4 = s3 + p;
/* load quad-byte vectors
* memory is 4 byte aligned
*/
* memory is 4 byte aligned
*/
p2 = *((uint32_t *)(s1 - 4));
p6 = *((uint32_t *)(s1));
p1 = *((uint32_t *)(s2 - 4));
@ -990,8 +990,8 @@ void vp8_loop_filter_uvvertical_edge_mips(unsigned char *s, int p,
:);
/* if (p1 - p4 == 0) and (p2 - p3 == 0)
* mask will be zero and filtering is not needed
*/
* mask will be zero and filtering is not needed
*/
if (!(((p1 - p4) == 0) && ((p2 - p3) == 0))) {
vp8_filter_mask_vec_mips(limit, flimit, p1, p2, pm1, p0, p3, p4, p5, p6,
thresh, &hev, &mask);
@ -2102,8 +2102,8 @@ void vp8_mbloop_filter_uvvertical_edge_mips(unsigned char *s, int p,
s4 = s3 + p;
/* load quad-byte vectors
* memory is 4 byte aligned
*/
* memory is 4 byte aligned
*/
p2 = *((uint32_t *)(s1 - 4));
p6 = *((uint32_t *)(s1));
p1 = *((uint32_t *)(s2 - 4));

View File

@ -6,7 +6,7 @@
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
*/
#ifndef VP8_COMMON_VP8_ENTROPYMODEDATA_H_
#define VP8_COMMON_VP8_ENTROPYMODEDATA_H_

View File

@ -351,8 +351,8 @@ void vp8_sixtap_predict4x4_ssse3(unsigned char *src_ptr,
yoffset);
} else {
/* ssse3 second-pass only function couldn't handle (xoffset==0 &&
* yoffset==0) case correctly. Add copy function here to guarantee
* six-tap function handles all possible offsets. */
* yoffset==0) case correctly. Add copy function here to guarantee
* six-tap function handles all possible offsets. */
int r;
for (r = 0; r < 4; ++r) {

View File

@ -9,12 +9,12 @@
*/
/****************************************************************************
*
* Module Title : boolhuff.h
*
* Description : Bool Coder header file.
*
****************************************************************************/
*
* Module Title : boolhuff.h
*
* Description : Bool Coder header file.
*
****************************************************************************/
#ifndef VP8_ENCODER_BOOLHUFF_H_
#define VP8_ENCODER_BOOLHUFF_H_

View File

@ -3799,7 +3799,7 @@ static void encode_frame_to_data_rate(VP8_COMP *cpi, size_t *size,
/* Setup background Q adjustment for error resilient mode.
* For multi-layer encodes only enable this for the base layer.
*/
*/
if (cpi->cyclic_refresh_mode_enabled) {
// Special case for screen_content_mode with golden frame updates.
int disable_cr_gf =

View File

@ -741,10 +741,10 @@ void vp8_pick_inter_mode(VP8_COMP *cpi, MACROBLOCK *x, int recon_yoffset,
x->e_mbd.mode_info_context->mbmi.ref_frame = INTRA_FRAME;
/* If the frame has big static background and current MB is in low
* motion area, its mode decision is biased to ZEROMV mode.
* No adjustment if cpu_used is <= -12 (i.e., cpi->Speed >= 12).
* At such speed settings, ZEROMV is already heavily favored.
*/
* motion area, its mode decision is biased to ZEROMV mode.
* No adjustment if cpu_used is <= -12 (i.e., cpi->Speed >= 12).
* At such speed settings, ZEROMV is already heavily favored.
*/
if (cpi->Speed < 12) {
calculate_zeromv_rd_adjustment(cpi, x, &rd_adjustment);
}

View File

@ -996,7 +996,7 @@ static void calc_pframe_target_size(VP8_COMP *cpi) {
* bits on this frame even if it is a contructed arf.
* The active maximum quantizer insures that an appropriate
* number of bits will be spent if needed for contstructed ARFs.
*/
*/
cpi->this_frame_target = 0;
}

View File

@ -200,9 +200,9 @@ static vpx_codec_err_t update_error_state(
static void yuvconfig2image(vpx_image_t *img, const YV12_BUFFER_CONFIG *yv12,
void *user_priv) {
/** vpx_img_wrap() doesn't allow specifying independent strides for
* the Y, U, and V planes, nor other alignment adjustments that
* might be representable by a YV12_BUFFER_CONFIG, so we just
* initialize all the fields.*/
* the Y, U, and V planes, nor other alignment adjustments that
* might be representable by a YV12_BUFFER_CONFIG, so we just
* initialize all the fields.*/
img->fmt = VPX_IMG_FMT_I420;
img->w = yv12->y_stride;
img->h = (yv12->y_height + 2 * VP8BORDERINPIXELS + 15) & ~15;

View File

@ -15,9 +15,9 @@
static void yuvconfig2image(vpx_image_t *img, const YV12_BUFFER_CONFIG *yv12,
void *user_priv) {
/** vpx_img_wrap() doesn't allow specifying independent strides for
* the Y, U, and V planes, nor other alignment adjustments that
* might be representable by a YV12_BUFFER_CONFIG, so we just
* initialize all the fields.*/
* the Y, U, and V planes, nor other alignment adjustments that
* might be representable by a YV12_BUFFER_CONFIG, so we just
* initialize all the fields.*/
int bps;
if (!yv12->subsampling_y) {
if (!yv12->subsampling_x) {

View File

@ -529,7 +529,7 @@ enum vp8e_enc_control_id {
* struct #vpx_svc_ref_frame_config defined below.
*
* Supported in codecs: VP9
*/
*/
VP9E_SET_SVC_REF_FRAME_CONFIG,
/*!\brief Codec control function to set intended rendering image size.
@ -550,11 +550,11 @@ enum vp8e_enc_control_id {
VP9E_SET_TARGET_LEVEL,
/*!\brief Codec control function to set row level multi-threading.
*
* 0 : off, 1 : on
*
* Supported in codecs: VP9
*/
*
* 0 : off, 1 : on
*
* Supported in codecs: VP9
*/
VP9E_SET_ROW_MT,
/*!\brief Codec control function to get bitstream level.
@ -574,18 +574,18 @@ enum vp8e_enc_control_id {
VP9E_SET_ALT_REF_AQ,
/*!\brief Boost percentage for Golden Frame in CBR mode.
*
* This value controls the amount of boost given to Golden Frame in
* CBR mode. It is expressed as a percentage of the average
* per-frame bitrate, with the special (and default) value 0 meaning
* the feature is off, i.e., no golden frame boost in CBR mode and
* average bitrate target is used.
*
* For example, to allow 100% more bits, i.e, 2X, in a golden frame
* than average frame, set this to 100.
*
* Supported in codecs: VP8
*/
*
* This value controls the amount of boost given to Golden Frame in
* CBR mode. It is expressed as a percentage of the average
* per-frame bitrate, with the special (and default) value 0 meaning
* the feature is off, i.e., no golden frame boost in CBR mode and
* average bitrate target is used.
*
* For example, to allow 100% more bits, i.e, 2X, in a golden frame
* than average frame, set this to 100.
*
* Supported in codecs: VP8
*/
VP8E_SET_GF_CBR_BOOST_PCT,
/*!\brief Codec control function to enable the extreme motion vector unit test

View File

@ -598,10 +598,10 @@ typedef struct vpx_codec_enc_cfg {
unsigned int rc_2pass_vbr_maxsection_pct;
/*!\brief Two-pass corpus vbr mode complexity control
* Used only in VP9: A value representing the corpus midpoint complexity
* for corpus vbr mode. This value defaults to 0 which disables corpus vbr
* mode in favour of normal vbr mode.
*/
* Used only in VP9: A value representing the corpus midpoint complexity
* for corpus vbr mode. This value defaults to 0 which disables corpus vbr
* mode in favour of normal vbr mode.
*/
unsigned int rc_2pass_vbr_corpus_complexity;
/*
@ -684,7 +684,7 @@ typedef struct vpx_codec_enc_cfg {
* membership of frames to temporal layers. For example, if the
* ts_periodicity = 8, then the frames are assigned to coding layers with a
* repeated sequence of length 8.
*/
*/
unsigned int ts_periodicity;
/*!\brief Template defining the membership of frames to temporal layers.
@ -693,7 +693,7 @@ typedef struct vpx_codec_enc_cfg {
* For a 2-layer encoding that assigns even numbered frames to one temporal
* layer (0) and odd numbered frames to a second temporal layer (1) with
* ts_periodicity=8, then ts_layer_id = (0,1,0,1,0,1,0,1).
*/
*/
unsigned int ts_layer_id[VPX_TS_MAX_PERIODICITY];
/*!\brief Target bitrate for each spatial/temporal layer.

View File

@ -1,12 +1,12 @@
/*
* Copyright (c) 2016 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
* Copyright (c) 2016 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#include <math.h>
#include <assert.h>
@ -24,8 +24,8 @@ double vpx_sse_to_psnr(double samples, double peak, double sse) {
}
/* TODO(yaowu): The block_variance calls the unoptimized versions of variance()
* and highbd_8_variance(). It should not.
*/
* and highbd_8_variance(). It should not.
*/
static void encoder_variance(const uint8_t *a, int a_stride, const uint8_t *b,
int b_stride, int w, int h, unsigned int *sse,
int *sum) {

View File

@ -1,12 +1,12 @@
/*
* Copyright (c) 2016 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
* Copyright (c) 2016 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef VPX_DSP_PSNR_H_
#define VPX_DSP_PSNR_H_
@ -28,13 +28,13 @@ typedef struct {
// TODO(dkovalev) change vpx_sse_to_psnr signature: double -> int64_t
/*!\brief Converts SSE to PSNR
*
* Converts sum of squared errros (SSE) to peak signal-to-noise ratio (PNSR).
*
* \param[in] samples Number of samples
* \param[in] peak Max sample value
* \param[in] sse Sum of squared errors
*/
*
* Converts sum of squared errros (SSE) to peak signal-to-noise ratio (PNSR).
*
* \param[in] samples Number of samples
* \param[in] peak Max sample value
* \param[in] sse Sum of squared errors
*/
double vpx_sse_to_psnr(double samples, double peak, double sse);
int64_t vpx_get_y_sse(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b);
#if CONFIG_VP9_HIGHBITDEPTH

View File

@ -12,8 +12,8 @@
#include "vpx_scale/vpx_scale.h"
#include "vpx_mem/vpx_mem.h"
/****************************************************************************
* Imports
****************************************************************************/
* Imports
****************************************************************************/
/****************************************************************************
*

View File

@ -17,8 +17,8 @@
***************************************************************************/
/****************************************************************************
* Header Files
****************************************************************************/
* Header Files
****************************************************************************/
#include "./vpx_scale_rtcd.h"
#include "vpx_mem/vpx_mem.h"
#include "vpx_scale/vpx_scale.h"

View File

@ -16,8 +16,8 @@
#include "vpx_ports/mem.h"
/****************************************************************************
* Exports
****************************************************************************/
* Exports
****************************************************************************/
/****************************************************************************
*
@ -54,7 +54,7 @@ int vp8_yv12_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width,
int uv_width = aligned_width >> 1;
int uv_height = aligned_height >> 1;
/** There is currently a bunch of code which assumes
* uv_stride == y_stride/2, so enforce this here. */
* uv_stride == y_stride/2, so enforce this here. */
int uv_stride = y_stride >> 1;
int uvplane_size = (uv_height + border) * uv_stride;
const int frame_size = yplane_size + 2 * uvplane_size;

View File

@ -1278,8 +1278,8 @@ static int parse_stream_params(struct VpxEncoderConfig *global,
match = 1;
/* Point either to the next free element or the first
* instance of this control.
*/
* instance of this control.
*/
for (j = 0; j < config->arg_ctrl_cnt; j++)
if (ctrl_args_map != NULL &&
config->arg_ctrls[j][0] == ctrl_args_map[i])

View File

@ -130,8 +130,8 @@ static int y4m_parse_tags(y4m_input *_y4m, char *_tags) {
The number of taps is intentionally kept small to reduce computational
overhead and limit ringing.
The taps from these filters are scaled so that their sum is 1, and the result
is scaled by 128 and rounded to integers to create a filter whose
The taps from these filters are scaled so that their sum is 1, and the
result is scaled by 128 and rounded to integers to create a filter whose
intermediate values fit inside 16 bits.
Coefficients are rounded in such a way as to ensure their sum is still 128,
which is usually equivalent to normal rounding.