]> granicus.if.org Git - libvpx/blob - third_party/libwebm/common/hdr_util.h
Merge "third_party: Roll libwebm snapshot."
[libvpx] / third_party / libwebm / common / hdr_util.h
1 // Copyright (c) 2016 The WebM project authors. All Rights Reserved.
2 //
3 // Use of this source code is governed by a BSD-style license
4 // that can be found in the LICENSE file in the root of the source
5 // tree. An additional intellectual property rights grant can be found
6 // in the file PATENTS.  All contributing project authors may
7 // be found in the AUTHORS file in the root of the source tree.
8 #ifndef LIBWEBM_COMMON_HDR_UTIL_H_
9 #define LIBWEBM_COMMON_HDR_UTIL_H_
10
11 #include <memory>
12
13 #include "mkvmuxer/mkvmuxer.h"
14
15 namespace mkvparser {
16 struct Colour;
17 struct MasteringMetadata;
18 struct PrimaryChromaticity;
19 }  // namespace mkvparser
20
21 namespace libwebm {
22 // Utility types and functions for working with the Colour element and its
23 // children. Copiers return true upon success. Presence functions return true
24 // when the specified element is present.
25
26 // TODO(tomfinegan): These should be moved to libwebm_utils once c++11 is
27 // required by libwebm.
28
29 typedef std::auto_ptr<mkvmuxer::PrimaryChromaticity> PrimaryChromaticityPtr;
30
31 bool CopyPrimaryChromaticity(const mkvparser::PrimaryChromaticity& parser_pc,
32                              PrimaryChromaticityPtr* muxer_pc);
33
34 bool MasteringMetadataValuePresent(double value);
35
36 bool CopyMasteringMetadata(const mkvparser::MasteringMetadata& parser_mm,
37                            mkvmuxer::MasteringMetadata* muxer_mm);
38
39 bool ColourValuePresent(long long value);
40
41 bool CopyColour(const mkvparser::Colour& parser_colour,
42                 mkvmuxer::Colour* muxer_colour);
43
44 }  // namespace libwebm
45
46 #endif  // LIBWEBM_COMMON_HDR_UTIL_H_