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

Unified Diff: media/filters/h264_parser.h

Issue 2268183009: H264SPS: Centralize computation of coded size and visible rect. (Closed)
Patch Set: Make sure fuzzing code actually runs. 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/BUILD.gn ('k') | media/filters/h264_parser.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/h264_parser.h
diff --git a/media/filters/h264_parser.h b/media/filters/h264_parser.h
index c557383022023dbfacab93e9cc076cf6aab3bd14..64519e8fd7a95eed0bd4fa2f00ddb36c7735c70f 100644
--- a/media/filters/h264_parser.h
+++ b/media/filters/h264_parser.h
@@ -15,11 +15,17 @@
#include <vector>
#include "base/macros.h"
+#include "base/optional.h"
#include "media/base/media_export.h"
#include "media/base/ranges.h"
#include "media/base/video_codecs.h"
#include "media/filters/h264_bit_reader.h"
+namespace gfx {
+class Rect;
+class Size;
+}
+
namespace media {
struct SubsampleEntry;
@@ -166,6 +172,12 @@ struct MEDIA_EXPORT H264SPS {
bool low_delay_hrd_flag;
int chroma_array_type;
+
+ // Helpers to compute frequently-used values. These methods return
+ // base::nullopt if they encounter integer overflow. They do not verify that
+ // the results are in-spec for the given profile or level.
+ base::Optional<gfx::Size> GetCodedSize() const;
+ base::Optional<gfx::Rect> GetVisibleRect() const;
};
struct MEDIA_EXPORT H264PPS {
« no previous file with comments | « media/BUILD.gn ('k') | media/filters/h264_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698