Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Side by Side Diff: source/libvpx/examples/decode_with_drops.c

Issue 181493009: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « source/libvpx/examples/decode_to_md5.c ('k') | source/libvpx/examples/error_resilient.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 if (vpx_codec_dec_init(&codec, decoder->interface(), NULL, 0)) 113 if (vpx_codec_dec_init(&codec, decoder->interface(), NULL, 0))
114 die_codec(&codec, "Failed to initialize decoder."); 114 die_codec(&codec, "Failed to initialize decoder.");
115 115
116 while (vpx_video_reader_read_frame(reader)) { 116 while (vpx_video_reader_read_frame(reader)) {
117 vpx_codec_iter_t iter = NULL; 117 vpx_codec_iter_t iter = NULL;
118 vpx_image_t *img = NULL; 118 vpx_image_t *img = NULL;
119 size_t frame_size = 0; 119 size_t frame_size = 0;
120 int skip; 120 int skip;
121 const unsigned char *frame = vpx_video_reader_get_frame(reader, 121 const unsigned char *frame = vpx_video_reader_get_frame(reader,
122 &frame_size); 122 &frame_size);
123 if (vpx_codec_decode(&codec, frame, frame_size, NULL, 0)) 123 if (vpx_codec_decode(&codec, frame, (unsigned int)frame_size, NULL, 0))
124 die_codec(&codec, "Failed to decode frame."); 124 die_codec(&codec, "Failed to decode frame.");
125 125
126 ++frame_cnt; 126 ++frame_cnt;
127 127
128 skip = (is_range && frame_cnt >= n && frame_cnt <= m) || 128 skip = (is_range && frame_cnt >= n && frame_cnt <= m) ||
129 (!is_range && m - (frame_cnt - 1) % m <= n); 129 (!is_range && m - (frame_cnt - 1) % m <= n);
130 130
131 if (!skip) { 131 if (!skip) {
132 putc('.', stdout); 132 putc('.', stdout);
133 133
(...skipping 11 matching lines...) Expand all
145 die_codec(&codec, "Failed to destroy codec."); 145 die_codec(&codec, "Failed to destroy codec.");
146 146
147 printf("Play: ffplay -f rawvideo -pix_fmt yuv420p -s %dx%d %s\n", 147 printf("Play: ffplay -f rawvideo -pix_fmt yuv420p -s %dx%d %s\n",
148 info->frame_width, info->frame_height, argv[2]); 148 info->frame_width, info->frame_height, argv[2]);
149 149
150 vpx_video_reader_close(reader); 150 vpx_video_reader_close(reader);
151 fclose(outfile); 151 fclose(outfile);
152 152
153 return EXIT_SUCCESS; 153 return EXIT_SUCCESS;
154 } 154 }
OLDNEW
« no previous file with comments | « source/libvpx/examples/decode_to_md5.c ('k') | source/libvpx/examples/error_resilient.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698