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

Side by Side Diff: source/libvpx/vp8/vp8_cx_iface.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/vp8/encoder/onyx_int.h ('k') | source/libvpx/vp9/common/vp9_alloccommon.h » ('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 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 printf("encode_breakout: %d\n", oxcf->encode_breakout); 440 printf("encode_breakout: %d\n", oxcf->encode_breakout);
441 */ 441 */
442 return VPX_CODEC_OK; 442 return VPX_CODEC_OK;
443 } 443 }
444 444
445 static vpx_codec_err_t vp8e_set_config(vpx_codec_alg_priv_t *ctx, 445 static vpx_codec_err_t vp8e_set_config(vpx_codec_alg_priv_t *ctx,
446 const vpx_codec_enc_cfg_t *cfg) 446 const vpx_codec_enc_cfg_t *cfg)
447 { 447 {
448 vpx_codec_err_t res; 448 vpx_codec_err_t res;
449 449
450 if (((cfg->g_w != ctx->cfg.g_w) || (cfg->g_h != ctx->cfg.g_h)) 450 if (cfg->g_w != ctx->cfg.g_w || cfg->g_h != ctx->cfg.g_h)
451 && (cfg->g_lag_in_frames > 1 || cfg->g_pass != VPX_RC_ONE_PASS)) 451 {
452 ERROR("Cannot change width or height after initialization"); 452 if (cfg->g_lag_in_frames > 1 || cfg->g_pass != VPX_RC_ONE_PASS)
453 ERROR("Cannot change width or height after initialization");
454 if ((ctx->cpi->initial_width && (int)cfg->g_w > ctx->cpi->initial_width) ||
455 (ctx->cpi->initial_height && (int)cfg->g_h > ctx->cpi->initial_heigh t))
456 ERROR("Cannot increast width or height larger than their initial val ues");
457 }
453 458
454 /* Prevent increasing lag_in_frames. This check is stricter than it needs 459 /* Prevent increasing lag_in_frames. This check is stricter than it needs
455 * to be -- the limit is not increasing past the first lag_in_frames 460 * to be -- the limit is not increasing past the first lag_in_frames
456 * value, but we don't track the initial config, only the last successful 461 * value, but we don't track the initial config, only the last successful
457 * config. 462 * config.
458 */ 463 */
459 if ((cfg->g_lag_in_frames > ctx->cfg.g_lag_in_frames)) 464 if ((cfg->g_lag_in_frames > ctx->cfg.g_lag_in_frames))
460 ERROR("Cannot increase lag_in_frames"); 465 ERROR("Cannot increase lag_in_frames");
461 466
462 res = validate_config(ctx, cfg, &ctx->vp8_cfg, 0); 467 res = validate_config(ctx, cfg, &ctx->vp8_cfg, 0);
(...skipping 923 matching lines...) Expand 10 before | Expand all | Expand 10 after
1386 1, /* 1 cfg map */ 1391 1, /* 1 cfg map */
1387 vp8e_usage_cfg_map, /* vpx_codec_enc_cfg_map_t peek_si; */ 1392 vp8e_usage_cfg_map, /* vpx_codec_enc_cfg_map_t peek_si; */
1388 vp8e_encode, /* vpx_codec_encode_fn_t encode; */ 1393 vp8e_encode, /* vpx_codec_encode_fn_t encode; */
1389 vp8e_get_cxdata, /* vpx_codec_get_cx_data_fn_t frame_get; */ 1394 vp8e_get_cxdata, /* vpx_codec_get_cx_data_fn_t frame_get; */
1390 vp8e_set_config, 1395 vp8e_set_config,
1391 NULL, 1396 NULL,
1392 vp8e_get_preview, 1397 vp8e_get_preview,
1393 vp8e_mr_alloc_mem, 1398 vp8e_mr_alloc_mem,
1394 } /* encoder functions */ 1399 } /* encoder functions */
1395 }; 1400 };
OLDNEW
« no previous file with comments | « source/libvpx/vp8/encoder/onyx_int.h ('k') | source/libvpx/vp9/common/vp9_alloccommon.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698