Commit 047b0b01 authored by Tero Rintaluoma's avatar Tero Rintaluoma
Browse files

Fix show existing frame

- Disable mode info update in case where current frame is coded
  as "show existing frame".
- Should fix issue 676.

Change-Id: Ibee681850eb307f982da6528d3e31cb94f881c08
parent ecc0a1ec
...@@ -133,6 +133,7 @@ typedef struct VP9Common { ...@@ -133,6 +133,7 @@ typedef struct VP9Common {
int show_frame; int show_frame;
int last_show_frame; int last_show_frame;
int show_existing_frame;
// Flag signaling that the frame is encoded using only INTRA modes. // Flag signaling that the frame is encoded using only INTRA modes.
int intra_only; int intra_only;
......
...@@ -1067,7 +1067,8 @@ static size_t read_uncompressed_header(VP9D_COMP *pbi, ...@@ -1067,7 +1067,8 @@ static size_t read_uncompressed_header(VP9D_COMP *pbi,
cm->version = vp9_rb_read_bit(rb); cm->version = vp9_rb_read_bit(rb);
RESERVED; RESERVED;
if (vp9_rb_read_bit(rb)) { cm->show_existing_frame = vp9_rb_read_bit(rb);
if (cm->show_existing_frame) {
// show an existing frame directly // show an existing frame directly
int frame_to_show = cm->ref_frame_map[vp9_rb_read_literal(rb, 3)]; int frame_to_show = cm->ref_frame_map[vp9_rb_read_literal(rb, 3)];
ref_cnt_fb(cm->fb_idx_ref_cnt, &cm->new_fb_idx, frame_to_show); ref_cnt_fb(cm->fb_idx_ref_cnt, &cm->new_fb_idx, frame_to_show);
......
...@@ -392,6 +392,7 @@ int vp9_receive_compressed_data(VP9D_PTR ptr, ...@@ -392,6 +392,7 @@ int vp9_receive_compressed_data(VP9D_PTR ptr,
cm->last_show_frame = cm->show_frame; cm->last_show_frame = cm->show_frame;
if (cm->show_frame) { if (cm->show_frame) {
if (!cm->show_existing_frame) {
// current mip will be the prev_mip for the next frame // current mip will be the prev_mip for the next frame
MODE_INFO *temp = cm->prev_mip; MODE_INFO *temp = cm->prev_mip;
MODE_INFO **temp2 = cm->prev_mi_grid_base; MODE_INFO **temp2 = cm->prev_mi_grid_base;
...@@ -404,11 +405,12 @@ int vp9_receive_compressed_data(VP9D_PTR ptr, ...@@ -404,11 +405,12 @@ int vp9_receive_compressed_data(VP9D_PTR ptr,
cm->mi = cm->mip + cm->mode_info_stride + 1; cm->mi = cm->mip + cm->mode_info_stride + 1;
cm->prev_mi = cm->prev_mip + cm->mode_info_stride + 1; cm->prev_mi = cm->prev_mip + cm->mode_info_stride + 1;
cm->mi_grid_visible = cm->mi_grid_base + cm->mode_info_stride + 1; cm->mi_grid_visible = cm->mi_grid_base + cm->mode_info_stride + 1;
cm->prev_mi_grid_visible = cm->prev_mi_grid_base + cm->mode_info_stride + 1; cm->prev_mi_grid_visible = cm->prev_mi_grid_base +
cm->mode_info_stride + 1;
pbi->mb.mi_8x8 = cm->mi_grid_visible; pbi->mb.mi_8x8 = cm->mi_grid_visible;
pbi->mb.mi_8x8[0] = cm->mi; pbi->mb.mi_8x8[0] = cm->mi;
}
cm->current_video_frame++; cm->current_video_frame++;
} }
......
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