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

Unified Diff: source/libvpx/vp8/vp8_cx_iface.c

Issue 3417017: Update libvpx sources to v0.9.2-35-ga8a38bc. ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 10 years, 3 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/vp8/vp8_common.mk ('k') | source/libvpx/vp8/vp8_dx_iface.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vp8/vp8_cx_iface.c
===================================================================
--- source/libvpx/vp8/vp8_cx_iface.c (revision 60257)
+++ source/libvpx/vp8/vp8_cx_iface.c (working copy)
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010 The VP8 project authors. All Rights Reserved.
+ * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
@@ -113,6 +113,11 @@
ERROR(#memb " out of range ["#lo".."#hi"]");\
} while(0)
+#define RANGE_CHECK_HI(p,memb,hi) do {\
+ if(!((p)->memb <= (hi))) \
+ ERROR(#memb " out of range [.."#hi"]");\
+ } while(0)
+
#define RANGE_CHECK_LO(p,memb,lo) do {\
if(!((p)->memb >= (lo))) \
ERROR(#memb " out of range ["#lo"..]");\
@@ -130,24 +135,24 @@
RANGE_CHECK(cfg, g_h, 2, 16384);
RANGE_CHECK(cfg, g_timebase.den, 1, 1000000000);
RANGE_CHECK(cfg, g_timebase.num, 1, cfg->g_timebase.den);
- RANGE_CHECK(cfg, g_profile, 0, 3);
- RANGE_CHECK(cfg, rc_min_quantizer, 0, 63);
- RANGE_CHECK(cfg, rc_max_quantizer, 0, 63);
- RANGE_CHECK(cfg, g_threads, 0, 64);
+ RANGE_CHECK_HI(cfg, g_profile, 3);
+ RANGE_CHECK_HI(cfg, rc_min_quantizer, 63);
+ RANGE_CHECK_HI(cfg, rc_max_quantizer, 63);
+ RANGE_CHECK_HI(cfg, g_threads, 64);
#if !(CONFIG_REALTIME_ONLY)
- RANGE_CHECK(cfg, g_lag_in_frames, 0, 25);
+ RANGE_CHECK_HI(cfg, g_lag_in_frames, 25);
#else
- RANGE_CHECK(cfg, g_lag_in_frames, 0, 0);
+ RANGE_CHECK_HI(cfg, g_lag_in_frames, 0);
#endif
RANGE_CHECK(cfg, rc_end_usage, VPX_VBR, VPX_CBR);
- RANGE_CHECK(cfg, rc_undershoot_pct, 0, 100);
- RANGE_CHECK(cfg, rc_2pass_vbr_bias_pct, 0, 100);
+ RANGE_CHECK_HI(cfg, rc_undershoot_pct, 100);
+ RANGE_CHECK_HI(cfg, rc_2pass_vbr_bias_pct, 100);
RANGE_CHECK(cfg, kf_mode, VPX_KF_DISABLED, VPX_KF_AUTO);
//RANGE_CHECK_BOOL(cfg, g_delete_firstpassfile);
RANGE_CHECK_BOOL(cfg, rc_resize_allowed);
- RANGE_CHECK(cfg, rc_dropframe_thresh, 0, 100);
- RANGE_CHECK(cfg, rc_resize_up_thresh, 0, 100);
- RANGE_CHECK(cfg, rc_resize_down_thresh, 0, 100);
+ RANGE_CHECK_HI(cfg, rc_dropframe_thresh, 100);
+ RANGE_CHECK_HI(cfg, rc_resize_up_thresh, 100);
+ RANGE_CHECK_HI(cfg, rc_resize_down_thresh, 100);
#if !(CONFIG_REALTIME_ONLY)
RANGE_CHECK(cfg, g_pass, VPX_RC_ONE_PASS, VPX_RC_LAST_PASS);
#else
@@ -166,7 +171,7 @@
#if !(CONFIG_REALTIME_ONLY)
RANGE_CHECK(vp8_cfg, encoding_mode, VP8_BEST_QUALITY_ENCODING, VP8_REAL_TIME_ENCODING);
RANGE_CHECK(vp8_cfg, cpu_used, -16, 16);
- RANGE_CHECK(vp8_cfg, noise_sensitivity, 0, 6);
+ RANGE_CHECK_HI(vp8_cfg, noise_sensitivity, 6);
#else
RANGE_CHECK(vp8_cfg, encoding_mode, VP8_REAL_TIME_ENCODING, VP8_REAL_TIME_ENCODING);
@@ -177,10 +182,10 @@
#endif
RANGE_CHECK(vp8_cfg, token_partitions, VP8_ONE_TOKENPARTITION, VP8_EIGHT_TOKENPARTITION);
- RANGE_CHECK(vp8_cfg, Sharpness, 0, 7);
- RANGE_CHECK(vp8_cfg, arnr_max_frames, 0, 15);
- RANGE_CHECK(vp8_cfg, arnr_strength, 0, 6);
- RANGE_CHECK(vp8_cfg, arnr_type, 0, 0xffffffff);
+ RANGE_CHECK_HI(vp8_cfg, Sharpness, 7);
+ RANGE_CHECK_HI(vp8_cfg, arnr_max_frames, 15);
+ RANGE_CHECK_HI(vp8_cfg, arnr_strength, 6);
+ RANGE_CHECK_HI(vp8_cfg, arnr_type, 0xffffffff);
if (cfg->g_pass == VPX_RC_LAST_PASS)
{
« no previous file with comments | « source/libvpx/vp8/vp8_common.mk ('k') | source/libvpx/vp8/vp8_dx_iface.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698