OLD | NEW |
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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
51 #include <stdlib.h> | 51 #include <stdlib.h> |
52 #include <string.h> | 52 #include <string.h> |
53 | 53 |
54 #include "vpx/vpx_encoder.h" | 54 #include "vpx/vpx_encoder.h" |
55 | 55 |
56 #include "../tools_common.h" | 56 #include "../tools_common.h" |
57 #include "../video_writer.h" | 57 #include "../video_writer.h" |
58 | 58 |
59 static const char *exec_name; | 59 static const char *exec_name; |
60 | 60 |
61 void usage_exit() { | 61 void usage_exit(void) { |
62 fprintf(stderr, "Usage: %s <codec> <width> <height> <infile> <outfile>\n", | 62 fprintf(stderr, "Usage: %s <codec> <width> <height> <infile> <outfile>\n", |
63 exec_name); | 63 exec_name); |
64 exit(EXIT_FAILURE); | 64 exit(EXIT_FAILURE); |
65 } | 65 } |
66 | 66 |
67 static int get_frame_stats(vpx_codec_ctx_t *ctx, | 67 static int get_frame_stats(vpx_codec_ctx_t *ctx, |
68 const vpx_image_t *img, | 68 const vpx_image_t *img, |
69 vpx_codec_pts_t pts, | 69 vpx_codec_pts_t pts, |
70 unsigned int duration, | 70 unsigned int duration, |
71 vpx_enc_frame_flags_t flags, | 71 vpx_enc_frame_flags_t flags, |
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 cfg.g_pass = VPX_RC_LAST_PASS; | 256 cfg.g_pass = VPX_RC_LAST_PASS; |
257 cfg.rc_twopass_stats_in = stats; | 257 cfg.rc_twopass_stats_in = stats; |
258 pass1(&raw, infile, outfile_arg, encoder, &cfg); | 258 pass1(&raw, infile, outfile_arg, encoder, &cfg); |
259 free(stats.buf); | 259 free(stats.buf); |
260 | 260 |
261 vpx_img_free(&raw); | 261 vpx_img_free(&raw); |
262 fclose(infile); | 262 fclose(infile); |
263 | 263 |
264 return EXIT_SUCCESS; | 264 return EXIT_SUCCESS; |
265 } | 265 } |
OLD | NEW |