Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1140)

Unified Diff: media/filters/vp9_uncompressed_header_parser.cc

Issue 2229353002: V4L2SVDA: Add a VP9Accelerator implementation utilizing the V4L2 VP9 frame API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/filters/vp9_uncompressed_header_parser.cc
diff --git a/media/filters/vp9_uncompressed_header_parser.cc b/media/filters/vp9_uncompressed_header_parser.cc
index 2e078992057c08d23f76f157e855aa941ebf5996..43e19b98fdab3cf70acb549654ae3bb48854a69b 100644
--- a/media/filters/vp9_uncompressed_header_parser.cc
+++ b/media/filters/vp9_uncompressed_header_parser.cc
@@ -744,7 +744,7 @@ void Vp9UncompressedHeaderParser::SetupPastIndependence(Vp9FrameHeader* fhdr) {
memset(&context_->segmentation, 0, sizeof(context_->segmentation));
ResetLoopfilter();
fhdr->frame_context = kVp9DefaultFrameContext;
- DCHECK(Vp9FrameContextManager::IsValidFrameContext(fhdr->frame_context));
+ DCHECK(Vp9FrameContext::IsValid(fhdr->frame_context));
}
// 6.2.8 Loop filter params syntax
@@ -1035,21 +1035,18 @@ bool Vp9UncompressedHeaderParser::Parse(const uint8_t* stream,
fhdr->frame_parallel_decoding_mode = reader_.ReadBool();
}
- static_assert(
- arraysize(context_->frame_context_managers) == (1 << 2),
- "bits of frame_context_idx doesn't match size of frame_context_managers");
fhdr->frame_context_idx_to_save_probs = fhdr->frame_context_idx =
- reader_.ReadLiteral(2);
+ reader_.ReadLiteral(kVp9NumFrameContextsLog2);
if (fhdr->IsIntra()) {
SetupPastIndependence(fhdr);
if (fhdr->IsKeyframe() || fhdr->error_resilient_mode ||
fhdr->reset_frame_context == 3) {
- for (auto& frame_context_manage : context_->frame_context_managers)
- frame_context_manage.Update(fhdr->frame_context);
+ for (size_t i = 0; i < kVp9NumFrameContexts; ++i)
+ context_->UpdateFrameContext(i, fhdr->frame_context);
} else if (fhdr->reset_frame_context == 2) {
- context_->frame_context_managers[fhdr->frame_context_idx].Update(
- fhdr->frame_context);
+ context_->UpdateFrameContext(fhdr->frame_context_idx,
+ fhdr->frame_context);
}
fhdr->frame_context_idx = 0;
}

Powered by Google App Engine
This is Rietveld 408576698