Add parsing support for new features in CodecPrivate.
Adds support for parsing bit depth and chroma subsampling features. BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1198 Change-Id: I8d11829f5d43a518cbe0e5c0bdd4fd37db7b6266
This commit is contained in:
@@ -28,6 +28,25 @@ namespace libwebm {
|
||||
// TODO(tomfinegan): These should be moved to libwebm_utils once c++11 is
|
||||
// required by libwebm.
|
||||
|
||||
// Features of the VP9 codec that may be set in the CodecPrivate of a VP9 video
|
||||
// stream. A value of kValueNotPresent represents that the value was not set in
|
||||
// the CodecPrivate.
|
||||
struct Vp9CodecFeatures {
|
||||
static const int kValueNotPresent;
|
||||
|
||||
Vp9CodecFeatures()
|
||||
: profile(kValueNotPresent),
|
||||
level(kValueNotPresent),
|
||||
bit_depth(kValueNotPresent),
|
||||
chroma_subsampling(kValueNotPresent) {}
|
||||
~Vp9CodecFeatures(){};
|
||||
|
||||
int profile;
|
||||
int level;
|
||||
int bit_depth;
|
||||
int chroma_subsampling;
|
||||
};
|
||||
|
||||
typedef std::auto_ptr<mkvmuxer::PrimaryChromaticity> PrimaryChromaticityPtr;
|
||||
|
||||
bool CopyPrimaryChromaticity(const mkvparser::PrimaryChromaticity& parser_pc,
|
||||
@@ -43,12 +62,9 @@ bool ColourValuePresent(long long value);
|
||||
bool CopyColour(const mkvparser::Colour& parser_colour,
|
||||
mkvmuxer::Colour* muxer_colour);
|
||||
|
||||
// Returns true if |profile| and |level| are set to valid values. Returns VP9
|
||||
// profile in |profile| or -1 if there was no profile set in CodecPrivate data.
|
||||
// Returns VP9 level in |level| or -1 if there was no level set in CodecPrivate
|
||||
// data.
|
||||
// Returns true if |features| is set to one or more valid values.
|
||||
bool ParseVpxCodecPrivate(const uint8_t* private_data, int32_t length,
|
||||
int* profile, int* level);
|
||||
Vp9CodecFeatures* features);
|
||||
|
||||
} // namespace libwebm
|
||||
|
||||
|
||||
Reference in New Issue
Block a user