Merge "Don't allocate dqcoeff in MACROBLOCKD."
This commit is contained in:
commit
8bf791e7ef
@ -187,12 +187,6 @@ typedef struct macroblockd {
|
|||||||
int bd;
|
int bd;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* dqcoeff are shared by all the planes. So planes must be decoded serially */
|
|
||||||
#if CONFIG_VP9_ENCODER
|
|
||||||
DECLARE_ALIGNED(16, tran_low_t, dqcoeff[64 * 64]);
|
|
||||||
#else
|
|
||||||
DECLARE_ALIGNED(16, tran_low_t, dqcoeff[32 * 32]);
|
|
||||||
#endif
|
|
||||||
int lossless;
|
int lossless;
|
||||||
int corrupted;
|
int corrupted;
|
||||||
|
|
||||||
|
@ -348,11 +348,12 @@ static INLINE void set_partition_probs(const VP9_COMMON *const cm,
|
|||||||
(const vp9_prob (*)[PARTITION_TYPES - 1])cm->fc->partition_prob;
|
(const vp9_prob (*)[PARTITION_TYPES - 1])cm->fc->partition_prob;
|
||||||
}
|
}
|
||||||
|
|
||||||
static INLINE void vp9_init_macroblockd(VP9_COMMON *cm, MACROBLOCKD *xd) {
|
static INLINE void vp9_init_macroblockd(VP9_COMMON *cm, MACROBLOCKD *xd,
|
||||||
|
tran_low_t *dqcoeff) {
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < MAX_MB_PLANE; ++i) {
|
for (i = 0; i < MAX_MB_PLANE; ++i) {
|
||||||
xd->plane[i].dqcoeff = xd->dqcoeff;
|
xd->plane[i].dqcoeff = dqcoeff;
|
||||||
xd->above_context[i] = cm->above_context +
|
xd->above_context[i] = cm->above_context +
|
||||||
i * sizeof(*cm->above_context) * 2 * mi_cols_aligned_to_sb(cm->mi_cols);
|
i * sizeof(*cm->above_context) * 2 * mi_cols_aligned_to_sb(cm->mi_cols);
|
||||||
|
|
||||||
|
@ -1397,11 +1397,12 @@ static const uint8_t *decode_tiles(VP9Decoder *pbi,
|
|||||||
tile_data->xd.corrupted = 0;
|
tile_data->xd.corrupted = 0;
|
||||||
tile_data->xd.counts = cm->frame_parallel_decoding_mode ?
|
tile_data->xd.counts = cm->frame_parallel_decoding_mode ?
|
||||||
NULL : &cm->counts;
|
NULL : &cm->counts;
|
||||||
|
vp9_zero(tile_data->dqcoeff);
|
||||||
vp9_tile_init(&tile_data->xd.tile, tile_data->cm, tile_row, tile_col);
|
vp9_tile_init(&tile_data->xd.tile, tile_data->cm, tile_row, tile_col);
|
||||||
setup_token_decoder(buf->data, data_end, buf->size, &cm->error,
|
setup_token_decoder(buf->data, data_end, buf->size, &cm->error,
|
||||||
&tile_data->bit_reader, pbi->decrypt_cb,
|
&tile_data->bit_reader, pbi->decrypt_cb,
|
||||||
pbi->decrypt_state);
|
pbi->decrypt_state);
|
||||||
vp9_init_macroblockd(cm, &tile_data->xd);
|
vp9_init_macroblockd(cm, &tile_data->xd, tile_data->dqcoeff);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1616,12 +1617,13 @@ static const uint8_t *decode_tiles_mt(VP9Decoder *pbi,
|
|||||||
tile_data->xd.corrupted = 0;
|
tile_data->xd.corrupted = 0;
|
||||||
tile_data->xd.counts = cm->frame_parallel_decoding_mode ?
|
tile_data->xd.counts = cm->frame_parallel_decoding_mode ?
|
||||||
0 : &tile_data->counts;
|
0 : &tile_data->counts;
|
||||||
|
vp9_zero(tile_data->dqcoeff);
|
||||||
vp9_tile_init(tile, cm, 0, buf->col);
|
vp9_tile_init(tile, cm, 0, buf->col);
|
||||||
vp9_tile_init(&tile_data->xd.tile, cm, 0, buf->col);
|
vp9_tile_init(&tile_data->xd.tile, cm, 0, buf->col);
|
||||||
setup_token_decoder(buf->data, data_end, buf->size, &cm->error,
|
setup_token_decoder(buf->data, data_end, buf->size, &cm->error,
|
||||||
&tile_data->bit_reader, pbi->decrypt_cb,
|
&tile_data->bit_reader, pbi->decrypt_cb,
|
||||||
pbi->decrypt_state);
|
pbi->decrypt_state);
|
||||||
vp9_init_macroblockd(cm, &tile_data->xd);
|
vp9_init_macroblockd(cm, &tile_data->xd, tile_data->dqcoeff);
|
||||||
|
|
||||||
worker->had_error = 0;
|
worker->had_error = 0;
|
||||||
if (i == num_workers - 1 || n == tile_cols - 1) {
|
if (i == num_workers - 1 || n == tile_cols - 1) {
|
||||||
|
@ -32,6 +32,8 @@ typedef struct TileData {
|
|||||||
VP9_COMMON *cm;
|
VP9_COMMON *cm;
|
||||||
vp9_reader bit_reader;
|
vp9_reader bit_reader;
|
||||||
DECLARE_ALIGNED(16, MACROBLOCKD, xd);
|
DECLARE_ALIGNED(16, MACROBLOCKD, xd);
|
||||||
|
/* dqcoeff are shared by all the planes. So planes must be decoded serially */
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, dqcoeff[32 * 32]);
|
||||||
} TileData;
|
} TileData;
|
||||||
|
|
||||||
typedef struct TileWorkerData {
|
typedef struct TileWorkerData {
|
||||||
@ -39,6 +41,8 @@ typedef struct TileWorkerData {
|
|||||||
vp9_reader bit_reader;
|
vp9_reader bit_reader;
|
||||||
FRAME_COUNTS counts;
|
FRAME_COUNTS counts;
|
||||||
DECLARE_ALIGNED(16, MACROBLOCKD, xd);
|
DECLARE_ALIGNED(16, MACROBLOCKD, xd);
|
||||||
|
/* dqcoeff are shared by all the planes. So planes must be decoded serially */
|
||||||
|
DECLARE_ALIGNED(16, tran_low_t, dqcoeff[32 * 32]);
|
||||||
struct vpx_internal_error_info error_info;
|
struct vpx_internal_error_info error_info;
|
||||||
} TileWorkerData;
|
} TileWorkerData;
|
||||||
|
|
||||||
|
@ -732,7 +732,7 @@ static void update_frame_size(VP9_COMP *cpi) {
|
|||||||
|
|
||||||
vp9_set_mb_mi(cm, cm->width, cm->height);
|
vp9_set_mb_mi(cm, cm->width, cm->height);
|
||||||
vp9_init_context_buffers(cm);
|
vp9_init_context_buffers(cm);
|
||||||
vp9_init_macroblockd(cm, xd);
|
vp9_init_macroblockd(cm, xd, NULL);
|
||||||
cpi->td.mb.mbmi_ext_base = cpi->mbmi_ext_base;
|
cpi->td.mb.mbmi_ext_base = cpi->mbmi_ext_base;
|
||||||
memset(cpi->mbmi_ext_base, 0,
|
memset(cpi->mbmi_ext_base, 0,
|
||||||
cm->mi_rows * cm->mi_cols * sizeof(*cpi->mbmi_ext_base));
|
cm->mi_rows * cm->mi_cols * sizeof(*cpi->mbmi_ext_base));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user