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

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) { ...@@ -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.*/ We drop the finest scale and renormalize the rest to sum to 1.*/
static const double FS_WEIGHTS[FS_NLEVELS] = { static const double FS_WEIGHTS[FS_NLEVELS] = {
0.2989654541015625, 0.3141326904296875, 0.2473602294921875, 0.2989654541015625, 0.3141326904296875, 0.2473602294921875, 0.1395416259765625
0.1395416259765625}; };
static double fs_average(fs_ctx *_ctx, int _l) { static double fs_average(fs_ctx *_ctx, int _l) {
double *ssim; double *ssim;
......
...@@ -201,13 +201,13 @@ int64_t aom_highbd_get_y_sse(const YV12_BUFFER_CONFIG *a, ...@@ -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, void aom_calc_highbd_psnr(const YV12_BUFFER_CONFIG *a,
const YV12_BUFFER_CONFIG *b, PSNR_STATS *psnr, const YV12_BUFFER_CONFIG *b, PSNR_STATS *psnr,
uint32_t bit_depth, uint32_t in_bit_depth) { 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 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, const int heights[3] = { a->y_crop_height, a->uv_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 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 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 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 b_strides[3] = { b->y_stride, b->uv_stride, b->uv_stride };
int i; int i;
uint64_t total_sse = 0; uint64_t total_sse = 0;
uint32_t total_samples = 0; uint32_t total_samples = 0;
...@@ -249,13 +249,13 @@ void aom_calc_highbd_psnr(const YV12_BUFFER_CONFIG *a, ...@@ -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, void aom_calc_psnr(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b,
PSNR_STATS *psnr) { PSNR_STATS *psnr) {
static const double peak = 255.0; static const double peak = 255.0;
const int widths[3] = {a->y_crop_width, a->uv_crop_width, a->uv_crop_width}; 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, const int heights[3] = { a->y_crop_height, a->uv_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 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 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 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 b_strides[3] = { b->y_stride, b->uv_stride, b->uv_stride };
int i; int i;
uint64_t total_sse = 0; uint64_t total_sse = 0;
uint32_t total_samples = 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, ...@@ -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, * transparency. This is not the JPEG based matrix from the paper,
this one gives a slightly higher MOS agreement.*/ this one gives a slightly higher MOS agreement.*/
static const double csf_y[8][8] = { static const double csf_y[8][8] = {
{1.6193873005, 2.2901594831, 2.08509755623, 1.48366094411, 1.00227514334, { 1.6193873005, 2.2901594831, 2.08509755623, 1.48366094411, 1.00227514334,
0.678296995242, 0.466224900598, 0.3265091542}, 0.678296995242, 0.466224900598, 0.3265091542 },
{2.2901594831, 1.94321815382, 2.04793073064, 1.68731108984, 1.2305666963, { 2.2901594831, 1.94321815382, 2.04793073064, 1.68731108984, 1.2305666963,
0.868920337363, 0.61280991668, 0.436405793551}, 0.868920337363, 0.61280991668, 0.436405793551 },
{2.08509755623, 2.04793073064, 1.34329019223, 1.09205635862, 0.875748795257, { 2.08509755623, 2.04793073064, 1.34329019223, 1.09205635862, 0.875748795257,
0.670882927016, 0.501731932449, 0.372504254596}, 0.670882927016, 0.501731932449, 0.372504254596 },
{1.48366094411, 1.68731108984, 1.09205635862, 0.772819797575, { 1.48366094411, 1.68731108984, 1.09205635862, 0.772819797575, 0.605636379554,
0.605636379554, 0.48309405692, 0.380429446972, 0.295774038565}, 0.48309405692, 0.380429446972, 0.295774038565 },
{1.00227514334, 1.2305666963, 0.875748795257, 0.605636379554, { 1.00227514334, 1.2305666963, 0.875748795257, 0.605636379554, 0.448996256676,
0.448996256676, 0.352889268808, 0.283006984131, 0.226951348204}, 0.352889268808, 0.283006984131, 0.226951348204 },
{0.678296995242, 0.868920337363, 0.670882927016, 0.48309405692, { 0.678296995242, 0.868920337363, 0.670882927016, 0.48309405692,
0.352889268808, 0.27032073436, 0.215017739696, 0.17408067321}, 0.352889268808, 0.27032073436, 0.215017739696, 0.17408067321 },
{0.466224900598, 0.61280991668, 0.501731932449, 0.380429446972, { 0.466224900598, 0.61280991668, 0.501731932449, 0.380429446972,
0.283006984131, 0.215017739696, 0.168869545842, 0.136153931001}, 0.283006984131, 0.215017739696, 0.168869545842, 0.136153931001 },
{0.3265091542, 0.436405793551, 0.372504254596, 0.295774038565, { 0.3265091542, 0.436405793551, 0.372504254596, 0.295774038565,
0.226951348204, 0.17408067321, 0.136153931001, 0.109083846276}}; 0.226951348204, 0.17408067321, 0.136153931001, 0.109083846276 }
};
static const double csf_cb420[8][8] = { static const double csf_cb420[8][8] = {
{1.91113096927, 2.46074210438, 1.18284184739, 1.14982565193, 1.05017074788, { 1.91113096927, 2.46074210438, 1.18284184739, 1.14982565193, 1.05017074788,
0.898018824055, 0.74725392039, 0.615105596242}, 0.898018824055, 0.74725392039, 0.615105596242 },
{2.46074210438, 1.58529308355, 1.21363250036, 1.38190029285, 1.33100189972, { 2.46074210438, 1.58529308355, 1.21363250036, 1.38190029285, 1.33100189972,
1.17428548929, 0.996404342439, 0.830890433625}, 1.17428548929, 0.996404342439, 0.830890433625 },
{1.18284184739, 1.21363250036, 0.978712413627, 1.02624506078, 1.03145147362, { 1.18284184739, 1.21363250036, 0.978712413627, 1.02624506078, 1.03145147362,
0.960060382087, 0.849823426169, 0.731221236837}, 0.960060382087, 0.849823426169, 0.731221236837 },
{1.14982565193, 1.38190029285, 1.02624506078, 0.861317501629, { 1.14982565193, 1.38190029285, 1.02624506078, 0.861317501629, 0.801821139099,
0.801821139099, 0.751437590932, 0.685398513368, 0.608694761374}, 0.751437590932, 0.685398513368, 0.608694761374 },
{1.05017074788, 1.33100189972, 1.03145147362, 0.801821139099, { 1.05017074788, 1.33100189972, 1.03145147362, 0.801821139099, 0.676555426187,
0.676555426187, 0.605503172737, 0.55002013668, 0.495804539034}, 0.605503172737, 0.55002013668, 0.495804539034 },
{0.898018824055, 1.17428548929, 0.960060382087, 0.751437590932, { 0.898018824055, 1.17428548929, 0.960060382087, 0.751437590932,
0.605503172737, 0.514674450957, 0.454353482512, 0.407050308965}, 0.605503172737, 0.514674450957, 0.454353482512, 0.407050308965 },
{0.74725392039, 0.996404342439, 0.849823426169, 0.685398513368, { 0.74725392039, 0.996404342439, 0.849823426169, 0.685398513368,
0.55002013668, 0.454353482512, 0.389234902883, 0.342353999733}, 0.55002013668, 0.454353482512, 0.389234902883, 0.342353999733 },
{0.615105596242, 0.830890433625, 0.731221236837, 0.608694761374, { 0.615105596242, 0.830890433625, 0.731221236837, 0.608694761374,
0.495804539034, 0.407050308965, 0.342353999733, 0.295530605237}}; 0.495804539034, 0.407050308965, 0.342353999733, 0.295530605237 }
};
static const double csf_cr420[8][8] = { static const double csf_cr420[8][8] = {
{2.03871978502, 2.62502345193, 1.26180942886, 1.11019789803, 1.01397751469, { 2.03871978502, 2.62502345193, 1.26180942886, 1.11019789803, 1.01397751469,
0.867069376285, 0.721500455585, 0.593906509971}, 0.867069376285, 0.721500455585, 0.593906509971 },
{2.62502345193, 1.69112867013, 1.17180569821, 1.3342742857, 1.28513006198, { 2.62502345193, 1.69112867013, 1.17180569821, 1.3342742857, 1.28513006198,
1.13381474809, 0.962064122248, 0.802254508198}, 1.13381474809, 0.962064122248, 0.802254508198 },
{1.26180942886, 1.17180569821, 0.944981930573, 0.990876405848, { 1.26180942886, 1.17180569821, 0.944981930573, 0.990876405848,
0.995903384143, 0.926972725286, 0.820534991409, 0.706020324706}, 0.995903384143, 0.926972725286, 0.820534991409, 0.706020324706 },
{1.11019789803, 1.3342742857, 0.990876405848, 0.831632933426, 0.77418706195, { 1.11019789803, 1.3342742857, 0.990876405848, 0.831632933426, 0.77418706195,
0.725539939514, 0.661776842059, 0.587716619023}, 0.725539939514, 0.661776842059, 0.587716619023 },
{1.01397751469, 1.28513006198, 0.995903384143, 0.77418706195, { 1.01397751469, 1.28513006198, 0.995903384143, 0.77418706195, 0.653238524286,
0.653238524286, 0.584635025748, 0.531064164893, 0.478717061273}, 0.584635025748, 0.531064164893, 0.478717061273 },
{0.867069376285, 1.13381474809, 0.926972725286, 0.725539939514, { 0.867069376285, 1.13381474809, 0.926972725286, 0.725539939514,
0.584635025748, 0.496936637883, 0.438694579826, 0.393021669543}, 0.584635025748, 0.496936637883, 0.438694579826, 0.393021669543 },
{0.721500455585, 0.962064122248, 0.820534991409, 0.661776842059, { 0.721500455585, 0.962064122248, 0.820534991409, 0.661776842059,
0.531064164893, 0.438694579826, 0.375820256136, 0.330555063063}, 0.531064164893, 0.438694579826, 0.375820256136, 0.330555063063 },
{0.593906509971, 0.802254508198, 0.706020324706, 0.587716619023, { 0.593906509971, 0.802254508198, 0.706020324706, 0.587716619023,
0.478717061273, 0.393021669543, 0.330555063063, 0.285345396658}}; 0.478717061273, 0.393021669543, 0.330555063063, 0.285345396658 }
};
static double convert_score_db(double _score, double _weight, int bit_depth) { static double convert_score_db(double _score, double _weight, int bit_depth) {
int16_t pix_max = 255; int16_t pix_max = 255;
......
...@@ -187,7 +187,6 @@ double aom_calc_ssim(const YV12_BUFFER_CONFIG *source, ...@@ -187,7 +187,6 @@ double aom_calc_ssim(const YV12_BUFFER_CONFIG *source,
return ssimv; return ssimv;
} }
// traditional ssim as per: http://en.wikipedia.org/wiki/Structural_similarity // traditional ssim as per: http://en.wikipedia.org/wiki/Structural_similarity
// //
// Re working out the math -> // Re working out the math ->
......
...@@ -1857,8 +1857,7 @@ int main(int argc, const char **argv_) { ...@@ -1857,8 +1857,7 @@ int main(int argc, const char **argv_) {
if (!input.filename) usage_exit(); if (!input.filename) usage_exit();
/* Decide if other chroma subsamplings than 4:2:0 are supported */ /* Decide if other chroma subsamplings than 4:2:0 are supported */
if (global.codec->fourcc == AV1_FOURCC) if (global.codec->fourcc == AV1_FOURCC) input.only_i420 = 0;
input.only_i420 = 0;
for (pass = global.pass ? global.pass - 1 : 0; pass < global.passes; pass++) { for (pass = global.pass ? global.pass - 1 : 0; pass < global.passes; pass++) {
int frames_in = 0, seen_frames = 0; 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, ...@@ -1094,8 +1094,8 @@ static aom_codec_err_t ctrl_set_reference(aom_codec_alg_priv_t *ctx,
YV12_BUFFER_CONFIG sd; YV12_BUFFER_CONFIG sd;
image2yuvconfig(&frame->img, &sd); image2yuvconfig(&frame->img, &sd);
av1_set_reference_enc(ctx->cpi, av1_set_reference_enc(ctx->cpi, ref_frame_to_av1_reframe(frame->frame_type),
ref_frame_to_av1_reframe(frame->frame_type), &sd); &sd);
return AOM_CODEC_OK; return AOM_CODEC_OK;
} else { } else {
return AOM_CODEC_INVALID_PARAM; return AOM_CODEC_INVALID_PARAM;
......
...@@ -87,8 +87,7 @@ void av1_fdct4x4_1_c(const int16_t *input, tran_low_t *output, int stride) { ...@@ -87,8 +87,7 @@ void av1_fdct4x4_1_c(const int16_t *input, tran_low_t *output, int stride) {
output[1] = 0; output[1] = 0;
} }
void av1_fdct8x8_c(const int16_t *input, tran_low_t *final_output, void av1_fdct8x8_c(const int16_t *input, tran_low_t *final_output, int stride) {
int stride) {
int i, j; int i, j;
tran_low_t intermediate[64]; tran_low_t intermediate[64];
int pass; int pass;
...@@ -797,8 +796,7 @@ void av1_highbd_fdct16x16_1_c(const int16_t *input, tran_low_t *output, ...@@ -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); av1_fdct16x16_1_c(input, output, stride);
} }
void av1_highbd_fdct32x32_c(const int16_t *input, tran_low_t *out, void av1_highbd_fdct32x32_c(const int16_t *input, tran_low_t *out, int stride) {
int stride) {
av1_fdct32x32_c(input, out, 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) { ...@@ -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, void av1_iwht4x4_1_add_c(const tran_low_t *in, uint8_t *dest, int dest_stride) {
int dest_stride) {
int i; int i;
tran_high_t a1, e1; tran_high_t a1, e1;
tran_low_t tmp[4]; tran_low_t tmp[4];
...@@ -769,8 +768,7 @@ void av1_idct16x16_10_add_c(const tran_low_t *input, uint8_t *dest, ...@@ -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, void av1_idct16x16_1_add_c(const tran_low_t *input, uint8_t *dest, int stride) {
int stride) {
int i, j; int i, j;
tran_high_t a1; tran_high_t a1;
tran_low_t out = WRAPLOW(dct_const_round_shift(input[0] * cospi_16_64), 8); 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, ...@@ -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, void av1_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest, int stride) {
int stride) {
int i, j; int i, j;
tran_high_t a1; tran_high_t a1;
...@@ -1801,8 +1798,7 @@ void av1_highbd_idct16x16_256_add_c(const tran_low_t *input, uint8_t *dest8, ...@@ -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, void av1_highbd_iadst16_c(const tran_low_t *input, tran_low_t *output, int bd) {
int bd) {
tran_high_t s0, s1, s2, s3, s4, s5, s6, s7, s8; tran_high_t s0, s1, s2, s3, s4, s5, s6, s7, s8;
tran_high_t s9, s10, s11, s12, s13, s14, s15; tran_high_t s9, s10, s11, s12, s13, s14, s15;
......
...@@ -19,13 +19,12 @@ ...@@ -19,13 +19,12 @@
#include "av1/common/reconinter.h" #include "av1/common/reconinter.h"
#include "av1/common/od_dering.h" #include "av1/common/od_dering.h"
int compute_level_from_index(int global_level, int gi) { 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; int level;
if (global_level == 0) return 0; if (global_level == 0) return 0;
level = (global_level*dering_gains[gi] + 8) >> 4; level = (global_level * dering_gains[gi] + 8) >> 4;
return clamp(level, gi, MAX_DERING_LEVEL-1); return clamp(level, gi, MAX_DERING_LEVEL - 1);
} }
int sb_all_skip(const AV1_COMMON *const cm, int mi_row, int mi_col) { 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) { ...@@ -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 (r = 0; r < maxr; r++) {
for (c = 0; c < maxc; c++) { for (c = 0; c < maxc; c++) {
skip = skip && skip = skip &&
cm->mi_grid_visible[(mi_row + r)*cm->mi_stride + mi_col + c]-> cm->mi_grid_visible[(mi_row + r) * cm->mi_stride + mi_col + c]
mbmi.skip; ->mbmi.skip;
} }
} }
return skip; return skip;
...@@ -53,30 +52,29 @@ void av1_dering_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm, ...@@ -53,30 +52,29 @@ void av1_dering_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
int nhsb, nvsb; int nhsb, nvsb;
od_dering_in *src[3]; od_dering_in *src[3];
unsigned char *bskip; unsigned char *bskip;
int dir[OD_DERING_NBLOCKS][OD_DERING_NBLOCKS] = {{0}}; int dir[OD_DERING_NBLOCKS][OD_DERING_NBLOCKS] = { { 0 } };
int stride; int stride;
int bsize[3]; int bsize[3];
int dec[3]; int dec[3];
int pli; int pli;
int coeff_shift = AOMMAX(cm->bit_depth - 8, 0); int coeff_shift = AOMMAX(cm->bit_depth - 8, 0);
nvsb = (cm->mi_rows + MI_BLOCK_SIZE - 1)/MI_BLOCK_SIZE; nvsb = (cm->mi_rows + MI_BLOCK_SIZE - 1) / MI_BLOCK_SIZE;
nhsb = (cm->mi_cols + 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); bskip = aom_malloc(sizeof(*bskip) * cm->mi_rows * cm->mi_cols);
av1_setup_dst_planes(xd->plane, frame, 0, 0); av1_setup_dst_planes(xd->plane, frame, 0, 0);
for (pli = 0; pli < 3; pli++) { for (pli = 0; pli < 3; pli++) {
dec[pli] = xd->plane[pli].subsampling_x; dec[pli] = xd->plane[pli].subsampling_x;
bsize[pli] = 8 >> dec[pli]; bsize[pli] = 8 >> dec[pli];
} }
stride = bsize[0]*cm->mi_cols; stride = bsize[0] * cm->mi_cols;
for (pli = 0; pli < 3; pli++) { for (pli = 0; pli < 3; pli++) {
src[pli] = aom_malloc(sizeof(*src)*cm->mi_rows*cm->mi_cols*64); src[pli] = aom_malloc(sizeof(*src) * cm->mi_rows * cm->mi_cols * 64);
for (r = 0; r < bsize[pli]*cm->mi_rows; ++r) { for (r = 0; r < bsize[pli] * cm->mi_rows; ++r) {
for (c = 0; c < bsize[pli]*cm->mi_cols; ++c) { for (c = 0; c < bsize[pli] * cm->mi_cols; ++c) {
#if CONFIG_AOM_HIGHBITDEPTH #if CONFIG_AOM_HIGHBITDEPTH
if (cm->use_highbitdepth) { if (cm->use_highbitdepth) {
src[pli][r * stride + c] = src[pli][r * stride + c] = CONVERT_TO_SHORTPTR(
CONVERT_TO_SHORTPTR(xd->plane[pli].dst.buf) xd->plane[pli].dst.buf)[r * xd->plane[pli].dst.stride + c];
[r * xd->plane[pli].dst.stride + c];
} else { } else {
#endif #endif
src[pli][r * stride + c] = src[pli][r * stride + c] =
...@@ -98,46 +96,48 @@ void av1_dering_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm, ...@@ -98,46 +96,48 @@ void av1_dering_frame(YV12_BUFFER_CONFIG *frame, AV1_COMMON *cm,
for (sbc = 0; sbc < nhsb; sbc++) { for (sbc = 0; sbc < nhsb; sbc++) {
int level; int level;
int nhb, nvb; int nhb, nvb;
nhb = AOMMIN(MI_BLOCK_SIZE, cm->mi_cols - MI_BLOCK_SIZE*sbc); nhb = AOMMIN(MI_BLOCK_SIZE, cm->mi_cols - MI_BLOCK_SIZE * sbc);
nvb = AOMMIN(MI_BLOCK_SIZE, cm->mi_rows - MI_BLOCK_SIZE*sbr); nvb = AOMMIN(MI_BLOCK_SIZE, cm->mi_rows - MI_BLOCK_SIZE * sbr);
for (pli = 0; pli < 3; pli++) { 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; int threshold;
#if DERING_REFINEMENT #if DERING_REFINEMENT
level = compute_level_from_index( level = compute_level_from_index(
global_level, global_level,
cm->mi_grid_visible[MI_BLOCK_SIZE*sbr*cm->mi_stride + cm->mi_grid_visible[MI_BLOCK_SIZE * sbr * cm->mi_stride +
MI_BLOCK_SIZE*sbc]->mbmi.dering_gain); MI_BLOCK_SIZE * sbc]
->mbmi.dering_gain);
#else #else
level = global_level; level = global_level;
#endif #endif
/* FIXME: This is a temporary hack that uses more conservative /* FIXME: This is a temporary hack that uses more conservative
deringing for chroma. */ deringing for chroma. */
if (pli) level = (level*5 + 4) >> 3; if (pli) level = (level * 5 + 4) >> 3;
if (sb_all_skip(cm, sbr*MI_BLOCK_SIZE, sbc*MI_BLOCK_SIZE)) level = 0; if (sb_all_skip(cm, sbr * MI_BLOCK_SIZE, sbc * MI_BLOCK_SIZE))
level = 0;
threshold = level << coeff_shift; threshold = level << coeff_shift;
od_dering( od_dering(
&OD_DERING_VTBL_C, &OD_DERING_VTBL_C, dst, MI_BLOCK_SIZE * bsize[pli],
dst, &src[pli][sbr * stride * bsize[pli] * MI_BLOCK_SIZE +
MI_BLOCK_SIZE*bsize[pli], sbc * bsize[pli] * MI_BLOCK_SIZE],
&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, 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); cm->mi_cols, threshold, OD_DERING_NO_CHECK_OVERLAP, coeff_shift);
for (r = 0; r < bsize[pli]*nvb; ++r) { for (r = 0; r < bsize[pli] * nvb; ++r) {
for (c = 0; c < bsize[pli]*nhb; ++c) { for (c = 0; c < bsize[pli] * nhb; ++c) {
#if CONFIG_AOM_HIGHBITDEPTH #if CONFIG_AOM_HIGHBITDEPTH
if (cm->use_highbitdepth) { if (cm->use_highbitdepth) {
CONVERT_TO_SHORTPTR(xd->plane[pli].dst.buf) CONVERT_TO_SHORTPTR(xd->plane[pli].dst.buf)
[xd->plane[pli].dst.stride*(bsize[pli]*MI_BLOCK_SIZE*sbr + r) [xd->plane[pli].dst.stride *
+ sbc*bsize[pli]*MI_BLOCK_SIZE + c] = (bsize[pli] * MI_BLOCK_SIZE * sbr + r) +
sbc * bsize[pli] * MI_BLOCK_SIZE + c] =
dst[r * MI_BLOCK_SIZE * bsize[pli] + c]; dst[r * MI_BLOCK_SIZE * bsize[pli] + c];
} else { } else {
#endif #endif
xd->plane[pli].dst.buf[xd->plane[pli].dst.stride* xd->plane[pli]
(bsize[pli]*MI_BLOCK_SIZE*sbr + r) + .dst.buf[xd->plane[pli].dst.stride *
sbc*bsize[pli]*MI_BLOCK_SIZE + c] = (bsize[pli] * MI_BLOCK_SIZE * sbr + r) +
sbc * bsize[pli] * MI_BLOCK_SIZE + c] =
dst[r * MI_BLOCK_SIZE * bsize[pli] + c]; dst[r * MI_BLOCK_SIZE * bsize[pli] + c];
#if CONFIG_AOM_HIGHBITDEPTH #if CONFIG_AOM_HIGHBITDEPTH
} }
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
#include "av1/common/onyxc_int.h" #include "av1/common/onyxc_int.h"
#include "av1/common/seg_common.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 // above = dc
{ 137, 30, 42, 148, 151, 207, 70, 52, 91 }, // left = dc { 137, 30, 42, 148, 151, 207, 70, 52, 91 }, // left = dc
{ 92, 45, 102, 136, 116, 180, 74, 90, 100 }, // left = v { 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] = ...@@ -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 { 52, 34, 29, 129, 183, 227, 42, 35, 43 }, // left = d207
{ 42, 44, 44, 104, 105, 164, 64, 130, 80 }, // left = d63 { 42, 44, 44, 104, 105, 164, 64, 130, 80 }, // left = d63
{ 43, 81, 53, 140, 169, 204, 68, 84, 72 } // left = tm { 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] = { 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 { 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] = { ...@@ -203,9 +204,8 @@ static const aom_prob default_refmv_prob[REFMV_MODE_CONTEXTS] = {
220, 220, 200, 200, 180, 128, 30, 220, 30, 220, 220, 200, 200, 180, 128, 30, 220, 30,
}; };
static const aom_prob default_drl_prob[DRL_MODE_CONTEXTS] = { static const aom_prob default_drl_prob[DRL_MODE_CONTEXTS] = { 128, 160, 180,
128, 160, 180, 128, 160 128, 160 };
};
#endif #endif
static const aom_prob static const aom_prob
...@@ -343,8 +343,8 @@ static void init_mode_probs(FRAME_CONTEXT *fc) { ...@@ -343,8 +343,8 @@ static void init_mode_probs(FRAME_CONTEXT *fc) {