Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef MEDIA_VIDEO_H264_POC_H_ | 5 #ifndef MEDIA_VIDEO_H264_POC_H_ |
| 6 #define MEDIA_VIDEO_H264_POC_H_ | 6 #define MEDIA_VIDEO_H264_POC_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "base/macros.h" | 10 #include "base/macros.h" |
| 11 | 11 |
| 12 namespace media { | 12 namespace media { |
| 13 | 13 |
| 14 struct H264SPS; | 14 struct H264SPS; |
| 15 struct H264SliceHeader; | 15 struct H264SliceHeader; |
| 16 | 16 |
| 17 class MEDIA_EXPORT H264POC { | 17 class MEDIA_EXPORT H264POC { |
| 18 public: | 18 public: |
| 19 H264POC(); | 19 H264POC(); |
| 20 ~H264POC(); | 20 ~H264POC(); |
| 21 | 21 |
| 22 // Compute the picture order count for a slice, storing the result into | 22 // Compute the picture order count for a slice, storing the result into |
| 23 // |*pic_order_cnt|. | 23 // |*pic_order_cnt|. |
| 24 bool ComputePicOrderCnt( | 24 bool ComputePicOrderCnt( |
| 25 const H264SPS* sps, | 25 const H264SPS* sps, |
| 26 const H264SliceHeader& slice_hdr, | 26 const H264SliceHeader& slice_hdr, |
| 27 int32_t* pic_order_cnt); | 27 int32_t* pic_order_cnt); |
| 28 | 28 |
| 29 bool IsPendingMMCO5() { return pending_mmco5_; } | |
|
Pawel Osciak
2017/02/17 04:53:26
Please add documentation.
sandersd (OOO until July 31)
2017/02/18 00:46:34
Done.
| |
| 30 | |
| 29 // Reset computation state. It's best (although not strictly required) to call | 31 // Reset computation state. It's best (although not strictly required) to call |
| 30 // this after a seek. | 32 // this after a seek. |
| 31 void Reset(); | 33 void Reset(); |
| 32 | 34 |
| 33 private: | 35 private: |
| 34 int32_t ref_pic_order_cnt_msb_; | 36 int32_t ref_pic_order_cnt_msb_; |
| 35 int32_t ref_pic_order_cnt_lsb_; | 37 int32_t ref_pic_order_cnt_lsb_; |
| 36 int32_t prev_frame_num_; | 38 int32_t prev_frame_num_; |
| 37 int32_t prev_frame_num_offset_; | 39 int32_t prev_frame_num_offset_; |
| 40 bool pending_mmco5_; | |
| 38 | 41 |
| 39 DISALLOW_COPY_AND_ASSIGN(H264POC); | 42 DISALLOW_COPY_AND_ASSIGN(H264POC); |
| 40 }; | 43 }; |
| 41 | 44 |
| 42 } // namespace media | 45 } // namespace media |
| 43 | 46 |
| 44 #endif // MEDIA_VIDEO_H264_POC_H_ | 47 #endif // MEDIA_VIDEO_H264_POC_H_ |
| OLD | NEW |