Commit a2dc61c7 authored by clang-format's avatar clang-format Committed by James Zern

apply clang-format

.c files were missed in the previous change

Change-Id: I9d22cd83e1f87472bfb09e6a38284396b2fcd860
parent 06259581
......@@ -418,8 +418,8 @@ static void fs_calc_structure(fs_ctx *_ctx, int _l, int bit_depth) {
We drop the finest scale and renormalize the rest to sum to 1.*/
static const double FS_WEIGHTS[FS_NLEVELS] = {
0.2989654541015625, 0.3141326904296875, 0.2473602294921875,
0.1395416259765625};
0.2989654541015625, 0.3141326904296875, 0.2473602294921875, 0.1395416259765625
};
static double fs_average(fs_ctx *_ctx, int _l) {
double *ssim;
......
......@@ -201,13 +201,13 @@ int64_t aom_highbd_get_y_sse(const YV12_BUFFER_CONFIG *a,
void aom_calc_highbd_psnr(const YV12_BUFFER_CONFIG *a,
const YV12_BUFFER_CONFIG *b, PSNR_STATS *psnr,
uint32_t bit_depth, uint32_t in_bit_depth) {
const int widths[3] = {a->y_crop_width, a->uv_crop_width, a->uv_crop_width};
const int heights[3] = {a->y_crop_height, a->uv_crop_height,
a->uv_crop_height};
const uint8_t *a_planes[3] = {a->y_buffer, a->u_buffer, a->v_buffer};
const int a_strides[3] = {a->y_stride, a->uv_stride, a->uv_stride};
const uint8_t *b_planes[3] = {b->y_buffer, b->u_buffer, b->v_buffer};
const int b_strides[3] = {b->y_stride, b->uv_stride, b->uv_stride};
const int widths[3] = { a->y_crop_width, a->uv_crop_width, a->uv_crop_width };
const int heights[3] = { a->y_crop_height, a->uv_crop_height,
a->uv_crop_height };
const uint8_t *a_planes[3] = { a->y_buffer, a->u_buffer, a->v_buffer };
const int a_strides[3] = { a->y_stride, a->uv_stride, a->uv_stride };
const uint8_t *b_planes[3] = { b->y_buffer, b->u_buffer, b->v_buffer };
const int b_strides[3] = { b->y_stride, b->uv_stride, b->uv_stride };
int i;
uint64_t total_sse = 0;
uint32_t total_samples = 0;
......@@ -249,13 +249,13 @@ void aom_calc_highbd_psnr(const YV12_BUFFER_CONFIG *a,
void aom_calc_psnr(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b,
PSNR_STATS *psnr) {
static const double peak = 255.0;
const int widths[3] = {a->y_crop_width, a->uv_crop_width, a->uv_crop_width};
const int heights[3] = {a->y_crop_height, a->uv_crop_height,
a->uv_crop_height};
const uint8_t *a_planes[3] = {a->y_buffer, a->u_buffer, a->v_buffer};
const int a_strides[3] = {a->y_stride, a->uv_stride, a->uv_stride};
const uint8_t *b_planes[3] = {b->y_buffer, b->u_buffer, b->v_buffer};
const int b_strides[3] = {b->y_stride, b->uv_stride, b->uv_stride};
const int widths[3] = { a->y_crop_width, a->uv_crop_width, a->uv_crop_width };
const int heights[3] = { a->y_crop_height, a->uv_crop_height,
a->uv_crop_height };
const uint8_t *a_planes[3] = { a->y_buffer, a->u_buffer, a->v_buffer };
const int a_strides[3] = { a->y_stride, a->uv_stride, a->uv_stride };
const uint8_t *b_planes[3] = { b->y_buffer, b->u_buffer, b->v_buffer };
const int b_strides[3] = { b->y_stride, b->uv_stride, b->uv_stride };
int i;
uint64_t total_sse = 0;
uint32_t total_samples = 0;
......
......@@ -54,56 +54,59 @@ static void hbd_od_bin_fdct8x8(tran_low_t *y, int ystride, const int16_t *x,
* transparency. This is not the JPEG based matrix from the paper,
this one gives a slightly higher MOS agreement.*/
static const double csf_y[8][8] = {
{1.6193873005, 2.2901594831, 2.08509755623, 1.48366094411, 1.00227514334,
0.678296995242, 0.466224900598, 0.3265091542},
{2.2901594831, 1.94321815382, 2.04793073064, 1.68731108984, 1.2305666963,
0.868920337363, 0.61280991668, 0.436405793551},
{2.08509755623, 2.04793073064, 1.34329019223, 1.09205635862, 0.875748795257,
0.670882927016, 0.501731932449, 0.372504254596},
{1.48366094411, 1.68731108984, 1.09205635862, 0.772819797575,
0.605636379554, 0.48309405692, 0.380429446972, 0.295774038565},
{1.00227514334, 1.2305666963, 0.875748795257, 0.605636379554,
0.448996256676, 0.352889268808, 0.283006984131, 0.226951348204},
{0.678296995242, 0.868920337363, 0.670882927016, 0.48309405692,
0.352889268808, 0.27032073436, 0.215017739696, 0.17408067321},
{0.466224900598, 0.61280991668, 0.501731932449, 0.380429446972,
0.283006984131, 0.215017739696, 0.168869545842, 0.136153931001},
{0.3265091542, 0.436405793551, 0.372504254596, 0.295774038565,
0.226951348204, 0.17408067321, 0.136153931001, 0.109083846276}};
{ 1.6193873005, 2.2901594831, 2.08509755623, 1.48366094411, 1.00227514334,
0.678296995242, 0.466224900598, 0.3265091542 },
{ 2.2901594831, 1.94321815382, 2.04793073064, 1.68731108984, 1.2305666963,
0.868920337363, 0.61280991668, 0.436405793551 },
{ 2.08509755623, 2.04793073064, 1.34329019223, 1.09205635862, 0.875748795257,
0.670882927016, 0.501731932449, 0.372504254596 },
{ 1.48366094411, 1.68731108984, 1.09205635862, 0.772819797575, 0.605636379554,
0.48309405692, 0.380429446972, 0.295774038565 },
{ 1.00227514334, 1.2305666963, 0.875748795257, 0.605636379554, 0.448996256676,
0.352889268808, 0.283006984131, 0.226951348204 },
{ 0.678296995242, 0.868920337363, 0.670882927016, 0.48309405692,
0.352889268808, 0.27032073436, 0.215017739696, 0.17408067321 },
{ 0.466224900598, 0.61280991668, 0.501731932449, 0.380429446972,
0.283006984131, 0.215017739696, 0.168869545842, 0.136153931001 },
{ 0.3265091542, 0.436405793551, 0.372504254596, 0.295774038565,
0.226951348204, 0.17408067321, 0.136153931001, 0.109083846276 }
};
static const double csf_cb420[8][8] = {
{1.91113096927, 2.46074210438, 1.18284184739, 1.14982565193, 1.05017074788,
0.898018824055, 0.74725392039, 0.615105596242},
{2.46074210438, 1.58529308355, 1.21363250036, 1.38190029285, 1.33100189972,
1.17428548929, 0.996404342439, 0.830890433625},
{1.18284184739, 1.21363250036, 0.978712413627, 1.02624506078, 1.03145147362,
0.960060382087, 0.849823426169, 0.731221236837},
{1.14982565193, 1.38190029285, 1.02624506078, 0.861317501629,
0.801821139099, 0.751437590932, 0.685398513368, 0.608694761374},
{1.05017074788, 1.33100189972, 1.03145147362, 0.801821139099,
0.676555426187, 0.605503172737, 0.55002013668, 0.495804539034},
{0.898018824055, 1.17428548929, 0.960060382087, 0.751437590932,
0.605503172737, 0.514674450957, 0.454353482512, 0.407050308965},
{0.74725392039, 0.996404342439, 0.849823426169, 0.685398513368,
0.55002013668, 0.454353482512, 0.389234902883, 0.342353999733},
{0.615105596242, 0.830890433625, 0.731221236837, 0.608694761374,
0.495804539034, 0.407050308965, 0.342353999733, 0.295530605237}};
{ 1.91113096927, 2.46074210438, 1.18284184739, 1.14982565193, 1.05017074788,
0.898018824055, 0.74725392039, 0.615105596242 },
{ 2.46074210438, 1.58529308355, 1.21363250036, 1.38190029285, 1.33100189972,
1.17428548929, 0.996404342439, 0.830890433625 },
{ 1.18284184739, 1.21363250036, 0.978712413627, 1.02624506078, 1.03145147362,
0.960060382087, 0.849823426169, 0.731221236837 },
{ 1.14982565193, 1.38190029285, 1.02624506078, 0.861317501629, 0.801821139099,
0.751437590932, 0.685398513368, 0.608694761374 },
{ 1.05017074788, 1.33100189972, 1.03145147362, 0.801821139099, 0.676555426187,
0.605503172737, 0.55002013668, 0.495804539034 },
{ 0.898018824055, 1.17428548929, 0.960060382087, 0.751437590932,
0.605503172737, 0.514674450957, 0.454353482512, 0.407050308965 },
{ 0.74725392039, 0.996404342439, 0.849823426169, 0.685398513368,
0.55002013668, 0.454353482512, 0.389234902883, 0.342353999733 },
{ 0.615105596242, 0.830890433625, 0.731221236837, 0.608694761374,
0.495804539034, 0.407050308965, 0.342353999733, 0.295530605237 }
};
static const double csf_cr420[8][8] = {
{2.03871978502, 2.62502345193, 1.26180942886, 1.11019789803, 1.01397751469,
0.867069376285, 0.721500455585, 0.593906509971},
{2.62502345193, 1.69112867013, 1.17180569821, 1.3342742857, 1.28513006198,
1.13381474809, 0.962064122248, 0.802254508198},
{1.26180942886, 1.17180569821, 0.944981930573, 0.990876405848,
0.995903384143, 0.926972725286, 0.820534991409, 0.706020324706},
{1.11019789803, 1.3342742857, 0.990876405848, 0.831632933426, 0.77418706195,
0.725539939514, 0.661776842059, 0.587716619023},
{1.01397751469, 1.28513006198, 0.995903384143, 0.77418706195,
0.653238524286, 0.584635025748, 0.531064164893, 0.478717061273},
{0.867069376285, 1.13381474809, 0.926972725286, 0.725539939514,
0.584635025748, 0.496936637883, 0.438694579826, 0.393021669543},
{0.721500455585, 0.962064122248, 0.820534991409, 0.661776842059,
0.531064164893, 0.438694579826, 0.375820256136, 0.330555063063},
{0.593906509971, 0.802254508198, 0.706020324706, 0.587716619023,
0.478717061273, 0.393021669543, 0.330555063063, 0.285345396658}};
{ 2.03871978502, 2.62502345193, 1.26180942886, 1.11019789803, 1.01397751469,
0.867069376285, 0.721500455585, 0.593906509971 },
{ 2.62502345193, 1.69112867013, 1.17180569821, 1.3342742857, 1.28513006198,
1.13381474809, 0.962064122248, 0.802254508198 },
{ 1.26180942886, 1.17180569821, 0.944981930573, 0.990876405848,
0.995903384143, 0.926972725286, 0.820534991409, 0.706020324706 },
{ 1.11019789803, 1.3342742857, 0.990876405848, 0.831632933426, 0.77418706195,
0.725539939514, 0.661776842059, 0.587716619023 },
{ 1.01397751469, 1.28513006198, 0.995903384143, 0.77418706195, 0.653238524286,
0.584635025748, 0.531064164893, 0.478717061273 },
{ 0.867069376285, 1.13381474809, 0.926972725286, 0.725539939514,
0.584635025748, 0.496936637883, 0.438694579826, 0.393021669543 },
{ 0.721500455585, 0.962064122248, 0.820534991409, 0.661776842059,
0.531064164893, 0.438694579826, 0.375820256136, 0.330555063063 },
{ 0.593906509971, 0.802254508198, 0.706020324706, 0.587716619023,
0.478717061273, 0.393021669543, 0.330555063063, 0.285345396658 }
};
static double convert_score_db(double _score, double _weight, int bit_depth) {
int16_t pix_max = 255;
......
......@@ -187,7 +187,6 @@ double aom_calc_ssim(const YV12_BUFFER_CONFIG *source,
return ssimv;
}
// traditional ssim as per: http://en.wikipedia.org/wiki/Structural_similarity
//
// Re working out the math ->
......
......@@ -1857,8 +1857,7 @@ int main(int argc, const char **argv_) {
if (!input.filename) usage_exit();
/* Decide if other chroma subsamplings than 4:2:0 are supported */
if (global.codec->fourcc == AV1_FOURCC)
input.only_i420 = 0;
if (global.codec->fourcc == AV1_FOURCC) input.only_i420 = 0;
for (pass = global.pass ? global.pass - 1 : 0; pass < global.passes; pass++) {
int frames_in = 0, seen_frames = 0;
......
......@@ -1094,8 +1094,8 @@ static aom_codec_err_t ctrl_set_reference(aom_codec_alg_priv_t *ctx,
YV12_BUFFER_CONFIG sd;
image2yuvconfig(&frame->img, &sd);
av1_set_reference_enc(ctx->cpi,
ref_frame_to_av1_reframe(frame->frame_type), &sd);
av1_set_reference_enc(ctx->cpi, ref_frame_to_av1_reframe(frame->frame_type),
&sd);
return AOM_CODEC_OK;
} else {
return AOM_CODEC_INVALID_PARAM;
......
......@@ -87,8 +87,7 @@ void av1_fdct4x4_1_c(const int16_t *input, tran_low_t *output, int stride) {
output[1] = 0;
}
void av1_fdct8x8_c(const int16_t *input, tran_low_t *final_output,
int stride) {
void av1_fdct8x8_c(const int16_t *input, tran_low_t *final_output, int stride) {
int i, j;
tran_low_t intermediate[64];
int pass;
......@@ -797,8 +796,7 @@ void av1_highbd_fdct16x16_1_c(const int16_t *input, tran_low_t *output,
av1_fdct16x16_1_c(input, output, stride);
}
void av1_highbd_fdct32x32_c(const int16_t *input, tran_low_t *out,
int stride) {
void av1_highbd_fdct32x32_c(const int16_t *input, tran_low_t *out, int stride) {
av1_fdct32x32_c(input, out, stride);
}
......
......@@ -65,8 +65,7 @@ void av1_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride) {
}
}
void av1_iwht4x4_1_add_c(const tran_low_t *in, uint8_t *dest,
int dest_stride) {
void av1_iwht4x4_1_add_c(const tran_low_t *in, uint8_t *dest, int dest_stride) {
int i;
tran_high_t a1, e1;
tran_low_t tmp[4];
......@@ -769,8 +768,7 @@ void av1_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest,
}
}
void av1_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest,
int stride) {
void av1_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride) {
int i, j;
tran_high_t a1;
tran_low_t out = WRAPLOW(dct_const_round_shift(input[0] * cospi_16_64), 8);
......@@ -1212,8 +1210,7 @@ void av1_idct32x32_34_add_c(const tran_low_t *input, uint8_t *dest,
}
}
void av1_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest,
int stride) {
void av1_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride) {
int i, j;
tran_high_t a1;
......@@ -1801,8 +1798,7 @@ void av1_highbd_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest8,
}
}
void av1_highbd_iadst16_c(const tran_low_t *input, tran_low_t *output,
int bd) {
void av1_highbd_iadst16_c(const tran_low_t *input, tran_low_t *output, int bd) {
tran_high_t s0, s1, s2, s3, s4, s5, s6, s7, s8;
tran_high_t s9, s10, s11, s12, s13, s14, s15;
......
......@@ -19,13 +19,12 @@
#include "av1/common/reconinter.h"
#include "av1/common/od_dering.h"
int compute_level_from_index(int global_level, int gi) {
static const int dering_gains[DERING_REFINEMENT_LEVELS] = {0, 11, 16, 22};
static const int dering_gains[DERING_REFINEMENT_LEVELS] = { 0, 11, 16, 22 };
int level;
if (global_level == 0) return 0;
level = (global_level*dering_gains[gi] + 8) >> 4;
return clamp(level, gi, MAX_DERING_LEVEL-1);
level = (global_level * dering_gains[gi] + 8) >> 4;
return clamp(level, gi, MAX_DERING_LEVEL - 1);
}
int sb_all_skip(const AV1_COMMON *const cm, int mi_row, int mi_col) {
......@@ -39,8 +38,8 @@ int sb_all_skip(const AV1_COMMON *const cm, int mi_row, int mi_col) {
for (r = 0; r < maxr; r++) {
for (c = 0; c < maxc; c++) {
skip = skip &&
cm->mi_grid_visible[(mi_row + r)*cm->mi_stride + mi_col + c]->
mbmi.skip;
cm->mi_grid_visible[(mi_row + r) * cm->mi_stride + mi_col + c]
->mbmi.skip;
}
}
return skip;
......@@ -53,30 +52,29 @@ void av1_dering_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
int nhsb, nvsb;
od_dering_in *src[3];
unsigned char *bskip;
int dir[OD_DERING_NBLOCKS][OD_DERING_NBLOCKS] = {{0}};
int dir[OD_DERING_NBLOCKS][OD_DERING_NBLOCKS] = { { 0 } };
int stride;
int bsize[3];
int dec[3];
int pli;
int coeff_shift = AOMMAX(cm->bit_depth - 8, 0);
nvsb = (cm->mi_rows + MI_BLOCK_SIZE - 1)/MI_BLOCK_SIZE;
nhsb = (cm->mi_cols + MI_BLOCK_SIZE - 1)/MI_BLOCK_SIZE;
bskip = aom_malloc(sizeof(*bskip)*cm->mi_rows*cm->mi_cols);
nvsb = (cm->mi_rows + MI_BLOCK_SIZE - 1) / MI_BLOCK_SIZE;
nhsb = (cm->mi_cols + MI_BLOCK_SIZE - 1) / MI_BLOCK_SIZE;
bskip = aom_malloc(sizeof(*bskip) * cm->mi_rows * cm->mi_cols);
av1_setup_dst_planes(xd->plane, frame, 0, 0);
for (pli = 0; pli < 3; pli++) {
dec[pli] = xd->plane[pli].subsampling_x;
bsize[pli] = 8 >> dec[pli];
}
stride = bsize[0]*cm->mi_cols;
stride = bsize[0] * cm->mi_cols;
for (pli = 0; pli < 3; pli++) {
src[pli] = aom_malloc(sizeof(*src)*cm->mi_rows*cm->mi_cols*64);
for (r = 0; r < bsize[pli]*cm->mi_rows; ++r) {
for (c = 0; c < bsize[pli]*cm->mi_cols; ++c) {
src[pli] = aom_malloc(sizeof(*src) * cm->mi_rows * cm->mi_cols * 64);
for (r = 0; r < bsize[pli] * cm->mi_rows; ++r) {
for (c = 0; c < bsize[pli] * cm->mi_cols; ++c) {
#if CONFIG_AOM_HIGHBITDEPTH
if (cm->use_highbitdepth) {
src[pli][r * stride + c] =
CONVERT_TO_SHORTPTR(xd->plane[pli].dst.buf)
[r * xd->plane[pli].dst.stride + c];
src[pli][r * stride + c] = CONVERT_TO_SHORTPTR(
xd->plane[pli].dst.buf)[r * xd->plane[pli].dst.stride + c];
} else {
#endif
src[pli][r * stride + c] =
......@@ -98,46 +96,48 @@ void av1_dering_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
for (sbc = 0; sbc < nhsb; sbc++) {
int level;
int nhb, nvb;
nhb = AOMMIN(MI_BLOCK_SIZE, cm->mi_cols - MI_BLOCK_SIZE*sbc);
nvb = AOMMIN(MI_BLOCK_SIZE, cm->mi_rows - MI_BLOCK_SIZE*sbr);
nhb = AOMMIN(MI_BLOCK_SIZE, cm->mi_cols - MI_BLOCK_SIZE * sbc);
nvb = AOMMIN(MI_BLOCK_SIZE, cm->mi_rows - MI_BLOCK_SIZE * sbr);
for (pli = 0; pli < 3; pli++) {
int16_t dst[MI_BLOCK_SIZE*MI_BLOCK_SIZE*8*8];
int16_t dst[MI_BLOCK_SIZE * MI_BLOCK_SIZE * 8 * 8];
int threshold;
#if DERING_REFINEMENT
level = compute_level_from_index(
global_level,
cm->mi_grid_visible[MI_BLOCK_SIZE*sbr*cm->mi_stride +
MI_BLOCK_SIZE*sbc]->mbmi.dering_gain);
cm->mi_grid_visible[MI_BLOCK_SIZE * sbr * cm->mi_stride +
MI_BLOCK_SIZE * sbc]
->mbmi.dering_gain);
#else
level = global_level;
#endif
/* FIXME: This is a temporary hack that uses more conservative
deringing for chroma. */
if (pli) level = (level*5 + 4) >> 3;
if (sb_all_skip(cm, sbr*MI_BLOCK_SIZE, sbc*MI_BLOCK_SIZE)) level = 0;
if (pli) level = (level * 5 + 4) >> 3;
if (sb_all_skip(cm, sbr * MI_BLOCK_SIZE, sbc * MI_BLOCK_SIZE))
level = 0;
threshold = level << coeff_shift;
od_dering(
&OD_DERING_VTBL_C,
dst,
MI_BLOCK_SIZE*bsize[pli],
&src[pli][sbr*stride*bsize[pli]*MI_BLOCK_SIZE +
sbc*bsize[pli]*MI_BLOCK_SIZE],
&OD_DERING_VTBL_C, dst, MI_BLOCK_SIZE * bsize[pli],
&src[pli][sbr * stride * bsize[pli] * MI_BLOCK_SIZE +
sbc * bsize[pli] * MI_BLOCK_SIZE],
stride, nhb, nvb, sbc, sbr, nhsb, nvsb, dec[pli], dir, pli,
&bskip[MI_BLOCK_SIZE*sbr*cm->mi_cols + MI_BLOCK_SIZE*sbc],
&bskip[MI_BLOCK_SIZE * sbr * cm->mi_cols + MI_BLOCK_SIZE * sbc],
cm->mi_cols, threshold, OD_DERING_NO_CHECK_OVERLAP, coeff_shift);
for (r = 0; r < bsize[pli]*nvb; ++r) {
for (c = 0; c < bsize[pli]*nhb; ++c) {
for (r = 0; r < bsize[pli] * nvb; ++r) {
for (c = 0; c < bsize[pli] * nhb; ++c) {
#if CONFIG_AOM_HIGHBITDEPTH
if (cm->use_highbitdepth) {
CONVERT_TO_SHORTPTR(xd->plane[pli].dst.buf)
[xd->plane[pli].dst.stride*(bsize[pli]*MI_BLOCK_SIZE*sbr + r)
+ sbc*bsize[pli]*MI_BLOCK_SIZE + c] =
[xd->plane[pli].dst.stride *
(bsize[pli] * MI_BLOCK_SIZE * sbr + r) +
sbc * bsize[pli] * MI_BLOCK_SIZE + c] =
dst[r * MI_BLOCK_SIZE * bsize[pli] + c];
} else {
#endif
xd->plane[pli].dst.buf[xd->plane[pli].dst.stride*
(bsize[pli]*MI_BLOCK_SIZE*sbr + r) +
sbc*bsize[pli]*MI_BLOCK_SIZE + c] =
xd->plane[pli]
.dst.buf[xd->plane[pli].dst.stride *
(bsize[pli] * MI_BLOCK_SIZE * sbr + r) +
sbc * bsize[pli] * MI_BLOCK_SIZE + c] =
dst[r * MI_BLOCK_SIZE * bsize[pli] + c];
#if CONFIG_AOM_HIGHBITDEPTH
}
......
......@@ -14,8 +14,8 @@
#include "av1/common/onyxc_int.h"
#include "av1/common/seg_common.h"
const aom_prob av1_kf_y_mode_prob[INTRA_MODES][INTRA_MODES][INTRA_MODES - 1] =
{ {
const aom_prob av1_kf_y_mode_prob[INTRA_MODES][INTRA_MODES][INTRA_MODES - 1] = {
{
// above = dc
{ 137, 30, 42, 148, 151, 207, 70, 52, 91 }, // left = dc
{ 92, 45, 102, 136, 116, 180, 74, 90, 100 }, // left = v
......@@ -144,7 +144,8 @@ const aom_prob av1_kf_y_mode_prob[INTRA_MODES][INTRA_MODES][INTRA_MODES - 1] =
{ 52, 34, 29, 129, 183, 227, 42, 35, 43 }, // left = d207
{ 42, 44, 44, 104, 105, 164, 64, 130, 80 }, // left = d63
{ 43, 81, 53, 140, 169, 204, 68, 84, 72 } // left = tm
} };
}
};
static const aom_prob default_if_y_probs[BLOCK_SIZE_GROUPS][INTRA_MODES - 1] = {
{ 65, 32, 18, 144, 162, 194, 41, 51, 98 }, // block_size < 8x8
......@@ -203,9 +204,8 @@ static const aom_prob default_refmv_prob[REFMV_MODE_CONTEXTS] = {
220, 220, 200, 200, 180, 128, 30, 220, 30,
};
static const aom_prob default_drl_prob[DRL_MODE_CONTEXTS] = {
128, 160, 180, 128, 160
};
static const aom_prob default_drl_prob[DRL_MODE_CONTEXTS] = { 128, 160, 180,
128, 160 };
#endif
static const aom_prob
......@@ -343,8 +343,8 @@ static void init_mode_probs(FRAME_CONTEXT *fc) {
av1_copy(fc->inter_ext_tx_prob, default_inter_ext_tx_prob);
}
const aom_tree_index av1_switchable_interp_tree[TREE_SIZE(
SWITCHABLE_FILTERS)] = { -EIGHTTAP, 2, -EIGHTTAP_SMOOTH, -EIGHTTAP_SHARP };
const aom_tree_index av1_switchable_interp_tree[TREE_SIZE(SWITCHABLE_FILTERS)] =
{ -EIGHTTAP, 2, -EIGHTTAP_SMOOTH, -EIGHTTAP_SHARP };
void av1_adapt_inter_frame_probs(AV1_COMMON *cm) {
int i, j;
......@@ -368,17 +368,17 @@ void av1_adapt_inter_frame_probs(AV1_COMMON *cm) {
#if CONFIG_REF_MV
for (i = 0; i < NEWMV_MODE_CONTEXTS; ++i)
fc->newmv_prob[i] = mode_mv_merge_probs(pre_fc->newmv_prob[i],
counts->newmv_mode[i]);
fc->newmv_prob[i] =
mode_mv_merge_probs(pre_fc->newmv_prob[i], counts->newmv_mode[i]);
for (i = 0; i < ZEROMV_MODE_CONTEXTS; ++i)
fc->zeromv_prob[i] = mode_mv_merge_probs(pre_fc->zeromv_prob[i],
counts->zeromv_mode[i]);
fc->zeromv_prob[i] =
mode_mv_merge_probs(pre_fc->zeromv_prob[i], counts->zeromv_mode[i]);
for (i = 0; i < REFMV_MODE_CONTEXTS; ++i)
fc->refmv_prob[i] = mode_mv_merge_probs(pre_fc->refmv_prob[i],
counts->refmv_mode[i]);
fc->refmv_prob[i] =
mode_mv_merge_probs(pre_fc->refmv_prob[i], counts->refmv_mode[i]);
for (i = 0; i < DRL_MODE_CONTEXTS; ++i)
fc->drl_prob[i] = mode_mv_merge_probs(pre_fc->drl_prob[i],
counts->drl_mode[i]);
fc->drl_prob[i] =
mode_mv_merge_probs(pre_fc->drl_prob[i], counts->drl_mode[i]);
#else
for (i = 0; i < INTER_MODE_CONTEXTS; i++)
aom_tree_merge_probs(av1_inter_mode_tree, pre_fc->inter_mode_probs[i],
......
......@@ -211,8 +211,8 @@ void av1_adapt_mv_probs(AV1_COMMON *cm, int allow_hp) {
aom_tree_merge_probs(av1_mv_fp_tree, pre_comp->fp, c->fp, comp->fp);
if (allow_hp) {
comp->class0_hp = mode_mv_merge_probs(pre_comp->class0_hp,
c->class0_hp);
comp->class0_hp =
mode_mv_merge_probs(pre_comp->class0_hp, c->class0_hp);
comp->hp = mode_mv_merge_probs(pre_comp->hp, c->hp);
}
}
......@@ -256,8 +256,7 @@ void av1_adapt_mv_probs(AV1_COMMON *cm, int allow_hp) {
void av1_init_mv_probs(AV1_COMMON *cm) {
#if CONFIG_REF_MV
int i;
for (i = 0; i < NMV_CONTEXTS; ++i)
cm->fc->nmvc[i] = default_nmv_context;
for (i = 0; i < NMV_CONTEXTS; ++i) cm->fc->nmvc[i] = default_nmv_context;
#else
cm->fc->nmvc = default_nmv_context;
#endif
......
......@@ -395,9 +395,7 @@ void av1_highbd_inv_txfm_add_4x4(const tran_low_t *input, uint8_t *dest,
av1_highbd_iwht4x4_add(input, dest, stride, eob, bd);
} else {
switch (tx_type) {
case DCT_DCT:
av1_highbd_idct4x4_add(input, dest, stride, eob, bd);
break;
case DCT_DCT: av1_highbd_idct4x4_add(input, dest, stride, eob, bd); break;
case ADST_DCT:
case DCT_ADST:
case ADST_ADST:
......@@ -409,8 +407,7 @@ void av1_highbd_inv_txfm_add_4x4(const tran_low_t *input, uint8_t *dest,
}
void av1_highbd_inv_txfm_add_8x8(const tran_low_t *input, uint8_t *dest,
int stride, int eob, int bd,
TX_TYPE tx_type) {
int stride, int eob, int bd, TX_TYPE tx_type) {
switch (tx_type) {
case DCT_DCT: av1_highbd_idct8x8_add(input, dest, stride, eob, bd); break;
case ADST_DCT:
......@@ -426,9 +423,7 @@ void av1_highbd_inv_txfm_add_16x16(const tran_low_t *input, uint8_t *dest,
int stride, int eob, int bd,
TX_TYPE tx_type) {
switch (tx_type) {
case DCT_DCT:
av1_highbd_idct16x16_add(input, dest, stride, eob, bd);
break;
case DCT_DCT: av1_highbd_idct16x16_add(input, dest, stride, eob, bd); break;
case ADST_DCT:
case DCT_ADST:
case ADST_ADST:
......@@ -442,9 +437,7 @@ void av1_highbd_inv_txfm_add_32x32(const tran_low_t *input, uint8_t *dest,
int stride, int eob, int bd,
TX_TYPE tx_type) {
switch (tx_type) {
case DCT_DCT:
av1_highbd_idct32x32_add(input, dest, stride, eob, bd);
break;
case DCT_DCT: av1_highbd_idct32x32_add(input, dest, stride, eob, bd); break;
case ADST_DCT:
case DCT_ADST:
case ADST_ADST: assert(0); break;
......
......@@ -1153,8 +1153,7 @@ static void highbd_filter_selectively_vert(
void av1_filter_block_plane_non420(AV1_COMMON *cm,
struct macroblockd_plane *plane,
MODE_INFO **mi_8x8, int mi_row,