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

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

Issue 1124333011: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: only update to last nights LKGR Created 5 years, 7 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/vp9/encoder/vp9_dct.c ('k') | source/libvpx/vp9/encoder/vp9_encodeframe.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) 2012 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 int increase_denoising, 196 int increase_denoising,
197 int mi_row, 197 int mi_row,
198 int mi_col, 198 int mi_col,
199 PICK_MODE_CONTEXT *ctx, 199 PICK_MODE_CONTEXT *ctx,
200 int *motion_magnitude 200 int *motion_magnitude
201 ) { 201 ) {
202 int mv_col, mv_row; 202 int mv_col, mv_row;
203 int sse_diff = ctx->zeromv_sse - ctx->newmv_sse; 203 int sse_diff = ctx->zeromv_sse - ctx->newmv_sse;
204 MV_REFERENCE_FRAME frame; 204 MV_REFERENCE_FRAME frame;
205 MACROBLOCKD *filter_mbd = &mb->e_mbd; 205 MACROBLOCKD *filter_mbd = &mb->e_mbd;
206 MB_MODE_INFO *mbmi = &filter_mbd->mi[0].src_mi->mbmi; 206 MB_MODE_INFO *mbmi = &filter_mbd->mi[0]->mbmi;
207 MB_MODE_INFO saved_mbmi; 207 MB_MODE_INFO saved_mbmi;
208 int i, j; 208 int i, j;
209 struct buf_2d saved_dst[MAX_MB_PLANE]; 209 struct buf_2d saved_dst[MAX_MB_PLANE];
210 struct buf_2d saved_pre[MAX_MB_PLANE][2]; // 2 pre buffers 210 struct buf_2d saved_pre[MAX_MB_PLANE][2]; // 2 pre buffers
211 211
212 mv_col = ctx->best_sse_mv.as_mv.col; 212 mv_col = ctx->best_sse_mv.as_mv.col;
213 mv_row = ctx->best_sse_mv.as_mv.row; 213 mv_row = ctx->best_sse_mv.as_mv.row;
214 *motion_magnitude = mv_row * mv_row + mv_col * mv_col; 214 *motion_magnitude = mv_row * mv_row + mv_col * mv_col;
215 frame = ctx->best_reference_frame; 215 frame = ctx->best_reference_frame;
216 216
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
350 350
351 static void copy_frame(YV12_BUFFER_CONFIG dest, const YV12_BUFFER_CONFIG src) { 351 static void copy_frame(YV12_BUFFER_CONFIG dest, const YV12_BUFFER_CONFIG src) {
352 int r; 352 int r;
353 const uint8_t *srcbuf = src.y_buffer; 353 const uint8_t *srcbuf = src.y_buffer;
354 uint8_t *destbuf = dest.y_buffer; 354 uint8_t *destbuf = dest.y_buffer;
355 355
356 assert(dest.y_width == src.y_width); 356 assert(dest.y_width == src.y_width);
357 assert(dest.y_height == src.y_height); 357 assert(dest.y_height == src.y_height);
358 358
359 for (r = 0; r < dest.y_height; ++r) { 359 for (r = 0; r < dest.y_height; ++r) {
360 vpx_memcpy(destbuf, srcbuf, dest.y_width); 360 memcpy(destbuf, srcbuf, dest.y_width);
361 destbuf += dest.y_stride; 361 destbuf += dest.y_stride;
362 srcbuf += src.y_stride; 362 srcbuf += src.y_stride;
363 } 363 }
364 } 364 }
365 365
366 static void swap_frame_buffer(YV12_BUFFER_CONFIG *dest, 366 static void swap_frame_buffer(YV12_BUFFER_CONFIG *dest,
367 YV12_BUFFER_CONFIG *src) { 367 YV12_BUFFER_CONFIG *src) {
368 uint8_t *tmp_buf = dest->y_buffer; 368 uint8_t *tmp_buf = dest->y_buffer;
369 assert(dest->y_width == src->y_width); 369 assert(dest->y_width == src->y_width);
370 assert(dest->y_height == src->y_height); 370 assert(dest->y_height == src->y_height);
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 for (r = 0; r < yuv->uv_height; ++r) { 489 for (r = 0; r < yuv->uv_height; ++r) {
490 for (c = 0; c < yuv->uv_width; ++c) { 490 for (c = 0; c < yuv->uv_width; ++c) {
491 u[c] = UINT8_MAX / 2; 491 u[c] = UINT8_MAX / 2;
492 v[c] = UINT8_MAX / 2; 492 v[c] = UINT8_MAX / 2;
493 } 493 }
494 u += yuv->uv_stride; 494 u += yuv->uv_stride;
495 v += yuv->uv_stride; 495 v += yuv->uv_stride;
496 } 496 }
497 } 497 }
498 #endif 498 #endif
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_dct.c ('k') | source/libvpx/vp9/encoder/vp9_encodeframe.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698