| 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 // Stores decoded pictures that will be used for future display | 64 // Stores decoded pictures that will be used for future display |
| 65 // and/or reference. | 65 // and/or reference. |
| 66 class H264DPB { | 66 class H264DPB { |
| 67 public: | 67 public: |
| 68 H264DPB(); | 68 H264DPB(); |
| 69 ~H264DPB(); | 69 ~H264DPB(); |
| 70 | 70 |
| 71 void set_max_num_pics(size_t max_num_pics); | 71 void set_max_num_pics(size_t max_num_pics); |
| 72 size_t max_num_pics() { return max_num_pics_; } | 72 size_t max_num_pics() { return max_num_pics_; } |
| 73 | 73 |
| 74 // Remove unused (not reference and already outputted) pictures from DPB. | 74 // Remove unused (not reference and already outputted) pictures from DPB |
| 75 void RemoveUnused(); | 75 // and free it. |
| 76 void DeleteUnused(); |
| 76 | 77 |
| 77 // Remove a picture by its pic_order_cnt. | 78 // Remove a picture by its pic_order_cnt and free it. |
| 78 void RemoveByPOC(int poc); | 79 void DeleteByPOC(int poc); |
| 79 | 80 |
| 80 // Clear DPB. | 81 // Clear DPB. |
| 81 void Clear(); | 82 void Clear(); |
| 82 | 83 |
| 83 // Store picture in DPB. DPB takes ownership of its resources. | 84 // Store picture in DPB. DPB takes ownership of its resources. |
| 84 void StorePic(H264Picture* pic); | 85 void StorePic(H264Picture* pic); |
| 85 | 86 |
| 86 // Return the number of reference pictures in DPB. | 87 // Return the number of reference pictures in DPB. |
| 87 int CountRefPics(); | 88 int CountRefPics(); |
| 88 | 89 |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 private: | 127 private: |
| 127 Pictures pics_; | 128 Pictures pics_; |
| 128 size_t max_num_pics_; | 129 size_t max_num_pics_; |
| 129 | 130 |
| 130 DISALLOW_COPY_AND_ASSIGN(H264DPB); | 131 DISALLOW_COPY_AND_ASSIGN(H264DPB); |
| 131 }; | 132 }; |
| 132 | 133 |
| 133 } // namespace content | 134 } // namespace content |
| 134 | 135 |
| 135 #endif // CONTENT_COMMON_GPU_MEDIA_H264_DPB_H_ | 136 #endif // CONTENT_COMMON_GPU_MEDIA_H264_DPB_H_ |
| OLD | NEW |