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

apply clang-format after 5cd2ab95

Change-Id: I186e90d99cd54e66d38159b7cb55a881226b1568
parent 674e9a7c
...@@ -178,8 +178,8 @@ static int64_t highbd_get_sse(const uint8_t *a, int a_stride, const uint8_t *b, ...@@ -178,8 +178,8 @@ static int64_t highbd_get_sse(const uint8_t *a, int a_stride, const uint8_t *b,
#endif // CONFIG_AOM_HIGHBITDEPTH #endif // CONFIG_AOM_HIGHBITDEPTH
int64_t aom_get_y_sse_part(const YV12_BUFFER_CONFIG *a, int64_t aom_get_y_sse_part(const YV12_BUFFER_CONFIG *a,
const YV12_BUFFER_CONFIG *b, const YV12_BUFFER_CONFIG *b, int hstart, int width,
int hstart, int width, int vstart, int height) { int vstart, int height) {
return get_sse(a->y_buffer + vstart * a->y_stride + hstart, a->y_stride, return get_sse(a->y_buffer + vstart * a->y_stride + hstart, a->y_stride,
b->y_buffer + vstart * b->y_stride + hstart, b->y_stride, b->y_buffer + vstart * b->y_stride + hstart, b->y_stride,
width, height); width, height);
...@@ -214,13 +214,11 @@ int64_t aom_get_v_sse(const YV12_BUFFER_CONFIG *a, ...@@ -214,13 +214,11 @@ int64_t aom_get_v_sse(const YV12_BUFFER_CONFIG *a,
#if CONFIG_AOM_HIGHBITDEPTH #if CONFIG_AOM_HIGHBITDEPTH
int64_t aom_highbd_get_y_sse_part(const YV12_BUFFER_CONFIG *a, int64_t aom_highbd_get_y_sse_part(const YV12_BUFFER_CONFIG *a,
const YV12_BUFFER_CONFIG *b, const YV12_BUFFER_CONFIG *b, int hstart,
int hstart, int width, int width, int vstart, int height) {
int vstart, int height) {
return highbd_get_sse( return highbd_get_sse(
a->y_buffer + vstart * a->y_stride + hstart, a->y_stride, a->y_buffer + vstart * a->y_stride + hstart, a->y_stride,
b->y_buffer + vstart * b->y_stride + hstart, b->y_stride, b->y_buffer + vstart * b->y_stride + hstart, b->y_stride, width, height);
width, height);
} }
int64_t aom_highbd_get_y_sse(const YV12_BUFFER_CONFIG *a, int64_t aom_highbd_get_y_sse(const YV12_BUFFER_CONFIG *a,
......
...@@ -36,16 +36,15 @@ typedef struct { ...@@ -36,16 +36,15 @@ typedef struct {
*/ */
double aom_sse_to_psnr(double samples, double peak, double sse); double aom_sse_to_psnr(double samples, double peak, double sse);
int64_t aom_get_y_sse_part(const YV12_BUFFER_CONFIG *a, int64_t aom_get_y_sse_part(const YV12_BUFFER_CONFIG *a,
const YV12_BUFFER_CONFIG *b, const YV12_BUFFER_CONFIG *b, int hstart, int width,
int hstart, int width, int vstart, int height); int vstart, int height);
int64_t aom_get_y_sse(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b); int64_t aom_get_y_sse(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b);
int64_t aom_get_u_sse(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b); int64_t aom_get_u_sse(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b);
int64_t aom_get_v_sse(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b); int64_t aom_get_v_sse(const YV12_BUFFER_CONFIG *a, const YV12_BUFFER_CONFIG *b);
#if CONFIG_AOM_HIGHBITDEPTH #if CONFIG_AOM_HIGHBITDEPTH
int64_t aom_highbd_get_y_sse_part(const YV12_BUFFER_CONFIG *a, int64_t aom_highbd_get_y_sse_part(const YV12_BUFFER_CONFIG *a,
const YV12_BUFFER_CONFIG *b, const YV12_BUFFER_CONFIG *b, int hstart,
int hstart, int width, int width, int vstart, int height);
int vstart, int height);
int64_t aom_highbd_get_y_sse(const YV12_BUFFER_CONFIG *a, int64_t aom_highbd_get_y_sse(const YV12_BUFFER_CONFIG *a,
const YV12_BUFFER_CONFIG *b); const YV12_BUFFER_CONFIG *b);
int64_t aom_highbd_get_u_sse(const YV12_BUFFER_CONFIG *a, int64_t aom_highbd_get_u_sse(const YV12_BUFFER_CONFIG *a,
......
...@@ -868,12 +868,11 @@ static const aom_prob default_tx_size_prob[TX_SIZES - 1][TX_SIZE_CONTEXTS] ...@@ -868,12 +868,11 @@ static const aom_prob default_tx_size_prob[TX_SIZES - 1][TX_SIZE_CONTEXTS]
#if CONFIG_LOOP_RESTORATION #if CONFIG_LOOP_RESTORATION
const aom_tree_index const aom_tree_index
av1_switchable_restore_tree[TREE_SIZE(RESTORE_SWITCHABLE_TYPES)] = { av1_switchable_restore_tree[TREE_SIZE(RESTORE_SWITCHABLE_TYPES)] = {
-RESTORE_NONE, 2, -RESTORE_NONE, 2, -RESTORE_BILATERAL, -RESTORE_WIENER,
-RESTORE_BILATERAL, -RESTORE_WIENER,
}; };
static const aom_prob static const aom_prob
default_switchable_restore_prob[RESTORE_SWITCHABLE_TYPES - 1] = {32, 128}; default_switchable_restore_prob[RESTORE_SWITCHABLE_TYPES - 1] = { 32, 128 };
#endif // CONFIG_LOOP_RESTORATION #endif // CONFIG_LOOP_RESTORATION
#if CONFIG_EXT_TX && CONFIG_RECT_TX && CONFIG_VAR_TX #if CONFIG_EXT_TX && CONFIG_RECT_TX && CONFIG_VAR_TX
......
...@@ -147,8 +147,8 @@ void av1_loop_restoration_init(RestorationInternal *rst, RestorationInfo *rsi, ...@@ -147,8 +147,8 @@ void av1_loop_restoration_init(RestorationInternal *rst, RestorationInfo *rsi,
rst->subsampling_x = 0; rst->subsampling_x = 0;
rst->subsampling_y = 0; rst->subsampling_y = 0;
rst->ntiles = rst->ntiles =
av1_get_rest_ntiles(width, height, &rst->tile_width, av1_get_rest_ntiles(width, height, &rst->tile_width, &rst->tile_height,
&rst->tile_height, &rst->nhtiles, &rst->nvtiles); &rst->nhtiles, &rst->nvtiles);
if (rsi->frame_restoration_type == RESTORE_WIENER) { if (rsi->frame_restoration_type == RESTORE_WIENER) {
for (tile_idx = 0; tile_idx < rst->ntiles; ++tile_idx) { for (tile_idx = 0; tile_idx < rst->ntiles; ++tile_idx) {
rsi->vfilter[tile_idx][RESTORATION_HALFWIN] = rsi->vfilter[tile_idx][RESTORATION_HALFWIN] =
......
...@@ -84,9 +84,9 @@ static INLINE int get_rest_tilesize(int width, int height) { ...@@ -84,9 +84,9 @@ static INLINE int get_rest_tilesize(int width, int height) {
return RESTORATION_TILESIZE_BIG; return RESTORATION_TILESIZE_BIG;
} }
static INLINE int av1_get_rest_ntiles(int width, int height, static INLINE int av1_get_rest_ntiles(int width, int height, int *tile_width,
int *tile_width, int *tile_height, int *tile_height, int *nhtiles,
int *nhtiles, int *nvtiles) { int *nvtiles) {
int nhtiles_, nvtiles_; int nhtiles_, nvtiles_;
int tile_width_, tile_height_; int tile_width_, tile_height_;
int tilesize = get_rest_tilesize(width, height); int tilesize = get_rest_tilesize(width, height);
......
...@@ -1914,8 +1914,8 @@ static void decode_restoration_mode(AV1_COMMON *cm, ...@@ -1914,8 +1914,8 @@ static void decode_restoration_mode(AV1_COMMON *cm,
static void decode_restoration(AV1_COMMON *cm, aom_reader *rb) { static void decode_restoration(AV1_COMMON *cm, aom_reader *rb) {
int i; int i;
RestorationInfo *rsi = &cm->rst_info; RestorationInfo *rsi = &cm->rst_info;
const int ntiles = av1_get_rest_ntiles(cm->width, cm->height, const int ntiles =
NULL, NULL, NULL, NULL); av1_get_rest_ntiles(cm->width, cm->height, NULL, NULL, NULL, NULL);
if (rsi->frame_restoration_type != RESTORE_NONE) { if (rsi->frame_restoration_type != RESTORE_NONE) {
rsi->restoration_type = (RestorationType *)aom_realloc( rsi->restoration_type = (RestorationType *)aom_realloc(
rsi->restoration_type, sizeof(*rsi->restoration_type) * ntiles); rsi->restoration_type, sizeof(*rsi->restoration_type) * ntiles);
...@@ -1938,24 +1938,18 @@ static void decode_restoration(AV1_COMMON *cm, aom_reader *rb) { ...@@ -1938,24 +1938,18 @@ static void decode_restoration(AV1_COMMON *cm, aom_reader *rb) {
rb, av1_switchable_restore_tree, cm->fc->switchable_restore_prob); rb, av1_switchable_restore_tree, cm->fc->switchable_restore_prob);
if (rsi->restoration_type[i] == RESTORE_WIENER) { if (rsi->restoration_type[i] == RESTORE_WIENER) {
rsi->wiener_level[i] = 1; rsi->wiener_level[i] = 1;
rsi->vfilter[i][0] = rsi->vfilter[i][0] = aom_read_literal(rb, WIENER_FILT_TAP0_BITS) +
aom_read_literal(rb, WIENER_FILT_TAP0_BITS) + WIENER_FILT_TAP0_MINV;
WIENER_FILT_TAP0_MINV; rsi->vfilter[i][1] = aom_read_literal(rb, WIENER_FILT_TAP1_BITS) +
rsi->vfilter[i][1] = WIENER_FILT_TAP1_MINV;
aom_read_literal(rb, WIENER_FILT_TAP1_BITS) + rsi->vfilter[i][2] = aom_read_literal(rb, WIENER_FILT_TAP2_BITS) +
WIENER_FILT_TAP1_MINV; WIENER_FILT_TAP2_MINV;
rsi->vfilter[i][2] = rsi->hfilter[i][0] = aom_read_literal(rb, WIENER_FILT_TAP0_BITS) +
aom_read_literal(rb, WIENER_FILT_TAP2_BITS) + WIENER_FILT_TAP0_MINV;
WIENER_FILT_TAP2_MINV; rsi->hfilter[i][1] = aom_read_literal(rb, WIENER_FILT_TAP1_BITS) +
rsi->hfilter[i][0] = WIENER_FILT_TAP1_MINV;
aom_read_literal(rb, WIENER_FILT_TAP0_BITS) + rsi->hfilter[i][2] = aom_read_literal(rb, WIENER_FILT_TAP2_BITS) +
WIENER_FILT_TAP0_MINV; WIENER_FILT_TAP2_MINV;
rsi->hfilter[i][1] =
aom_read_literal(rb, WIENER_FILT_TAP1_BITS) +
WIENER_FILT_TAP1_MINV;
rsi->hfilter[i][2] =
aom_read_literal(rb, WIENER_FILT_TAP2_BITS) +
WIENER_FILT_TAP2_MINV;
} else if (rsi->restoration_type[i] == RESTORE_BILATERAL) { } else if (rsi->restoration_type[i] == RESTORE_BILATERAL) {
int s; int s;
for (s = 0; s < BILATERAL_SUBTILES; ++s) { for (s = 0; s < BILATERAL_SUBTILES; ++s) {
......
...@@ -2461,8 +2461,7 @@ static void encode_restoration(AV1_COMMON *cm, aom_writer *wb) { ...@@ -2461,8 +2461,7 @@ static void encode_restoration(AV1_COMMON *cm, aom_writer *wb) {
// RESTORE_SWITCHABLE // RESTORE_SWITCHABLE
for (i = 0; i < cm->rst_internal.ntiles; ++i) { for (i = 0; i < cm->rst_internal.ntiles; ++i) {
av1_write_token( av1_write_token(
wb, av1_switchable_restore_tree, wb, av1_switchable_restore_tree, cm->fc->switchable_restore_prob,
cm->fc->switchable_restore_prob,
&switchable_restore_encodings[rst->restoration_type[i]]); &switchable_restore_encodings[rst->restoration_type[i]]);
if (rst->restoration_type[i] == RESTORE_NONE) { if (rst->restoration_type[i] == RESTORE_NONE) {
} else if (rst->restoration_type[i] == RESTORE_BILATERAL) { } else if (rst->restoration_type[i] == RESTORE_BILATERAL) {
...@@ -2487,13 +2486,13 @@ static void encode_restoration(AV1_COMMON *cm, aom_writer *wb) { ...@@ -2487,13 +2486,13 @@ static void encode_restoration(AV1_COMMON *cm, aom_writer *wb) {
aom_write_literal(wb, rst->vfilter[i][1] - WIENER_FILT_TAP1_MINV, aom_write_literal(wb, rst->vfilter[i][1] - WIENER_FILT_TAP1_MINV,
WIENER_FILT_TAP1_BITS); WIENER_FILT_TAP1_BITS);
aom_write_literal(wb, rst->vfilter[i][2] - WIENER_FILT_TAP2_MINV, aom_write_literal(wb, rst->vfilter[i][2] - WIENER_FILT_TAP2_MINV,
WIENER_FILT_TAP2_BITS); WIENER_FILT_TAP2_BITS);
aom_write_literal(wb, rst->hfilter[i][0] - WIENER_FILT_TAP0_MINV, aom_write_literal(wb, rst->hfilter[i][0] - WIENER_FILT_TAP0_MINV,
WIENER_FILT_TAP0_BITS); WIENER_FILT_TAP0_BITS);
aom_write_literal(wb, rst->hfilter[i][1] - WIENER_FILT_TAP1_MINV, aom_write_literal(wb, rst->hfilter[i][1] - WIENER_FILT_TAP1_MINV,
WIENER_FILT_TAP1_BITS); WIENER_FILT_TAP1_BITS);
aom_write_literal(wb, rst->hfilter[i][2] - WIENER_FILT_TAP2_MINV, aom_write_literal(wb, rst->hfilter[i][2] - WIENER_FILT_TAP2_MINV,
WIENER_FILT_TAP2_BITS); WIENER_FILT_TAP2_BITS);
} }
} }
} else if (rst->frame_restoration_type == RESTORE_BILATERAL) { } else if (rst->frame_restoration_type == RESTORE_BILATERAL) {
...@@ -2505,7 +2504,7 @@ static void encode_restoration(AV1_COMMON *cm, aom_writer *wb) { ...@@ -2505,7 +2504,7 @@ static void encode_restoration(AV1_COMMON *cm, aom_writer *wb) {
RESTORE_NONE_BILATERAL_PROB); RESTORE_NONE_BILATERAL_PROB);
if (rst->bilateral_level[j] >= 0) { if (rst->bilateral_level[j] >= 0) {
aom_write_literal(wb, rst->bilateral_level[j], aom_write_literal(wb, rst->bilateral_level[j],
av1_bilateral_level_bits(cm)); av1_bilateral_level_bits(cm));
} }
} }
} }
......
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