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

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

Issue 394353005: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 5 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_with_drops.c ('k') | source/libvpx/examples/set_maps.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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 if (!(outfile = fopen(argv[2], "wb"))) 80 if (!(outfile = fopen(argv[2], "wb")))
81 die("Failed to open %s for writing", argv[2]); 81 die("Failed to open %s for writing", argv[2]);
82 82
83 info = vpx_video_reader_get_info(reader); 83 info = vpx_video_reader_get_info(reader);
84 84
85 decoder = get_vpx_decoder_by_fourcc(info->codec_fourcc); 85 decoder = get_vpx_decoder_by_fourcc(info->codec_fourcc);
86 if (!decoder) 86 if (!decoder)
87 die("Unknown input codec."); 87 die("Unknown input codec.");
88 88
89 printf("Using %s\n", vpx_codec_iface_name(decoder->interface())); 89 printf("Using %s\n", vpx_codec_iface_name(decoder->codec_interface()));
90 90
91 res = vpx_codec_dec_init(&codec, decoder->interface(), NULL, 91 res = vpx_codec_dec_init(&codec, decoder->codec_interface(), NULL,
92 VPX_CODEC_USE_POSTPROC); 92 VPX_CODEC_USE_POSTPROC);
93 if (res == VPX_CODEC_INCAPABLE) 93 if (res == VPX_CODEC_INCAPABLE)
94 die_codec(&codec, "Postproc not supported by this decoder."); 94 die_codec(&codec, "Postproc not supported by this decoder.");
95 95
96 if (res) 96 if (res)
97 die_codec(&codec, "Failed to initialize decoder."); 97 die_codec(&codec, "Failed to initialize decoder.");
98 98
99 while (vpx_video_reader_read_frame(reader)) { 99 while (vpx_video_reader_read_frame(reader)) {
100 vpx_codec_iter_t iter = NULL; 100 vpx_codec_iter_t iter = NULL;
101 vpx_image_t *img = NULL; 101 vpx_image_t *img = NULL;
(...skipping 29 matching lines...) Expand all
131 die_codec(&codec, "Failed to destroy codec"); 131 die_codec(&codec, "Failed to destroy codec");
132 132
133 printf("Play: ffplay -f rawvideo -pix_fmt yuv420p -s %dx%d %s\n", 133 printf("Play: ffplay -f rawvideo -pix_fmt yuv420p -s %dx%d %s\n",
134 info->frame_width, info->frame_height, argv[2]); 134 info->frame_width, info->frame_height, argv[2]);
135 135
136 vpx_video_reader_close(reader); 136 vpx_video_reader_close(reader);
137 137
138 fclose(outfile); 138 fclose(outfile);
139 return EXIT_SUCCESS; 139 return EXIT_SUCCESS;
140 } 140 }
OLDNEW
« no previous file with comments | « source/libvpx/examples/decode_with_drops.c ('k') | source/libvpx/examples/set_maps.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698