Commit d822126f authored by Alex Converse's avatar Alex Converse
Browse files

Align frame contexts.

This will allow for aligned cdfs and scan orders inside.

Change-Id: I799af6cc0b87d90bad56f32fd822e0690fc51b8b
parent 2e52fb25
......@@ -95,10 +95,13 @@ AV1Decoder *av1_decoder_create(BufferPool *const pool) {
cm->error.setjmp = 1;
CHECK_MEM_ERROR(cm, cm->fc, (FRAME_CONTEXT *)aom_calloc(1, sizeof(*cm->fc)));
CHECK_MEM_ERROR(
cm, cm->frame_contexts,
(FRAME_CONTEXT *)aom_calloc(FRAME_CONTEXTS, sizeof(*cm->frame_contexts)));
CHECK_MEM_ERROR(cm, cm->fc,
(FRAME_CONTEXT *)aom_memalign(32, sizeof(*cm->fc)));
CHECK_MEM_ERROR(cm, cm->frame_contexts,
(FRAME_CONTEXT *)aom_memalign(
32, FRAME_CONTEXTS * sizeof(*cm->frame_contexts)));
memset(cm->fc, 0, sizeof(*cm->fc));
memset(cm->frame_contexts, 0, FRAME_CONTEXTS * sizeof(*cm->frame_contexts));
pbi->need_resync = 1;
once(initialize_dec);
......
......@@ -1606,10 +1606,13 @@ AV1_COMP *av1_create_compressor(AV1EncoderConfig *oxcf,
cm->free_mi = av1_enc_free_mi;
cm->setup_mi = av1_enc_setup_mi;
CHECK_MEM_ERROR(cm, cm->fc, (FRAME_CONTEXT *)aom_calloc(1, sizeof(*cm->fc)));
CHECK_MEM_ERROR(
cm, cm->frame_contexts,
(FRAME_CONTEXT *)aom_calloc(FRAME_CONTEXTS, sizeof(*cm->frame_contexts)));
CHECK_MEM_ERROR(cm, cm->fc,
(FRAME_CONTEXT *)aom_memalign(32, sizeof(*cm->fc)));
CHECK_MEM_ERROR(cm, cm->frame_contexts,
(FRAME_CONTEXT *)aom_memalign(
32, FRAME_CONTEXTS * sizeof(*cm->frame_contexts)));
memset(cm->fc, 0, sizeof(*cm->fc));
memset(cm->frame_contexts, 0, FRAME_CONTEXTS * sizeof(*cm->frame_contexts));
cpi->resize_state = 0;
cpi->resize_avg_qp = 0;
......
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