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

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

Issue 592203002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years, 2 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/twopass_encoder.c ('k') | source/libvpx/examples/vp8cx_set_ref.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
11 11
12 // This is an example demonstrating multi-resolution encoding in VP8. 12 // This is an example demonstrating multi-resolution encoding in VP8.
13 // High-resolution input video is down-sampled to lower-resolutions. The 13 // High-resolution input video is down-sampled to lower-resolutions. The
14 // encoder then encodes the video and outputs multiple bitstreams with 14 // encoder then encodes the video and outputs multiple bitstreams with
15 // different resolutions. 15 // different resolutions.
16 // 16 //
17 // Configure with --enable-multi-res-encoding flag to enable this example. 17 // Configure with --enable-multi-res-encoding flag to enable this example.
18 18
19 #include <stdio.h> 19 #include <stdio.h>
20 #include <stdlib.h> 20 #include <stdlib.h>
21 #include <string.h> 21 #include <string.h>
22 22
23 #include "third_party/libyuv/include/libyuv/basic_types.h" 23 #include "third_party/libyuv/include/libyuv/basic_types.h"
24 #include "third_party/libyuv/include/libyuv/scale.h" 24 #include "third_party/libyuv/include/libyuv/scale.h"
25 #include "third_party/libyuv/include/libyuv/cpu_id.h" 25 #include "third_party/libyuv/include/libyuv/cpu_id.h"
26 26
27 #define VPX_CODEC_DISABLE_COMPAT 1
28 #include "vpx/vpx_encoder.h" 27 #include "vpx/vpx_encoder.h"
29 #include "vpx/vp8cx.h" 28 #include "vpx/vp8cx.h"
30 29
31 #include "./tools_common.h" 30 #include "./tools_common.h"
32 #include "./video_writer.h" 31 #include "./video_writer.h"
33 32
34 // The input video frame is downsampled several times to generate a 33 // The input video frame is downsampled several times to generate a
35 // multi-level hierarchical structure. kNumEncoders is defined as the number 34 // multi-level hierarchical structure. kNumEncoders is defined as the number
36 // of encoding levels required. For example, if the size of input video is 35 // of encoding levels required. For example, if the size of input video is
37 // 1280x720, kNumEncoders is 3, and down-sampling factor is 2, the encoder 36 // 1280x720, kNumEncoders is 3, and down-sampling factor is 2, the encoder
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 if (vpx_codec_destroy(&codec[i])) 290 if (vpx_codec_destroy(&codec[i]))
292 die_codec(&codec[i], "Failed to destroy codec"); 291 die_codec(&codec[i], "Failed to destroy codec");
293 292
294 vpx_img_free(&raw[i]); 293 vpx_img_free(&raw[i]);
295 vpx_video_writer_close(writers[i]); 294 vpx_video_writer_close(writers[i]);
296 } 295 }
297 printf("\n"); 296 printf("\n");
298 297
299 return EXIT_SUCCESS; 298 return EXIT_SUCCESS;
300 } 299 }
OLDNEW
« no previous file with comments | « source/libvpx/examples/twopass_encoder.c ('k') | source/libvpx/examples/vp8cx_set_ref.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698