| 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 738 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 749 if (input->detect.buf_read == 4 | 749 if (input->detect.buf_read == 4 |
| 750 && file_is_y4m(input->detect.buf)) { | 750 && file_is_y4m(input->detect.buf)) { |
| 751 if (y4m_input_open(&input->y4m, input->file, input->detect.buf, 4, | 751 if (y4m_input_open(&input->y4m, input->file, input->detect.buf, 4, |
| 752 input->only_i420) >= 0) { | 752 input->only_i420) >= 0) { |
| 753 input->file_type = FILE_TYPE_Y4M; | 753 input->file_type = FILE_TYPE_Y4M; |
| 754 input->width = input->y4m.pic_w; | 754 input->width = input->y4m.pic_w; |
| 755 input->height = input->y4m.pic_h; | 755 input->height = input->y4m.pic_h; |
| 756 input->framerate.numerator = input->y4m.fps_n; | 756 input->framerate.numerator = input->y4m.fps_n; |
| 757 input->framerate.denominator = input->y4m.fps_d; | 757 input->framerate.denominator = input->y4m.fps_d; |
| 758 input->fmt = input->y4m.vpx_fmt; | 758 input->fmt = input->y4m.vpx_fmt; |
| 759 input->bit_depth = input->y4m.bit_depth; |
| 759 } else | 760 } else |
| 760 fatal("Unsupported Y4M stream."); | 761 fatal("Unsupported Y4M stream."); |
| 761 } else if (input->detect.buf_read == 4 && fourcc_is_ivf(input->detect.buf)) { | 762 } else if (input->detect.buf_read == 4 && fourcc_is_ivf(input->detect.buf)) { |
| 762 fatal("IVF is not supported as input."); | 763 fatal("IVF is not supported as input."); |
| 763 } else { | 764 } else { |
| 764 input->file_type = FILE_TYPE_RAW; | 765 input->file_type = FILE_TYPE_RAW; |
| 765 } | 766 } |
| 766 } | 767 } |
| 767 | 768 |
| 768 | 769 |
| (...skipping 757 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1526 | 1527 |
| 1527 exec_name = argv_[0]; | 1528 exec_name = argv_[0]; |
| 1528 | 1529 |
| 1529 if (argc < 3) | 1530 if (argc < 3) |
| 1530 usage_exit(); | 1531 usage_exit(); |
| 1531 | 1532 |
| 1532 /* Setup default input stream settings */ | 1533 /* Setup default input stream settings */ |
| 1533 input.framerate.numerator = 30; | 1534 input.framerate.numerator = 30; |
| 1534 input.framerate.denominator = 1; | 1535 input.framerate.denominator = 1; |
| 1535 input.only_i420 = 1; | 1536 input.only_i420 = 1; |
| 1537 input.bit_depth = 0; |
| 1536 | 1538 |
| 1537 /* First parse the global configuration values, because we want to apply | 1539 /* First parse the global configuration values, because we want to apply |
| 1538 * other parameters on top of the default configuration provided by the | 1540 * other parameters on top of the default configuration provided by the |
| 1539 * codec. | 1541 * codec. |
| 1540 */ | 1542 */ |
| 1541 argv = argv_dup(argc - 1, argv_ + 1); | 1543 argv = argv_dup(argc - 1, argv_ + 1); |
| 1542 parse_global_config(&global, argv); | 1544 parse_global_config(&global, argv); |
| 1543 | 1545 |
| 1544 input.fmt = global.use_i420 ? VPX_IMG_FMT_I420 : VPX_IMG_FMT_YV12; | 1546 input.fmt = global.use_i420 ? VPX_IMG_FMT_I420 : VPX_IMG_FMT_YV12; |
| 1545 | 1547 |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1803 } | 1805 } |
| 1804 fclose(f); | 1806 fclose(f); |
| 1805 }); | 1807 }); |
| 1806 #endif | 1808 #endif |
| 1807 | 1809 |
| 1808 vpx_img_free(&raw); | 1810 vpx_img_free(&raw); |
| 1809 free(argv); | 1811 free(argv); |
| 1810 free(streams); | 1812 free(streams); |
| 1811 return res ? EXIT_FAILURE : EXIT_SUCCESS; | 1813 return res ? EXIT_FAILURE : EXIT_SUCCESS; |
| 1812 } | 1814 } |
| OLD | NEW |