summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2023-03-13 22:44:16 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2023-03-13 22:44:16 +0000
commit1930e3ca23b007f3ff11d98a570077be6201957e (patch)
tree3e74c2bff30b278e1f26538b9fe18b89eb19515c
parentb87133b5d8ef3b7a9d1ec97d11480298c7d7cd23 (diff)
parent60ff71f235ba11efdfa19496e4f9a339a4c3106f (diff)
downloadlibwebm-1930e3ca23b007f3ff11d98a570077be6201957e.tar.gz
Merge changes I15c2d52e,I32fbee85,I491d9003 into main
* changes: cosmetics,fix a typo: compresion -> compression vp9_level_stats,Vp9LevelRow: fix -Wc++20-compat warnings Vp9LevelTable: fix initializer order
-rw-r--r--CMakeLists.txt3
-rw-r--r--common/vp9_level_stats.cc32
-rw-r--r--common/vp9_level_stats.h9
-rw-r--r--mkvmuxer/mkvmuxer.cc4
-rw-r--r--mkvmuxer/mkvmuxer.h2
5 files changed, 23 insertions, 27 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a83d23b..99e904f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,6 +48,9 @@ if (MSVC)
endif ()
else ()
add_cxx_flag_if_supported("-Wall")
+ add_cxx_flag_if_supported("-Wc++14-compat")
+ add_cxx_flag_if_supported("-Wc++17-compat")
+ add_cxx_flag_if_supported("-Wc++20-compat")
add_cxx_flag_if_supported("-Wextra")
add_cxx_flag_if_supported("-Wnarrowing")
add_cxx_flag_if_supported("-Wno-deprecated")
diff --git a/common/vp9_level_stats.cc b/common/vp9_level_stats.cc
index 76891e6..96a4bcc 100644
--- a/common/vp9_level_stats.cc
+++ b/common/vp9_level_stats.cc
@@ -17,21 +17,21 @@
namespace vp9_parser {
const Vp9LevelRow Vp9LevelStats::Vp9LevelTable[kNumVp9Levels] = {
- {LEVEL_1, 829440, 36864, 200, 400, 2, 1, 4, 8, 512},
- {LEVEL_1_1, 2764800, 73728, 800, 1000, 2, 1, 4, 8, 768},
- {LEVEL_2, 4608000, 122880, 1800, 1500, 2, 1, 4, 8, 960},
- {LEVEL_2_1, 9216000, 245760, 3600, 2800, 2, 2, 4, 8, 1344},
- {LEVEL_3, 20736000, 552960, 7200, 6000, 2, 4, 4, 8, 2048},
- {LEVEL_3_1, 36864000, 983040, 12000, 10000, 2, 4, 4, 8, 2752},
- {LEVEL_4, 83558400, 2228224, 18000, 16000, 4, 4, 4, 8, 4160},
- {LEVEL_4_1, 160432128, 2228224, 30000, 18000, 4, 4, 5, 6, 4160},
- {LEVEL_5, 311951360, 8912896, 60000, 36000, 6, 8, 6, 4, 8384},
- {LEVEL_5_1, 588251136, 8912896, 120000, 46000, 8, 8, 10, 4, 8384},
+ {LEVEL_1, 829440, 36864, 512, 200, 400, 2, 1, 4, 8},
+ {LEVEL_1_1, 2764800, 73728, 768, 800, 1000, 2, 1, 4, 8},
+ {LEVEL_2, 4608000, 122880, 960, 1800, 1500, 2, 1, 4, 8},
+ {LEVEL_2_1, 9216000, 245760, 1344, 3600, 2800, 2, 2, 4, 8},
+ {LEVEL_3, 20736000, 552960, 2048, 7200, 6000, 2, 4, 4, 8},
+ {LEVEL_3_1, 36864000, 983040, 2752, 12000, 10000, 2, 4, 4, 8},
+ {LEVEL_4, 83558400, 2228224, 4160, 18000, 16000, 4, 4, 4, 8},
+ {LEVEL_4_1, 160432128, 2228224, 4160, 30000, 18000, 4, 4, 5, 6},
+ {LEVEL_5, 311951360, 8912896, 8384, 60000, 36000, 6, 8, 6, 4},
+ {LEVEL_5_1, 588251136, 8912896, 8384, 120000, 46000, 8, 8, 10, 4},
// CPB Size = 0 for levels 5_2 to 6_2
- {LEVEL_5_2, 1176502272, 8912896, 180000, 0, 8, 8, 10, 4, 8384},
- {LEVEL_6, 1176502272, 35651584, 180000, 0, 8, 16, 10, 4, 16832},
- {LEVEL_6_1, 2353004544, 35651584, 240000, 0, 8, 16, 10, 4, 16832},
- {LEVEL_6_2, 4706009088, 35651584, 480000, 0, 8, 16, 10, 4, 16832}};
+ {LEVEL_5_2, 1176502272, 8912896, 8384, 180000, 0, 8, 8, 10, 4},
+ {LEVEL_6, 1176502272, 35651584, 16832, 180000, 0, 8, 16, 10, 4},
+ {LEVEL_6_1, 2353004544, 35651584, 16832, 240000, 0, 8, 16, 10, 4},
+ {LEVEL_6_2, 4706009088, 35651584, 16832, 480000, 0, 8, 16, 10, 4}};
void Vp9LevelStats::AddFrame(const Vp9HeaderParser& parser, int64_t time_ns) {
++frames;
@@ -129,7 +129,7 @@ Vp9Level Vp9LevelStats::GetLevel() const {
const int64_t max_luma_picture_breadth = GetMaxLumaPictureBreadth();
const double average_bitrate = GetAverageBitRate();
const double max_cpb_size = GetMaxCpbSize();
- const double compresion_ratio = GetCompressionRatio();
+ const double compression_ratio = GetCompressionRatio();
const int max_column_tiles = GetMaxColumnTiles();
const int min_altref_distance = GetMinimumAltrefDistance();
const int max_ref_frames = GetMaxReferenceFrames();
@@ -215,7 +215,7 @@ Vp9Level Vp9LevelStats::GetLevel() const {
// The minimum compression ratio has the same behavior as minimum altref
// distance.
- if (compresion_ratio < Vp9LevelTable[level_index].compresion_ratio)
+ if (compression_ratio < Vp9LevelTable[level_index].compression_ratio)
max_level = LEVEL_UNKNOWN;
return max_level;
}
diff --git a/common/vp9_level_stats.h b/common/vp9_level_stats.h
index 45d6f5c..4230385 100644
--- a/common/vp9_level_stats.h
+++ b/common/vp9_level_stats.h
@@ -40,20 +40,13 @@ enum Vp9Level {
};
struct Vp9LevelRow {
- Vp9LevelRow() = default;
- ~Vp9LevelRow() = default;
- Vp9LevelRow(Vp9LevelRow&& other) = default;
- Vp9LevelRow(const Vp9LevelRow& other) = default;
- Vp9LevelRow& operator=(Vp9LevelRow&& other) = delete;
- Vp9LevelRow& operator=(const Vp9LevelRow& other) = delete;
-
Vp9Level level;
int64_t max_luma_sample_rate;
int64_t max_luma_picture_size;
int64_t max_luma_picture_breadth;
double average_bitrate;
double max_cpb_size;
- double compresion_ratio;
+ double compression_ratio;
int max_tiles;
int min_altref_distance;
int max_ref_frames;
diff --git a/mkvmuxer/mkvmuxer.cc b/mkvmuxer/mkvmuxer.cc
index ae36531..faaf016 100644
--- a/mkvmuxer/mkvmuxer.cc
+++ b/mkvmuxer/mkvmuxer.cc
@@ -607,10 +607,10 @@ bool ContentEncoding::Write(IMkvWriter* writer) const {
return true;
}
-uint64_t ContentEncoding::EncodingSize(uint64_t compresion_size,
+uint64_t ContentEncoding::EncodingSize(uint64_t compression_size,
uint64_t encryption_size) const {
// TODO(fgalligan): Add support for compression settings.
- if (compresion_size != 0)
+ if (compression_size != 0)
return 0;
uint64_t encoding_size = 0;
diff --git a/mkvmuxer/mkvmuxer.h b/mkvmuxer/mkvmuxer.h
index 94773df..8602d82 100644
--- a/mkvmuxer/mkvmuxer.h
+++ b/mkvmuxer/mkvmuxer.h
@@ -330,7 +330,7 @@ class ContentEncoding {
private:
// Returns the size in bytes for the encoding elements.
- uint64_t EncodingSize(uint64_t compresion_size,
+ uint64_t EncodingSize(uint64_t compression_size,
uint64_t encryption_size) const;
// Returns the size in bytes for the encryption elements.