| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 ref.frame_type = VP8_LAST_FRAME; | 171 ref.frame_type = VP8_LAST_FRAME; |
| 172 ref.img = raw; | 172 ref.img = raw; |
| 173 if (vpx_codec_control(&codec, VP8_SET_REFERENCE, &ref)) | 173 if (vpx_codec_control(&codec, VP8_SET_REFERENCE, &ref)) |
| 174 die_codec(&codec, "Failed to set reference frame"); | 174 die_codec(&codec, "Failed to set reference frame"); |
| 175 } | 175 } |
| 176 | 176 |
| 177 encode_frame(&codec, &raw, frame_count++, writer); | 177 encode_frame(&codec, &raw, frame_count++, writer); |
| 178 } | 178 } |
| 179 | 179 |
| 180 // Flush encoder. | 180 // Flush encoder. |
| 181 while (encode_frame(&codec, NULL, -1, writer)) {}; | 181 while (encode_frame(&codec, NULL, -1, writer)) {} |
| 182 | 182 |
| 183 printf("\n"); | 183 printf("\n"); |
| 184 fclose(infile); | 184 fclose(infile); |
| 185 printf("Processed %d frames.\n", frame_count); | 185 printf("Processed %d frames.\n", frame_count); |
| 186 | 186 |
| 187 vpx_img_free(&raw); | 187 vpx_img_free(&raw); |
| 188 if (vpx_codec_destroy(&codec)) | 188 if (vpx_codec_destroy(&codec)) |
| 189 die_codec(&codec, "Failed to destroy codec."); | 189 die_codec(&codec, "Failed to destroy codec."); |
| 190 | 190 |
| 191 vpx_video_writer_close(writer); | 191 vpx_video_writer_close(writer); |
| 192 | 192 |
| 193 return EXIT_SUCCESS; | 193 return EXIT_SUCCESS; |
| 194 } | 194 } |
| OLD | NEW |