/* vp8cx_init_de_quantizer() is first called here. Add check in *frame_init_dequantizer()toavoid *unnecessarycallingofvp8cx_init_de_quantizer()foreveryframe.
*/
vp8cx_init_de_quantizer(pbi);
vp8_loop_filter_init(&pbi->common);
pbi->common.error.setjmp = 0;
#if CONFIG_ERROR_CONCEALMENT
pbi->ec_enabled = oxcf->error_concealment;
pbi->overlaps = NULL; #else
(void)oxcf;
pbi->ec_enabled = 0; #endif /* Error concealment is activated after a key frame has been *decodedwithouterrorswhenerrorconcealmentisenabled.
*/
pbi->ec_active = 0;
pbi->decoded_key_frame = 0;
/* Independent partitions is activated when a frame updates the *tokenprobabilitytabletohaveequalprobabilitiesoverthe *PREV_COEFcontext.
*/
pbi->independent_partitions = 0;
staticvoid ref_cnt_fb(int *buf, int *idx, int new_idx) { if (buf[*idx] > 0) buf[*idx]--;
*idx = new_idx;
buf[new_idx]++;
}
/* If any buffer copy / swapping is signalled it should be done here. */ staticint swap_frame_buffers(VP8_COMMON *cm) { int err = 0;
/* The alternate reference frame or golden frame can be updated *usingthenew,last,orgolden/altrefframe.Ifit *isupdatedusingthenewlydecodedframeitisarefresh. *Anupdateusingthelastorgolden/altrefframeisacopy.
*/ if (cm->copy_buffer_to_arf) { int new_fb = 0;
/* If error concealment is disabled we won't signal missing frames *tothedecoder.
*/ if (cm->fb_idx_ref_cnt[cm->lst_fb_idx] > 1) { /* The last reference shares buffer with another reference *buffer.Moveittoitsownbufferbeforesettingitas *corrupt,otherwisewewillmakemultiplebufferscorrupt.
*/ constint prev_idx = cm->lst_fb_idx;
cm->fb_idx_ref_cnt[prev_idx]--;
cm->lst_fb_idx = get_free_fb(cm);
vp8_yv12_copy_frame(&cm->yv12_fb[prev_idx], &cm->yv12_fb[cm->lst_fb_idx]);
} /* This is used to signal that we are missing frames. *Wedonotknowifthemissingframe(s)wassupposedtoupdate *anyofthereferencebuffers,butweactconservativeand *markonlythelastbufferascorrupted.
*/
cm->yv12_fb[cm->lst_fb_idx].corrupted = 1;
/* Signal that we have no frame to show. */
cm->show_frame = 0;
/* Nothing more to do. */ return0;
}
return1;
}
int vp8dx_receive_compressed_data(VP8D_COMP *pbi) {
VP8_COMMON *cm = &pbi->common; int retcode = -1;
pbi->common.error.error_code = VPX_CODEC_OK;
retcode = check_fragments_for_errors(pbi); if (retcode <= 0) return retcode;
/* This function as written isn't decoder specific, but the encoder has *muchfasterwaysofcomputingthis,soit'sokforittoliveina *decodespecificfile.
*/ int vp8dx_references_buffer(VP8_COMMON *oci, int ref_frame) { const MODE_INFO *mi = oci->mi; int mb_row, mb_col;
for (mb_row = 0; mb_row < oci->mb_rows; ++mb_row) { for (mb_col = 0; mb_col < oci->mb_cols; mb_col++, mi++) { if (mi->mbmi.ref_frame == ref_frame) return1;
}
mi++;
} return0;
}
int vp8_create_decoder_instances(struct frame_buffers *fb, VP8D_CONFIG *oxcf) { /* decoder instance for single thread mode */
fb->pbi[0] = create_decompressor(oxcf); if (!fb->pbi[0]) return VPX_CODEC_ERROR;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.