Change MaxLumaSampleRate to be based on frame resolution.
MaxLumaSampleRate generation code now takes into account the frame resolution of every frame. BUG=https://bugs.chromium.org/p/webm/issues/detail?id=1203 Change-Id: I666fa2f21971ff4fb80219ef29dee3254cbb370c
This commit is contained in:
		| @@ -64,12 +64,6 @@ void Vp9LevelStats::AddFrame(const Vp9HeaderParser& parser, int64_t time_ns) { | ||||
|     max_luma_end_ns_ = luma_window_.back().first; | ||||
|   } | ||||
|  | ||||
|   // Max luma sample rate does not take frame resizing into account. So | ||||
|   // I'm doing max number of frames in one second times max width times max | ||||
|   // height to generate Max luma sample rate. | ||||
|   if (luma_window_.size() > max_frames_in_one_second_) | ||||
|     max_frames_in_one_second_ = luma_window_.size(); | ||||
|  | ||||
|   // Record CPB stats. | ||||
|   // Remove all frames that are less than window size. | ||||
|   while (cpb_window_.size() > 3) { | ||||
| @@ -210,9 +204,7 @@ Vp9Level Vp9LevelStats::GetLevel() const { | ||||
|   return max_level; | ||||
| } | ||||
|  | ||||
| int64_t Vp9LevelStats::GetMaxLumaSampleRate() const { | ||||
|   return max_luma_picture_size_ * max_frames_in_one_second_; | ||||
| } | ||||
| int64_t Vp9LevelStats::GetMaxLumaSampleRate() const { return max_luma_size_; } | ||||
|  | ||||
| int64_t Vp9LevelStats::GetMaxLumaPictureSize() const { | ||||
|   return max_luma_picture_size_; | ||||
|   | ||||
| @@ -73,7 +73,6 @@ class Vp9LevelStats { | ||||
|         current_luma_size_(0), | ||||
|         max_luma_size_(0), | ||||
|         max_luma_end_ns_(0), | ||||
|         max_frames_in_one_second_(0), | ||||
|         first_altref(true), | ||||
|         frames_since_last_altref(0), | ||||
|         minimum_altref_distance(std::numeric_limits<int>::max()), | ||||
| @@ -153,7 +152,6 @@ class Vp9LevelStats { | ||||
|   int64_t current_luma_size_; | ||||
|   int64_t max_luma_size_; | ||||
|   int64_t max_luma_end_ns_; | ||||
|   size_t max_frames_in_one_second_; | ||||
|  | ||||
|   bool first_altref; | ||||
|   int frames_since_last_altref; | ||||
|   | ||||
| @@ -35,7 +35,7 @@ using libwebm::Indent; | ||||
| using libwebm::kNanosecondsPerSecond; | ||||
| using libwebm::kNanosecondsPerSecondi; | ||||
|  | ||||
| const char VERSION_STRING[] = "1.0.4.1"; | ||||
| const char VERSION_STRING[] = "1.0.4.2"; | ||||
|  | ||||
| struct Options { | ||||
|   Options(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Frank Galligan
					Frank Galligan