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

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

Issue 415333002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 4 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/encoder/denoising.c ('k') | source/libvpx/vp8/vp8_cx_iface.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 1387 matching lines...) Expand 10 before | Expand all | Expand 10 after
1398 { 1398 {
1399 VP8_CONFIG *oxcf = &cpi->oxcf; 1399 VP8_CONFIG *oxcf = &cpi->oxcf;
1400 1400
1401 /* Update snapshots of the layer contexts to reflect new parameters */ 1401 /* Update snapshots of the layer contexts to reflect new parameters */
1402 if (oxcf->number_of_layers > 1) 1402 if (oxcf->number_of_layers > 1)
1403 { 1403 {
1404 unsigned int i; 1404 unsigned int i;
1405 double prev_layer_framerate=0; 1405 double prev_layer_framerate=0;
1406 1406
1407 assert(oxcf->number_of_layers <= VPX_TS_MAX_LAYERS); 1407 assert(oxcf->number_of_layers <= VPX_TS_MAX_LAYERS);
1408 for (i=0; i<oxcf->number_of_layers; i++) 1408 for (i = 0; i < oxcf->number_of_layers && i < VPX_TS_MAX_LAYERS; ++i)
1409 { 1409 {
1410 LAYER_CONTEXT *lc = &cpi->layer_context[i]; 1410 LAYER_CONTEXT *lc = &cpi->layer_context[i];
1411 1411
1412 lc->framerate = 1412 lc->framerate =
1413 cpi->ref_framerate / oxcf->rate_decimator[i]; 1413 cpi->ref_framerate / oxcf->rate_decimator[i];
1414 lc->target_bandwidth = oxcf->target_bitrate[i] * 1000; 1414 lc->target_bandwidth = oxcf->target_bitrate[i] * 1000;
1415 1415
1416 lc->starting_buffer_level = rescale( 1416 lc->starting_buffer_level = rescale(
1417 (int)oxcf->starting_buffer_level_in_ms, 1417 (int)oxcf->starting_buffer_level_in_ms,
1418 lc->target_bandwidth, 1000); 1418 lc->target_bandwidth, 1000);
(...skipping 1806 matching lines...) Expand 10 before | Expand all | Expand 10 after
3225 #if CONFIG_TEMPORAL_DENOISING 3225 #if CONFIG_TEMPORAL_DENOISING
3226 if (cpi->oxcf.noise_sensitivity) 3226 if (cpi->oxcf.noise_sensitivity)
3227 { 3227 {
3228 /* we shouldn't have to keep multiple copies as we know in advance which 3228 /* we shouldn't have to keep multiple copies as we know in advance which
3229 * buffer we should start - for now to get something up and running 3229 * buffer we should start - for now to get something up and running
3230 * I've chosen to copy the buffers 3230 * I've chosen to copy the buffers
3231 */ 3231 */
3232 if (cm->frame_type == KEY_FRAME) 3232 if (cm->frame_type == KEY_FRAME)
3233 { 3233 {
3234 int i; 3234 int i;
3235 vp8_yv12_copy_frame( 3235 for (i = LAST_FRAME; i < MAX_REF_FRAMES; ++i)
3236 cpi->Source, 3236 vp8_yv12_copy_frame(cpi->Source,
3237 &cpi->denoiser.yv12_running_avg[LAST_FRAME]); 3237 &cpi->denoiser.yv12_running_avg[i]);
3238
3239 vp8_yv12_extend_frame_borders(
3240 &cpi->denoiser.yv12_running_avg[LAST_FRAME]);
3241
3242 for (i = 2; i < MAX_REF_FRAMES - 1; i++)
3243 vp8_yv12_copy_frame(
3244 &cpi->denoiser.yv12_running_avg[LAST_FRAME],
3245 &cpi->denoiser.yv12_running_avg[i]);
3246 } 3238 }
3247 else /* For non key frames */ 3239 else /* For non key frames */
3248 { 3240 {
3249 vp8_yv12_extend_frame_borders( 3241 vp8_yv12_extend_frame_borders(
3250 &cpi->denoiser.yv12_running_avg[INTRA_FRAME]); 3242 &cpi->denoiser.yv12_running_avg[INTRA_FRAME]);
3251 3243
3252 if (cm->refresh_alt_ref_frame || cm->copy_buffer_to_arf) 3244 if (cm->refresh_alt_ref_frame || cm->copy_buffer_to_arf)
3253 { 3245 {
3254 vp8_yv12_copy_frame( 3246 vp8_yv12_copy_frame(
3255 &cpi->denoiser.yv12_running_avg[INTRA_FRAME], 3247 &cpi->denoiser.yv12_running_avg[INTRA_FRAME],
(...skipping 1774 matching lines...) Expand 10 before | Expand all | Expand 10 after
5030 5022
5031 cpi->ref_framerate = 10000000.0 / avg_duration; 5023 cpi->ref_framerate = 10000000.0 / avg_duration;
5032 } 5024 }
5033 5025
5034 if (cpi->oxcf.number_of_layers > 1) 5026 if (cpi->oxcf.number_of_layers > 1)
5035 { 5027 {
5036 unsigned int i; 5028 unsigned int i;
5037 5029
5038 /* Update frame rates for each layer */ 5030 /* Update frame rates for each layer */
5039 assert(cpi->oxcf.number_of_layers <= VPX_TS_MAX_LAYERS); 5031 assert(cpi->oxcf.number_of_layers <= VPX_TS_MAX_LAYERS);
5040 for (i=0; i<cpi->oxcf.number_of_layers; i++) 5032 for (i = 0; i < cpi->oxcf.number_of_layers &&
5033 i < VPX_TS_MAX_LAYERS; ++i)
5041 { 5034 {
5042 LAYER_CONTEXT *lc = &cpi->layer_context[i]; 5035 LAYER_CONTEXT *lc = &cpi->layer_context[i];
5043 lc->framerate = cpi->ref_framerate / 5036 lc->framerate = cpi->ref_framerate /
5044 cpi->oxcf.rate_decimator[i]; 5037 cpi->oxcf.rate_decimator[i];
5045 } 5038 }
5046 } 5039 }
5047 else 5040 else
5048 vp8_new_framerate(cpi, cpi->ref_framerate); 5041 vp8_new_framerate(cpi, cpi->ref_framerate);
5049 } 5042 }
5050 5043
(...skipping 499 matching lines...) Expand 10 before | Expand all | Expand 10 after
5550 } 5543 }
5551 5544
5552 return Total; 5545 return Total;
5553 } 5546 }
5554 5547
5555 5548
5556 int vp8_get_quantizer(VP8_COMP *cpi) 5549 int vp8_get_quantizer(VP8_COMP *cpi)
5557 { 5550 {
5558 return cpi->common.base_qindex; 5551 return cpi->common.base_qindex;
5559 } 5552 }
OLDNEW
« no previous file with comments | « source/libvpx/vp8/encoder/denoising.c ('k') | source/libvpx/vp8/vp8_cx_iface.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698