Chromium Code Reviews| Index: content/common/gpu/media/h264_poc.h |
| diff --git a/content/common/gpu/media/h264_poc.h b/content/common/gpu/media/h264_poc.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..10fff9a3b140307898fe8b8606810020a2b2c673 |
| --- /dev/null |
| +++ b/content/common/gpu/media/h264_poc.h |
| @@ -0,0 +1,42 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_COMMON_GPU_MEDIA_H264_POC_H_ |
| +#define CONTENT_COMMON_GPU_MEDIA_H264_POC_H_ |
| + |
| +namespace media { |
| + struct H264SPS; |
|
DaleCurtis
2014/11/20 23:03:30
Traditionally no indentation here.
sandersd (OOO until July 31)
2014/11/20 23:58:25
Done.
|
| + struct H264SliceHeader; |
| +} // namespace media |
| + |
| +namespace content { |
| + |
| +class H264POC { |
| + public: |
| + explicit H264POC(); |
|
DaleCurtis
2014/11/20 23:03:30
explicit not necessary for no-argument constructor
sandersd (OOO until July 31)
2014/11/20 23:58:25
Done.
|
| + ~H264POC(); |
| + |
| + // Compute the picture order count for a slice, storing the result into |
| + // |*pic_order_cnt|. |
| + bool ComputePicOrderCnt( |
| + const media::H264SPS* sps, |
| + const media::H264SliceHeader& slice_hdr, |
| + int32_t *pic_order_cnt); |
|
DaleCurtis
2014/11/20 23:03:30
* goes with int32_t.
sandersd (OOO until July 31)
2014/11/20 23:58:25
Done.
|
| + |
| + // Reset computation state. It's best (although not strictly required) to call |
| + // this after a seek. |
| + void Reset(); |
| + |
| + private: |
| + int32_t ref_pic_order_cnt_msb_; |
| + int32_t ref_pic_order_cnt_lsb_; |
| + int32_t prev_frame_num_; |
| + int32_t prev_frame_num_offset_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(H264POC); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_COMMON_GPU_MEDIA_H264_POC_H_ |