| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "content/common/gpu/media/vp9_decoder.h" | 5 #include "media/gpu/vp9_decoder.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 | 8 |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "media/base/limits.h" | 10 #include "media/base/limits.h" |
| 11 #include "media/gpu/vp9_decoder.h" |
| 11 | 12 |
| 12 namespace content { | 13 namespace media { |
| 13 | 14 |
| 14 VP9Decoder::VP9Accelerator::VP9Accelerator() {} | 15 VP9Decoder::VP9Accelerator::VP9Accelerator() {} |
| 15 | 16 |
| 16 VP9Decoder::VP9Accelerator::~VP9Accelerator() {} | 17 VP9Decoder::VP9Accelerator::~VP9Accelerator() {} |
| 17 | 18 |
| 18 VP9Decoder::VP9Decoder(VP9Accelerator* accelerator) | 19 VP9Decoder::VP9Decoder(VP9Accelerator* accelerator) |
| 19 : state_(kNeedStreamMetadata), accelerator_(accelerator) { | 20 : state_(kNeedStreamMetadata), accelerator_(accelerator) { |
| 20 DCHECK(accelerator_); | 21 DCHECK(accelerator_); |
| 21 ref_frames_.resize(media::kVp9NumRefFrames); | 22 ref_frames_.resize(media::kVp9NumRefFrames); |
| 22 } | 23 } |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 gfx::Size VP9Decoder::GetPicSize() const { | 173 gfx::Size VP9Decoder::GetPicSize() const { |
| 173 return pic_size_; | 174 return pic_size_; |
| 174 } | 175 } |
| 175 | 176 |
| 176 size_t VP9Decoder::GetRequiredNumOfPictures() const { | 177 size_t VP9Decoder::GetRequiredNumOfPictures() const { |
| 177 // kMaxVideoFrames to keep higher level media pipeline populated, +2 for the | 178 // kMaxVideoFrames to keep higher level media pipeline populated, +2 for the |
| 178 // pictures being parsed and decoded currently. | 179 // pictures being parsed and decoded currently. |
| 179 return media::limits::kMaxVideoFrames + media::kVp9NumRefFrames + 2; | 180 return media::limits::kMaxVideoFrames + media::kVp9NumRefFrames + 2; |
| 180 } | 181 } |
| 181 | 182 |
| 182 } // namespace content | 183 } // namespace media |
| OLD | NEW |