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

Unified Diff: media/filters/vp9_uncompressed_header_parser.h

Issue 2133993002: Parse VP9 compressed header (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reset curr_frame_info_ when Reset Created 4 years, 4 months 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 | « media/filters/vp9_raw_bits_reader.cc ('k') | media/filters/vp9_uncompressed_header_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/vp9_uncompressed_header_parser.h
diff --git a/media/filters/vp9_uncompressed_header_parser.h b/media/filters/vp9_uncompressed_header_parser.h
new file mode 100644
index 0000000000000000000000000000000000000000..ea85af4769b1baf2d68bdb4627e4bf08ea20bb79
--- /dev/null
+++ b/media/filters/vp9_uncompressed_header_parser.h
@@ -0,0 +1,48 @@
+// Copyright 2016 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 MEDIA_FILTERS_VP9_UNCOMPRESSED_HEADER_PARSER_H_
+#define MEDIA_FILTERS_VP9_UNCOMPRESSED_HEADER_PARSER_H_
+
+#include "media/filters/vp9_parser.h"
+#include "media/filters/vp9_raw_bits_reader.h"
+
+namespace media {
+
+class Vp9UncompressedHeaderParser {
+ public:
+ Vp9UncompressedHeaderParser(Vp9Parser::Context* context);
+
+ // Parses VP9 uncompressed header in |stream| with |frame_size| into |fhdr|.
+ // Returns true if no error.
+ bool Parse(const uint8_t* stream, off_t frame_size, Vp9FrameHeader* fhdr);
+
+ private:
+ uint8_t ReadProfile();
+ bool VerifySyncCode();
+ bool ReadColorConfig(Vp9FrameHeader* fhdr);
+ void ReadFrameSize(Vp9FrameHeader* fhdr);
+ bool ReadFrameSizeFromRefs(Vp9FrameHeader* fhdr);
+ void ReadRenderSize(Vp9FrameHeader* fhdr);
+ Vp9InterpolationFilter ReadInterpolationFilter();
+ void ResetLoopfilter();
+ void SetupPastIndependence(Vp9FrameHeader* fhdr);
+ void ReadLoopFilterParams();
+ void ReadQuantizationParams(Vp9QuantizationParams* quants);
+ int8_t ReadDeltaQ();
+ uint8_t ReadProb();
+ bool ReadSegmentationParams();
+ bool ReadTileInfo(Vp9FrameHeader* fhdr);
+
+ // Raw bits reader for uncompressed frame header.
+ Vp9RawBitsReader reader_;
+
+ Vp9Parser::Context* context_;
+
+ DISALLOW_COPY_AND_ASSIGN(Vp9UncompressedHeaderParser);
+};
+
+} // namespace media
+
+#endif // MEDIA_FILTERS_VP9_UNCOMPRESSED_HEADER_PARSER_H_
« no previous file with comments | « media/filters/vp9_raw_bits_reader.cc ('k') | media/filters/vp9_uncompressed_header_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698