Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: source/libvpx/test/datarate_test.cc

Issue 11974002: libvpx: Pull from upstream (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 7 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/libs.mk ('k') | source/libvpx/test/dct32x32_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/test/datarate_test.cc
===================================================================
--- source/libvpx/test/datarate_test.cc (revision 177019)
+++ source/libvpx/test/datarate_test.cc (working copy)
@@ -59,9 +59,13 @@
/* Test the buffer model here before subtracting the frame. Do so because
* the way the leaky bucket model works in libvpx is to allow the buffer to
* empty - and then stop showing frames until we've got enough bits to
- * show one. */
- ASSERT_GE(bits_in_buffer_model_, 0) << "Buffer Underrun at frame "
- << pkt->data.frame.pts;
+ * show one. As noted in comment below (issue 495), this does not currently
+ * apply to key frames. For now exclude key frames in condition below. */
+ bool key_frame = (pkt->data.frame.flags & VPX_FRAME_IS_KEY) ? true: false;
+ if (!key_frame) {
+ ASSERT_GE(bits_in_buffer_model_, 0) << "Buffer Underrun at frame "
+ << pkt->data.frame.pts;
+ }
const int frame_size_in_bits = pkt->data.frame.sz * 8;
@@ -125,7 +129,12 @@
::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288,
30, 1, 0, 140);
- for (int i = 70; i < 700; i += 200) {
+ // There is an issue for low bitrates in real-time mode, where the
+ // effective_datarate slightly overshoots the target bitrate.
+ // This is same the issue as noted about (#495).
+ // TODO(jimbankoski/marpan): Update test to run for lower bitrates (< 100),
+ // when the issue is resolved.
+ for (int i = 100; i < 800; i += 200) {
cfg_.rc_target_bitrate = i;
ResetModel();
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
« no previous file with comments | « source/libvpx/libs.mk ('k') | source/libvpx/test/dct32x32_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698