This commit resolves some compiling issues due to merge.
Change-Id: I0eef8aa36c404e185e0b0004948a49307c360d3e
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];
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_wide[tx_size];
int seg_id = mbmi->segment_id;
int16_t *quant;
FWD_TXFM_PARAM fwd_txfm_param;
+ // ToDo(yaowu): figure out how to initialize this
+ int max_scan_line = 0;
for (j = 0; j < tx_blk_size; j++)
for (i = 0; i < tx_blk_size; i++) {
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,
+ max_scan_line, eob);
}
return eob;
#endif
int segment_id, int plane, int row, int col,
TX_SIZE tx_size) {
- struct macroblockd_plane *const pd = &xd->plane[plane];
PLANE_TYPE plane_type = (plane == 0) ? PLANE_TYPE_Y : PLANE_TYPE_UV;
int block_idx = (row << 1) + col;
TX_TYPE tx_type = get_tx_type(plane_type, xd, block_idx, tx_size);
int eob;
(void)cm;
(void)r;
+ (void)segment_id;
+#else
+ struct macroblockd_plane *const pd = &xd->plane[plane];
#endif
#if !CONFIG_PVQ
&pd->dst.buf[4 * row * pd->dst.stride + 4 * col],
pd->dst.stride, max_scan_line, eob);
#else
- eob = av1_pvq_decode_helper2(xd, mbmi, plane, row, col, tx_size, tx_type);
+ eob = av1_pvq_decode_helper2(xd, &xd->mi[0]->mbmi, plane, row, col, tx_size,
+ tx_type);
#endif
return eob;
}
: NULL;
av1_zero(td->dqcoeff);
#if CONFIG_PVQ
- av1_zero(tile_data->pvq_ref_coeff);
+ av1_zero(td->pvq_ref_coeff);
#endif
av1_tile_init(&td->xd.tile, td->cm, tile_row, tile_col);
#if !CONFIG_ANS
#endif
twd->dqcoeff);
#if CONFIG_PVQ
- daala_dec_init(&twd->xd.daala_dec, &twd->bit_reader.ec);
+ daala_dec_init(&twd->xd.daala_dec, &twd->bit_reader.ec);
#endif
#if CONFIG_PALETTE
twd->xd.plane[0].color_index_map = twd->color_index_map[0];
aom_free(ctx->dqcoeff[i][k]);
ctx->dqcoeff[i][k] = 0;
#if CONFIG_PVQ
- aom_free(ctx->pvq_ref_coeff[i]);
- ctx->pvq_ref_coeff[i] = 0;
+ aom_free(ctx->pvq_ref_coeff[i]);
+ ctx->pvq_ref_coeff[i] = 0;
#endif
aom_free(ctx->eobs[i][k]);
ctx->eobs[i][k] = 0;
static void restore_context(MACROBLOCK *x,
const RD_SEARCH_MACROBLOCK_CONTEXT *ctx, int mi_row,
- int mi_col,
+ int mi_col,
#if CONFIG_PVQ
od_rollback_buffer *rdo_buf,
-#endif
- BLOCK_SIZE bsize) {
+#endif
+ BLOCK_SIZE bsize) {
MACROBLOCKD *xd = &x->e_mbd;
int p;
const int num_4x4_blocks_wide = num_4x4_blocks_wide_lookup[bsize];
}
static void save_context(const MACROBLOCK *x, RD_SEARCH_MACROBLOCK_CONTEXT *ctx,
- int mi_row, int mi_col,
+ int mi_row, int mi_col,
#if CONFIG_PVQ
od_rollback_buffer *rdo_buf,
#endif
- BLOCK_SIZE bsize) {
+ BLOCK_SIZE bsize) {
const MACROBLOCKD *xd = &x->e_mbd;
int p;
const int num_4x4_blocks_wide = num_4x4_blocks_wide_lookup[bsize];
#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
}
tran_low_t dqc;
} av1_token_state;
-#if !CONFIG_PVQ
// These numbers are empirically obtained.
static const int plane_rd_mult[REF_TYPES][PLANE_TYPES] = {
{ 10, 6 }, { 8, 5 },
assert(final_eob <= default_eob);
return final_eob;
}
-#endif // !CONFIG_PVG
#if CONFIG_AOM_HIGHBITDEPTH
typedef enum QUANT_FUNC {
BLOCK_SIZE plane_bsize, TX_SIZE tx_size,
void *arg) {
struct encode_b_args *const args = arg;
-#if !CONFIG_PVG
+#if !CONFIG_PVQ
AV1_COMMON *cm = args->cm;
#endif
MACROBLOCK *const x = args->x;
(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,
#define AV1_ENCODER_ENCODEMB_H_
#include "./aom_config.h"
+#include "av1/common/onyxc_int.h"
#include "av1/encoder/block.h"
#ifdef __cplusplus
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;
#include "av1/common/partition.h"
#include "av1/common/pvq_state.h"
#include "av1/encoder/encodemb.h"
-#include "pvq_encoder.h"
+#include "av1/encoder/pvq_encoder.h"
#define OD_PVQ_RATE_APPROX (0)
/*Shift to ensure that the upper bound (i.e. for the max blocksize) of the
#endif
#endif
-
#if CONFIG_EXT_REFS
#define LAST_FRAME_MODE_MASK \
tran_low_t *const coeff = BLOCK_OFFSET(p->coeff, block);
tran_low_t *const dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
#if CONFIG_PVQ
- tran_low_t *ref_coeff = BLOCK_OFFSET(pd->pvq_ref_coeff, block);
+ tran_low_t *ref_coeff = BLOCK_OFFSET(pd->pvq_ref_coeff, block);
#endif
#if CONFIG_AOM_HIGHBITDEPTH
const int bd = (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) ? xd->bd : 8;
int this_rate;
};
+#if !CONFIG_PVQ
static void cost_coeffs_b(int plane, int block, int blk_row, int blk_col,
BLOCK_SIZE plane_bsize, TX_SIZE tx_size, void *arg) {
struct tokenize_b_args *const args = arg;
av1_set_contexts(xd, pd, tx_size, p->eobs[block] > 0, blk_col, blk_row);
}
-#if !CONFIG_PVQ
static void set_entropy_context_b(int plane, int block, int blk_row,
int blk_col, BLOCK_SIZE plane_bsize,
TX_SIZE tx_size, void *arg) {
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;
}
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
#if CONFIG_VAR_TX