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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 #include <string.h> | 48 #include <string.h> |
49 | 49 |
50 #include "vpx/vp8cx.h" | 50 #include "vpx/vp8cx.h" |
51 #include "vpx/vpx_encoder.h" | 51 #include "vpx/vpx_encoder.h" |
52 | 52 |
53 #include "../tools_common.h" | 53 #include "../tools_common.h" |
54 #include "../video_writer.h" | 54 #include "../video_writer.h" |
55 | 55 |
56 static const char *exec_name; | 56 static const char *exec_name; |
57 | 57 |
58 void usage_exit() { | 58 void usage_exit(void) { |
59 fprintf(stderr, "Usage: %s <codec> <width> <height> <infile> <outfile>\n", | 59 fprintf(stderr, "Usage: %s <codec> <width> <height> <infile> <outfile>\n", |
60 exec_name); | 60 exec_name); |
61 exit(EXIT_FAILURE); | 61 exit(EXIT_FAILURE); |
62 } | 62 } |
63 | 63 |
64 static void set_roi_map(const vpx_codec_enc_cfg_t *cfg, | 64 static void set_roi_map(const vpx_codec_enc_cfg_t *cfg, |
65 vpx_codec_ctx_t *codec) { | 65 vpx_codec_ctx_t *codec) { |
66 unsigned int i; | 66 unsigned int i; |
67 vpx_roi_map_t roi; | 67 vpx_roi_map_t roi; |
68 memset(&roi, 0, sizeof(roi)); | 68 memset(&roi, 0, sizeof(roi)); |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 printf("Processed %d frames.\n", frame_count); | 246 printf("Processed %d frames.\n", frame_count); |
247 | 247 |
248 vpx_img_free(&raw); | 248 vpx_img_free(&raw); |
249 if (vpx_codec_destroy(&codec)) | 249 if (vpx_codec_destroy(&codec)) |
250 die_codec(&codec, "Failed to destroy codec."); | 250 die_codec(&codec, "Failed to destroy codec."); |
251 | 251 |
252 vpx_video_writer_close(writer); | 252 vpx_video_writer_close(writer); |
253 | 253 |
254 return EXIT_SUCCESS; | 254 return EXIT_SUCCESS; |
255 } | 255 } |
OLD | NEW |