Commit 8b0f6368 authored by Thomas Davies's avatar Thomas Davies

Fix clang-format issues.

Change-Id: I6cdb7e80072359fc2c485424e2130e62a796cf25
parent 7d208d08
......@@ -383,9 +383,8 @@ static int av1_pvq_decode_helper(od_dec_ctx *dec, int16_t *ref_coeff,
od_pvq_decode(dec, ref_int32, out_int32, (int)quant[1] >> quant_shift, pli,
bs, OD_PVQ_BETA[use_activity_masking][pli][bs],
OD_ROBUST_STREAM,
is_keyframe, &flags, ac_dc_coded, dec->state.qm + off,
dec->state.qm_inv + off);
OD_ROBUST_STREAM, is_keyframe, &flags, ac_dc_coded,
dec->state.qm + off, dec->state.qm_inv + off);
// copy int32 result back to int16
for (i = 0; i < blk_size * blk_size; i++) dqcoeff_pvq[i] = out_int32[i];
......@@ -407,9 +406,9 @@ static int av1_pvq_decode_helper(od_dec_ctx *dec, int16_t *ref_coeff,
return eob;
}
static int av1_pvq_decode_helper2(
MACROBLOCKD *const xd, MB_MODE_INFO *const mbmi, int plane, int row,
int col, TX_SIZE tx_size, TX_TYPE tx_type ) {
static int av1_pvq_decode_helper2(MACROBLOCKD *const xd,
MB_MODE_INFO *const mbmi, int plane, int row,
int col, TX_SIZE tx_size, TX_TYPE tx_type) {
struct macroblockd_plane *const pd = &xd->plane[plane];
// transform block size in pixels
int tx_blk_size = tx_size_1d[tx_size];
......@@ -464,8 +463,8 @@ static int av1_pvq_decode_helper2(
for (j = 0; j < tx_blk_size; j++)
for (i = 0; i < tx_blk_size; i++) dst[j * pd->dst.stride + i] = 0;
inverse_transform_block(xd, plane, tx_type, tx_size, dst,
pd->dst.stride, eob);
inverse_transform_block(xd, plane, tx_type, tx_size, dst, pd->dst.stride,
eob);
}
return eob;
......
......@@ -2830,8 +2830,9 @@ void av1_init_tile_data(AV1_COMP *cpi) {
#if CONFIG_PVQ
// This will be dynamically increased as more pvq block is encoded.
tile_data->pvq_q.buf_len = 1000;
CHECK_MEM_ERROR(cm, tile_data->pvq_q.buf,
aom_malloc(tile_data->pvq_q.buf_len * sizeof(PVQ_INFO)));
CHECK_MEM_ERROR(
cm, tile_data->pvq_q.buf,
aom_malloc(tile_data->pvq_q.buf_len * sizeof(PVQ_INFO)));
tile_data->pvq_q.curr_pos = 0;
#endif
}
......
......@@ -1317,8 +1317,7 @@ int av1_pvq_encode_helper(daala_enc_ctx *daala_enc, tran_low_t *const coeff,
(int)quant[1] >> quant_shift, // scale/quantizer
// TODO(yushin): Instead of 0,
// use daala_enc->use_activity_masking for activity masking.
plane, tx_size, OD_PVQ_BETA[0][plane][tx_size],
OD_ROBUST_STREAM,
plane, tx_size, OD_PVQ_BETA[0][plane][tx_size], OD_ROBUST_STREAM,
0, // is_keyframe,
0, 0, 0, // q_scaling, bx, by,
daala_enc->state.qm + off, daala_enc->state.qm_inv + off,
......
......@@ -529,7 +529,8 @@ void av1_first_pass(AV1_COMP *cpi, const struct lookahead_entry *source) {
od_adapt_ctx *adapt;
pvq_q.buf_len = 5000;
CHECK_MEM_ERROR(cm, pvq_q.buf, aom_malloc(pvq_q.buf_len * sizeof(PVQ_INFO)));
CHECK_MEM_ERROR(cm, pvq_q.buf,
aom_malloc(pvq_q.buf_len * sizeof(PVQ_INFO)));
pvq_q.curr_pos = 0;
x->pvq_coded = 0;
......
......@@ -527,9 +527,10 @@ void add_pvq_block(AV1_COMMON *const cm, MACROBLOCK *const x, PVQ_INFO *pvq) {
PVQ_QUEUE *q = x->pvq_q;
if (q->curr_pos >= q->buf_len) {
q->buf_len = 2 * q->buf_len + 1;
CHECK_MEM_ERROR(cm, q->buf, aom_realloc(q->buf, q->buf_len * sizeof(PVQ_INFO)));
CHECK_MEM_ERROR(cm, q->buf,
aom_realloc(q->buf, q->buf_len * sizeof(PVQ_INFO)));
}
//memcpy(q->buf + q->curr_pos, pvq, sizeof(PVQ_INFO));
// memcpy(q->buf + q->curr_pos, pvq, sizeof(PVQ_INFO));
OD_COPY(q->buf + q->curr_pos, pvq, 1);
++q->curr_pos;
}
......@@ -554,7 +555,7 @@ static void tokenize_pvq(int plane, int block, int blk_row, int blk_col,
assert(block < MAX_PVQ_BLOCKS_IN_SB);
pvq_info = &x->pvq[block][plane];
add_pvq_block((AV1_COMMON *const)cm, x, pvq_info);
add_pvq_block((AV1_COMMON * const)cm, x, pvq_info);
}
#endif
......
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