| 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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 104     mem_put_le32(header+8, pts >> 32); | 104     mem_put_le32(header+8, pts >> 32); | 
| 105 | 105 | 
| 106     if(fwrite(header, 1, 12, outfile)); | 106     if(fwrite(header, 1, 12, outfile)); | 
| 107 } | 107 } | 
| 108 | 108 | 
| 109 int main(int argc, char **argv) { | 109 int main(int argc, char **argv) { | 
| 110     FILE                *infile, *outfile; | 110     FILE                *infile, *outfile; | 
| 111     vpx_codec_ctx_t      codec; | 111     vpx_codec_ctx_t      codec; | 
| 112     vpx_codec_enc_cfg_t  cfg; | 112     vpx_codec_enc_cfg_t  cfg; | 
| 113     int                  frame_cnt = 0; | 113     int                  frame_cnt = 0; | 
| 114     unsigned char        file_hdr[IVF_FILE_HDR_SZ]; |  | 
| 115     unsigned char        frame_hdr[IVF_FRAME_HDR_SZ]; |  | 
| 116     vpx_image_t          raw; | 114     vpx_image_t          raw; | 
| 117     vpx_codec_err_t      res; | 115     vpx_codec_err_t      res; | 
| 118     long                 width; | 116     long                 width; | 
| 119     long                 height; | 117     long                 height; | 
| 120     int                  frame_avail; | 118     int                  frame_avail; | 
| 121     int                  got_data; | 119     int                  got_data; | 
| 122     int                  flags = 0; | 120     int                  flags = 0; | 
| 123 @@@@TWOPASS_VARS | 121 @@@@TWOPASS_VARS | 
| 124 | 122 | 
| 125     /* Open files */ | 123     /* Open files */ | 
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 179 | 177 | 
| 180     printf("Processed %d frames.\n",frame_cnt-1); | 178     printf("Processed %d frames.\n",frame_cnt-1); | 
| 181 @@@@DESTROY | 179 @@@@DESTROY | 
| 182 | 180 | 
| 183     /* Try to rewrite the file header with the actual frame count */ | 181     /* Try to rewrite the file header with the actual frame count */ | 
| 184     if(!fseek(outfile, 0, SEEK_SET)) | 182     if(!fseek(outfile, 0, SEEK_SET)) | 
| 185         write_ivf_file_header(outfile, &cfg, frame_cnt-1); | 183         write_ivf_file_header(outfile, &cfg, frame_cnt-1); | 
| 186     fclose(outfile); | 184     fclose(outfile); | 
| 187     return EXIT_SUCCESS; | 185     return EXIT_SUCCESS; | 
| 188 } | 186 } | 
| OLD | NEW | 
|---|