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

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

Issue 1162573005: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 6 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_rdopt.c ('k') | source/libvpx/vp9/encoder/vp9_speed_features.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) 2014 The WebM project authors. All Rights Reserved. 2 * Copyright (c) 2014 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 <assert.h> 11 #include <assert.h>
12 #include <limits.h> 12 #include <limits.h>
13 #include <math.h> 13 #include <math.h>
14 #include <stdio.h> 14 #include <stdio.h>
15 #include <stdlib.h> 15 #include <stdlib.h>
16 #include <string.h> 16 #include <string.h>
17 17
18 #include "vpx_ports/mem.h"
18 #include "vp9/common/vp9_common.h" 19 #include "vp9/common/vp9_common.h"
19 #include "vp9/encoder/vp9_resize.h" 20 #include "vp9/encoder/vp9_resize.h"
20 21
21 #define FILTER_BITS 7 22 #define FILTER_BITS 7
22 23
23 #define INTERP_TAPS 8 24 #define INTERP_TAPS 8
24 #define SUBPEL_BITS 5 25 #define SUBPEL_BITS 5
25 #define SUBPEL_MASK ((1 << SUBPEL_BITS) - 1) 26 #define SUBPEL_MASK ((1 << SUBPEL_BITS) - 1)
26 #define INTERP_PRECISION_BITS 32 27 #define INTERP_PRECISION_BITS 32
27 28
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
420 } 421 }
421 } 422 }
422 423
423 static int get_down2_length(int length, int steps) { 424 static int get_down2_length(int length, int steps) {
424 int s; 425 int s;
425 for (s = 0; s < steps; ++s) 426 for (s = 0; s < steps; ++s)
426 length = (length + 1) >> 1; 427 length = (length + 1) >> 1;
427 return length; 428 return length;
428 } 429 }
429 430
430 int get_down2_steps(int in_length, int out_length) { 431 static int get_down2_steps(int in_length, int out_length) {
431 int steps = 0; 432 int steps = 0;
432 int proj_in_length; 433 int proj_in_length;
433 while ((proj_in_length = get_down2_length(in_length, 1)) >= out_length) { 434 while ((proj_in_length = get_down2_length(in_length, 1)) >= out_length) {
434 ++steps; 435 ++steps;
435 in_length = proj_in_length; 436 in_length = proj_in_length;
436 } 437 }
437 return steps; 438 return steps;
438 } 439 }
439 440
440 static void resize_multistep(const uint8_t *const input, 441 static void resize_multistep(const uint8_t *const input,
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after
915 uint8_t *ou, uint8_t *ov, int ouv_stride, 916 uint8_t *ou, uint8_t *ov, int ouv_stride,
916 int oheight, int owidth, int bd) { 917 int oheight, int owidth, int bd) {
917 vp9_highbd_resize_plane(y, height, width, y_stride, 918 vp9_highbd_resize_plane(y, height, width, y_stride,
918 oy, oheight, owidth, oy_stride, bd); 919 oy, oheight, owidth, oy_stride, bd);
919 vp9_highbd_resize_plane(u, height, width, uv_stride, 920 vp9_highbd_resize_plane(u, height, width, uv_stride,
920 ou, oheight, owidth, ouv_stride, bd); 921 ou, oheight, owidth, ouv_stride, bd);
921 vp9_highbd_resize_plane(v, height, width, uv_stride, 922 vp9_highbd_resize_plane(v, height, width, uv_stride,
922 ov, oheight, owidth, ouv_stride, bd); 923 ov, oheight, owidth, ouv_stride, bd);
923 } 924 }
924 #endif // CONFIG_VP9_HIGHBITDEPTH 925 #endif // CONFIG_VP9_HIGHBITDEPTH
OLDNEW
« no previous file with comments | « source/libvpx/vp9/encoder/vp9_rdopt.c ('k') | source/libvpx/vp9/encoder/vp9_speed_features.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698