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

Side by Side Diff: source/libvpx/vp9/encoder/vp9_temporal_filter.c

Issue 1302353004: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 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 unified diff | Download patch
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
11 #include <math.h> 11 #include <math.h>
12 #include <limits.h> 12 #include <limits.h>
13 13
14 #include "vp9/common/vp9_alloccommon.h" 14 #include "vp9/common/vp9_alloccommon.h"
15 #include "vp9/common/vp9_onyxc_int.h" 15 #include "vp9/common/vp9_onyxc_int.h"
16 #include "vp9/common/vp9_quant_common.h" 16 #include "vp9/common/vp9_quant_common.h"
17 #include "vp9/common/vp9_reconinter.h" 17 #include "vp9/common/vp9_reconinter.h"
18 #include "vp9/common/vp9_systemdependent.h"
19 #include "vp9/encoder/vp9_extend.h" 18 #include "vp9/encoder/vp9_extend.h"
20 #include "vp9/encoder/vp9_firstpass.h" 19 #include "vp9/encoder/vp9_firstpass.h"
21 #include "vp9/encoder/vp9_mcomp.h" 20 #include "vp9/encoder/vp9_mcomp.h"
22 #include "vp9/encoder/vp9_encoder.h" 21 #include "vp9/encoder/vp9_encoder.h"
23 #include "vp9/encoder/vp9_quantize.h" 22 #include "vp9/encoder/vp9_quantize.h"
24 #include "vp9/encoder/vp9_ratectrl.h" 23 #include "vp9/encoder/vp9_ratectrl.h"
25 #include "vp9/encoder/vp9_segmentation.h" 24 #include "vp9/encoder/vp9_segmentation.h"
26 #include "vp9/encoder/vp9_temporal_filter.h" 25 #include "vp9/encoder/vp9_temporal_filter.h"
27 #include "vpx_mem/vpx_mem.h" 26 #include "vpx_mem/vpx_mem.h"
28 #include "vpx_ports/mem.h" 27 #include "vpx_ports/mem.h"
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 best_ref_mv1_full.col = best_ref_mv1.col >> 3; 235 best_ref_mv1_full.col = best_ref_mv1.col >> 3;
237 best_ref_mv1_full.row = best_ref_mv1.row >> 3; 236 best_ref_mv1_full.row = best_ref_mv1.row >> 3;
238 237
239 // Setup frame pointers 238 // Setup frame pointers
240 x->plane[0].src.buf = arf_frame_buf; 239 x->plane[0].src.buf = arf_frame_buf;
241 x->plane[0].src.stride = stride; 240 x->plane[0].src.stride = stride;
242 xd->plane[0].pre[0].buf = frame_ptr_buf; 241 xd->plane[0].pre[0].buf = frame_ptr_buf;
243 xd->plane[0].pre[0].stride = stride; 242 xd->plane[0].pre[0].stride = stride;
244 243
245 step_param = mv_sf->reduce_first_step_size; 244 step_param = mv_sf->reduce_first_step_size;
246 step_param = MIN(step_param, MAX_MVSEARCH_STEPS - 2); 245 step_param = VPXMIN(step_param, MAX_MVSEARCH_STEPS - 2);
247 246
248 // Ignore mv costing by sending NULL pointer instead of cost arrays 247 // Ignore mv costing by sending NULL pointer instead of cost arrays
249 vp9_hex_search(x, &best_ref_mv1_full, step_param, sadpb, 1, 248 vp9_hex_search(x, &best_ref_mv1_full, step_param, sadpb, 1,
250 cond_cost_list(cpi, cost_list), 249 cond_cost_list(cpi, cost_list),
251 &cpi->fn_ptr[BLOCK_16X16], 0, &best_ref_mv1, ref_mv); 250 &cpi->fn_ptr[BLOCK_16X16], 0, &best_ref_mv1, ref_mv);
252 251
253 // Ignore mv costing by sending NULL pointer instead of cost array 252 // Ignore mv costing by sending NULL pointer instead of cost array
254 bestsme = cpi->find_fractional_mv_step(x, ref_mv, 253 bestsme = cpi->find_fractional_mv_step(x, ref_mv,
255 &best_ref_mv1, 254 &best_ref_mv1,
256 cpi->common.allow_high_precision_mv, 255 cpi->common.allow_high_precision_mv,
(...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after
699 &sf, 698 &sf,
700 get_frame_new_buffer(cm)->y_crop_width, 699 get_frame_new_buffer(cm)->y_crop_width,
701 get_frame_new_buffer(cm)->y_crop_height, 700 get_frame_new_buffer(cm)->y_crop_height,
702 get_frame_new_buffer(cm)->y_crop_width, 701 get_frame_new_buffer(cm)->y_crop_width,
703 get_frame_new_buffer(cm)->y_crop_height); 702 get_frame_new_buffer(cm)->y_crop_height);
704 #endif // CONFIG_VP9_HIGHBITDEPTH 703 #endif // CONFIG_VP9_HIGHBITDEPTH
705 704
706 for (frame = 0; frame < frames_to_blur; ++frame) { 705 for (frame = 0; frame < frames_to_blur; ++frame) {
707 if (cm->mi_cols * MI_SIZE != frames[frame]->y_width || 706 if (cm->mi_cols * MI_SIZE != frames[frame]->y_width ||
708 cm->mi_rows * MI_SIZE != frames[frame]->y_height) { 707 cm->mi_rows * MI_SIZE != frames[frame]->y_height) {
709 if (vp9_realloc_frame_buffer(&cpi->svc.scaled_frames[frame_used], 708 if (vpx_realloc_frame_buffer(&cpi->svc.scaled_frames[frame_used],
710 cm->width, cm->height, 709 cm->width, cm->height,
711 cm->subsampling_x, cm->subsampling_y, 710 cm->subsampling_x, cm->subsampling_y,
712 #if CONFIG_VP9_HIGHBITDEPTH 711 #if CONFIG_VP9_HIGHBITDEPTH
713 cm->use_highbitdepth, 712 cm->use_highbitdepth,
714 #endif 713 #endif
715 VP9_ENC_BORDER_IN_PIXELS, 714 VP9_ENC_BORDER_IN_PIXELS,
716 cm->byte_alignment, 715 cm->byte_alignment,
717 NULL, NULL, NULL)) { 716 NULL, NULL, NULL)) {
718 vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR, 717 vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
719 "Failed to reallocate alt_ref_buffer"); 718 "Failed to reallocate alt_ref_buffer");
(...skipping 21 matching lines...) Expand all
741 frames[0]->y_crop_height, 740 frames[0]->y_crop_height,
742 frames[0]->y_crop_width, 741 frames[0]->y_crop_width,
743 frames[0]->y_crop_height); 742 frames[0]->y_crop_height);
744 #endif // CONFIG_VP9_HIGHBITDEPTH 743 #endif // CONFIG_VP9_HIGHBITDEPTH
745 } 744 }
746 } 745 }
747 746
748 temporal_filter_iterate_c(cpi, frames, frames_to_blur, 747 temporal_filter_iterate_c(cpi, frames, frames_to_blur,
749 frames_to_blur_backward, strength, &sf); 748 frames_to_blur_backward, strength, &sf);
750 } 749 }
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_svc_layercontext.c ('k') | source/libvpx/vp9/encoder/x86/vp9_dct_mmx.asm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698