Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(223)

Unified Diff: content/common/gpu/media/h264_poc.h

Issue 742233002: Implement |pic_order_cnt| computation for VTVideoDecode accelerator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@vt_reorder
Patch Set: Address comments (other than unittesting). Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | content/common/gpu/media/h264_poc.cc » ('j') | content/common/gpu/media/h264_poc.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..bc24a5db8c6d860cd88c2ee4699ae69e08f06eb6
--- /dev/null
+++ b/content/common/gpu/media/h264_poc.h
@@ -0,0 +1,44 @@
+// 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;
+struct H264SliceHeader;
+
+} // namespace media
+
+namespace content {
+
+class H264POC {
+ public:
+ H264POC();
+ ~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);
+
+ // 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_
« no previous file with comments | « no previous file | content/common/gpu/media/h264_poc.cc » ('j') | content/common/gpu/media/h264_poc.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698