[go: nahoru, domu]

Vaapi: Move extra GetNumReferenceFrames() to VaVDA

As explained in crbug.com/931499#c7,  crrev.com/c/1455302 moved
one of the two extra GetNumReferenceFrames() from h264_decoder to
VaVDA, but forgot one such Frame from all {h264,vp8,vp9}_decoder.
This CL extracts that +1 to VaVda, so when we're in kNormal mode,
everything should be like before crrev.com/c/1387391 : this extra
+1 was causing regressions in many pre-SkyLake board tests, hence
the numerous bugs below.

Bug: 925709, 920510, 931499
Change-Id: I230b7f9fadf1e46d80251c9b7331f3c0a740d2b7
Reviewed-on: https://chromium-review.googlesource.com/c/1471001
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#632270}
diff --git a/media/gpu/vp9_decoder.cc b/media/gpu/vp9_decoder.cc
index a8d2f2a..632a967 100644
--- a/media/gpu/vp9_decoder.cc
+++ b/media/gpu/vp9_decoder.cc
@@ -266,9 +266,8 @@
 }
 
 size_t VP9Decoder::GetNumReferenceFrames() const {
-  // Maximum number of reference frames needed plus one for the one being
-  // currently egressed.
-  return kVp9NumRefFrames + 1;
+  // Maximum number of reference frames
+  return kVp9NumRefFrames;
 }
 
 }  // namespace media