Commit 72dc70da authored by Ted Meyer's avatar Ted Meyer Committed by Commit Bot

Unconditionally set the loop_filter_params for vp9

The accelerator was misinterpreting the |bool update_mode_deltas[2]| and
|bool update_ref_deltas[4]| as something that should be used when
copying the data. These flags are for the parser only. The spec
(http://downloads.webmproject.org/docs/vp9/vp9-bitstream_superframe-and-uncompressed-header_v1.0.pdf)
seems to imply that they shouldn't even be stored in the
Vp9LoopFilterParams struct at all, and only used to help compress the
headers.

Bug: 1091466
Change-Id: I6c73dd46f748583fae42b5aa2beab91d6649eca0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2253216Reviewed-by: default avatarFrank Liberato <liberato@chromium.org>
Commit-Queue: Ted Meyer <tmathmeyer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#780466}
parent d21a80c5
...@@ -185,19 +185,16 @@ void D3D11VP9Accelerator::CopyLoopFilterParams( ...@@ -185,19 +185,16 @@ void D3D11VP9Accelerator::CopyLoopFilterParams(
// base::size(...) doesn't work well in an array initializer. // base::size(...) doesn't work well in an array initializer.
DCHECK_EQ(4lu, base::size(pic_params->ref_deltas)); DCHECK_EQ(4lu, base::size(pic_params->ref_deltas));
int ref_deltas[4] = {0};
for (size_t i = 0; i < base::size(pic_params->ref_deltas); i++) { for (size_t i = 0; i < base::size(pic_params->ref_deltas); i++) {
if (loop_filter_params.update_ref_deltas[i]) // The update_ref_deltas[i] is _only_ for parsing! it allows omission of the
ref_deltas[i] = loop_filter_params.ref_deltas[i]; // 6 bytes that would otherwise be needed for a new value to overwrite the
pic_params->ref_deltas[i] = ref_deltas[i]; // global one. It has nothing to do with setting the ref_deltas here.
pic_params->ref_deltas[i] = loop_filter_params.ref_deltas[i];
} }
int mode_deltas[2] = {0};
DCHECK_EQ(2lu, base::size(pic_params->mode_deltas)); DCHECK_EQ(2lu, base::size(pic_params->mode_deltas));
for (size_t i = 0; i < base::size(pic_params->mode_deltas); i++) { for (size_t i = 0; i < base::size(pic_params->mode_deltas); i++) {
if (loop_filter_params.update_mode_deltas[i]) pic_params->mode_deltas[i] = loop_filter_params.mode_deltas[i];
mode_deltas[i] = loop_filter_params.mode_deltas[i];
pic_params->mode_deltas[i] = mode_deltas[i];
} }
} }
......
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