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

Side by Side Diff: source/libvpx/vpxenc.c

Issue 898943004: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « source/libvpx/vpx/vpx_frame_buffer.h ('k') | source/libvpx/vpxstats.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 static const struct arg_enum_list test_decode_enum[] = { 176 static const struct arg_enum_list test_decode_enum[] = {
177 {"off", TEST_DECODE_OFF}, 177 {"off", TEST_DECODE_OFF},
178 {"fatal", TEST_DECODE_FATAL}, 178 {"fatal", TEST_DECODE_FATAL},
179 {"warn", TEST_DECODE_WARN}, 179 {"warn", TEST_DECODE_WARN},
180 {NULL, 0} 180 {NULL, 0}
181 }; 181 };
182 static const arg_def_t recontest = ARG_DEF_ENUM( 182 static const arg_def_t recontest = ARG_DEF_ENUM(
183 NULL, "test-decode", 1, "Test encode/decode mismatch", test_decode_enum); 183 NULL, "test-decode", 1, "Test encode/decode mismatch", test_decode_enum);
184 static const arg_def_t framerate = ARG_DEF( 184 static const arg_def_t framerate = ARG_DEF(
185 NULL, "fps", 1, "Stream frame rate (rate/scale)"); 185 NULL, "fps", 1, "Stream frame rate (rate/scale)");
186 static const arg_def_t use_webm = ARG_DEF(
187 NULL, "webm", 0, "Output WebM (default when WebM IO is enabled)");
186 static const arg_def_t use_ivf = ARG_DEF( 188 static const arg_def_t use_ivf = ARG_DEF(
187 NULL, "ivf", 0, "Output IVF (default is WebM if WebM IO is enabled)"); 189 NULL, "ivf", 0, "Output IVF");
188 static const arg_def_t out_part = ARG_DEF( 190 static const arg_def_t out_part = ARG_DEF(
189 "P", "output-partitions", 0, 191 "P", "output-partitions", 0,
190 "Makes encoder output partitions. Requires IVF output!"); 192 "Makes encoder output partitions. Requires IVF output!");
191 static const arg_def_t q_hist_n = ARG_DEF( 193 static const arg_def_t q_hist_n = ARG_DEF(
192 NULL, "q-hist", 1, "Show quantizer histogram (n-buckets)"); 194 NULL, "q-hist", 1, "Show quantizer histogram (n-buckets)");
193 static const arg_def_t rate_hist_n = ARG_DEF( 195 static const arg_def_t rate_hist_n = ARG_DEF(
194 NULL, "rate-hist", 1, "Show rate histogram (n-buckets)"); 196 NULL, "rate-hist", 1, "Show rate histogram (n-buckets)");
195 static const arg_def_t disable_warnings = ARG_DEF( 197 static const arg_def_t disable_warnings = ARG_DEF(
196 NULL, "disable-warnings", 0, 198 NULL, "disable-warnings", 0,
197 "Disable warnings about potentially incorrect encode settings."); 199 "Disable warnings about potentially incorrect encode settings.");
198 static const arg_def_t disable_warning_prompt = ARG_DEF( 200 static const arg_def_t disable_warning_prompt = ARG_DEF(
199 "y", "disable-warning-prompt", 0, 201 "y", "disable-warning-prompt", 0,
200 "Display warnings, but do not prompt user to continue."); 202 "Display warnings, but do not prompt user to continue.");
201 203
202 #if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH 204 #if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
203 static const arg_def_t test16bitinternalarg = ARG_DEF( 205 static const arg_def_t test16bitinternalarg = ARG_DEF(
204 NULL, "test-16bit-internal", 0, "Force use of 16 bit internal buffer"); 206 NULL, "test-16bit-internal", 0, "Force use of 16 bit internal buffer");
205 #endif 207 #endif
206 208
207 static const arg_def_t *main_args[] = { 209 static const arg_def_t *main_args[] = {
208 &debugmode, 210 &debugmode,
209 &outputfile, &codecarg, &passes, &pass_arg, &fpf_name, &limit, &skip, 211 &outputfile, &codecarg, &passes, &pass_arg, &fpf_name, &limit, &skip,
210 &deadline, &best_dl, &good_dl, &rt_dl, 212 &deadline, &best_dl, &good_dl, &rt_dl,
211 &quietarg, &verbosearg, &psnrarg, &use_ivf, &out_part, &q_hist_n, 213 &quietarg, &verbosearg, &psnrarg, &use_webm, &use_ivf, &out_part, &q_hist_n,
212 &rate_hist_n, &disable_warnings, &disable_warning_prompt, 214 &rate_hist_n, &disable_warnings, &disable_warning_prompt,
213 NULL 215 NULL
214 }; 216 };
215 217
216 static const arg_def_t usage = ARG_DEF( 218 static const arg_def_t usage = ARG_DEF(
217 "u", "usage", 1, "Usage profile number to use"); 219 "u", "usage", 1, "Usage profile number to use");
218 static const arg_def_t threads = ARG_DEF( 220 static const arg_def_t threads = ARG_DEF(
219 "t", "threads", 1, "Max number of threads to use"); 221 "t", "threads", 1, "Max number of threads to use");
220 static const arg_def_t profile = ARG_DEF( 222 static const arg_def_t profile = ARG_DEF(
221 NULL, "profile", 1, "Bitstream profile number to use"); 223 NULL, "profile", 1, "Bitstream profile number to use");
(...skipping 830 matching lines...) Expand 10 before | Expand all | Expand 10 after
1052 1054
1053 if (0) { 1055 if (0) {
1054 } else if (arg_match(&arg, &outputfile, argi)) { 1056 } else if (arg_match(&arg, &outputfile, argi)) {
1055 config->out_fn = arg.val; 1057 config->out_fn = arg.val;
1056 } else if (arg_match(&arg, &fpf_name, argi)) { 1058 } else if (arg_match(&arg, &fpf_name, argi)) {
1057 config->stats_fn = arg.val; 1059 config->stats_fn = arg.val;
1058 #if CONFIG_FP_MB_STATS 1060 #if CONFIG_FP_MB_STATS
1059 } else if (arg_match(&arg, &fpmbf_name, argi)) { 1061 } else if (arg_match(&arg, &fpmbf_name, argi)) {
1060 config->fpmb_stats_fn = arg.val; 1062 config->fpmb_stats_fn = arg.val;
1061 #endif 1063 #endif
1064 } else if (arg_match(&arg, &use_webm, argi)) {
1065 #if CONFIG_WEBM_IO
1066 config->write_webm = 1;
1067 #else
1068 die("Error: --webm specified but webm is disabled.");
1069 #endif
1062 } else if (arg_match(&arg, &use_ivf, argi)) { 1070 } else if (arg_match(&arg, &use_ivf, argi)) {
1063 config->write_webm = 0; 1071 config->write_webm = 0;
1064 } else if (arg_match(&arg, &threads, argi)) { 1072 } else if (arg_match(&arg, &threads, argi)) {
1065 config->cfg.g_threads = arg_parse_uint(&arg); 1073 config->cfg.g_threads = arg_parse_uint(&arg);
1066 } else if (arg_match(&arg, &profile, argi)) { 1074 } else if (arg_match(&arg, &profile, argi)) {
1067 config->cfg.g_profile = arg_parse_uint(&arg); 1075 config->cfg.g_profile = arg_parse_uint(&arg);
1068 } else if (arg_match(&arg, &width, argi)) { 1076 } else if (arg_match(&arg, &width, argi)) {
1069 config->cfg.g_w = arg_parse_uint(&arg); 1077 config->cfg.g_w = arg_parse_uint(&arg);
1070 } else if (arg_match(&arg, &height, argi)) { 1078 } else if (arg_match(&arg, &height, argi)) {
1071 config->cfg.g_h = arg_parse_uint(&arg); 1079 config->cfg.g_h = arg_parse_uint(&arg);
(...skipping 1162 matching lines...) Expand 10 before | Expand all | Expand 10 after
2234 2242
2235 #if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH 2243 #if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
2236 if (allocated_raw_shift) 2244 if (allocated_raw_shift)
2237 vpx_img_free(&raw_shift); 2245 vpx_img_free(&raw_shift);
2238 #endif 2246 #endif
2239 vpx_img_free(&raw); 2247 vpx_img_free(&raw);
2240 free(argv); 2248 free(argv);
2241 free(streams); 2249 free(streams);
2242 return res ? EXIT_FAILURE : EXIT_SUCCESS; 2250 return res ? EXIT_FAILURE : EXIT_SUCCESS;
2243 } 2251 }
OLDNEW
« no previous file with comments | « source/libvpx/vpx/vpx_frame_buffer.h ('k') | source/libvpx/vpxstats.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698