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

Side by Side Diff: source/libvpx/examples/resize_util.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/examples/postproc.c ('k') | source/libvpx/examples/set_maps.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 "../tools_common.h"
18 #include "../vp9/encoder/vp9_resize.h" 19 #include "../vp9/encoder/vp9_resize.h"
19 20
20 static const char *exec_name = NULL; 21 static const char *exec_name = NULL;
21 22
22 static void usage() { 23 static void usage() {
23 printf("Usage:\n"); 24 printf("Usage:\n");
24 printf("%s <input_yuv> <width>x<height> <target_width>x<target_height> ", 25 printf("%s <input_yuv> <width>x<height> <target_width>x<target_height> ",
25 exec_name); 26 exec_name);
26 printf("<output_yuv> [<frames>]\n"); 27 printf("<output_yuv> [<frames>]\n");
27 } 28 }
28 29
29 void usage_exit() { 30 void usage_exit(void) {
30 usage(); 31 usage();
31 exit(EXIT_FAILURE); 32 exit(EXIT_FAILURE);
32 } 33 }
33 34
34 static int parse_dim(char *v, int *width, int *height) { 35 static int parse_dim(char *v, int *width, int *height) {
35 char *x = strchr(v, 'x'); 36 char *x = strchr(v, 'x');
36 if (x == NULL) 37 if (x == NULL)
37 x = strchr(v, 'X'); 38 x = strchr(v, 'X');
38 if (x == NULL) 39 if (x == NULL)
39 return 0; 40 return 0;
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
120 f++; 121 f++;
121 } 122 }
122 printf("%d frames processed\n", f); 123 printf("%d frames processed\n", f);
123 fclose(fpin); 124 fclose(fpin);
124 fclose(fpout); 125 fclose(fpout);
125 126
126 free(inbuf); 127 free(inbuf);
127 free(outbuf); 128 free(outbuf);
128 return 0; 129 return 0;
129 } 130 }
OLDNEW
« no previous file with comments | « source/libvpx/examples/postproc.c ('k') | source/libvpx/examples/set_maps.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698