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 |
11 #include <assert.h> | 11 #include <assert.h> |
12 #include <stdio.h> | 12 #include <stdio.h> |
13 #include <stdlib.h> | 13 #include <stdlib.h> |
14 #include <stdarg.h> | 14 #include <stdarg.h> |
15 #include <string.h> | 15 #include <string.h> |
16 #include <limits.h> | 16 #include <limits.h> |
17 | 17 |
18 #include "./vpx_config.h" | 18 #include "./vpx_config.h" |
19 | 19 |
20 #if CONFIG_LIBYUV | 20 #if CONFIG_LIBYUV |
21 #include "third_party/libyuv/include/libyuv/scale.h" | 21 #include "third_party/libyuv/include/libyuv/scale.h" |
22 #endif | 22 #endif |
23 | 23 |
24 #include "./args.h" | 24 #include "./args.h" |
25 #include "./ivfdec.h" | 25 #include "./ivfdec.h" |
26 | 26 |
27 #define VPX_CODEC_DISABLE_COMPAT 1 | |
28 #include "vpx/vpx_decoder.h" | 27 #include "vpx/vpx_decoder.h" |
29 #include "vpx_ports/mem_ops.h" | 28 #include "vpx_ports/mem_ops.h" |
30 #include "vpx_ports/vpx_timer.h" | 29 #include "vpx_ports/vpx_timer.h" |
31 | 30 |
32 #if CONFIG_VP8_DECODER || CONFIG_VP9_DECODER | 31 #if CONFIG_VP8_DECODER || CONFIG_VP9_DECODER |
33 #include "vpx/vp8dx.h" | 32 #include "vpx/vp8dx.h" |
34 #endif | 33 #endif |
35 | 34 |
36 #include "./md5_utils.h" | 35 #include "./md5_utils.h" |
37 | 36 |
(...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 for (i = 0; i < ext_fb_list->num_external_frame_buffers; ++i) { | 377 for (i = 0; i < ext_fb_list->num_external_frame_buffers; ++i) { |
379 if (!ext_fb_list->ext_fb[i].in_use) | 378 if (!ext_fb_list->ext_fb[i].in_use) |
380 break; | 379 break; |
381 } | 380 } |
382 | 381 |
383 if (i == ext_fb_list->num_external_frame_buffers) | 382 if (i == ext_fb_list->num_external_frame_buffers) |
384 return -1; | 383 return -1; |
385 | 384 |
386 if (ext_fb_list->ext_fb[i].size < min_size) { | 385 if (ext_fb_list->ext_fb[i].size < min_size) { |
387 free(ext_fb_list->ext_fb[i].data); | 386 free(ext_fb_list->ext_fb[i].data); |
388 ext_fb_list->ext_fb[i].data = (uint8_t *)malloc(min_size); | 387 ext_fb_list->ext_fb[i].data = (uint8_t *)calloc(min_size, sizeof(uint8_t)); |
389 if (!ext_fb_list->ext_fb[i].data) | 388 if (!ext_fb_list->ext_fb[i].data) |
390 return -1; | 389 return -1; |
391 | 390 |
392 ext_fb_list->ext_fb[i].size = min_size; | 391 ext_fb_list->ext_fb[i].size = min_size; |
393 } | 392 } |
394 | 393 |
395 fb->data = ext_fb_list->ext_fb[i].data; | 394 fb->data = ext_fb_list->ext_fb[i].data; |
396 fb->size = ext_fb_list->ext_fb[i].size; | 395 fb->size = ext_fb_list->ext_fb[i].size; |
397 ext_fb_list->ext_fb[i].in_use = 1; | 396 ext_fb_list->ext_fb[i].in_use = 1; |
398 | 397 |
(...skipping 887 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1286 if (arg_match(&arg, &looparg, argi)) { | 1285 if (arg_match(&arg, &looparg, argi)) { |
1287 loops = arg_parse_uint(&arg); | 1286 loops = arg_parse_uint(&arg); |
1288 break; | 1287 break; |
1289 } | 1288 } |
1290 } | 1289 } |
1291 free(argv); | 1290 free(argv); |
1292 for (i = 0; !error && i < loops; i++) | 1291 for (i = 0; !error && i < loops; i++) |
1293 error = main_loop(argc, argv_); | 1292 error = main_loop(argc, argv_); |
1294 return error; | 1293 return error; |
1295 } | 1294 } |
OLD | NEW |