/* * Copyright (c) 2010 The WebM project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contributing project authors may * be found in the AUTHORS file in the root of the source tree.
*/
/* vp8cx_init_de_quantizer() is first called here. Add check in * frame_init_dequantizer() to avoid * unnecessary calling of vp8cx_init_de_quantizer() for every frame.
*/
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 * decoded without errors when error concealment is enabled.
*/
pbi->ec_active = 0;
pbi->decoded_key_frame = 0;
/* Independent partitions is activated when a frame updates the * token probability table to have equal probabilities over the * PREV_COEF context.
*/
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 * using the new, last, or golden/alt ref frame. If it * is updated using the newly decoded frame it is a refresh. * An update using the last or golden/alt ref frame is a copy.
*/ if (cm->copy_buffer_to_arf) { int new_fb = 0;
/* If error concealment is disabled we won't signal missing frames * to the decoder.
*/ if (cm->fb_idx_ref_cnt[cm->lst_fb_idx] > 1) { /* The last reference shares buffer with another reference * buffer. Move it to its own buffer before setting it as * corrupt, otherwise we will make multiple buffers corrupt.
*/ 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. * We do not know if the missing frame(s) was supposed to update * any of the reference buffers, but we act conservative and * mark only the last buffer as corrupted.
*/
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. */ return 0;
}
return 1;
}
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 * much faster ways of computing this, so it's ok for it to live in a * decode specific file.
*/ int vp8dx_references_buffer(VP8_COMMON *oci, int ref_frame) { const MODE_INFO *mi = oci->mi; int mb_row, mb_col;
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.