Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: correct typo (coefficents -> coefficients) #18

Merged
merged 1 commit into from
Mar 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions include/shiguredo/mp4/box/colr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ struct ColrParameters {
const std::array<std::uint8_t, 4> colour_type;
const std::uint16_t colour_primaries;
const std::uint16_t transfer_characteristics;
const std::uint16_t matrix_coefficents;
const std::uint16_t matrix_coefficients;
const bool full_range_flag;
const std::vector<std::uint8_t> profile = {};
const std::vector<std::uint8_t> unknown = {};
Expand All @@ -45,7 +45,7 @@ class Colr : public Box {
std::array<std::uint8_t, 4> m_colour_type;
std::uint16_t m_colour_primaries;
std::uint16_t m_transfer_characteristics;
std::uint16_t m_matrix_coefficents;
std::uint16_t m_matrix_coefficients;
bool m_full_range_flag;
std::uint8_t m_reserved = 0;
std::vector<std::uint8_t> m_profile;
Expand Down
4 changes: 2 additions & 2 deletions include/shiguredo/mp4/box/vpc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ struct VPCodecConfigurationParameters {
const std::uint8_t video_full_range_flag = 0;
const std::uint8_t colour_primaries = 2;
const std::uint8_t transfer_characteristics = 2;
const std::uint8_t matrix_coefficents = 2;
const std::uint8_t matrix_coefficients = 2;
const std::vector<std::uint8_t> codec_initialization_data = {};
};

Expand All @@ -45,7 +45,7 @@ class VPCodecConfiguration : public FullBox {
std::uint8_t m_video_full_range_flag;
std::uint8_t m_colour_primaries;
std::uint8_t m_transfer_characteristics;
std::uint8_t m_matrix_coefficents;
std::uint8_t m_matrix_coefficients;
std::vector<std::uint8_t> m_codec_initialization_data;
};

Expand Down
8 changes: 4 additions & 4 deletions src/box/colr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Colr::Colr(const ColrParameters& params)
: m_colour_type(params.colour_type),
m_colour_primaries(params.colour_primaries),
m_transfer_characteristics(params.transfer_characteristics),
m_matrix_coefficents(params.matrix_coefficents),
m_matrix_coefficients(params.matrix_coefficients),
m_full_range_flag(params.full_range_flag),
m_profile(params.profile),
m_unknown(params.unknown) {
Expand All @@ -50,7 +50,7 @@ std::string Colr::nclxToString() const {
"TransferCharacteristics={} "
"MatrixCoefficients={} FullRangeFlag={}",
m_colour_type[0], m_colour_type[1], m_colour_type[2], m_colour_type[3], m_colour_primaries,
m_transfer_characteristics, m_matrix_coefficents, m_full_range_flag);
m_transfer_characteristics, m_matrix_coefficients, m_full_range_flag);
}

std::string Colr::profileToString() const {
Expand Down Expand Up @@ -83,7 +83,7 @@ std::uint64_t Colr::nclxMarshal(bitio::Writer* writer) const {
std::uint64_t wbits = 0;
wbits += bitio::write_uint<std::uint16_t>(writer, m_colour_primaries);
wbits += bitio::write_uint<std::uint16_t>(writer, m_transfer_characteristics);
wbits += bitio::write_uint<std::uint16_t>(writer, m_matrix_coefficents);
wbits += bitio::write_uint<std::uint16_t>(writer, m_matrix_coefficients);
wbits += write_bool(writer, m_full_range_flag);
wbits += bitio::write_uint<std::uint8_t>(writer, m_reserved, 7);
return wbits;
Expand Down Expand Up @@ -113,7 +113,7 @@ std::uint64_t Colr::readData(std::istream& is) {
std::uint64_t Colr::nclxUnwriteData(bitio::Reader* reader) {
std::uint64_t rbits = bitio::read_uint<std::uint16_t>(reader, &m_colour_primaries);
rbits += bitio::read_uint<std::uint16_t>(reader, &m_transfer_characteristics);
rbits += bitio::read_uint<std::uint16_t>(reader, &m_matrix_coefficents);
rbits += bitio::read_uint<std::uint16_t>(reader, &m_matrix_coefficients);
rbits += read_bool(reader, &m_full_range_flag);
rbits += bitio::read_uint<std::uint8_t>(reader, &m_reserved, 7);
return rbits;
Expand Down
10 changes: 5 additions & 5 deletions src/box/vpc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ VPCodecConfiguration::VPCodecConfiguration() {
std::string VPCodecConfiguration::toStringOnlyData() const {
return fmt::format(
"{} Profile={} Level={} BitDepth={} ChromaSubSampling={} VideoFullRangeFlag={} ColourPrimaries={} "
"TransferCharacteristics={} MatrixCoefficents={} CodecInitializationData=[{:#x}]",
"TransferCharacteristics={} MatrixCoefficients={} CodecInitializationData=[{:#x}]",
getVersionAndFlagsString(), m_profile, m_level, m_bit_depth, m_chroma_sub_sampling, m_video_full_range_flag,
m_colour_primaries, m_transfer_characteristics, m_matrix_coefficents,
m_colour_primaries, m_transfer_characteristics, m_matrix_coefficients,
fmt::join(m_codec_initialization_data, ", "));
}

Expand All @@ -42,7 +42,7 @@ std::uint64_t VPCodecConfiguration::writeData(std::ostream& os) const {
wbits += bitio::write_uint<std::uint8_t>(&writer, m_video_full_range_flag, 1);
wbits += bitio::write_uint<std::uint8_t>(&writer, m_colour_primaries);
wbits += bitio::write_uint<std::uint8_t>(&writer, m_transfer_characteristics);
wbits += bitio::write_uint<std::uint8_t>(&writer, m_matrix_coefficents);
wbits += bitio::write_uint<std::uint8_t>(&writer, m_matrix_coefficients);
if (m_version == 0) {
return wbits;
}
Expand All @@ -68,7 +68,7 @@ std::uint64_t VPCodecConfiguration::readData(std::istream& is) {
rbits += bitio::read_uint<std::uint8_t>(&reader, &m_video_full_range_flag, 1);
rbits += bitio::read_uint<std::uint8_t>(&reader, &m_colour_primaries);
rbits += bitio::read_uint<std::uint8_t>(&reader, &m_transfer_characteristics);
rbits += bitio::read_uint<std::uint8_t>(&reader, &m_matrix_coefficents);
rbits += bitio::read_uint<std::uint8_t>(&reader, &m_matrix_coefficients);
if (m_version == 0) {
return rbits;
}
Expand All @@ -86,7 +86,7 @@ VPCodecConfiguration::VPCodecConfiguration(const VPCodecConfigurationParameters&
m_video_full_range_flag(params.video_full_range_flag),
m_colour_primaries(params.colour_primaries),
m_transfer_characteristics(params.transfer_characteristics),
m_matrix_coefficents(params.matrix_coefficents),
m_matrix_coefficients(params.matrix_coefficients),
m_codec_initialization_data(params.codec_initialization_data) {
setVersion(params.version);
setFlags(params.flags);
Expand Down
10 changes: 5 additions & 5 deletions test/box_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ BoxTypesTestCase box_test_cases[] = {
new shiguredo::mp4::box::Colr({.colour_type = {'n', 'c', 'l', 'x'},
.colour_primaries = 0x0123,
.transfer_characteristics = 0x2345,
.matrix_coefficents = 0x4567,
.matrix_coefficients = 0x4567,
.full_range_flag = true}),
new shiguredo::mp4::box::Colr(),
{
Expand Down Expand Up @@ -1977,11 +1977,11 @@ BoxTypesTestCase box_test_cases[] = {
.video_full_range_flag = 0,
.colour_primaries = 0xff,
.transfer_characteristics = 0xff,
.matrix_coefficents = 0}),
.matrix_coefficients = 0}),
new shiguredo::mp4::box::VPCodecConfiguration(),
{0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x00, 0x00, 0x00},
"Version=1 Flags=0x000000 Profile=0 Level=0 BitDepth=8 ChromaSubSampling=0 VideoFullRangeFlag=0 "
"ColourPrimaries=255 TransferCharacteristics=255 MatrixCoefficents=0 CodecInitializationData=[]"},
"ColourPrimaries=255 TransferCharacteristics=255 MatrixCoefficients=0 CodecInitializationData=[]"},
{"vpcC version: 0",
new shiguredo::mp4::box::VPCodecConfiguration({.version = 0,
.profile = 0,
Expand All @@ -1991,11 +1991,11 @@ BoxTypesTestCase box_test_cases[] = {
.video_full_range_flag = 0,
.colour_primaries = 0xff,
.transfer_characteristics = 0xff,
.matrix_coefficents = 0}),
.matrix_coefficients = 0}),
new shiguredo::mp4::box::VPCodecConfiguration(),
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xff, 0xff, 0x00},
"Version=0 Flags=0x000000 Profile=0 Level=0 BitDepth=8 ChromaSubSampling=0 VideoFullRangeFlag=0 "
"ColourPrimaries=255 TransferCharacteristics=255 MatrixCoefficents=0 CodecInitializationData=[]"},
"ColourPrimaries=255 TransferCharacteristics=255 MatrixCoefficients=0 CodecInitializationData=[]"},
{
"sdtp",
new shiguredo::mp4::box::Sdtp({.samples =
Expand Down