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

Side by Side Diff: source/libvpx/vp8/encoder/onyx_if.c

Issue 232133009: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « source/libvpx/vp8/common/x86/postproc_sse2.asm ('k') | source/libvpx/vp8/encoder/rdopt.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 1383 matching lines...) Expand 10 before | Expand all | Expand 10 after
1394 static void update_layer_contexts (VP8_COMP *cpi) 1394 static void update_layer_contexts (VP8_COMP *cpi)
1395 { 1395 {
1396 VP8_CONFIG *oxcf = &cpi->oxcf; 1396 VP8_CONFIG *oxcf = &cpi->oxcf;
1397 1397
1398 /* Update snapshots of the layer contexts to reflect new parameters */ 1398 /* Update snapshots of the layer contexts to reflect new parameters */
1399 if (oxcf->number_of_layers > 1) 1399 if (oxcf->number_of_layers > 1)
1400 { 1400 {
1401 unsigned int i; 1401 unsigned int i;
1402 double prev_layer_framerate=0; 1402 double prev_layer_framerate=0;
1403 1403
1404 assert(oxcf->number_of_layers <= VPX_TS_MAX_LAYERS);
1404 for (i=0; i<oxcf->number_of_layers; i++) 1405 for (i=0; i<oxcf->number_of_layers; i++)
1405 { 1406 {
1406 LAYER_CONTEXT *lc = &cpi->layer_context[i]; 1407 LAYER_CONTEXT *lc = &cpi->layer_context[i];
1407 1408
1408 lc->framerate = 1409 lc->framerate =
1409 cpi->ref_framerate / oxcf->rate_decimator[i]; 1410 cpi->ref_framerate / oxcf->rate_decimator[i];
1410 lc->target_bandwidth = oxcf->target_bitrate[i] * 1000; 1411 lc->target_bandwidth = oxcf->target_bitrate[i] * 1000;
1411 1412
1412 lc->starting_buffer_level = rescale( 1413 lc->starting_buffer_level = rescale(
1413 (int)oxcf->starting_buffer_level_in_ms, 1414 (int)oxcf->starting_buffer_level_in_ms,
(...skipping 3650 matching lines...) Expand 10 before | Expand all | Expand 10 after
5064 avg_duration /= interval; 5065 avg_duration /= interval;
5065 5066
5066 cpi->ref_framerate = 10000000.0 / avg_duration; 5067 cpi->ref_framerate = 10000000.0 / avg_duration;
5067 } 5068 }
5068 5069
5069 if (cpi->oxcf.number_of_layers > 1) 5070 if (cpi->oxcf.number_of_layers > 1)
5070 { 5071 {
5071 unsigned int i; 5072 unsigned int i;
5072 5073
5073 /* Update frame rates for each layer */ 5074 /* Update frame rates for each layer */
5075 assert(cpi->oxcf.number_of_layers <= VPX_TS_MAX_LAYERS);
5074 for (i=0; i<cpi->oxcf.number_of_layers; i++) 5076 for (i=0; i<cpi->oxcf.number_of_layers; i++)
5075 { 5077 {
5076 LAYER_CONTEXT *lc = &cpi->layer_context[i]; 5078 LAYER_CONTEXT *lc = &cpi->layer_context[i];
5077 lc->framerate = cpi->ref_framerate / 5079 lc->framerate = cpi->ref_framerate /
5078 cpi->oxcf.rate_decimator[i]; 5080 cpi->oxcf.rate_decimator[i];
5079 } 5081 }
5080 } 5082 }
5081 else 5083 else
5082 vp8_new_framerate(cpi, cpi->ref_framerate); 5084 vp8_new_framerate(cpi, cpi->ref_framerate);
5083 } 5085 }
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after
5592 } 5594 }
5593 5595
5594 return Total; 5596 return Total;
5595 } 5597 }
5596 5598
5597 5599
5598 int vp8_get_quantizer(VP8_COMP *cpi) 5600 int vp8_get_quantizer(VP8_COMP *cpi)
5599 { 5601 {
5600 return cpi->common.base_qindex; 5602 return cpi->common.base_qindex;
5601 } 5603 }
OLDNEW
« no previous file with comments | « source/libvpx/vp8/common/x86/postproc_sse2.asm ('k') | source/libvpx/vp8/encoder/rdopt.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698