| 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 19 matching lines...) Expand all Loading... |
| 30 #include <assert.h> | 30 #include <assert.h> |
| 31 #include <sys/time.h> | 31 #include <sys/time.h> |
| 32 #if USE_POSIX_MMAP | 32 #if USE_POSIX_MMAP |
| 33 #include <sys/types.h> | 33 #include <sys/types.h> |
| 34 #include <sys/stat.h> | 34 #include <sys/stat.h> |
| 35 #include <sys/mman.h> | 35 #include <sys/mman.h> |
| 36 #include <fcntl.h> | 36 #include <fcntl.h> |
| 37 #include <unistd.h> | 37 #include <unistd.h> |
| 38 #endif | 38 #endif |
| 39 #include "vpx_ports/vpx_timer.h" | 39 #include "vpx_ports/vpx_timer.h" |
| 40 #define VPX_CODEC_DISABLE_COMPAT 1 | |
| 41 #include "vpx/vpx_encoder.h" | 40 #include "vpx/vpx_encoder.h" |
| 42 #include "vpx/vp8cx.h" | 41 #include "vpx/vp8cx.h" |
| 43 #include "vpx_ports/mem_ops.h" | 42 #include "vpx_ports/mem_ops.h" |
| 44 #include "./tools_common.h" | 43 #include "../tools_common.h" |
| 45 #define interface (vpx_codec_vp8_cx()) | 44 #define interface (vpx_codec_vp8_cx()) |
| 46 #define fourcc 0x30385056 | 45 #define fourcc 0x30385056 |
| 47 | 46 |
| 48 void usage_exit() { | 47 void usage_exit(void) { |
| 49 exit(EXIT_FAILURE); | 48 exit(EXIT_FAILURE); |
| 50 } | 49 } |
| 51 | 50 |
| 52 /* | 51 /* |
| 53 * The input video frame is downsampled several times to generate a multi-level | 52 * The input video frame is downsampled several times to generate a multi-level |
| 54 * hierarchical structure. NUM_ENCODERS is defined as the number of encoding | 53 * hierarchical structure. NUM_ENCODERS is defined as the number of encoding |
| 55 * levels required. For example, if the size of input video is 1280x720, | 54 * levels required. For example, if the size of input video is 1280x720, |
| 56 * NUM_ENCODERS is 3, and down-sampling factor is 2, the encoder outputs 3 | 55 * NUM_ENCODERS is 3, and down-sampling factor is 2, the encoder outputs 3 |
| 57 * bitstreams with resolution of 1280x720(level 0), 640x360(level 1), and | 56 * bitstreams with resolution of 1280x720(level 0), 640x360(level 1), and |
| 58 * 320x180(level 2) respectively. | 57 * 320x180(level 2) respectively. |
| (...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 728 | 727 |
| 729 /* Try to rewrite the file header with the actual frame count */ | 728 /* Try to rewrite the file header with the actual frame count */ |
| 730 if(!fseek(outfile[i], 0, SEEK_SET)) | 729 if(!fseek(outfile[i], 0, SEEK_SET)) |
| 731 write_ivf_file_header(outfile[i], &cfg[i], frame_cnt-1); | 730 write_ivf_file_header(outfile[i], &cfg[i], frame_cnt-1); |
| 732 fclose(outfile[i]); | 731 fclose(outfile[i]); |
| 733 } | 732 } |
| 734 printf("\n"); | 733 printf("\n"); |
| 735 | 734 |
| 736 return EXIT_SUCCESS; | 735 return EXIT_SUCCESS; |
| 737 } | 736 } |
| OLD | NEW |