OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 // This file contains an implementation of an H.264 Decoded Picture Buffer | 5 // This file contains an implementation of an H.264 Decoded Picture Buffer |
6 // used in H264 decoders. | 6 // used in H264 decoders. |
7 | 7 |
8 #ifndef CONTENT_COMMON_GPU_MEDIA_H264_DPB_H_ | 8 #ifndef CONTENT_COMMON_GPU_MEDIA_H264_DPB_H_ |
9 #define CONTENT_COMMON_GPU_MEDIA_H264_DPB_H_ | 9 #define CONTENT_COMMON_GPU_MEDIA_H264_DPB_H_ |
10 | 10 |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 Pictures::reverse_iterator rbegin() { return pics_.rbegin(); } | 113 Pictures::reverse_iterator rbegin() { return pics_.rbegin(); } |
114 Pictures::reverse_iterator rend() { return pics_.rend(); } | 114 Pictures::reverse_iterator rend() { return pics_.rend(); } |
115 | 115 |
116 size_t size() const { return pics_.size(); } | 116 size_t size() const { return pics_.size(); } |
117 bool IsFull() const { return pics_.size() == kDPBMaxSize; } | 117 bool IsFull() const { return pics_.size() == kDPBMaxSize; } |
118 | 118 |
119 // Per H264 spec, increase to 32 if interlaced video is supported. | 119 // Per H264 spec, increase to 32 if interlaced video is supported. |
120 enum { kDPBMaxSize = 16 }; | 120 enum { kDPBMaxSize = 16 }; |
121 | 121 |
122 private: | 122 private: |
123 // Remove a picture from DPB, freeing its resources. | |
124 void RemovePic(const Pictures::iterator iter); | |
125 | |
126 Pictures pics_; | 123 Pictures pics_; |
127 | 124 |
128 DISALLOW_COPY_AND_ASSIGN(H264DPB); | 125 DISALLOW_COPY_AND_ASSIGN(H264DPB); |
129 }; | 126 }; |
130 | 127 |
131 } // namespace content | 128 } // namespace content |
132 | 129 |
133 #endif // CONTENT_COMMON_GPU_MEDIA_H264_DPB_H_ | 130 #endif // CONTENT_COMMON_GPU_MEDIA_H264_DPB_H_ |
134 | |
OLD | NEW |