summaryrefslogtreecommitdiff
path: root/vp8/encoder/ratectrl.c
diff options
context:
space:
mode:
authorYaowu Xu <yaowu@google.com>2012-10-12 11:38:10 -0700
committerYaowu Xu <yaowu@google.com>2012-10-12 12:25:21 -0700
commit707e6c301ef9aab779ab685646d0514b6b148835 (patch)
tree03a180936ebdcc0f865f58434a1767c829bd1e90 /vp8/encoder/ratectrl.c
parentf6022327f181f4bfcb781f17a438ceb3d8f445f2 (diff)
downloadlibvpx-707e6c301ef9aab779ab685646d0514b6b148835.tar
libvpx-707e6c301ef9aab779ab685646d0514b6b148835.tar.gz
libvpx-707e6c301ef9aab779ab685646d0514b6b148835.tar.bz2
libvpx-707e6c301ef9aab779ab685646d0514b6b148835.zip
removed the dependency cross key frame boundary
This allowed decoding from any key frame after skipping the frames prior. Change-Id: I096fccad5346d75ae50a017c94eb8d772a7e8b00
Diffstat (limited to 'vp8/encoder/ratectrl.c')
-rw-r--r--vp8/encoder/ratectrl.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/vp8/encoder/ratectrl.c b/vp8/encoder/ratectrl.c
index 2864a6b15..2b5f699b6 100644
--- a/vp8/encoder/ratectrl.c
+++ b/vp8/encoder/ratectrl.c
@@ -267,10 +267,12 @@ void vp8_restore_coding_context(VP8_COMP *cpi) {
void vp8_setup_key_frame(VP8_COMP *cpi) {
+ VP8_COMMON *cm = &cpi->common;
// Setup for Key frame:
vp8_default_coef_probs(& cpi->common);
vp8_kf_default_bmode_probs(cpi->common.kf_bmode_prob);
vp8_init_mbmode_probs(& cpi->common);
+ vp8_default_bmode_probs(cm->fc.bmode_prob);
vp8_init_mv_probs(& cpi->common);
#if CONFIG_NEWMVENTROPY == 0
@@ -297,6 +299,15 @@ void vp8_setup_key_frame(VP8_COMP *cpi) {
vpx_memcpy(&cpi->common.lfc, &cpi->common.fc, sizeof(cpi->common.fc));
vpx_memcpy(&cpi->common.lfc_a, &cpi->common.fc, sizeof(cpi->common.fc));
+ vpx_memset(cm->prev_mip, 0,
+ (cm->mb_cols + 1) * (cm->mb_rows + 1)* sizeof(MODE_INFO));
+ vpx_memset(cm->mip, 0,
+ (cm->mb_cols + 1) * (cm->mb_rows + 1)* sizeof(MODE_INFO));
+
+ update_mode_info_border(cm, cm->mip);
+ update_mode_info_in_image(cm, cm->mi);
+
+
}
void vp8_setup_inter_frame(VP8_COMP *cpi) {