OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_COMMON_GPU_MEDIA_H264_POC_H_ |
| 6 #define CONTENT_COMMON_GPU_MEDIA_H264_POC_H_ |
| 7 |
| 8 namespace media { |
| 9 |
| 10 struct H264SPS; |
| 11 struct H264SliceHeader; |
| 12 |
| 13 } // namespace media |
| 14 |
| 15 namespace content { |
| 16 |
| 17 class H264POC { |
| 18 public: |
| 19 H264POC(); |
| 20 ~H264POC(); |
| 21 |
| 22 // Compute the picture order count for a slice, storing the result into |
| 23 // |*pic_order_cnt|. |
| 24 bool ComputePicOrderCnt( |
| 25 const media::H264SPS* sps, |
| 26 const media::H264SliceHeader& slice_hdr, |
| 27 int32_t* pic_order_cnt); |
| 28 |
| 29 // Reset computation state. It's best (although not strictly required) to call |
| 30 // this after a seek. |
| 31 void Reset(); |
| 32 |
| 33 private: |
| 34 int32_t ref_pic_order_cnt_msb_; |
| 35 int32_t ref_pic_order_cnt_lsb_; |
| 36 int32_t prev_frame_num_; |
| 37 int32_t prev_frame_num_offset_; |
| 38 |
| 39 DISALLOW_COPY_AND_ASSIGN(H264POC); |
| 40 }; |
| 41 |
| 42 } // namespace content |
| 43 |
| 44 #endif // CONTENT_COMMON_GPU_MEDIA_H264_POC_H_ |
OLD | NEW |