Commit 337d68d7 authored by Hirokazu Honda's avatar Hirokazu Honda Committed by Commit Bot

media/gpu/vaapi/VP9Encoder: Enable error_resilient_mode in temporal layer encoding

A frame context is necessary to parse vp9 compressed data and
the context is updated every frame by default. In other words,
it is necessary to see all previous frames.
In temporal layer encoding, frames in temporal layers, e.g. TL0
only stream and TL0+TL1 stream, must be able to be decoded even
though there is no frames in TL2. To resolve the frame context
problem, we enable error resilient mode in temporal layer
encoding. It let the frame context not be updated and thus the
syntax of a frame can be decoded independently of the previous
frames.

Bug: b:169219904, b:169538499
Test: https://appr.tc/?vsc=vp9&vrc=vp9
Change-Id: I976dc2d2f0f91d69b87b081da22f1c153ecb634c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2435030Reviewed-by: default avatarMiguel Casas <mcasas@chromium.org>
Commit-Queue: Hirokazu Honda <hiroh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811421}
parent 95fddf83
...@@ -376,6 +376,9 @@ void VP9Encoder::SetFrameHeader( ...@@ -376,6 +376,9 @@ void VP9Encoder::SetFrameHeader(
if (temporal_layers_) { if (temporal_layers_) {
// Reference frame settings for temporal layer stream. // Reference frame settings for temporal layer stream.
temporal_layers_->FillUsedRefFramesAndMetadata(picture, ref_frames_used); temporal_layers_->FillUsedRefFramesAndMetadata(picture, ref_frames_used);
// Enable error resilient mode so that the syntax of a frame can be decoded
// independently of previous frames.
picture->frame_hdr->error_resilient_mode = true;
} else { } else {
// Reference frame settings for simple stream. // Reference frame settings for simple stream.
if (keyframe) { if (keyframe) {
......
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