Commit fa5959a7 authored by Frank Liberato's avatar Frank Liberato Committed by Commit Bot

Set |use_prev_in_find_mv_refs| correctly.

At least, set it correctly for some value of "correct".

Bug: 1091466
Change-Id: Ib5f242fcc923333d647e5209233b718acf902197
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2232777Reviewed-by: default avatarTed Meyer <tmathmeyer@chromium.org>
Commit-Queue: Frank Liberato <liberato@chromium.org>
Cr-Commit-Position: refs/heads/master@{#776174}
parent 28a2657e
...@@ -101,7 +101,6 @@ void D3D11VP9Accelerator::CopyFrameParams(const D3D11VP9Picture& pic, ...@@ -101,7 +101,6 @@ void D3D11VP9Accelerator::CopyFrameParams(const D3D11VP9Picture& pic,
COPY_PARAM(frame_context_idx); COPY_PARAM(frame_context_idx);
COPY_PARAM(reset_frame_context); COPY_PARAM(reset_frame_context);
COPY_PARAM(allow_high_precision_mv); COPY_PARAM(allow_high_precision_mv);
COPY_PARAM(refresh_frame_context);
COPY_PARAM(frame_parallel_decoding_mode); COPY_PARAM(frame_parallel_decoding_mode);
COPY_PARAM(intra_only); COPY_PARAM(intra_only);
COPY_PARAM(frame_context_idx); COPY_PARAM(frame_context_idx);
...@@ -125,6 +124,18 @@ void D3D11VP9Accelerator::CopyFrameParams(const D3D11VP9Picture& pic, ...@@ -125,6 +124,18 @@ void D3D11VP9Accelerator::CopyFrameParams(const D3D11VP9Picture& pic,
SET_PARAM(log2_tile_rows, tile_rows_log2); SET_PARAM(log2_tile_rows, tile_rows_log2);
#undef COPY_PARAM #undef COPY_PARAM
#undef SET_PARAM #undef SET_PARAM
// This is taken, approximately, from libvpx.
gfx::Size this_frame_size(pic.frame_hdr->frame_width,
pic.frame_hdr->frame_height);
pic_params->use_prev_in_find_mv_refs = last_frame_size_ == this_frame_size &&
!pic.frame_hdr->error_resilient_mode &&
!pic.frame_hdr->intra_only &&
last_show_frame_;
// TODO(liberato): So, uh, do we ever need to reset this?
last_frame_size_ = this_frame_size;
last_show_frame_ = pic.frame_hdr->show_frame;
} }
void D3D11VP9Accelerator::CopyReferenceFrames( void D3D11VP9Accelerator::CopyReferenceFrames(
......
...@@ -76,6 +76,10 @@ class D3D11VP9Accelerator : public VP9Decoder::VP9Accelerator { ...@@ -76,6 +76,10 @@ class D3D11VP9Accelerator : public VP9Decoder::VP9Accelerator {
ComD3D11VideoDevice video_device_; ComD3D11VideoDevice video_device_;
std::unique_ptr<VideoContextWrapper> video_context_; std::unique_ptr<VideoContextWrapper> video_context_;
// Used to set |use_prev_in_find_mv_refs| properly.
gfx::Size last_frame_size_;
bool last_show_frame_ = false;
DISALLOW_COPY_AND_ASSIGN(D3D11VP9Accelerator); DISALLOW_COPY_AND_ASSIGN(D3D11VP9Accelerator);
}; };
......
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