aboutsummaryrefslogtreecommitdiff
path: root/src/obu_parser.h
diff options
context:
space:
mode:
authorBoyuan Yang <byang@debian.org>2022-07-14 15:56:59 -0400
committerBoyuan Yang <byang@debian.org>2022-07-14 15:56:59 -0400
commit1a2e17bd28a068714658551c8c355171ce15dfa0 (patch)
treedb9e739007016850ee355365874a20b07034ef2c /src/obu_parser.h
parenta08da9600832caf817125edee2c3206fe24cd5cb (diff)
parentd4dbf19f6b0181ee78034bfe4caf189d1c016998 (diff)
downloadlibgav1-1a2e17bd28a068714658551c8c355171ce15dfa0.tar.gz
libgav1-1a2e17bd28a068714658551c8c355171ce15dfa0.tar.bz2
libgav1-1a2e17bd28a068714658551c8c355171ce15dfa0.zip
Update upstream source from tag 'upstream/0.18.0'
Update to upstream version '0.18.0' with Debian dir a69c1f7f3e7109393a3f9f5f1a2e7a5c3d3eda9f
Diffstat (limited to 'src/obu_parser.h')
-rw-r--r--src/obu_parser.h27
1 files changed, 5 insertions, 22 deletions
diff --git a/src/obu_parser.h b/src/obu_parser.h
index 3f452ef..eba3370 100644
--- a/src/obu_parser.h
+++ b/src/obu_parser.h
@@ -221,26 +221,6 @@ enum MetadataType : uint8_t {
// 32 and greater are reserved for AOM use.
};
-struct ObuMetadata {
- // Maximum content light level.
- uint16_t max_cll;
- // Maximum frame-average light level.
- uint16_t max_fall;
- uint16_t primary_chromaticity_x[3];
- uint16_t primary_chromaticity_y[3];
- uint16_t white_point_chromaticity_x;
- uint16_t white_point_chromaticity_y;
- uint32_t luminance_max;
- uint32_t luminance_min;
- // ITU-T T.35.
- uint8_t itu_t_t35_country_code;
- uint8_t itu_t_t35_country_code_extension_byte; // Valid if
- // itu_t_t35_country_code is
- // 0xFF.
- std::unique_ptr<uint8_t[]> itu_t_t35_payload_bytes;
- size_t itu_t_t35_payload_size;
-};
-
class ObuParser : public Allocable {
public:
ObuParser(const uint8_t* const data, size_t size, int operating_point,
@@ -276,7 +256,6 @@ class ObuParser : public Allocable {
const ObuSequenceHeader& sequence_header() const { return sequence_header_; }
const ObuFrameHeader& frame_header() const { return frame_header_; }
const Vector<TileBuffer>& tile_buffers() const { return tile_buffers_; }
- const ObuMetadata& metadata() const { return metadata_; }
// Returns true if the last call to ParseOneFrame() encountered a sequence
// header change.
bool sequence_header_changed() const { return sequence_header_changed_; }
@@ -372,6 +351,11 @@ class ObuParser : public Allocable {
size_t tg_header_size, size_t bytes_consumed_so_far);
bool ParseTileGroup(size_t size, size_t bytes_consumed_so_far); // 5.11.1.
+ // Populates |current_frame_| from the |buffer_pool_| if |current_frame_| is
+ // nullptr. Does not do anything otherwise. Returns true on success, false
+ // otherwise.
+ bool EnsureCurrentFrameIsNotNull();
+
// Parser elements.
std::unique_ptr<RawBitReader> bit_reader_;
const uint8_t* data_;
@@ -383,7 +367,6 @@ class ObuParser : public Allocable {
ObuSequenceHeader sequence_header_ = {};
ObuFrameHeader frame_header_ = {};
Vector<TileBuffer> tile_buffers_;
- ObuMetadata metadata_ = {};
// The expected starting tile number of the next Tile Group.
int next_tile_group_start_ = 0;
// If true, the sequence_header_ field is valid.